In Maya, is there a script or way to quickly set/reset the pivot point of a mesh to the origin at 0, 0, 0? As opposed to pressing insert and doing it manually?
Changes the rotation pivot only, use -sp for the scale pivot.
I'm no good at mel or scripting so I can't figure out how to string them together, but it should do what you're looking for.
m4dcow>
type both rows in script editor, select/highlight both strings, MMB-drag to shelf, select to save it as "MEL". Voila, shelf-button with what you spoke of.
m4dcow>
type both rows in script editor, select/highlight both strings, MMB-drag to shelf, select to save it as "MEL". Voila, shelf-button with what you spoke of.
I tried doing that initially and it complained that "xform was not an object", but now I see that I wasn't terminating each line with a semi-colon. So it works now
I tried doing that initially and it complained that "xform was not an object", but now I see that I wasn't terminating each line with a semi-colon. So it works now
If you have a programmers background you always terminate the line with semicolons, oohhh the horror of always have to go through your code to find that you missed a semi-colon somewhere. :poly127:
Replies
Changes the rotation pivot only, use -sp for the scale pivot.
I'm no good at mel or scripting so I can't figure out how to string them together, but it should do what you're looking for.
type both rows in script editor, select/highlight both strings, MMB-drag to shelf, select to save it as "MEL". Voila, shelf-button with what you spoke of.
I tried doing that initially and it complained that "xform was not an object", but now I see that I wasn't terminating each line with a semi-colon. So it works now
If you have a programmers background you always terminate the line with semicolons, oohhh the horror of always have to go through your code to find that you missed a semi-colon somewhere. :poly127:
Figured out:
xform -ws -a -rp 0 0 0;
ToggleScalePivots;
xform -ws -a -sp 0 0 0;
That seems to work