ef4dbd7611
1. Modification of CanvasScript and WasmScript classes: added a field to save the name of the script / file in the class. 2. Added logical nodes for working with Traits. - Get Object Traits - gets an array of Traits for the specified object; - Get Trait Name - get the Trait name (the name that appears in the list in Armory Traits) and its type (Canvas, Wasm, Bundle, LogicNode or Haxe).
14 lines
484 B
Python
14 lines
484 B
Python
from arm.logicnode.arm_nodes import *
|
|
|
|
class GetObjectTraitsNode(ArmLogicTreeNode):
|
|
"""Returns the children of the given object."""
|
|
bl_idname = 'LNGetObjectTraitsNode'
|
|
bl_label = 'Get Object Traits'
|
|
arm_version = 1
|
|
|
|
def init(self, context):
|
|
super(GetObjectTraitsNode, self).init(context)
|
|
self.add_input('ArmNodeSocketObject', 'Object')
|
|
self.add_output('ArmNodeSocketArray', 'Traits')
|
|
|
|
add_node(GetObjectTraitsNode, category=PKG_AS_CATEGORY) |