How to get nodes from the AnimationTree?

Godot Version

v4.2.1.stable.mono.official [b09f793f5]


I want to modify some animations at runtime, but to do that I have to get a reference to the a BlendSpace2D inside the AnimationTree. I tried to do this:

 AnimationNodeBlendSpace2D blendSpace = (AnimationNodeBlendSpace2D)at.Get("MoveState/gunIdleBlend");

But it seems the Get method only works for parameters since it returns null. So how can I get a reference to the blendTree?