FreePointTriadManip translation vector

50 views
Skip to first unread message

kevco...@gmail.com

unread,
Jun 6, 2015, 7:04:27 PM6/6/15
to python_in...@googlegroups.com
Hey Guys,

how can I read the position of this type of manipulator? I have the manipulator as an MObject, I've tried instancing another MFnFreePointTriadManip with this MObject as the src. and calling getTranslation(om.MSpace.kWorld) since it inherits from MFnTransform, but It complains about an incompatible arg.

So maybe I'm using this thing wrong, but I'd love a hint on how to get it's translation vector. It has a method setPoint(), but no getPoint()

Thanks
Kev

33th...@gmail.com

unread,
Jun 7, 2015, 4:47:59 PM6/7/15
to python_in...@googlegroups.com, kevco...@gmail.com
okay, so the only way i've been able to find the position of this manipulator is to connect it's point to another nodes translate plug, then read that other node. But it seems silly to have to create a node just to read this position. So how can I best get past this.

Right now I'm just doing something like..

import maya.OpenMaya as om
import maya.OpenMayaUI as mui

fnFreePoint = mui.MFnFreePointTriadManip()
manip = fnFreePoint.create()

#I could then set the point using
pt = om.MPoint(om.MVector(1.0, 3.0, 10.0))
fnFreePoint.setPoint(pt)

#but now getting the translation in worldSpace returns an arg error
fnFreePoint.getTranslation(om.MSpace.kWorld)

#getting the translation in object space returns a vector of zero's
fnFreePoint.getTranslation(om.MSpace.kObject)

So how do I access this position? or what am I not understanding? here

Thanks Guys!
Kev

Reply all
Reply to author
Forward
0 new messages