armory/blender/arm/logicnode/trait/LN_trait.py

19 lines
647 B
Python
Raw Normal View History

2017-04-14 20:38:50 +02:00
from arm.logicnode.arm_nodes import *
class TraitNode(ArmLogicTreeNode):
2020-10-05 20:06:10 +02:00
"""Stores the given trait as a variable. If the trait was not found or
2020-09-28 15:58:41 +02:00
was not exported, an error is thrown ([more information](https://github.com/armory3d/armory/wiki/troubleshooting#trait-not-exported)).
"""
2017-04-14 20:38:50 +02:00
bl_idname = 'LNTraitNode'
bl_label = 'Trait'
arm_version = 1
2017-04-14 20:38:50 +02:00
2018-12-18 23:48:38 +01:00
property0: StringProperty(name='', default='')
2017-04-14 20:38:50 +02:00
def init(self, context):
super(TraitNode, self).init(context)
2020-09-08 22:08:29 +02:00
self.add_output('NodeSocketShader', 'Trait', is_var=True)
2017-04-14 20:38:50 +02:00
def draw_buttons(self, context, layout):
layout.prop(self, 'property0')