How do you change the Blend Position parameter of AnimationNodeBlendSpace1D in an AnimationTree

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dlean Jeans

Funny how there’s a blog about it with no instructions or its API.
I’ve tried:

$AnimationTree.tree_root.set_parameter('blend_position', val)
# or
$AnimationTree.tree_root.set_parameter('parameters/blend_position', val)

AnimationTree Inspector

$Animation_tree[“parameters/blend_position”] = val

davidoc | 2018-12-18 17:58

Thanks. Weird syntax but it works.

Dlean Jeans | 2018-12-21 06:25

:bust_in_silhouette: Reply From: Dlean Jeans

As answered by davidoc:

$AnimationTree["parameters/param_name"] = value

For an AnimationTree with TreeRoot being AnimationNodeBlendTree and a Blend2 node with a parameter called “MyParameter” I had to set up blend_amount, Godot 4.2

@export var _animation_tree : AnimationTree

_animation_tree["parameters/MyParameter/blend_amount"] = 1.0