Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Programming (https://simplymaya.com/forum/forumdisplay.php?f=32)
-   -   Batch Command to Snap pivot to 0,0,0 (https://simplymaya.com/forum/showthread.php?t=62578)

djidji 23-10-2021 03:29 PM

Batch Command to Snap pivot to 0,0,0
 
Hello everyone,

I have a situation that root bone pivots on different poses are all at slightly different position and I need them be at 0,0,0, grid center.
Each pose is separate fbx file, and each is the same skeleton hierarchy, names... SO basically what I was doing is selecting root bone, go to edit pivot mode ( D), snap it to grid center, export, and then do it all over again.
Since there's a lot of files and I have to do literally the same sequence of clicks on each I realized automating everything is the way...
However, being a scripting noob I found it difficult to do the thing.

I was echoing all commands in script editor and I managed to figure out basic how to select the root bone by name ( same name in each file), snap it to grid center and overwrite the original file with export selected command.
Where I fail is to automate edit pivot mode and batch processing everything in the end.
Also while reading I learned that writing the script in python woud be better, but that's something I cannot do with my limited coding knowledge.

So, if anyone can help by pointing me to right direction I'd appreciate that.
Thanks in advance,

Dj.


All times are GMT. The time now is 09:01 PM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
Simply Maya 2018