Merge branch 'pythongosssss:main' into main
This commit is contained in:
@@ -130,7 +130,7 @@ class MathExpression:
|
||||
return target.shape[2]
|
||||
return target.shape[1]
|
||||
|
||||
def evaluate(self, expression, extra_pnginfo, prompt, a=None, b=None, c=None):
|
||||
def evaluate(self, expression, prompt, extra_pnginfo={}, a=None, b=None, c=None):
|
||||
expression = expression.replace('\n', ' ').replace('\r', '')
|
||||
node = ast.parse(expression, mode='eval').body
|
||||
|
||||
|
||||
+18
-5
@@ -48,12 +48,25 @@ app.registerExtension({
|
||||
});
|
||||
picker.onchange = () => {
|
||||
if (activeNode) {
|
||||
if (activeNode.constructor === LiteGraph.LGraphGroup) {
|
||||
activeNode.color = picker.value;
|
||||
} else {
|
||||
activeNode.color = colorShade(picker.value, 20);
|
||||
activeNode.bgcolor = picker.value;
|
||||
const fApplyColor = function(node){
|
||||
if (picker.value) {
|
||||
if (node.constructor === LiteGraph.LGraphGroup) {
|
||||
node.color = picker.value;
|
||||
} else {
|
||||
node.color = colorShade(picker.value, 20);
|
||||
node.bgcolor = picker.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
const graphcanvas = LGraphCanvas.active_canvas;
|
||||
if (!graphcanvas.selected_nodes || Object.keys(graphcanvas.selected_nodes).length <= 1){
|
||||
fApplyColor(activeNode);
|
||||
} else {
|
||||
for (let i in graphcanvas.selected_nodes) {
|
||||
fApplyColor(graphcanvas.selected_nodes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
activeNode.setDirtyCanvas(true, true);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user