Disposing Targeted Animation

Hi,
How can I dispose targeted animations which are a child of Animation groups (as shown in Inscpector) through code? I am able to dispose them through inspector.

I basically want to dispose the animation targeted to a mesh without disposing the mesh.

Hi Sidharth_Suresh,

One of the great things about Babylon is that all the source is public, including that of the Inspector itself; so in this case, since we know the Inspector does what you’re looking for, we can look into the Inspector source and see how it does this.

Babylon.js/targetedAnimationPropertyGridComponent.tsx at 5e6321d887637877d8b28b417410abbbeb651c6e · BabylonJS/Babylon.js (github.com)

Since this is what the Inspector is doing, I think this likely the most recommended approach. Does this work in your scenario?

2 Likes

Hey Syntheticmagus,
Thank you for answering. I think I have a different problem, what I was looking for doesn’t seem to help me. Anyway, thanks for sharing the resource, will definitely help in the future.

2 Likes