AnimLayer problem

Skip to first unread message

Rémi Deletrain

Nov 3, 2020, 9:31:43 AM11/3/20
to Python Programming for Autodesk Maya
Hi everyone,

I just realized there was a problem with my way of creating a new anim layer, but I can't quite figure it out.

I explain how I realized it.
I have a script that allows me to format manipulator animations in a json.
Without animLayer or with the creation of animLayer via the maya button I have no problem of speed, less than 1 second for 280 manipulators.
However, as soon as I add an animLayer with cmds.animLayer(s_layer, edit=True, addSelectedObjects=True) I go to 6 seconds.
I realized that I was also giving all the shapes of all manipulators and not just the instantiating shapes for the rig attributes.

To solve my problem I therefore only recover the shapes that interest me. But I have to do a little trick in the code that I don't like.
I wish it was less restrictive...
What is maya doing in its "Create layer and assign selected objects" button that the animLayer command does not?
I tried to add the nodes with only the attributes that interest me but it didn't change anything. Or I misused the attribute argument of the command.

Thank you in advance for your answer.
Reply all
Reply to author
0 new messages