armory/blender/arm/logicnode/action_set_property.py

20 lines
625 B
Python
Raw Normal View History

2017-04-03 22:29:46 +02:00
import bpy
from bpy.props import *
from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
2017-04-04 23:11:31 +02:00
class SetPropertyNode(Node, ArmLogicTreeNode):
'''Set property node'''
bl_idname = 'LNSetPropertyNode'
bl_label = 'Set Property'
2017-04-03 22:29:46 +02:00
bl_icon = 'GAME'
def init(self, context):
2017-04-08 20:05:35 +02:00
self.inputs.new('ArmNodeSocketAction', 'In')
2017-04-08 00:34:45 +02:00
self.inputs.new('ArmNodeSocketObject', 'Object')
self.inputs.new('NodeSocketString', 'Property')
self.inputs.new('NodeSocketShader', 'Value')
2017-04-08 20:05:35 +02:00
self.outputs.new('ArmNodeSocketAction', 'Out')
2017-04-03 22:29:46 +02:00
2017-05-06 00:22:15 +02:00
add_node(SetPropertyNode, category='Action')