2025-01-22 16:18:30 +01:00
|
|
|
from lnx.logicnode.lnx_nodes import *
|
|
|
|
|
|
|
|
|
|
class GetObjectTraitsNode(LnxLogicTreeNode):
|
|
|
|
|
"""Returns all traits from the given object."""
|
|
|
|
|
bl_idname = 'LNGetObjectTraitsNode'
|
|
|
|
|
bl_label = 'Get Object Traits'
|
2026-09-04 10:46:13 -07:00
|
|
|
lnx_version = 2
|
2025-01-22 16:18:30 +01:00
|
|
|
|
|
|
|
|
def lnx_init(self, context):
|
|
|
|
|
self.add_input('LnxNodeSocketObject', 'Object')
|
|
|
|
|
|
|
|
|
|
self.add_output('LnxNodeSocketArray', 'Traits')
|
2026-09-04 10:46:13 -07:00
|
|
|
self.add_output('LnxIntSocket', 'Length')
|
|
|
|
|
|
|
|
|
|
def get_replacement_node(self, node_tree: bpy.types.NodeTree):
|
|
|
|
|
return NodeReplacement.Identity(self)
|