getAttr World space position after freezing transformations?

getAttr World space position after freezing transformations?

Anonymous
Not applicable
4,839 Views
3 Replies
Message 1 of 4

getAttr World space position after freezing transformations?

Anonymous
Not applicable

how  to get world space pivot scale value(not local) after freezing transformations? i tried 

 

import maya.cmds as mc

s = mc.ls(selection=True)
pv = mc.xform(s , q= True , ws =True, t =True)
print(pv)

 

but this gives all value 0.

maya_pivotPosition.JPG

0 Likes
Accepted solutions (1)
4,840 Views
3 Replies
Replies (3)
Message 2 of 4

mspeer
Consultant
Consultant
Accepted solution

Hi!

 

cmds.xform(piv=True , q=True , ws=True)

or in your example

mc.xform(piv=True , q=True , ws=True)

Message 3 of 4

Anonymous
Not applicable

Thank you for the solution. This gives me a list of 6 items including both rotate and scale pivot values. what i was trying to get is  x,y,z position in 3d space of selected object. i tried cmds.xform(sp =True, q =True, ws =true) and  looks like this works for me.

 

Message 4 of 4

cbrowneL7QTD
Participant
Participant

did this work?

i feel like your sample did not give the actual positon space and it was still just rotational and scale position?

0 Likes