There's a few things on nukepedia - attached is one I adapted from there. Has the maths for rotation in it - select an object and run it - you'll get a camera rotating to the object.
Might point you in the right direction. cant remeber the difference between the 2 off the top of my head but I use cameraTarget.py Howard >________________________________ > From: Lars Cawley <[email protected]> >To: Nuke Python discussion <[email protected]> >Sent: Sunday, 27 November 2011, 9:45 >Subject: Re: [Nuke-python] Parenting a projection camera to a moving object > >So, no comments on how to stick a camera to an animated axis (or object) and >have it maintain its relationship with it? > >Lars > >On 22/11/2011 10:22 p.m., Lars Cawley wrote: >> Having thrashed around for a while trying to get a camera linked to a moving >> object, I'd be really happy to be shown The Way. >> The idea is to get a camera (which is projecting an image, often some edited >> version of the plate) to keep it's position relative to the tracked object. >> This is a natural behaviour in 3D software such as Maya/Max, but not in Nuke >> it seems. In Nuke the linked object inherits all transforms of the object >> from [0,0,0] and I scripted my way beyond that, but the rotations are where >> my attempts have fallen down. I will plunge in and learn more about matrix >> transforms if I must, but if there is another way I would be so grateful. >> >> Lars >> _______________________________________________ >> Nuke-python mailing list >> [email protected], http://forums.thefoundry.co.uk/ >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >> >> > >_______________________________________________ >Nuke-python mailing list >[email protected], http://forums.thefoundry.co.uk/ >http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > > >
TargetCamera.py
Description: Binary data
cameraTarget.py
Description: Binary data
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
