Merge pull request #1897 from MoritzBrueckner/node-docs

Update node docstrings
This commit is contained in:
Lubos Lenco 2020-09-28 20:51:39 +02:00 committed by GitHub
commit 3bc39d82cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
140 changed files with 498 additions and 161 deletions

View file

@ -13,7 +13,7 @@ class ArrayAddNode extends LogicNode {
if (ar == null) return;
// "Modify Original" == `false` -> Copy the input array
if (!inputs[3].get()) {
if (!inputs[2].get()) {
ar = ar.copy();
}
@ -24,7 +24,7 @@ class ArrayAddNode extends LogicNode {
// "Unique Values" options only supports primitive data types
// for now, a custom indexOf() or contains() method would be
// required to compare values of other types
if (!inputs[2].get() || ar.indexOf(value) == -1) {
if (!inputs[3].get() || ar.indexOf(value) == -1) {
ar.push(value);
}
}

View file

@ -4,10 +4,12 @@ import pkgutil
from arm.logicnode import arm_nodes
# Register node menu categories
arm_nodes.add_category('Logic', icon='OUTLINER', section="basic")
arm_nodes.add_category('Logic', icon='OUTLINER', section="basic",
description="Logic nodes are used to control execution flow using branching, loops, gates etc.")
arm_nodes.add_category('Event', icon='INFO', section="basic")
arm_nodes.add_category('Input', icon='GREASEPENCIL', section="basic")
arm_nodes.add_category('Native', icon='MEMORY', section="basic")
arm_nodes.add_category('Native', icon='MEMORY', section="basic",
description="The Native category contains nodes which interact with the system (Input/Output functionality, etc.) or Haxe.")
arm_nodes.add_category('Camera', icon='OUTLINER_OB_CAMERA', section="data")
arm_nodes.add_category('Material', icon='MATERIAL', section="data")
@ -27,7 +29,8 @@ arm_nodes.add_category('Random', icon='SEQ_HISTOGRAM', section="values")
arm_nodes.add_category('String', icon='SORTALPHA', section="values")
arm_nodes.add_category('Variable', icon='OPTIONS', section="values")
arm_nodes.add_category('Canvas', icon='RENDERLAYERS', section="graphics")
arm_nodes.add_category('Canvas', icon='RENDERLAYERS', section="graphics",
description="Note: To get the canvas, be sure that the node(s) and the canvas (UI) is attached to the same object.")
arm_nodes.add_category('Postprocess', icon='FREEZE', section="graphics")
arm_nodes.add_category('Renderpath', icon='STICKY_UVS_LOC', section="graphics")

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class AnimActionNode(ArmLogicTreeNode):
"""Use to hold an action as a variable."""
"""Hold an action as a variable."""
bl_idname = 'LNAnimActionNode'
bl_label = 'Action'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class AnimationStateNode(ArmLogicTreeNode):
"""Use to get information about the current animation of an object."""
"""Get information about the current animation of an object."""
bl_idname = 'LNAnimationStateNode'
bl_label = 'Animation State'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class BlendActionNode(ArmLogicTreeNode):
"""Use to interpolate between two different actions."""
"""Interpolate between two different actions."""
bl_idname = 'LNBlendActionNode'
bl_label = 'Blend Action'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class BoneFKNode(ArmLogicTreeNode):
"""Use to apply forward kinematics in an object bone."""
"""Apply forward kinematics in an object bone."""
bl_idname = 'LNBoneFKNode'
bl_label = 'Bone FK'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class BoneIKNode(ArmLogicTreeNode):
"""Use to apply inverse kinematics in an object bone."""
"""Apply inverse kinematics in an object bone."""
bl_idname = 'LNBoneIKNode'
bl_label = 'Bone IK'
arm_version = 1
@ -14,4 +14,4 @@ class BoneIKNode(ArmLogicTreeNode):
self.add_input('NodeSocketVector', 'Goal')
self.add_output('ArmNodeSocketAction', 'Out')
add_node(BoneIKNode, category=PKG_AS_CATEGORY)
add_node(BoneIKNode, category=PKG_AS_CATEGORY, section='armature')

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class OnActionMarkerNode(ArmLogicTreeNode):
"""Runs the output when the object action trespasses the action marker."""
"""Activates the output when the object action trespasses the action marker."""
bl_idname = 'LNOnActionMarkerNode'
bl_label = 'On Action Marker'
arm_version = 1
@ -12,4 +12,4 @@ class OnActionMarkerNode(ArmLogicTreeNode):
self.add_input('NodeSocketString', 'Marker')
self.add_output('ArmNodeSocketAction', 'Out')
add_node(OnActionMarkerNode, category=PKG_AS_CATEGORY, section='armature')
add_node(OnActionMarkerNode, category=PKG_AS_CATEGORY)

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class PauseActionNode(ArmLogicTreeNode):
"""Use to pause an action."""
"""Pause an action."""
bl_idname = 'LNPauseActionNode'
bl_label = 'Pause Action'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class PauseTilesheetNode(ArmLogicTreeNode):
"""Use to pause a tilesheet."""
"""Pause a tilesheet action."""
bl_idname = 'LNPauseTilesheetNode'
bl_label = 'Pause Tilesheet'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class PlayActionNode(ArmLogicTreeNode):
"""Use to play an action."""
"""Play an action."""
bl_idname = 'LNPlayActionNode'
bl_label = 'Play Action'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class PlayActionFromNode(ArmLogicTreeNode):
"""Use to play an action from a defined frame."""
"""Play an action from a defined frame."""
bl_idname = 'LNPlayActionFromNode'
bl_label = 'Play Action From'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class PlayTilesheetNode(ArmLogicTreeNode):
"""Use to play a tilesheet."""
"""Play a tilesheet action."""
bl_idname = 'LNPlayTilesheetNode'
bl_label = 'Play Tilesheet'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class ResumeActionNode(ArmLogicTreeNode):
"""Use to resume an action."""
"""Resume an action."""
bl_idname = 'LNResumeActionNode'
bl_label = 'Resume Action'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class ResumeTilesheetNode(ArmLogicTreeNode):
"""Use to resume a tilesheet."""
"""Resume a tilesheet action."""
bl_idname = 'LNResumeTilesheetNode'
bl_label = 'Resume Tilesheet'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class SetActionSpeedNode(ArmLogicTreeNode):
"""Use to set the speed of an action."""
"""Set the current action playback speed."""
bl_idname = 'LNSetActionSpeedNode'
bl_label = 'Set Action Speed'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class SetParticleSpeedNode(ArmLogicTreeNode):
"""Use to set the speed of a particle source."""
"""Set the speed of a particle source."""
bl_idname = 'LNSetParticleSpeedNode'
bl_label = 'Set Particle Speed'
arm_version = 1

View file

@ -1,7 +1,12 @@
from arm.logicnode.arm_nodes import *
class ArrayAddNode(ArmLogicTreeNode):
"""Use to add a value to an array."""
"""Add a value to an array.
@input Array: the array to manipulate.
@input Modify Original: if `false`, the input array is copied before adding the value.
@input Unique Values: if `true`, values may occur only once in that array (only primitive data types are supported).
"""
bl_idname = 'LNArrayAddNode'
bl_label = 'Array Add'
arm_version = 1
@ -13,8 +18,8 @@ class ArrayAddNode(ArmLogicTreeNode):
super(ArrayAddNode, self).init(context)
self.add_input('ArmNodeSocketAction', 'In')
self.add_input('ArmNodeSocketArray', 'Array')
self.add_input('NodeSocketBool', 'Unique Values')
self.add_input('NodeSocketBool', 'Modify Original', default_value=True)
self.add_input('NodeSocketBool', 'Unique Values')
self.add_input('NodeSocketShader', 'Value')
self.add_output('ArmNodeSocketAction', 'Out')
self.add_output('ArmNodeSocketArray', 'Array')

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class ArrayContainsNode(ArmLogicTreeNode):
"""Use to get if an array contains a specific value."""
"""Get if an array contains a specific value."""
bl_idname = 'LNArrayInArrayNode'
bl_label = 'Array Contains'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class ArrayGetNode(ArmLogicTreeNode):
"""Use to get a value of an array using the element index."""
"""Get the value of an array at the specified index."""
bl_idname = 'LNArrayGetNode'
bl_label = 'Array Get'
arm_version = 1

View file

@ -2,7 +2,7 @@ from arm.logicnode.arm_nodes import *
class ArrayLoopNode(ArmLogicTreeNode):
"""Use to loop trought an array."""
"""Loop through each item of the given array."""
bl_idname = 'LNArrayLoopNode'
bl_label = 'Array Loop'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class ArrayPopNode(ArmLogicTreeNode):
"""Use to remove the last element of an array."""
"""Remove the last element of an array.
@see [Haxe API](https://api.haxe.org/Array.html#pop)"""
bl_idname = 'LNArrayPopNode'
bl_label = 'Array Pop'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class ArrayRemoveIndexNode(ArmLogicTreeNode):
"""Use to remove a value from an array by index."""
"""Remove an element from an array by its index.
@seeNode Array Remove By Value"""
bl_idname = 'LNArrayRemoveNode'
bl_label = 'Array Remove By Index'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class ArrayRemoveValueNode(ArmLogicTreeNode):
"""Use to remove a value from an array."""
"""Remove an element from an array by its value.
@seeNode Array Remove By Index"""
bl_idname = 'LNArrayRemoveValueNode'
bl_label = 'Array Remove By Value'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class ArraySetNode(ArmLogicTreeNode):
"""Use to set the value of an array element by index."""
"""Set the value of an array at the specified index."""
bl_idname = 'LNArraySetNode'
bl_label = 'Array Set'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class ArrayShiftNode(ArmLogicTreeNode):
"""Use to remove the first element of an array."""
"""Use to remove the first element of an array.
@see [Haxe API](https://api.haxe.org/Array.html#shift)"""
bl_idname = 'LNArrayShiftNode'
bl_label = 'Array Shift'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class ArraySliceNode(ArmLogicTreeNode):
"""TO DO. Search for haxe array slice."""
"""Creates a shallow copy of the given array in the specified range.
@see [Haxe API](https://api.haxe.org/Array.html#slice)"""
bl_idname = 'LNArraySliceNode'
bl_label = 'Array Slice'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class ArraySpliceNode(ArmLogicTreeNode):
"""TO DO. Search for haxe array splice."""
"""Removes a specified amount of elements from the given array.
@see [Haxe API](https://api.haxe.org/Array.html#splice)"""
bl_idname = 'LNArraySpliceNode'
bl_label = 'Array Splice'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class ActiveCameraNode(ArmLogicTreeNode):
"""Use to get the the active camera."""
"""Get the the active camera.
@seeNode Set Active Camera"""
bl_idname = 'LNActiveCameraNode'
bl_label = 'Get Active Camera'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class GetCameraFovNode(ArmLogicTreeNode):
"""Use to get the FOV of a camera."""
"""Get the field of view (FOV) of a camera.
@seeNode Set Camera FOV"""
bl_idname = 'LNGetCameraFovNode'
bl_label = 'Get Camera FOV'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class SetCameraNode(ArmLogicTreeNode):
"""Use to set the active camera."""
"""Set the active camera.
@seeNode Get Active Camera"""
bl_idname = 'LNSetCameraNode'
bl_label = 'Set Active Camera'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class SetCameraFovNode(ArmLogicTreeNode):
"""Use to set the FOV of a camera."""
"""Set the field of view (FOV) of a camera.
@seeNode Get Camera FOV"""
bl_idname = 'LNSetCameraFovNode'
bl_label = 'Set Camera FOV'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class CanvasSetTextNode(ArmLogicTreeNode):
"""Use to set the content of an UI text."""
"""Set the text of a element that is given by its name."""
bl_idname = 'LNCanvasSetTextNode'
bl_label = 'Set Canvas Text'
arm_version = 1

View file

@ -1,7 +1,10 @@
from arm.logicnode.arm_nodes import *
class OnEventNode(ArmLogicTreeNode):
"""Runs the output when the event is received."""
"""Activates the output when the given event is received.
@seeNode Send Event To Object
@seeNode Send Event"""
bl_idname = 'LNOnEventNode'
bl_label = 'On Event'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class OnInitNode(ArmLogicTreeNode):
"""Runs the output when the logic starts (only once)."""
"""Activates the output on the first frame of execution of the logic tree."""
bl_idname = 'LNOnInitNode'
bl_label = 'On Init'
arm_version = 1

View file

@ -1,7 +1,10 @@
from arm.logicnode.arm_nodes import *
class OnTimerNode(ArmLogicTreeNode):
"""Runs the output when the time is reached."""
"""Activates the output when a given time elapsed (optionally repeating the timer).
@input Duration: the time in seconds after which to activate the output
@input Repeat: whether to repeat the timer"""
bl_idname = 'LNOnTimerNode'
bl_label = 'On Timer'
arm_version = 1

View file

@ -1,7 +1,12 @@
from arm.logicnode.arm_nodes import *
class OnUpdateNode(ArmLogicTreeNode):
"""Runs the output in every update."""
"""Activates the output on every frame.
@option Update: (default) activates the output every frame.
@option Late Update: activates the output after all non-late updates are calculated.
@option Physics Pre-Update: activates the output before calculating the physics.
Only available when using a physics engine."""
bl_idname = 'LNOnUpdateNode'
bl_label = 'On Update'
arm_version = 1

View file

@ -1,7 +1,13 @@
from arm.logicnode.arm_nodes import *
class SendEventNode(ArmLogicTreeNode):
"""Use to send an event to an object."""
"""Send an event to an object.
@seeNode Send Event
@seeNode On Event
@input Event: the identifier of the event
@input Object: the receiving object"""
bl_idname = 'LNSendEventNode'
bl_label = 'Send Event To Object'
arm_version = 1

View file

@ -1,9 +1,14 @@
from arm.logicnode.arm_nodes import *
class SendGlobalEventNode(ArmLogicTreeNode):
"""Use to send an event to all objects in the scene."""
"""Send an event to all objects in the scene.
@seeNode Send Event To Object
@seeNode On Event
@input Event: the identifier of the event"""
bl_idname = 'LNSendGlobalEventNode'
bl_label = 'Send Event'
bl_label = 'Send Global Event'
arm_version = 1
def init(self, context):

View file

@ -1,7 +1,15 @@
from arm.logicnode.arm_nodes import *
class GamepadNode(ArmLogicTreeNode):
"""Runs the output when the action over the gamepad is done."""
"""Activates the output when there is a gamepad event.
@seeNode Gamepad Coords
@input Gamepad: the ID of the gamepad.
@option State: the state of the gamepad button to listen to.
@option Button: the gamepad button that should activate the output.
"""
bl_idname = 'LNMergedGamepadNode'
bl_label = 'Gamepad'
arm_version = 1

View file

@ -1,7 +1,11 @@
from arm.logicnode.arm_nodes import *
class GamepadCoordsNode(ArmLogicTreeNode):
"""Use to get the coordinates of a gamepad."""
"""Get the coordinates of different gamepad sticks.
@seeNode Gamepad
@input Gamepad: the ID of the gamepad."""
bl_idname = 'LNGamepadCoordsNode'
bl_label = 'Gamepad Coords'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class GetCursorLocationNode(ArmLogicTreeNode):
"""Use to get the location of the cursor in the screen (in pixels)."""
"""Get the mouse cursor location in screen coordinates (pixels)."""
bl_idname = 'LNGetCursorLocationNode'
bl_label = 'Get Cursor Location'
arm_version = 1

View file

@ -4,7 +4,13 @@ from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
class GetCursorStateNode(ArmLogicTreeNode):
"""Use to get the state of the cursor."""
"""Get the state of the mouse cursor.
@seeNode Set Cursor State
@output Is Hidden Locked: `true` if the mouse cursor is both hidden and locked.
@output Is Hidden: `true` if the mouse cursor is hidden.
@output Is Locked: `true` if the mouse cursor is locked."""
bl_idname = 'LNGetCursorStateNode'
bl_label = 'Get Cursor State'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class GetMouseMovementNode(ArmLogicTreeNode):
"""Use to get the movement coordinates of the mouse."""
"""Get the movement coordinates of the mouse."""
bl_idname = 'LNGetMouseMovementNode'
bl_label = 'Get Mouse Movement'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class GetTouchLocationNode(ArmLogicTreeNode):
"""Use to get the location of the touch (in pixels)."""
"""Get the location of the last touch event in screen coordinates (pixels)."""
bl_idname = 'LNGetTouchLocationNode'
bl_label = 'Get Touch Location'
arm_version = 1

View file

@ -1,14 +1,14 @@
from arm.logicnode.arm_nodes import *
class GetTouchMovementNode(ArmLogicTreeNode):
"""Use to get the movement coordinates of the touch."""
"""Get the movement values of the current touch event."""
bl_idname = 'LNGetTouchMovementNode'
bl_label = 'Get Touch Movement'
arm_version = 1
def init(self, context):
super(GetTouchMovementNode, self).init(context)
self.add_input('NodeSocketFloat', 'X Multiplier' , default_value=1.0)
self.add_input('NodeSocketFloat', 'X Multiplier', default_value=1.0)
self.add_input('NodeSocketFloat', 'Y Multiplier', default_value=-1.0)
self.add_output('NodeSocketFloat', 'X')
self.add_output('NodeSocketFloat', 'Y')

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class KeyboardNode(ArmLogicTreeNode):
"""Runs the output when the action over the key is done."""
"""Activates the output when there is a keyboard event."""
bl_idname = 'LNMergedKeyboardNode'
bl_label = 'Keyboard'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class MouseNode(ArmLogicTreeNode):
"""Runs the output when the action over the button is done."""
"""Activates the output when there is a mouse button event."""
bl_idname = 'LNMergedMouseNode'
bl_label = 'Mouse'
arm_version = 1

View file

@ -17,9 +17,9 @@ class NodeAddOutputButton(bpy.types.Operator):
return ''
def execute(self, context):
global array_nodes
node = array_nodes[self.node_index]
outs = node.outputs
global array_nodes
node = array_nodes[self.node_index]
outs = node.outputs
outs.new('NodeSocketBool', self.get_name_state(len(outs), node.min_outputs))
outs.new('NodeSocketBool', self.get_name_state(len(outs), node.min_outputs))
outs.new('NodeSocketBool', self.get_name_state(len(outs), node.min_outputs))
@ -45,7 +45,7 @@ class NodeRemoveOutputButton(bpy.types.Operator):
# Class SwipeNode
class OnSwipeNode(ArmLogicTreeNode):
"""Runs the output when the swipe is done."""
"""Activates the output when there is a swipe event."""
bl_idname = 'LNOnSwipeNode'
bl_label = 'On Swipe'
arm_version = 1
@ -55,8 +55,8 @@ class OnSwipeNode(ArmLogicTreeNode):
def __init__(self):
array_nodes[str(id(self))] = self
def init(self, context):
super(OnSwipeNode, self).init(context)
def init(self, context):
super(OnSwipeNode, self).init(context)
self.inputs.new('NodeSocketFloat', 'Time')
self.inputs[-1].default_value = 0.15
self.inputs.new('NodeSocketInt', 'Min Length (px)')
@ -68,14 +68,14 @@ class OnSwipeNode(ArmLogicTreeNode):
# Draw node buttons
def draw_buttons(self, context, layout):
row = layout.row(align=True)
row = layout.row(align=True)
column = row.column(align=True)
# Button add output
# Button add output
op = column.operator('arm.add_output_4_parameters', text='Add 4 States', icon='PLUS', emboss=True)
op.node_index = str(id(self))
# Disable/Enabled button
if (len(self.outputs) == self.max_outputs):
column.enabled = False
column.enabled = False
# Button remove output
column = row.column(align=True)
op2 = column.operator('arm.remove_output_4_parameters', text='', icon='X', emboss=True)

View file

@ -2,13 +2,13 @@ from arm.logicnode.arm_nodes import *
# Class OnTapScreen
class OnTapScreen(ArmLogicTreeNode):
"""Runs the output when the action over the screen is done."""
"""Activates the output when there is a tap event."""
bl_idname = 'LNOnTapScreen'
bl_label = 'On Tap Screen'
arm_version = 1
def init(self, context):
super(OnTapScreen, self).init(context)
def init(self, context):
super(OnTapScreen, self).init(context)
self.add_input('NodeSocketFloat', 'Duration')
self.inputs[-1].default_value = 0.3
self.add_input('NodeSocketFloat', 'Interval')

View file

@ -1,7 +1,13 @@
from arm.logicnode.arm_nodes import *
class SetCursorStateNode(ArmLogicTreeNode):
"""Use to set the state of the cursor."""
"""Set the state of the mouse cursor.
@seeNode Get Cursor State
@option Hide Locked: hide and lock or unhide and unlock the mouse cursor.
@output Hide: hide/unhide the mouse cursor.
@output Lock: lock/unlock the mouse cursor."""
bl_idname = 'LNSetCursorStateNode'
bl_label = 'Set Cursor State'
arm_version = 1

View file

@ -2,7 +2,7 @@ from arm.logicnode.arm_nodes import *
class AlternateNode(ArmLogicTreeNode):
"""Runs the outputs 0 and 1 alternately."""
"""Runs the outputs 0 and 1 alternating every time it is activated."""
bl_idname = 'LNAlternateNode'
bl_label = 'Alternate'
arm_version = 1

View file

@ -2,7 +2,8 @@ from arm.logicnode.arm_nodes import *
class BranchNode(ArmLogicTreeNode):
"""Runs the output True if the condition is true and the output False if the condition is false."""
"""When activated, activates its "True" or "False" output, according
to the state of the plugged-in boolean."""
bl_idname = 'LNBranchNode'
bl_label = 'Branch'
arm_version = 1

View file

@ -1,9 +1,10 @@
from arm.logicnode.arm_nodes import *
class CallFunctionNode(ArmLogicTreeNode):
"""Use to call a haxe function."""
"""Calls a function that was created by the [Function](#function) node."""
bl_idname = 'LNCallFunctionNode'
bl_label = 'Call Function'
bl_description = 'Calls a function that was created by the Function node.'
arm_version = 1
min_inputs = 3

View file

@ -2,9 +2,11 @@ from arm.logicnode.arm_nodes import *
class FunctionNode(ArmLogicTreeNode):
"""Runs the output when the function is called."""
"""Creates a reusable function that can be called by the
[Call Function](#call-function) node."""
bl_idname = 'LNFunctionNode'
bl_label = 'Function'
bl_description = 'Creates a reusable function that can be called by the Call Function node'
arm_version = 1
min_outputs = 1

View file

@ -2,7 +2,9 @@ from arm.logicnode.arm_nodes import *
class FunctionOutputNode(ArmLogicTreeNode):
"""Use to define the connected node chain as a function."""
"""Set the return value for the specified function.
@seeNode Function"""
bl_idname = 'LNFunctionOutputNode'
bl_label = 'Function Output'
arm_version = 1

View file

@ -7,7 +7,14 @@ def remove_extra_inputs(self, context):
self.inputs.remove(self.inputs[-1])
class GateNode(ArmLogicTreeNode):
"""Runs the output True if the condition is true and the output False if the condition is false. Similar: Compare node."""
"""Logic nodes way to do "if" statements. When activated, it
compares if its two inputs are being Equal, Greater Equal,
Less Equal, or Not Equal, regardless of variable type, and passes
through its active input to the output that matches the result of
the comparison.
"And" and "Or" are being used for booleans only, and pass through
the input when both booleans are true (And) or at least one (Or)."""
bl_idname = 'LNGateNode'
bl_label = 'Gate'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class NotNode(ArmLogicTreeNode):
"""Use to invert a boolean value."""
"""Inverts a plugged in boolean, so if its input is `true` it outputs `false`."""
bl_idname = 'LNNotNode'
bl_label = 'Inverse Bool'
arm_version = 1

View file

@ -2,7 +2,7 @@ from arm.logicnode.arm_nodes import *
class InverseNode(ArmLogicTreeNode):
"""Runs the output only if the connected input is not running."""
"""Activates the output if the input is not active."""
bl_idname = 'LNInverseNode'
bl_label = 'Inverse Output'
arm_version = 1

View file

@ -2,7 +2,10 @@ from arm.logicnode.arm_nodes import *
class IsFalseNode(ArmLogicTreeNode):
"""Runs the output if the input is false."""
"""Passes through its activation only if the plugged in boolean
equals `false`.
@seeNode Is True"""
bl_idname = 'LNIsFalseNode'
bl_label = 'Is False'
arm_version = 1

View file

@ -2,7 +2,10 @@ from arm.logicnode.arm_nodes import *
class IsNoneNode(ArmLogicTreeNode):
"""Runs the output if the input value is null."""
"""Passes through its activation only if the plugged in value is
`null` (no value).
@seeNode Is Not None"""
bl_idname = 'LNIsNoneNode'
bl_label = 'Is None'
arm_version = 1

View file

@ -1,7 +1,10 @@
from arm.logicnode.arm_nodes import *
class IsNotNoneNode(ArmLogicTreeNode):
"""Runs the output if the input value is not null."""
"""Passes through its activation only if the plugged in value is
not `null`.
@seeNode Is None"""
bl_idname = 'LNIsNotNoneNode'
bl_label = 'Is Not None'
arm_version = 1

View file

@ -1,7 +1,10 @@
from arm.logicnode.arm_nodes import *
class IsTrueNode(ArmLogicTreeNode):
"""Runs the output if the input value is true."""
"""Passes through its activation only if the plugged in boolean
equals `true`.
@seeNode Is False"""
bl_idname = 'LNIsTrueNode'
bl_label = 'Is True'
arm_version = 1

View file

@ -1,9 +1,22 @@
from arm.logicnode.arm_nodes import *
class LoopNode(ArmLogicTreeNode):
"""TO DO."""
"""Resembles a for-loop (`for (i in from...to)`) that is executed at
once when this node is activated.
@seeNode While
@seeNode Loop Break
@input From: The value to start the loop from (inclusive)
@input To: The value to end the loop at (exclusive)
@output Loop: Active at every iteration of the loop
@output Index: The index for the current iteration
@output Done: Activated once when the looping is done
"""
bl_idname = 'LNLoopNode'
bl_label = 'Loop'
bl_description = 'Resembles a for-loop that is executed at once when this node is activated'
arm_version = 1
def init(self, context):

View file

@ -1,7 +1,12 @@
from arm.logicnode.arm_nodes import *
class LoopBreakNode(ArmLogicTreeNode):
"""TO DO."""
"""Terminates the currently executing loop (only one loop is
executed at once).
@seeNode Loop
@seeNode While
"""
bl_idname = 'LNLoopBreakNode'
bl_label = 'Loop Break'
arm_version = 1

View file

@ -1,7 +1,10 @@
from arm.logicnode.arm_nodes import *
class MergeNode(ArmLogicTreeNode):
"""Runs the output when any connected input is running. The output execution will vary depending of inputs connected to it running."""
"""Activates the output when any connected input is active.
@option New: Add a new input socket.
@option X Button: Remove the lowermost input socket."""
bl_idname = 'LNMergeNode'
bl_label = 'Merge'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class NoneNode(ArmLogicTreeNode):
"""A null value that can be used in comparisons and conditions."""
"""A `null` value that can be used in comparisons and conditions."""
bl_idname = 'LNNoneNode'
bl_label = 'None'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class SequenceNode(ArmLogicTreeNode):
"""Runs the outputs one per time sequentially."""
"""Runs the outputs one by one sequentially and repeatedly."""
bl_idname = 'LNSequenceNode'
bl_label = 'Sequence'
arm_version = 1

View file

@ -1,7 +1,10 @@
from arm.logicnode.arm_nodes import *
class SwitchNode(ArmLogicTreeNode):
"""Runs the outputs depending of the value. Example: If 'value' is equal to 'case 1', the output 'case 1' will run."""
"""Runs the outputs depending of the value. Example: If 'value' is equal to 'case 1', the output 'case 1' will run.
@output Default: Activated if the input value does not match any case.
"""
bl_idname = 'LNSwitchNode'
bl_label = 'Switch'
arm_version = 1

View file

@ -1,7 +1,8 @@
from arm.logicnode.arm_nodes import *
class ToBoolNode(ArmLogicTreeNode):
"""Convert an output to boolean. If the output is running, the boolean is true; if not, the boolean is false."""
"""Converts a signal to a boolean value. If the input signal is
active, the boolean is `true`; if not, the boolean is `false`."""
bl_idname = 'LNToBoolNode'
bl_label = 'To Bool'
arm_version = 1

View file

@ -1,7 +1,15 @@
from arm.logicnode.arm_nodes import *
class WhileNode(ArmLogicTreeNode):
"""TO DO."""
"""Loops while the condition is `True`.
@seeNode Loop
@seeNode Loop Break
@input Condition: boolean that resembles the result of the condition
@output Loop: Activated on every iteration step
@output Done: Activated when the loop is done executing"""
bl_idname = 'LNWhileNode'
bl_label = 'While'
arm_version = 1

View file

@ -1,7 +1,8 @@
from arm.logicnode.arm_nodes import *
class SleepNode(ArmLogicTreeNode):
"""Use to delay between an running output and a input."""
"""Waits a specified amount of time (in seconds) until passing
through the incoming signal."""
bl_idname = 'LNSleepNode'
bl_label = 'Sleep'
arm_version = 1

View file

@ -1,7 +1,10 @@
from arm.logicnode.arm_nodes import *
class CallHaxeStaticNode(ArmLogicTreeNode):
"""Use to call a static haxe function."""
"""Call a static haxe function.
@input Function: the full module path to the function.
@output Result: the result of the function."""
bl_idname = 'LNCallHaxeStaticNode'
bl_label = 'Call Haxe Static'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class ExpressionNode(ArmLogicTreeNode):
"""Use to get the value of an defined expression."""
"""Evaluate a Haxe expression and get its output.
@output Result: the result of the expression."""
bl_idname = 'LNExpressionNode'
bl_label = 'Expression'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class GetHaxePropertyNode(ArmLogicTreeNode):
"""Use to get a haxe property."""
"""Get a property of an Haxe object (via the Reflection API).
@seeNode Set Haxe Property"""
bl_idname = 'LNGetHaxePropertyNode'
bl_label = 'Get Haxe Property'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class LoadUrlNode(ArmLogicTreeNode):
"""Use to load a URL in a new tab. Works only for Browsers."""
"""Load a URL in a new tab (works only for web browsers)."""
bl_idname = 'LNLoadUrlNode'
bl_label = 'Load URL'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class PrintNode(ArmLogicTreeNode):
"""Use to print a content in the console."""
"""Prints the given value to the console."""
bl_idname = 'LNPrintNode'
bl_label = 'Print'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class ReadFileNode(ArmLogicTreeNode):
"""Use to get the content of a file."""
"""Get the content of a file.
@seeNode Write File"""
bl_idname = 'LNReadFileNode'
bl_label = 'Read File'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class ReadJsonNode(ArmLogicTreeNode):
"""Use to get the content of a JSON file."""
"""Get the content of a JSON file.
@seeNode Write JSON"""
bl_idname = 'LNReadJsonNode'
bl_label = 'Read JSON'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class ReadStorageNode(ArmLogicTreeNode):
"""Use to read a stored content."""
"""Use to read a stored content.
@seeNode Write Storage"""
bl_idname = 'LNReadStorageNode'
bl_label = 'Read Storage'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class SetHaxePropertyNode(ArmLogicTreeNode):
"""Use to set the content of a haxe property."""
"""Set a property of an Haxe object (via the Reflection API).
@seeNode Get Haxe Property"""
bl_idname = 'LNSetHaxePropertyNode'
bl_label = 'Set Haxe Property'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class ShutdownNode(ArmLogicTreeNode):
"""Use to close the application."""
"""Close the application."""
bl_idname = 'LNShutdownNode'
bl_label = 'Shutdown'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class WriteFileNode(ArmLogicTreeNode):
"""Use to write a content inside a file."""
"""Use to write a content inside a file.
@seeNode Read File"""
bl_idname = 'LNWriteFileNode'
bl_label = 'Write File'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class WriteJsonNode(ArmLogicTreeNode):
"""Use to write the content of a JSON file."""
"""Use to write the content of a JSON file.
@seeNode Read JSON"""
bl_idname = 'LNWriteJsonNode'
bl_label = 'Write JSON'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class WriteStorageNode(ArmLogicTreeNode):
"""Use to store a content into a file."""
"""Use to store a content into a file.
@seeNode Read Storage"""
bl_idname = 'LNWriteStorageNode'
bl_label = 'Write Storage'
arm_version = 1

View file

@ -1,7 +1,10 @@
from arm.logicnode.arm_nodes import *
class GetDistanceNode(ArmLogicTreeNode):
"""Use to get the distance between two objects. For distance between two locations, use 'Distance' operator in 'Vector Math' node."""
"""Get the euclidian distance between the two given objects.
@see For distance between two locations, use the `Distance` operator
in the *[`Vector Math`](#vector-math)* node."""
bl_idname = 'LNGetDistanceNode'
bl_label = 'Get Distance'
arm_version = 1

View file

@ -4,7 +4,7 @@ from arm.logicnode.arm_nodes import *
class GetObjectNode(ArmLogicTreeNode):
"""Use to get an object by its name."""
"""Searches for an object by its name and returns it."""
bl_idname = 'LNGetObjectNode'
bl_label = 'Get Object'
arm_version = 1

View file

@ -1,7 +1,7 @@
from arm.logicnode.arm_nodes import *
class GetChildNode(ArmLogicTreeNode):
"""Use to get the child of an object."""
"""Get the child of an object by the child object's name."""
bl_idname = 'LNGetChildNode'
bl_label = 'Get Object Child'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class GetParentNode(ArmLogicTreeNode):
"""Use to get the parent of an object."""
"""Returns the direct parent (nearest in the hierarchy) of an object.
@seeNode Set Object Parent"""
bl_idname = 'LNGetParentNode'
bl_label = 'Get Object Parent'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class GetPropertyNode(ArmLogicTreeNode):
"""Use to get the property value of an object."""
"""Get the value of an object property.
@seeNode Set Object Property"""
bl_idname = 'LNGetPropertyNode'
bl_label = 'Get Object Property'
arm_version = 1

View file

@ -1,7 +1,10 @@
from arm.logicnode.arm_nodes import *
class GetVisibleNode(ArmLogicTreeNode):
"""Use to get if an object or its components are visible."""
"""Returns whether a given object or its visual components are
visible.
@seeNode Set Object Visible"""
bl_idname = 'LNGetVisibleNode'
bl_label = 'Get Object Visible'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class SetParentNode(ArmLogicTreeNode):
"""Use to set the parent of an object."""
"""Set the direct parent (nearest in the hierarchy) of an object.
@seeNode Get Object Parent"""
bl_idname = 'LNSetParentNode'
bl_label = 'Set Object Parent'
arm_version = 1

View file

@ -1,7 +1,14 @@
from arm.logicnode.arm_nodes import *
class SetPropertyNode(ArmLogicTreeNode):
"""Use to set the value of an object property."""
"""Set the value of an 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"""
bl_idname = 'LNSetPropertyNode'
bl_label = 'Set Object Property'
arm_version = 1

View file

@ -1,7 +1,9 @@
from arm.logicnode.arm_nodes import *
class SetVisibleNode(ArmLogicTreeNode):
"""Use to set if an object is visible."""
"""Set the visibility of a given object.
@seeNode Get Object Visible"""
bl_idname = 'LNSetVisibleNode'
bl_label = 'Set Object Visible'
arm_version = 1

View file

@ -1,7 +1,16 @@
from arm.logicnode.arm_nodes import *
class ApplyForceNode(ArmLogicTreeNode):
"""Use to apply force to a rigid body."""
"""Applies a specified force to a given rigid body.
@seeNode Apply Force At Location
@seeNode Apply Impulse
@seeNode Apply Impulse At Location
@input Force: the force vector
@input On Local Axis: if `true`, interpret the force vector as in
object space
"""
bl_idname = 'LNApplyForceNode'
bl_label = 'Apply Force'
arm_version = 1

View file

@ -1,7 +1,19 @@
from arm.logicnode.arm_nodes import *
class ApplyForceAtLocationNode(ArmLogicTreeNode):
"""Use to apply force to a rigid body in at a specific location."""
"""Applies a force to a rigid body at a specified position.
@seeNode Apply Force
@seeNode Apply Impulse
@seeNode Apply Impulse At Location
@input Force: the force vector
@input Force On Local Axis: if `true`, interpret the force vector as in
object space
@input Location: the location where to apply the force
@input Location On Local Axis: if `true`, use the location relative
to the objects location, otherwise use world coordinates
"""
bl_idname = 'LNApplyForceAtLocationNode'
bl_label = 'Apply Force At Location'
arm_version = 1

View file

@ -1,7 +1,16 @@
from arm.logicnode.arm_nodes import *
class ApplyImpulseNode(ArmLogicTreeNode):
"""Use to apply impulse in a rigid body."""
"""Applies a specified impulse to a given rigid body.
@seeNode Apply Impulse At Location
@seeNode Apply Force
@seeNode Apply Force At Location
@input Impulse: the impulse vector
@input On Local Axis: if `true`, interpret the impulse vector as in
object space
"""
bl_idname = 'LNApplyImpulseNode'
bl_label = 'Apply Impulse'
arm_version = 1

View file

@ -1,7 +1,19 @@
from arm.logicnode.arm_nodes import *
class ApplyImpulseAtLocationNode(ArmLogicTreeNode):
"""Use to apply impulse in a rigid body at a specific location."""
"""Applies an impulse to a rigid body at a specified position.
@seeNode Apply Impulse
@seeNode Apply Force
@seeNode Apply Force At Location
@input Impulse: the impulse vector
@input Impulse On Local Axis: if `true`, interpret the impulse vector as in
object space
@input Location: the location where to apply the impulse
@input Location On Local Axis: if `true`, use the location relative
to the objects location, otherwise use world coordinates
"""
bl_idname = 'LNApplyImpulseAtLocationNode'
bl_label = 'Apply Impulse At Location'
arm_version = 1

View file

@ -1,7 +1,11 @@
from arm.logicnode.arm_nodes import *
class GetContactsNode(ArmLogicTreeNode):
"""Use to get the contacts of a rigid body."""
"""Returns an array with all objects that are colliding with the
given object.
@seeNode Get First Contact
"""
bl_idname = 'LNGetContactsNode'
bl_label = 'Get Contacts'
arm_version = 1

View file

@ -1,7 +1,10 @@
from arm.logicnode.arm_nodes import *
class GetFirstContactNode(ArmLogicTreeNode):
"""Use to get the first contact of a rigid body."""
"""Returns the first object that is colliding with the given object.
@seeNode Get Contacts
"""
bl_idname = 'LNGetFirstContactNode'
bl_label = 'Get First Contact'
arm_version = 1

Some files were not shown because too many files have changed in this diff Show more