print rotation coords in quaternions

Hi. extremely new to this. bit stuck and cant seem to find the info Im looking for anywhere or Im misunderstanding something?

How do I go about printing the rotation coords (in quaternions) for selected objects in the scene in this format RotX, RotY, RotZ, RotW to the listner?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Graph's picture

its 2 mouseclicks and 1 f1

its 2 mouseclicks and 1 f1 click away so i dont know where the problem is in finding the solution
simply select a function or word you like to research like "quat" and hit F1

for o in selection do 
(
 local tmR = o.transform.rotationPart
 print o.name
 format "% % % %\n" tmR.x tmR.y tmR.z tmR.w
)

and dun worry it didnt read like it otherwise id have you wait a week for the full answer; my way of dealing with someOnes hissyFit ;)

Raphael 'Insanto' Steves
http://Graph.Net84.Net

dizzy's picture

Thank you for all your help

Thank you for all your help :)

Graph's picture

take a look into the

take a look into the maxScript help, its actually usefull ;)

Raphael 'Insanto' Steves
http://Graph.Net84.Net

dizzy's picture

:P Dont think I dont read it,

:P Dont think I dont read it, I have honestly spent more time reading that thing in the last three weeks than doing anything else other than getting errors from max from running my attempts. I just seem to be finding it quite difficult atm

But fair enough I see how it might look (like Im after you doing my work for me) and I should work this stuff out myself or how will I learn. probably was a bit quick to ask for more help on this anyway.

Thanks again for the help you did give though and I dont mean any of this in a rude way in case it reads that way.

dizzy's picture

Thanks for your help but how

Thanks for your help but how do I get it to print without the brackets and quat? I need to use it amongst other data from objects and for multiple objects

Graph's picture

$.transform.rotationpart form

$.transform.rotationpart

format "% \n" $.transform.rotationpart

Raphael 'Insanto' Steves
http://Graph.Net84.Net

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.