armory/blender/arm/logicnode/logic_function_output.py
Zicklag f00b72836b Add Functions and Function Calls to Logic Nodes
* Renamed Call Haxe node to Call Function because it will now be able
to call node functions as well.
 * Added ability to pass arguments to the Call Function node.
 * Created Function and Function output nodes that allow you to create
functions in node trees. Node functions can be called from other nodes
and from Haxe.
2018-11-04 09:00:38 -06:00

23 lines
653 B
Python

import bpy
from bpy.props import *
from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
class FunctionOutputNode(Node, ArmLogicTreeNode):
'''Function output node'''
bl_idname = 'LNFunctionOutputNode'
bl_label = 'Function Output'
bl_icon = 'CURVE_PATH'
def init(self, context):
self.inputs.new('ArmNodeSocketAction', 'In')
self.inputs.new('NodeSocketShader', 'Value')
function_name = StringProperty(name="Name")
def draw_buttons(self, context, layout):
row = layout.row(align=True)
row.prop(self, 'function_name')
add_node(FunctionOutputNode, category='Logic')