Skip to content

Commit

Permalink
Improve documentation of object property nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzBrueckner committed Nov 7, 2023
1 parent f08461e commit dcda14c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
16 changes: 14 additions & 2 deletions blender/arm/logicnode/object/LN_get_object_property.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
from arm.logicnode.arm_nodes import *


class GetPropertyNode(ArmLogicTreeNode):
"""Returns the value of the given object property.
"""Return the value of the given object property. If the object is `null`
or the property does not exist on the object, the node returns `null`.
@input Object: The object to which the property belongs.
@input Property: The name of the property from which to get the value.
@output Value: The value of the property.
@output Property: The name of the property as stated in the `Property` input.
@see `Object Properties Panel > Armory Props > Properties` (do not confuse Armory object properties with Blender custom properties!)
@see [`iron.object.Object.properties`](https://api.armory3d.org/iron/object/Object.html#properties)
@seeNode Set Object Property"""
@seeNode Set Object Property
"""
bl_idname = 'LNGetPropertyNode'
bl_label = 'Get Object Property'
arm_version = 1
Expand Down
13 changes: 11 additions & 2 deletions blender/arm/logicnode/object/LN_set_object_property.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
from arm.logicnode.arm_nodes import *


class SetPropertyNode(ArmLogicTreeNode):
"""Sets the value of the given object property.
"""Set the value of the given object property.
This node can be used to share variables between different traits.
If the trait(s) you want to access the variable with are on
different objects, use the *[`Global Object`](#global-object)*
node to store the data. Every trait can access this one.
@seeNode Get Object Property"""
@input Object: The object to which the property belongs. If the object is `null`, the node does not do anything.
@input Property: The name of the property from which to get the value.
@input Value: The value of the property.
@see `Object Properties Panel > Armory Props > Properties` (do not confuse Armory object properties with Blender custom properties!)
@see [`iron.object.Object.properties`](https://api.armory3d.org/iron/object/Object.html#properties)
@seeNode Get Object Property
"""
bl_idname = 'LNSetPropertyNode'
bl_label = 'Set Object Property'
arm_section = 'props'
Expand Down

0 comments on commit dcda14c

Please sign in to comment.