diff --git a/extended_scripting/Program/Multi Execute.py b/extended_scripting/Program/Multi Execute.py new file mode 100644 index 0000000..9d9032d --- /dev/null +++ b/extended_scripting/Program/Multi Execute.py @@ -0,0 +1,23 @@ +import bpy +from ..base_node import SN_ScriptingBaseNode + + +class SN_MultiExecuteNode(bpy.types.Node, SN_ScriptingBaseNode): + + bl_idname = "SN_MultiExecuteNode" + bl_label = "Multi Execute" + node_color = "PROGRAM" + + def on_create(self, context): + self.add_execute_input() + self.add_execute_output() + self.add_dynamic_execute_input() + self.add_dynamic_execute_output() + + def on_dynamic_socket_add(self, socket): + socket.python_value = self.code + + def evaluate(self, context): + self.code = f"{self.outputs[0].python_value}" + for output in self.outputs[1:-1]: + self.code += f"\n{output.python_value}" diff --git a/extended_scripting/package_info.json b/extended_scripting/package_info.json index a4e8ac8..57b9179 100644 --- a/extended_scripting/package_info.json +++ b/extended_scripting/package_info.json @@ -1,7 +1,7 @@ { "name": "Extended Scripting", - "description": "Extends the Serpens scripting capabilities with new nodes.", + "description": "Extends Serpens scripting capabilities with new nodes.", "author": "Mahrkeenerh", - "version": "1.0.1", + "version": "1.1.0", "wiki": "https://github.com/Mahrkeenerh/SerpensExtendedScripting" } \ No newline at end of file diff --git a/serpens_dev.blend b/serpens_dev.blend index fe75908..d9adae5 100644 Binary files a/serpens_dev.blend and b/serpens_dev.blend differ