From 8af0664931faa88dab004ab53180596ff1c1edc9 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Wed, 17 Aug 2022 12:17:28 -0400 Subject: [PATCH] Clarify that AnimationNode virtual methods need to be implemented rather than called directly Backport of #64344 Fixes #35272 --- doc/classes/AnimationNode.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index a802ee8d4..d4f008b14 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -55,20 +55,20 @@ - Gets the text caption for this node (used by some editors). + When inheriting from [AnimationRootNode], implement this virtual method to override the text caption for this node. - Gets a child node by index (used by editors inheriting from [AnimationRootNode]). + When inheriting from [AnimationRootNode], implement this virtual method to return a child node by its [code]name[/code]. - Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode]. + When inheriting from [AnimationRootNode], implement this virtual method to return all children nodes in order as a [code]name: node[/code] dictionary. @@ -94,19 +94,19 @@ - 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. + When inheriting from [AnimationRootNode], implement this virtual method to return the default value of parameter "[code]name[/code]". Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. - 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]. + When inheriting from [AnimationRootNode], implement this virtual method to return a list of the properties on this node. 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]. - Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node. + When inheriting from [AnimationRootNode], implement this virtual method to return whether the blend tree editor should display filter editing on this node. @@ -121,7 +121,7 @@ - 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. + When inheriting from [AnimationRootNode], implement this virtual method to run some code when this 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).