2017-04-08 00:34:45 +02:00
|
|
|
import bpy
|
|
|
|
from bpy.props import *
|
|
|
|
from bpy.types import Node, NodeSocket
|
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
|
|
|
class ExpressionNode(Node, ArmLogicTreeNode):
|
|
|
|
'''Expression node'''
|
|
|
|
bl_idname = 'LNExpressionNode'
|
|
|
|
bl_label = 'Expression'
|
|
|
|
bl_icon = 'GAME'
|
|
|
|
|
|
|
|
property0 = StringProperty(name='', default='')
|
|
|
|
|
|
|
|
def init(self, context):
|
2017-04-08 20:05:35 +02:00
|
|
|
self.inputs.new('ArmNodeSocketAction', 'In')
|
|
|
|
self.outputs.new('ArmNodeSocketAction', 'Out')
|
2017-04-08 00:34:45 +02:00
|
|
|
self.outputs.new('NodeSocketShader', 'Result')
|
|
|
|
|
|
|
|
def draw_buttons(self, context, layout):
|
|
|
|
layout.prop(self, 'property0')
|
|
|
|
|
|
|
|
add_node(ExpressionNode, category='Native')
|