Since you've got a CameraOp*, access the matrix methods directly on it rather 
than going through the Op knob interface.

On AxisOp:: there's matrix methods to directly get the Matrix4 - just make sure 
you've validate()'d the Op after setting parameters so the matrix is up to 
date.  Only the local transform matrix (AxisOp::local()) is directly set by the 
Axis_Knob, the concatenated final transform matrix (AxisOp::matrix()) is 
constructed in validate.

-jonathan

On Jun 17, 2011, at 8:16 AM, Buddly wrote:

> Hi everybody
> 
> I'm trying to access the matrix from an internal CameraOp and all related 
> functions succeed the compilation but crash immediatly in Nuke (field(), 
> set_field(), get_field()...). Here is my code :
> 
> Op* aCamera = Op::create("Camera");
> _nukeCamera = dynamic_cast(aCamera);
> 
> _nukeCamera->film_width( _haperture[time]);
> _nukeCamera->film_height( _vaperture[time] );
> _nukeCamera->focal_length( _focal_length[time] );
> _nukeCamera->Near( _near_clip[time] );
> _nukeCamera->Far( _far_clip[time] );
> 
> Matrix4* mat;
> nukeCamera->get_field("matrix", (void*)&mat, sizeof(Matrix4));
> 
> It crashes even if I set just nukeCamera->field("matrix")...
> 
> This make me mad... Any idea ?
> 
> 
> 
> Jeremy
> _______________________________________________
> Nuke-dev mailing list
> [email protected], http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

_______________________________________________
Nuke-dev mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev

Reply via email to