Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Best way to delete / clear an AnimCurve in the SDK?

Best way to delete / clear an AnimCurve in the SDK?

Anonymous
Not applicable
792 Views
1 Reply
Message 1 of 2

Best way to delete / clear an AnimCurve in the SDK?

Anonymous
Not applicable

I am trying to either delete an MFnAnimCurve or clear all of it's keys.

 

All I see in the MFnAnimCurve is a single "Remove" function -- which seems quite inefficient if I have many keys.

 

What is the best way to do this?

 

 

0 Likes
Accepted solutions (1)
793 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

Try the static method deleteNode

MStatus MGlobal::deleteNode(MObject& object)

or the mel command "delete"

https://help.autodesk.com/cloudhelp/2016/ENU/Maya-Tech-Docs/Commands/delete.html