Skip to content

Commit

Permalink
Add Multi Execute node
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahrkeenerh committed Aug 27, 2022
1 parent 3912c35 commit f255dda
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions extended_scripting/Program/Multi Execute.py
Original file line number Diff line number Diff line change
@@ -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}"
4 changes: 2 additions & 2 deletions extended_scripting/package_info.json
Original file line number Diff line number Diff line change
@@ -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"
}
Binary file modified serpens_dev.blend
Binary file not shown.

0 comments on commit f255dda

Please sign in to comment.