MPxLocatorNode local position and scale

65 views
Skip to first unread message

Denil Son

unread,
Feb 11, 2017, 1:58:14 AM2/11/17
to Python Programming for Autodesk Maya
Hi 

I just wrote my first custom locator plugin and I am not be able to access the localPosition attribute.

Everytime I freeze the transform , the shape snap back to the origin.
I know i have to do something with these local attributes, since when i alter it, It doesnt move the shape.

maybe 

glVertext3f(MPoint[0] * localPositionX, MPoint[1] * localPositionY, MPoint[2] * localPositionZ)

Can i get those attribute in initialize() function ?

My purpose is to make those local attributes affects the shape.

Thanks

Michael Boon

unread,
Feb 16, 2017, 6:28:59 PM2/16/17
to Python Programming for Autodesk Maya
localPosition is a static function that returns an MObject. I guess that means it's an attribute, not a value, and you probably need to create an MPlug in order to access the value. You could check its apiTypeStr() to be sure. Hopefully that points you in the right direction.

Denil Son

unread,
Feb 18, 2017, 5:02:56 AM2/18/17
to Python Programming for Autodesk Maya
I can retrieve the plug`s value from data block.

Thanks
Reply all
Reply to author
Forward
0 new messages