Thanks brian, but jointFn.setOrientation(rotation, rotation order) seemed
not working. I already tried with variable of flag if you see my code.
 jointFn.setOrientation(OM.MEulerRotation(rotationAngle.asRadians(), 0, 0,
self.rotOrder))

Thanks anyway, I will look into it further.

Matt,


On Wed, Nov 6, 2013 at 12:02 PM, <[email protected]> wrote:

> Looking at the help docs for MFnIkJoint inheritance diagram, you already
> have access to the class MFnTransform and the method setOrientation.
>
> You can just use:
> jointFn.setOrientation(...)
>
> without creating an instance of MFnTransform
>
> -brian
>
>  -------- Original Message --------
> Subject: Re: [Maya-Python] Joint rotate order
> From: matthew park <[email protected]>
> Date: Wed, November 06, 2013 11:07 am
> To: [email protected]
>
> Hi Brian,
> Thanks for the quick reply.
> Before I try, can you send me simple code hierarchy? peusdo is great
> enough for me.
> Thanks for helping a starter!
>
> Matt,
>
>
> On Wed, Nov 6, 2013 at 10:44 AM, <[email protected]> wrote:
>
>> You need to create an instance of MFnTransform with a MObject or MDagPath
>> before you can call setRotationOrder.
>>
>> -brian
>>
>>
>>  -------- Original Message --------
>> Subject: [Maya-Python] Joint rotate order
>> From: matthew park <[email protected]>
>> Date: Wed, November 06, 2013 10:10 am
>> To: [email protected]
>>
>> Hi there,
>>
>> since I am pretty new to Maya python api, I wonder how to set up the
>> joint rotation order.  as you know default is xyz.
>> In a python plug-in code,  I created joints and manipulate them. I want
>> to set rotation order for the joints but when I looked up the api ref, it
>> said rotation order should be set in MFnTransform function class not in
>> MFnIkJoint with method. sounds like MFnTransform class is for any dag node
>> needs to move and wonder how I can I use this or if my guess is right or
>> not? using script flag could be another way, but as purpose of learning api
>> to build a plug-in, I want to know about using lower level.
>>
>> Any help will be much appreciate it!
>>
>>
>> Thanks a lot!
>>
>> Matt,
>>
>>        OMA ==> OpenMayaAnim
>>
>>         jointFn = OMA.MFnIkJoint()
>>
>>         for i in range(1, len(self.jointObjects)):
>>             jointFn.setObject(self.jointObjects[i])
>>
>>             *OpenMaya.MFnTransform.setRotationOrder(self, order,
>> reorder)  <===?*
>>             rotationAngle = OM.MAngle(self.jointOrientation,
>> OM.MAngle.kDegrees)
>>
>> jointFn.setOrientation(OM.MEulerRotation(rotationAngle.asRadians(), 0, 0,
>> self.rotOrder))
>>              translationVector = OM.MVector(0, self.jointDistance, 0)
>>             jointFn.setTranslation(translationVector,
>> OM.MSpace.kTransform)
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/CAMczULY5WmrNZx_q1kwzi5%3Dyni8VubjtPJHTxaaz-0ooD-1L-g%40mail.gmail.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Python Programming for Autodesk Maya" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/python_inside_maya/20131106114417.4b67a6573d13e8dd18091ea81788b1e6.1513f51a19.wbe%40email06.secureserver.net
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
>  To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CAMczULbk156Zz8%3DRvLxjSgiezouX7PeiWfTVHtkO3rSZ9WL20w%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
>  To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/20131106130237.4b67a6573d13e8dd18091ea81788b1e6.60a0e71d94.wbe%40email06.secureserver.net
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAMczULb1fOJFr7i%2BBhNuEJ2rDErD3%2BLDL%3De2Xr3X4tXBd1y5cA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to