Update Files

This commit is contained in:
2025-01-22 16:18:30 +01:00
parent ed4603cf95
commit a36294b518
16718 changed files with 2960346 additions and 0 deletions

View File

@ -0,0 +1,14 @@
from lnx.logicnode.lnx_nodes import *
class AddTraitNode(LnxLogicTreeNode):
"""Adds trait to the given object."""
bl_idname = 'LNAddTraitNode'
bl_label = 'Add Trait to Object'
lnx_version = 2
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Object')
self.add_input('LnxStringSocket', 'Trait')
self.add_output('LnxNodeSocketAction', 'Out')

View File

@ -0,0 +1,14 @@
from lnx.logicnode.lnx_nodes import *
class GetTraitNode(LnxLogicTreeNode):
"""Searches for a trait with the specified name which is applied to the
given object and returns that trait."""
bl_idname = 'LNGetTraitNode'
bl_label = 'Get Object Trait'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'Object')
self.add_input('LnxStringSocket', 'Name')
self.add_output('LnxDynamicSocket', 'Trait')

View File

@ -0,0 +1,12 @@
from lnx.logicnode.lnx_nodes import *
class GetObjectTraitsNode(LnxLogicTreeNode):
"""Returns all traits from the given object."""
bl_idname = 'LNGetObjectTraitsNode'
bl_label = 'Get Object Traits'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketObject', 'Object')
self.add_output('LnxNodeSocketArray', 'Traits')

View File

@ -0,0 +1,13 @@
from lnx.logicnode.lnx_nodes import *
class GetTraitNameNode(LnxLogicTreeNode):
"""Returns the name and the class type of the given trait."""
bl_idname = 'LNGetTraitNameNode'
bl_label = 'Get Trait Name'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxDynamicSocket', 'Trait')
self.add_output('LnxStringSocket', 'Name')
self.add_output('LnxStringSocket', 'Class Type')

View File

@ -0,0 +1,12 @@
from lnx.logicnode.lnx_nodes import *
class GetTraitPausedNode(LnxLogicTreeNode):
"""Returns whether the given trait is paused."""
bl_idname = 'LNGetTraitPausedNode'
bl_label = 'Get Trait Paused'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxDynamicSocket', 'Trait')
self.add_output('LnxBoolSocket', 'Is Paused')

View File

@ -0,0 +1,13 @@
from lnx.logicnode.lnx_nodes import *
class RemoveTraitNode(LnxLogicTreeNode):
"""Removes the given trait."""
bl_idname = 'LNRemoveTraitNode'
bl_label = 'Remove Trait'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxDynamicSocket', 'Trait')
self.add_output('LnxNodeSocketAction', 'Out')

View File

@ -0,0 +1,14 @@
from lnx.logicnode.lnx_nodes import *
class RemoveTraitObjectNode(LnxLogicTreeNode):
"""Remove trait from the given object."""
bl_idname = 'LNRemoveTraitObjectNode'
bl_label = 'Remove Trait from Object'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Object')
self.add_input('LnxStringSocket', 'Trait')
self.add_output('LnxNodeSocketAction', 'Out')

View File

@ -0,0 +1,10 @@
from lnx.logicnode.lnx_nodes import *
class SelfTraitNode(LnxLogicTreeNode):
"""Returns the trait that owns this node."""
bl_idname = 'LNSelfTraitNode'
bl_label = 'Self Trait'
lnx_version = 1
def lnx_init(self, context):
self.add_output('LnxDynamicSocket', 'Trait')

View File

@ -0,0 +1,14 @@
from lnx.logicnode.lnx_nodes import *
class SetTraitPausedNode(LnxLogicTreeNode):
"""Sets the paused state of the given trait."""
bl_idname = 'LNSetTraitPausedNode'
bl_label = 'Set Trait Paused'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxDynamicSocket', 'Trait')
self.add_input('LnxBoolSocket', 'Paused')
self.add_output('LnxNodeSocketAction', 'Out')

View File

@ -0,0 +1,21 @@
from lnx.logicnode.lnx_nodes import *
class TraitNode(LnxLogicVariableNodeMixin, LnxLogicTreeNode):
"""Stores the given trait as a variable. If the trait was not found or
was not exported, an error is thrown ([more information](https://github.com/leenkx3d/leenkx/wiki/troubleshooting#trait-not-exported)).
"""
bl_idname = 'LNTraitNode'
bl_label = 'Trait'
lnx_version = 1
property0: HaxeStringProperty('property0', name='', default='')
def lnx_init(self, context):
self.add_output('LnxDynamicSocket', 'Trait', is_var=True)
def draw_content(self, context, layout):
layout.prop(self, 'property0')
def synchronize_from_master(self, master_node: LnxLogicVariableNodeMixin):
self.property0 = master_node.property0