Hi Simon, In Nuke 7, the Matrix4 class has python methods to extract euler rotations in any order. (check Matrix4.rotationsZYX(), Matrix4.rotationsXYZ(), etc...)
If you need to do it in an earlier version, here's a function that might help: http://pastebin.com/jf9uAAEU (Disclaimer, I just extracted this from a larger matrix-related module I wrote. It should run fine independently, but I have not tested it) Using the getEulerRotations() function from the link above, you'd want to do something like: cam = nuke.toNode('YOUR_CAMERA_NAME') mtx = cam['transform'].value() # And then, to get the rotations (in degrees) for a ZYX order... print getEulerRotations(mtx, 'ZYX') Hope that helps. Cheers, Ivan On Sat, Nov 3, 2012 at 2:01 PM, Simon Björk <bjork.si...@gmail.com> wrote: > > Hi all, > > this is probably way over my head, but I'm looking for a way to convert > rotation values from a standard Nuke camera (rotation order ZXY) to rotation > order ZYX using Python. Anyone know where I can find any example code of > this, or could point me in the right direction? > > Thank you. > > _______________________________________________ > Nuke-python mailing list > Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > _______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python