Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi, I’m an animation student and this is the first time I study programing and Python.

My doubt is the following: I have two objects in a maya file: “pSphere1” and “pCone1”, and I want to place the pSphere1 center at the center of pCone1, (by center I mean pivot; I want both pivots to be aligned). pSphere1 is the one that should move to the position of pCone1. pCone 1 doesn’t move.

So, I was wondering if there is a command in Python that can center both object’s pivots.


What I have tried:

In rigging lessons we saw that you can align the center of an object to the center of another object by parenting them, and then, set the child's translation and rotation to zero.

But I'm not sure that this is the best way to do this. So, I was wondering if there was a command for that.
Posted
Comments
Richard MacCutchan 19-Mar-21 6:03am    
You probably need to look at the Maya documentation. There is nothing specific to Python for this that I am aware of.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900