Update Files
This commit is contained in:
14
leenkx/blender/lnx/logicnode/trait/LN_add_trait_to_object.py
Normal file
14
leenkx/blender/lnx/logicnode/trait/LN_add_trait_to_object.py
Normal 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')
|
14
leenkx/blender/lnx/logicnode/trait/LN_get_object_trait.py
Normal file
14
leenkx/blender/lnx/logicnode/trait/LN_get_object_trait.py
Normal 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')
|
12
leenkx/blender/lnx/logicnode/trait/LN_get_object_traits.py
Normal file
12
leenkx/blender/lnx/logicnode/trait/LN_get_object_traits.py
Normal 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')
|
13
leenkx/blender/lnx/logicnode/trait/LN_get_trait_name.py
Normal file
13
leenkx/blender/lnx/logicnode/trait/LN_get_trait_name.py
Normal 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')
|
12
leenkx/blender/lnx/logicnode/trait/LN_get_trait_paused.py
Normal file
12
leenkx/blender/lnx/logicnode/trait/LN_get_trait_paused.py
Normal 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')
|
13
leenkx/blender/lnx/logicnode/trait/LN_remove_trait.py
Normal file
13
leenkx/blender/lnx/logicnode/trait/LN_remove_trait.py
Normal 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')
|
@ -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')
|
10
leenkx/blender/lnx/logicnode/trait/LN_self_trait.py
Normal file
10
leenkx/blender/lnx/logicnode/trait/LN_self_trait.py
Normal 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')
|
14
leenkx/blender/lnx/logicnode/trait/LN_set_trait_paused.py
Normal file
14
leenkx/blender/lnx/logicnode/trait/LN_set_trait_paused.py
Normal 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')
|
21
leenkx/blender/lnx/logicnode/trait/LN_trait.py
Normal file
21
leenkx/blender/lnx/logicnode/trait/LN_trait.py
Normal 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
|
0
leenkx/blender/lnx/logicnode/trait/__init__.py
Normal file
0
leenkx/blender/lnx/logicnode/trait/__init__.py
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user