mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-24 20:57:18 +01:00
184 lines
7.5 KiB
XML
184 lines
7.5 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="AnimationNode" inherits="Resource" version="3.8">
|
|
<brief_description>
|
|
Base resource for [AnimationTree] nodes.
|
|
</brief_description>
|
|
<description>
|
|
Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas.
|
|
Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead.
|
|
</description>
|
|
<tutorials>
|
|
<link>$DOCS_URL/tutorials/animation/animation_tree.html</link>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="add_input">
|
|
<return type="void" />
|
|
<argument index="0" name="name" type="String" />
|
|
<description>
|
|
Adds an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree].
|
|
</description>
|
|
</method>
|
|
<method name="blend_animation">
|
|
<return type="void" />
|
|
<argument index="0" name="animation" type="StringName" />
|
|
<argument index="1" name="time" type="float" />
|
|
<argument index="2" name="delta" type="float" />
|
|
<argument index="3" name="seeked" type="bool" />
|
|
<argument index="4" name="blend" type="float" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="blend_input">
|
|
<return type="float" />
|
|
<argument index="0" name="input_index" type="int" />
|
|
<argument index="1" name="time" type="float" />
|
|
<argument index="2" name="seek" type="bool" />
|
|
<argument index="3" name="blend" type="float" />
|
|
<argument index="4" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
|
|
<argument index="5" name="optimize" type="bool" default="true" />
|
|
<description>
|
|
Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options).
|
|
</description>
|
|
</method>
|
|
<method name="blend_node">
|
|
<return type="float" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<argument index="1" name="node" type="AnimationNode" />
|
|
<argument index="2" name="time" type="float" />
|
|
<argument index="3" name="seek" type="bool" />
|
|
<argument index="4" name="blend" type="float" />
|
|
<argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" />
|
|
<argument index="6" name="optimize" type="bool" default="true" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_caption" qualifiers="virtual">
|
|
<return type="String" />
|
|
<description>
|
|
Gets the text caption for this node (used by some editors).
|
|
</description>
|
|
</method>
|
|
<method name="get_child_by_name" qualifiers="virtual">
|
|
<return type="Object" />
|
|
<argument index="0" name="name" type="String" />
|
|
<description>
|
|
Gets a child node by index (used by editors inheriting from [AnimationRootNode]).
|
|
</description>
|
|
</method>
|
|
<method name="get_child_nodes" qualifiers="virtual">
|
|
<return type="Dictionary" />
|
|
<description>
|
|
Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode].
|
|
</description>
|
|
</method>
|
|
<method name="get_input_count" qualifiers="const">
|
|
<return type="int" />
|
|
<description>
|
|
Amount of inputs in this node, only useful for nodes that go into [AnimationNodeBlendTree].
|
|
</description>
|
|
</method>
|
|
<method name="get_input_name">
|
|
<return type="String" />
|
|
<argument index="0" name="input" type="int" />
|
|
<description>
|
|
Gets the name of an input by index.
|
|
</description>
|
|
</method>
|
|
<method name="get_parameter" qualifiers="const">
|
|
<return type="Variant" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_parameter_default_value" qualifiers="virtual">
|
|
<return type="Variant" />
|
|
<argument index="0" name="name" type="String" />
|
|
<description>
|
|
Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
|
|
</description>
|
|
</method>
|
|
<method name="get_parameter_list" qualifiers="virtual">
|
|
<return type="Array" />
|
|
<description>
|
|
Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
|
|
</description>
|
|
</method>
|
|
<method name="has_filter" qualifiers="virtual">
|
|
<return type="String" />
|
|
<description>
|
|
Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
|
|
</description>
|
|
</method>
|
|
<method name="is_path_filtered" qualifiers="const">
|
|
<return type="bool" />
|
|
<argument index="0" name="path" type="NodePath" />
|
|
<description>
|
|
Returns whether the given path is filtered.
|
|
</description>
|
|
</method>
|
|
<method name="process" qualifiers="virtual">
|
|
<return type="void" />
|
|
<argument index="0" name="time" type="float" />
|
|
<argument index="1" name="seek" type="bool" />
|
|
<description>
|
|
User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute.
|
|
Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory.
|
|
This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called).
|
|
</description>
|
|
</method>
|
|
<method name="remove_input">
|
|
<return type="void" />
|
|
<argument index="0" name="index" type="int" />
|
|
<description>
|
|
Removes an input, call this only when inactive.
|
|
</description>
|
|
</method>
|
|
<method name="set_filter_path">
|
|
<return type="void" />
|
|
<argument index="0" name="path" type="NodePath" />
|
|
<argument index="1" name="enable" type="bool" />
|
|
<description>
|
|
Adds or removes a path for the filter.
|
|
</description>
|
|
</method>
|
|
<method name="set_parameter">
|
|
<return type="void" />
|
|
<argument index="0" name="name" type="StringName" />
|
|
<argument index="1" name="value" type="Variant" />
|
|
<description>
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="filter_enabled" type="bool" setter="set_filter_enabled" getter="is_filter_enabled">
|
|
If [code]true[/code], filtering is enabled.
|
|
</member>
|
|
</members>
|
|
<signals>
|
|
<signal name="removed_from_graph">
|
|
<description>
|
|
Emitted when the node was removed from the graph.
|
|
</description>
|
|
</signal>
|
|
<signal name="tree_changed">
|
|
<description>
|
|
Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], and [AnimationNodeBlendTree].
|
|
</description>
|
|
</signal>
|
|
</signals>
|
|
<constants>
|
|
<constant name="FILTER_IGNORE" value="0" enum="FilterAction">
|
|
Do not use filtering.
|
|
</constant>
|
|
<constant name="FILTER_PASS" value="1" enum="FilterAction">
|
|
Paths matching the filter will be allowed to pass.
|
|
</constant>
|
|
<constant name="FILTER_STOP" value="2" enum="FilterAction">
|
|
Paths matching the filter will be discarded.
|
|
</constant>
|
|
<constant name="FILTER_BLEND" value="3" enum="FilterAction">
|
|
Paths matching the filter will be blended (by the blend value).
|
|
</constant>
|
|
</constants>
|
|
</class>
|