2018-11-04 05:05:52 +01:00
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
2020-09-08 17:03:24 +02:00
|
|
|
|
2020-09-08 21:16:20 +02:00
|
|
|
class FunctionOutputNode(ArmLogicTreeNode):
|
2020-09-28 15:58:41 +02:00
|
|
|
"""Set the return value for the specified function.
|
|
|
|
|
|
|
|
@seeNode Function"""
|
2018-11-04 05:05:52 +01:00
|
|
|
bl_idname = 'LNFunctionOutputNode'
|
|
|
|
bl_label = 'Function Output'
|
2020-09-13 11:27:58 +02:00
|
|
|
arm_version = 1
|
2020-09-08 17:03:24 +02:00
|
|
|
|
2018-11-04 05:05:52 +01:00
|
|
|
def init(self, context):
|
2020-09-13 11:27:58 +02:00
|
|
|
super(FunctionOutputNode, self).init(context)
|
2020-09-08 21:49:02 +02:00
|
|
|
self.add_input('ArmNodeSocketAction', 'In')
|
|
|
|
self.add_input('NodeSocketShader', 'Value')
|
2018-11-04 05:05:52 +01:00
|
|
|
|
2018-12-18 23:48:38 +01:00
|
|
|
function_name: StringProperty(name="Name")
|
2018-11-04 05:05:52 +01:00
|
|
|
|
|
|
|
def draw_buttons(self, context, layout):
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(self, 'function_name')
|
|
|
|
|
2020-09-08 17:03:24 +02:00
|
|
|
|
2020-09-09 20:48:35 +02:00
|
|
|
add_node(FunctionOutputNode, category=PKG_AS_CATEGORY, section='function')
|