# How to use Maxscript to add animation group nodes？

**URL:** <https://forum.babylonjs.com/t/how-to-use-maxscript-to-add-animation-group-nodes/16836>\
**Category:** Content creation (3dsMax, Maya, Blender, glTF)\
**Tags:** 3ds-max\
**Created:** [December 21, 2020, 5:23pm UTC](https://forum.babylonjs.com/t/how-to-use-maxscript-to-add-animation-group-nodes/16836 "2020-12-21T17:23:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liang](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/liang/32/7215_2.png) [@Liang](https://forum.babylonjs.com/u/Liang)\
**Post date:** [December 21, 2020, 5:23pm UTC](https://forum.babylonjs.com/t/how-to-use-maxscript-to-add-animation-group-nodes/16836/1 "2020-12-21T17:23:11Z")

</div>

_ **Code:** _  
maxScriptManager = dotNetObject “Max2Babylon.MaxScriptManager”  
aniGroup=maxScriptManager.CreateAnimationGroup()  
maxScriptManager.RenameAnimationGroup aniGroup “TestAni”  
testAni=maxScriptManager.GetAnimationGroupByName “TestAni”

id = $.handle  
type = dotnetclass “System.UInt32”  
uID = dotnet.ValueToDotNetObject id type  
uID.tostring()

maxScriptManager.AddNodeInAnimationGroup testAni uID

format "AnimationGroupNodes is % " testAni.AnimationGroupNodes

 ![2](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/b/bdffa7aebe66dc83f3ca8716367aa540c627883c.png)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [December 21, 2020, 5:24pm UTC](https://forum.babylonjs.com/t/how-to-use-maxscript-to-add-animation-group-nodes/16836/2 "2020-12-21T17:24:29Z")

</div>

Assiging to @Guillaume_Pelletier our exporter master 🙂

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [December 21, 2020, 5:25pm UTC](https://forum.babylonjs.com/t/how-to-use-maxscript-to-add-animation-group-nodes/16836/3 "2020-12-21T17:25:07Z")

</div>

Be aware that there might be a slight delay with his answers related to the vacations

---

<div class="post-metadata">

**Author:** ![Guillaume\_Pelletier](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/guillaume_pelletier/32/3695_2.png) [@Guillaume\_Pelletier](https://forum.babylonjs.com/u/Guillaume_Pelletier)\
**Post date:** [December 21, 2020, 9:00pm UTC](https://forum.babylonjs.com/t/how-to-use-maxscript-to-add-animation-group-nodes/16836/4 "2020-12-21T21:00:09Z")

</div>

Hey guys, i will try to have a look this week. Have a great christmas.

---

<div class="post-metadata">

**Author:** ![Guillaume\_Pelletier](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/guillaume_pelletier/32/3695_2.png) [@Guillaume\_Pelletier](https://forum.babylonjs.com/u/Guillaume_Pelletier)\
**Post date:** [December 23, 2020, 11:08am UTC](https://forum.babylonjs.com/t/how-to-use-maxscript-to-add-animation-group-nodes/16836/5 "2020-12-23T11:08:01Z")

</div>

Ok Guys, there was a bug which prevent script to relay on the correct AnimationGroup to add the node. I solved it and publish a PR related to it. Be aware that there might be a delay for the PR to be merge.  
Assuming a Group named “Animation” exist, the following script

> manager = dotNetObject “Max2Babylon.MaxScriptManager”  
> g = manager.GetAnimationGroupByName “Animation”  
> id = $.handle  
> manager.AddNodeInAnimationGroup g id

works now.

Happy christmas.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [December 23, 2020, 1:42pm UTC](https://forum.babylonjs.com/t/how-to-use-maxscript-to-add-animation-group-nodes/16836/6 "2020-12-23T13:42:51Z")

</div>

GG @Guillaume_Pelletier

---

<div class="post-metadata">

**Author:** ![Liang](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/liang/32/7215_2.png) [@Liang](https://forum.babylonjs.com/u/Liang)\
**Post date:** [December 23, 2020, 2:35pm UTC](https://forum.babylonjs.com/t/how-to-use-maxscript-to-add-animation-group-nodes/16836/8 "2020-12-23T14:35:47Z")

</div>

thank！  
Happy christmas.

---

<div class="post-metadata">

**Author:** ![DavidM](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@DavidM](https://forum.babylonjs.com/u/DavidM)\
**Post date:** [March 4, 2026, 2:28pm UTC](https://forum.babylonjs.com/t/how-to-use-maxscript-to-add-animation-group-nodes/16836/9 "2026-03-04T14:28:43Z")

</div>

Hiello. Thank you for what you explained. I can create a group and add nodes, but when i try to change the FrameStart and the FrameEnd of the animation group in maxscript, the values are not correctly stored. What’s wrong ? How to do ?  
Moreover, do you know where i can find all the properties/attributes of the dotNetObject “Max2Babylon.MaxScriptManager” ? (as “CreateAnimationGroup”, “RenameAnimationGroup”, etc.)  
Thank you for your help.

maxScriptManager = dotNetObject “Max2Babylon.MaxScriptManager”  
aniGroup=maxScriptManager.CreateAnimationGroup()  
maxScriptManager.RenameAnimationGroup aniGroup “TestAni”  
testAni=maxScriptManager.GetAnimationGroupByName “TestAni”

testAni.framestart = 10 → this property exists but the value is not crorrectly stored and exported
