How to dynamically edit motion of EmotionFX at runtime?

Can I dynamically edit motion of EmotionFX at runtime?

Here is my idea in code form:

GetMotionByName("RunStop").SetMotion("RunStopLevel99");

And the code would change the RunStop’s Motion to RunStopLevel99 (Assume this motion is available in the motion set)

6853-emotionfxmotion.png

Is
it possible to do so? Note that I need this feature to turn a very complex case into a simple one, the animation graph above is just a simple example.

So after awhile thinking, I conclude that animation graph should not be supposed to dynamically edit motion of EmotionFX at runtime.

So I re-think and I find out my problem is: I want to
play animation X base on switch case, maybe I can pre-define the list of X for the animation graph. So the solution is the StateMachine combine with Wildcard Transition. And it works.

6861-wildcardmotion.png