OK - no need to reply to this Jan, I've already taken up too much of
your time with your three previous replies;
Maybe someone else could please suggest how to "just" add a line to
the following to use MTransformationMatrix::rotateBy a value, if they
get the time
http://www.akeric.com/blog/?p=1067
Somehow this:
rotate -r -os $rot[0] $rot[1] $rot[2] $target;

Equals this:
MTransformationMatrix::rotateBy ( const MEulerRotation &  e,
MSpace::Space  space, MStatus *  ReturnStatus = NULL )

It would be much appreciated.
Thank you

On Mar 25, 6:52 pm, Jan Berger <[email protected]> wrote:
> At 07:48 AM 3/25/2011, you wrote:
>
> >So to find out the syntax to do the rotation I should just do the
> >rotation? Good advice!
>
> There is already code how to build the rotation
> on the blog, just add some rotation to it by RTFM.
> I dont have the time to write your code, sorry
> for that, maybe you should try yourself at least, instead
> of sending ironic reactions. Good luck!
>
>
>
>
>
> >Luckily I found out that you DID help someone last year with a similar
> >question...
> >http://groups.google.com/group/maya_he3d/browse_thread/thread/89a70ce...
> >So I'm one step closer to getting the line of code I need...
> >Thanks.
>
> >On Mar 21, 8:58 pm, Jan Berger <[email protected]> wrote:
> > > The example in the blog just spits out what has
> > > been put into the TransformationMatrix.
> > > The question is whether when you add a rotation
> > > this will be kept track of as well, right?
> > > If I were you I would take the code from the blog
> > > and add some rotation either with rotateBy
> > > or addRotation and then see what it spits out.
> > > Sorry I can not give you direct answers and/or write code ...
>
> > > At 10:34 AM 3/21/2011, you wrote:
>
> > > >My current mel script that I'd like to turn into a scripted plugin:
> > > >for ($obj in $hir){
> > > >  string $type = `nodeType $obj`;
> > > >  if (`gmatch joint $type`){
> > > >       float $jo[] ={};
> > > >       $jo[0] = `getAttr ($obj + ".jointOrientX")`;
> > > >       $jo[1] = `getAttr ($obj + ".jointOrientY")`;
> > > >       $jo[2] = `getAttr ($obj + ".jointOrientZ")`;
> > > >       rotate -r -os  $jo[0] $jo[1]  $jo[2] c;
> > > >  }
> > > >  float $rot[] = `xform -q -os -ro $obj`;
> > > >  rotate -r -os $rot[0] $rot[1] $rot[2] $target;
> > > >}
> > > >By "classic way" do you mean using the MMatrix class?
> > > >Because 'AK Eric' says in the above mentioned description that the
> > > >"MTransformationMatrix [class] will keep track of rotations past 360
> > > >degrees & rotation order of the node, while MMatrix objects will not.
> > > >It makes sense: A matrix itself stores orientations as vectors, which
> > > >have no concept how how far they’ve been ‘rotated’, so the MMatrix
> > > >object doesn’t track this data. But behind the scenes, the
> > > >MTransformationMatrix does track this info..."
> > > >http://www.akeric.com/blog/?p=1067
> > > >The whole point of the plugin I want to create is to add up how many
> > > >times the source nodes have spun and incrementaly add the rotations
> > > >together and output it on to one node. It sounds like
> > > >"MTransformationMatrix::rotateBy" would allow me to do this?
> > > >http://download.autodesk.com/us/maya/2010help/api/class_m_transformat...
> > > >Thanks!
>
> > > >On Mar 21, 6:25 pm, "[email protected]" <[email protected]> wrote:
>
> > > > > You can match transformations with different rotation orders,
> > > > > because internally the rotation order is irrelevant, it is only used
> > > > > when calculating the input and the output ( given it is rotation ).
> > > > > Internally the 4x4 matrix is just a bunch of vectors, that dont
> > > > > know anything about rotation orders and
> > how many times they spun around.
> > > > > So I am not sure if the classic way will
> > get you what you are looking for.
>
> > > > > t <[email protected]> hat am 21. März 2011 um 03:04 geschrieben:
>
> > > > > > OK! Due to further research, it seems that matching rotations of
> > > > > > different rotation orders is a mathmatical imposibility;
> > > > > >http://en.wikipedia.org/wiki/Rotation_(mathematics)
> > > > > > So, the question now is;
>
> > > > > > What would be the scripted plugin code to do 'relative' additive
> > > > > > rotations on one transform from the rotation values of nodes in a
> > > > > > hierarchy?
>
> > > > > > I'd like to use this class that supports rotations past 360 degrees
> > > > > > using "MTransformationMatrix::rotateBy"
> > > > > >http://download.autodesk.com/us/maya/2010
> > help/api/class_m_transformat...
>
> > > > > > Thanks!
>
> > > > > > --
> > > > > >http://groups.google.com/group/python_inside_maya-Hidequoted text -
>
> > > > > - Show quoted text -
>
> > > >--
> > > >http://groups.google.com/group/python_inside_maya
>
> > > Jan Berger
> > > [email protected] ::www.janberger.de- Hide quoted text -
>
> > > - Show quoted text -
>
> >--
> >http://groups.google.com/group/python_inside_maya
>
> Jan Berger
> [email protected] ::www.janberger.de - Hide quoted text -
>
> - Show quoted text -

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to