Nuke binary plugins  14.0.8
DD::Image::CameraOp Class Reference
Inheritance diagram for DD::Image::CameraOp:
DD::Image::AxisOp DD::Image::GeomOp DD::Image::LookAt DD::Image::Op DD::Image::LightOp DD::Image::ComplexLightOp

Public Types

typedef void( LensFunc) (Scene *, CameraOp *, MatrixArray *transforms, const VArray &v, Vector4 &out, void *data)
 
typedef void( LensNFunc) (Scene *, CameraOp *, MatrixArray *transforms, VArray *vert_array, int n, void *data)
 
- Public Types inherited from DD::Image::Op
enum  HandlesMode { eNoHandles, eHandlesUncooked, eHandlesCooked, eHandlesMax }
 
enum  PrevalidateResult { eFinished, eCancelled, eAbandoned }
 This is a tribool return value. Do not extend.
 
enum  HandleType {
  eNone, eMouseLeftClick, eMouseRightClick, eMouseMove,
  eMouseDrag, eMouseRelease, eSelectionChanged, eSelectionChangeFinished,
  eHandleDragTranslate, eHandleDragRotate, eHandleDragScale, eHandleDragPivot,
  eAllHandles
}
 
enum  ViewableModes { eViewableMode2D, eViewableMode3D, eViewableMode3D_2DReference }
 
enum  GenerateType {
  OUTPUT_OP, ANY_CONTEXT, INPUT_OP, INPUT_OP_PEEK,
  EXECUTABLE, EXECUTABLE_SKIP, EXECUTABLE_INPUT, UICONTEXT_ONLY
}
 
enum  NodeContext { eNodeGraph, eTimeline, eOpGraph }
 
enum  StatusFlags { StatusNone, StatusModal, StatusUseCallback }
 
enum  PopUpScheme {
  ePU_Never, ePU_Done, ePU_Once, ePU_Default,
  ePU_Always
}
 Pop-up schemes determine when pop-up messages are displayed for op errors. More...
 
enum  VersionComponents { eMajor, eMinor, ePoint, eRevision }
 Enum to help get the desired version component from the VersionInfo tuple.
 
typedef std::pair< int, DD::Image::Op * > Output
 Combination of input number and pointer to Op.
 
typedef std::set< OutputOutputSet
 Set of all outputs from this Op.
 
typedef std::map< Hash, std::vector< unsigned int > > ItemSelectionList
 
typedef bool( EventCallback) (Op *op, EventContext eventCtx)
 
using VersionInfo = std::tuple< int, int, int, int >
 Contains version components with each index defined by the VersionComponents enum.
 

Public Member Functions

 CameraOp (Node *node, GeomOpEngine::Builder engine_ctor)
 
 CameraOp (Node *node)
 Backwards-compatible ctor.
 
const CameraOpcameraOp () const override
 Cast to a CameraOp. This is much cheaper and safer than using dynamic_cast.
 
CameraOpcameraOp () override
 
OpHints opHints () const override
 Return hints to control when and how this op will be evaluated by the top-down system.
 
unsigned node_color () const override
 
void _validate (bool for_real) override
 
void knobs (Knob_Callback) override
 
void addExtraFrontPanelKnobs (Knob_Callback f) override
 
void addDisplayOptionsKnobs (Knob_Callback f) override
 Adds the frustum visualization controls.
 
virtual void addProjectionKnobs (Knob_Callback)
 Adds the default projection controls.
 
virtual void addShutterKnobs (Knob_Callback)
 Adds the default shutter controls.
 
virtual void addLensKnobs (Knob_Callback)
 Adds the default lens controls.
 
void setHorizontalFov (double angle_in_degrees)
 
double horizontalAperture () const
 
void setHorizontalAperture (double w)
 
double verticalAperture () const
 
void setVerticalAperture (double h)
 
double focalLength () const
 
void setFocalLength (double f)
 
double fStop () const
 
void setfStop (double f)
 
double nearPlaneDistance () const
 
void setNearPlaneDistance (double n)
 
double farPlaneDistance () const
 
void setFarPlaneDistance (double f)
 
double focusDistance () const
 
void setFocusDistance (double f)
 
const fdk::Vec2f & windowTranslate () const
 
const fdk::Vec2f & windowScale () const
 
double windowRotateZ () const
 
LensProjection projectionMode () const
 
void setProjectionMode (LensProjection mode)
 
const fdk::Mat4d & projectionMatrix () const
 
virtual fdk::Mat4d projectionModeMatrix (LensProjection mode) const
 
virtual fdk::Mat4d projectionModeMatrixAt (LensProjection mode, const OutputContext &context) const
 Same as projectionMatrix() except it evaluates the matrix at an arbitrary OutputContext.
 
virtual bool isLinearProjection (LensProjection mode) const
 
double lens_distort_a () const
 
double lens_distort_b () const
 
double lens_distort_c () const
 
double lens_distort_D () const
 
double lens_distortion () const
 
double lens_power () const
 
bool lens_distort_enabled () const
 
virtual LensProjectionFunc * lensProjectionFunction (LensProjection mode, const Format *format, CameraLensContext &context) const
 
int importScenePrim (const usg::StageRef &stage, const std::string &prim_path) override
 
HandlesMode doAnyHandles (ViewerContext *ctx) override
 
void build_handles (ViewerContext *) override
 
void draw_handle (ViewerContext *) override
 Draws a lovely camera, I think it is a Mitchell.
 
virtual void drawCameraIcon (bool solid, bool dashed_lines=false)
 Draw the camera's frustum outline solid or wireframe, dashed if 'dashed_lines'=true.
 
void drawNodeName (const char *subcam_name="")
 Draw the node name at position 0,0,0 which will be the local center.
 
void drawNodeName (const fdk::Vec3d &P, const char *subcam_name="")
 Draw the node name at an xyz position P relative to the local center.
 
void drawAperture (const fdk::Vec3d &P, bool dashed_lines=false)
 Draw the aperture rectangle in millimeters, centered on xyz position P. More...
 
void drawSolidFrustum (const fdk::Vec3d &near_corner, const fdk::Vec3d &far_corner)
 Draw the camera's frustum. More...
 
void drawWireFrustum (const fdk::Vec3d &near_corner, const fdk::Vec3d &far_corner, bool dashed_lines=false)
 Draw the camera's frustum outline, dashed if 'dashed_lines'=true. More...
 
enum mFnDeprecatedInNuke14 ("Enumeration deprecated, use enum class LensProjection instead.")
 
 mFnDeprecatedInNuke14 ("Class() has been deprecated, implement on subclass plugin instead.") const char *Class() const override
 
 mFnDeprecatedInNuke14 ("node_help() has been deprecated, implement on subclass plugin instead.") const char *node_help() const override
 
 mFnDeprecatedInNuke14 ("projection_knobs() has been deprecated, use addProjectionKnobs() instead.") virtual void projection_knobs(Knob_Callback f)
 
 mFnDeprecatedInNuke14 ("lens_knobs() has been deprecated, use addDistortionKnobs() instead.") virtual void lens_knobs(Knob_Callback f)
 
 mFnDeprecatedInNuke14 ("projection() has been deprecated, use projectionMatrix() instead") const Matrix4 &projection() const
 
 mFnDeprecatedInNuke14 ("hfov(double) has been deprecated, use setHorizontalFov() instead") void hfov(double v)
 
 mFnDeprecatedInNuke14 ("film_width() has been deprecated, use horizontalAperture() instead") double film_width() const
 
 mFnDeprecatedInNuke14 ("film_height() has been deprecated, use verticalAperture() instead") double film_height() const
 
 mFnDeprecatedInNuke14 ("focal_length() has been deprecated, use focalLength() instead") double focal_length() const
 
 mFnDeprecatedInNuke14 ("Near() has been deprecated, use nearPlaneDistance() instead") double Near() const
 
 mFnDeprecatedInNuke14 ("Far() has been deprecated, use farPlaneDistance() instead") double Far() const
 
 mFnDeprecatedInNuke14 ("focal_point() has been deprecated, use focusDistance() instead") double focal_point() const
 
 mFnDeprecatedInNuke14 ("fstop() has been deprecated, use fStop() instead") double fstop() const
 
 mFnDeprecatedInNuke14 ("film_width(double) has been deprecated, use setHorizontalAperture() instead") void film_width(double v)
 
 mFnDeprecatedInNuke14 ("film_height(double) has been deprecated, use setVerticalAperture() instead") void film_height(double v)
 
 mFnDeprecatedInNuke14 ("focal_length(double) has been deprecated, use setFocalLength() instead") void focal_length(double v)
 
 mFnDeprecatedInNuke14 ("Near(double) has been deprecated, use setNearPlaneDistance() instead") void Near(double v)
 
 mFnDeprecatedInNuke14 ("Far(double) has been deprecated, use setFarPlaneDistance() instead") void Far(double v)
 
 mFnDeprecatedInNuke14 ("focal_point(double) has been deprecated, use setFocusDistance() instead") void focal_point(double v)
 
 mFnDeprecatedInNuke14 ("fstop(double) has been deprecated, use setfStop() instead") void fstop(double v)
 
 mFnDeprecatedInNuke14 ("win_translate() has been deprecated, use windowTranslate() instead") const Vector2 &win_translate() const
 
 mFnDeprecatedInNuke14 ("win_scale() has been deprecated, use windowScale() instead") const Vector2 &win_scale() const
 
 mFnDeprecatedInNuke14 ("win_roll() has been deprecated, use windowRotateZ() instead") double win_roll() const
 
 mFnDeprecatedInNuke14 ("projection_mode() has been deprecated, use projectionMode() instead") int projection_mode() const
 
 mFnDeprecatedInNuke14 ("projection_mode(int) has been deprecated, use setProjectionMode() instead") void projection_mode(int i)
 
 mFnDeprecatedInNuke14 ("projection_is_linear(int) has been deprecated, use isProjectionModeLinear(LensProjection) instead") virtual bool projection_is_linear(int mode) const
 
 mFnDeprecatedInNuke14 ("projection(int) has been deprecated, use projectionModeMatrix(LensProjection) instead") virtual Matrix4 projection(int mode) const
 
 mFnDeprecatedInNuke14 ("projectionAt(OutputContext) has been deprecated, use projectionModeMatrixAt(LensProjection, OutputContext) instead") virtual Matrix4 projectionAt(const OutputContext &)
 
 mFnDeprecatedInNuke14 ("lens_function(int mode) has been deprecated.") virtual LensFunc *lens_function(int mode) const
 
 mFnDeprecatedInNuke14 ("lensNfunction(int mode) has been deprecated.") virtual LensNFunc *lensNfunction(int mode) const
 
 mFnDeprecatedInNuke14 ("to_format has been deprecated, use toFormat instead.") static void to_format(Matrix4 &
 
const FormatmFnDeprecatedInNuke14 ("from_format has been deprecated, use fromFormat instead.") static void from_format(Matrix4 &
 
- Public Member Functions inherited from DD::Image::AxisOp
 AxisOp (Node *node, GeomOpEngine::Builder engine_ctor, int defaultLookAtAxis=LookAt::kAxisZPlus)
 
 AxisOp (Node *node, int defaultLookAtAxis=LookAt::kAxisZPlus)
 Backwards-compatible ctor.
 
const AxisOpaxisOp () const override
 Cast this Op to an AxisOp. This is much cheaper and safer than using dynamic_cast.
 
AxisOpaxisOp () override
 
AxisOpparentInputOp () const
 Convenience that casts parent input 0 to an AxisOp.
 
GeomOpsceneInputOp () const
 Convenience that casts input sceneImporterInput() to a GeomOp.
 
int32_t parentInput () const
 Return the node input to use for the merge geometry source. Always defaults to input 0.
 
virtual int32_t sceneImporterInput () const
 Return the node input to use for the scene importer. Default returns optional_input().
 
const char * node_shape () const override
 Draw a circular node shape.
 
int minimum_inputs () const override
 Default is 2: axis and scene(optional)
 
int maximum_inputs () const override
 Default is 2: axis and scene(optional)
 
int optional_input () const override
 Optional input index is the scene-importer input. This returns (maximum_inputs()-1). More...
 
bool test_input (int node_input, Op *op) const override
 AxisOp and null works on 0, and GeomOp or null on input 1.
 
Opdefault_input (int node_input) const override
 Returns null for all inputs. Override this so Op::test_input() doesn't produce warnings.
 
const char * input_label (int node_input, char *) const override
 
 mFnDeprecatedInNuke14 ("isLegacyAxisOp() has been deprecated, port AxisOp sublass to new Nuke 14 api.") bool isLegacyAxisOp() const
 
const std::string & primName () const
 Return the name of the prim created by this node. Stored in AxisEngine.
 
const usg::Path & primFullPath () const
 Return the full path of this prim and all its parents. Stored in AxisEngine.
 
int updateScenePrim (bool force=false)
 
template<typename T >
size_t getAttribValuesTimeWarped (const usg::Attribute &attr, double attr_fps, fdk::TimeValueList &times, std::vector< T > &values) const
 
template<typename T >
bool copyAttribToKnobTimeWarped (const usg::Attribute &attr, double attr_fps, Knob *knob, bool force_keys, int32_t channel_start_offset, int32_t view) const
 
fdk::TimeValueList getOutputSampleTimes (const fdk::TimeValueList &input_times, double input_fps=0.0) const
 
void setOutputContext (const OutputContext &context) override
 Called by Nuke immediately AFTER Op::knobs(). We use this to update the importer values. More...
 
int knob_changed (Knob *k) override
 
void appendGeomState (DD::Image::Hash &op_hash) override
 Adds the node name to the node hash for invalidation on changes.
 
virtual void addFileImportKnobs (Knob_Callback f)
 Add the file path and import enable knobs.
 
virtual void addCreateOptionsKnobs (Knob_Callback f)
 Adds the create/import, prim path, etc knobs.
 
virtual void addScenePrimImporterKnobs (Knob_Callback f, bool group_open, bool add_time_options, bool add_xform_options)
 
virtual void addLocalParentingKnobs (Knob_Callback f, bool add_sync_options=true)
 
virtual void addLocalXformKnobs (Knob_Callback f, bool add_sync_options=true)
 
virtual void addTransformKnobs (Knob_Callback f, bool add_sync_options=true)
 
Axis_KnobI * getAxis ()
 Return internal 'transform' Axis_Knob for set/get internal transformation.
 
void enableAxisKnobs (bool on)
 
void enableKnobs (const std::vector< std::string > &knobNames, bool on)
 
virtual void enableScenePrimImporterKnobs (bool scene_import_enabled)
 Enable/disable knobs filled in by the scene importer.
 
virtual void enableScenePrimImporterExtraKnobs (bool scene_import_enabled)
 
virtual void enableXformExtractKnobs (bool xform_extract_enabled)
 
const fdk::Mat4d & inputParentTransform () const
 
const fdk::Mat4d & localParentTransform () const
 Result of the local-parent TRS knobs, if enabled. Calculated in _validate().
 
const fdk::Mat4d & localAxisTransform () const
 Result of the local-axis TRS Axis_Knob (without lookat rotations.) Calculated in knobs().
 
const fdk::Mat4d & parentTransform () const
 Parent transform containing the input-parent and local-parent. Calculated in _validate().
 
const fdk::Mat4d & localTransform () const
 Local object transform containing the local-axis TRS Axis_Knob with lookat rotations. Calculated in _validate().
 
const fdk::Mat4d & worldTransform () const
 World transform containing the input-parent, local-parent, local-axis, and lookat. Calculated in _validate().
 
const fdk::Mat4d & invWorldTransform ()
 
virtual fdk::Mat4d worldTransformAt (const OutputContext &context) const
 
void setWorldTransform (const fdk::Mat4d &)
 
int display3d () const
 
int display3d ()
 
void setDisplay3d (int mode)
 
bool selectable () const override
 
void setSelectable (bool v)
 
bool editable () const
 
void setEditable (bool v)
 
virtual bool isGuiInteractive (Axis_KnobI::Transformation knob) const
 Return true if a particular knob transformation is modifiable by user interaction in gui.
 
 mFnDeprecatedInNuke14 ("Class() has been deprecated, implement on subclass plugin instead.") const char *Class() const override
 
 mFnDeprecatedInNuke14 ("node_help() has been deprecated, implement on subclass plugin instead.") const char *node_help() const override
 
 mFnDeprecatedInNuke14 ("selectable(bool mode) has been deprecated, use setSelectable() instead.") void selectable(bool v)
 
 mFnDeprecatedInNuke14 ("display3d(int mode) has been deprecated, use setDisplay3d() instead.") void display3d(int mode)
 
 mFnDeprecatedInNuke14 ("input0() has been deprecated, use parentInput() instead.") AxisOp *input0() const
 
 mFnDeprecatedInNuke14 ("lookAtEnabled() has been deprecated") virtual bool lookAtEnabled() const
 
 mFnDeprecatedInNuke14 ("lookat_input() has been deprecated") Op *lookat_input() const override
 
 mFnDeprecatedInNuke14 ("matrix(const Matrix4&) has been deprecated, use setWorldTransform() instead.") void matrix(const Matrix4 &)
 
 mFnDeprecatedInNuke14 ("local() has been deprecated, use localTransform() instead.") const Matrix4 &local() const
 
 mFnDeprecatedInNuke14 ("matrix() has been deprecated, use worldTransform() instead.") const Matrix4 &matrix() const
 
 mFnDeprecatedInNuke14 ("imatrix() has been deprecated, use invWorldTransform() instead.") const Matrix4 &imatrix()
 
 mFnDeprecatedInNuke14 ("matrixAt() has been deprecated, use getWorldTransformAt() instead.") virtual void matrixAt(const OutputContext &
 
- Public Member Functions inherited from DD::Image::GeomOp
const GeneralInfogeneralInfo () const override
 
const GeomOpgeomOp () const override
 Cast to a GeomOp. This is much cheaper and safer than using dynamic_cast.
 
GeomOpgeomOp () override
 
GeomOpEngine * engineNode () const
 
const char * node_shape () const override
 Draw a round sided box.
 
unsigned node_color () const override
 
int minimum_inputs () const override
 Minimum number of Node inputs for this class - GeomOp base class has only one input.
 
int maximum_inputs () const override
 Maximum number of Node inputs for this class.
 
Opdefault_input (int node_input) const override
 Return a default NullGeomOp op for Node input0.
 
bool test_input (int node_input, Op *op) const override
 Allows only GeomOp inputs by default.
 
void knobs (Knob_Callback f) override
 Default knobs() method - calls addSelectionKnobs(geoselect_saves=false).
 
virtual void addSelectionKnobs (Knob_Callback f, bool geoselect_saves=false)
 
virtual void AppendKnobToTarget (const Knob_Closure &f, const usg::Token &target_id)
 
virtual void AppendKnobToTarget (const char *knob_name, const usg::Token &target_id)
 
void KnobDefinesGeometry (const Knob_Closure &f)
 
void KnobModifiesAttribValues (const Knob_Closure &f)
 
void KnobEditsLayer (const Knob_Closure &f)
 
void KnobEditStage (const Knob_Closure &f)
 
template<typename T >
getKnobValue (const char *knob_name, const OutputContext &context, const T &default_value) const
 
template<typename T >
bool setKnobValue (const char *knob_name, const T &value, double time, int32_t element_offset=0, int32_t view=-1)
 
template<typename T >
bool setKnobValues (const char *knob_name, bool clear_keys, const std::vector< T > &values, const std::vector< double > &times, int32_t element_offset=0, int32_t view=-1)
 
const OutputContextinputContext (int node_input, int offset, OutputContext &scratch_ctx) const override
 
const OutputContextinputUIContext (int node_input, OutputContext &scratch_ctx) const override
 
GeomOpinput (int op_input) const
 
GeomOpinput0 () const
 
GeomOpinput1 () const
 
virtual bool selection3DChanged (ViewerContext *ctx)
 
virtual bool selection3DCleared ()
 
virtual bool selection3DMouseDown (ViewerContext *ctx)
 
virtual bool selection3DMouseUp (ViewerContext *ctx)
 
virtual bool selection3DMouseDrag (ViewerContext *ctx)
 
virtual void printInfo (std::ostream &o)
 
void build_handles (ViewerContext *ctx) override
 
virtual void buildXformHandles (ViewerContext *ctx, const fdk::Mat4d &localMatrix)
 
const usg::GeomState & inputVersions () const
 
const usg::GeomState & localVersions () const
 
const usg::GeomState & outputVersions () const
 
const usg::GeomState & inputGeomState () const
 
const usg::GeomState & localGeomState () const
 
const usg::GeomState & outputGeomState () const
 
void resetGeomState ()
 
void buildGeomState (DD::Image::Hash &op_hash)
 
void appendToTarget (const usg::Token &target_id, const fdk::Hash &hash, const fdk::Hash &version, bool is_animating_source=false)
 
void appendToTarget (const usg::Token &target_id, const Hash &hash, const Hash &version, bool is_animating_source=false)
 
void appendToTarget (const usg::Token &target_id, Op *op)
 Variant that appends op->hash() and uses op->varyingOutputHash() for 'is hash animating' state.
 
void appendToDefineGeometryTarget (const fdk::Hash &hash, const fdk::Hash &version, bool is_animating_source=false)
 
void appendToDefineGeometryTarget (const Hash &hash, const Hash &version, bool is_animating_source=false)
 
void appendToDefineGeometryTarget (Op *op)
 
void appendToModifyValuesTarget (const fdk::Hash &hash, const fdk::Hash &version, bool is_animating_source=false)
 
void appendToModifyValuesTarget (const Hash &hash, const Hash &version, bool is_animating_source=false)
 
void appendToModifyValuesTarget (Op *op)
 
void appendToEditLayerTarget (const fdk::Hash &hash, const fdk::Hash &version, bool is_animating_source=false)
 
void appendToEditLayerTarget (const Hash &hash, const Hash &version, bool is_animating_source=false)
 
void appendToEditLayerTarget (Op *op)
 
void appendToEditStageTarget (const fdk::Hash &hash, const fdk::Hash &version, bool is_animating_source=false)
 
void appendToEditStageTarget (const Hash &hash, const Hash &version, bool is_animating_source=false)
 
void appendToEditStageTarget (Op *op)
 
const usg::GeomStateTargetArray & localTargets () const
 The set of knob-change targets, copied from the shared GeomOpEngine.
 
- Public Member Functions inherited from DD::Image::Op
PrevalidateResult preValidate (ViewerContext *ctx=nullptr, PreValidateContext *=nullptr)
 
OprootOp () const
 
bool preValidateAborted (int treeStartingVersion, PrevalidateResult &result) const
 
const OutputSetgetOutputs () const
 return all the outputs of this node
 
virtual void setInputsValid (bool nowValid)
 set whether the input ops are valid (are for the right context)
 
bool inputsValid () const
 return whether the input ops are valid (are for the right context)
 
virtual bool can_clone () const
 returns whether or not an op can be cloned in the dag
 
bool haveHash () const
 return true if the hash() value is meaningful and globally unique
 
bool varyingOutputHash () const
 
void setVaryingOutputHash (bool varyingHashes)
 Set the varyingOutputHash indicator to a specific state.
 
void enableVaryingOutputHash ()
 Enable the varyingOutputHash indicator.
 
virtual Hash editState () const
 
virtual void setEditState (const Hash &h)
 
virtual std::vector< DD::Image::OutputContextgetPrevVersionsWanted () const
 
virtual const MetaData::Bundle_fetchMetaData (const char *keyname)
 
const MetaData::BundlefetchMetaData (const char *keyname)
 
Node * node () const
 
DD::Image::NodeI * getNode () const
 
void node (Node *v)
 
const char * nodeName () const
 Return NodeI::name() which is the Node's local name with no parent path.
 
std::string nodeFullPath (char separator= '.') const
 
Hash nodeTopologyHash () const
 
OpfirstOp () const
 
void firstOp (Op *v)
 
Opparent () const
 
void parent (Op *lpOp)
 
virtual void detach ()
 node has been deleted in DAG
 
virtual void attach ()
 node has been created in DAG
 
virtual void pre_write_knobs ()
 
void knobStorePrep (const OutputContext &storeContext)
 
void knobStorePost (const OutputContext &storeContext, Hash &hash)
 
int replace_knobs (Knob *afterthis, int n, void(*f)(void *, Knob_Callback), void *, const char *fileExt=nullptr)
 
int add_knobs (void(*f)(void *, Knob_Callback), void *, Knob_Callback)
 
void set_unlicensed ()
 
Knobknob (const char *name) const
 
Knobknob (int) const
 
bool pushed () const
 
bool panel_visible () const
 
bool node_disabled () const
 
bool node_selected () const
 
unsigned node_gl_color () const
 
void * field (const char *name)
 
void * field (const char *name, int &type)
 
void * set_field (const char *name, const void *source, int size)
 
void * get_field (const char *name, void *dest, int size)
 
void beginHandle (HandleType command, ViewerContext *ctx, EventCallback *cb, int index, float x=0, float y=0, float z=0, ViewerContext::Cursor cursor=ViewerContext::kNoCursor)
 
void endHandle (ViewerContext *ctx)
 
virtual int knob_change_finished (Knob *knob, bool changedByUser=true)
 
void addTime (OpTimer::Category category, long long microsecondsCPU, long long microsecondsWall, bool isTopLevel=true)
 
void getPerformanceInfo (OpTimer::Category category, OpTimer::PerformanceInfo &info) const
 return the amount of CPU time taken by this op
 
virtual bool inputs_clockwise () const
 whether unconnected inputs on the DAG should be arranged clockwise or anticlockwise (default)
 
virtual std::vector< int > input_order () const
 
virtual int inputArrows (int nodeInputs) const
 
bool script_command (const char *command, bool py=true, bool eval=true) const
 
bool script_expand (const char *str) const
 
HandlesMode anyHandles (ViewerContext *ctx)
 
void add_draw_handle (ViewerContext *)
 
virtual void add_input_handle (int input, ViewerContext *)
 
void add_op_handle (ViewerContext *ctx)
 
void add_knob_handle (Knob *, ViewerContext *)
 
virtual int getViewableModes () const
 
int inputs () const
 
int node_inputs () const
 
Opnode_input (int, GenerateType=OUTPUT_OP) const
 
Opnode_input (int, GenerateType, const DD::Image::OutputContext *outputContext) const
 
Opinput_op (int n=0) const
 
virtual void inputs (int n)
 
Opinput (int) const
 
int inputNumber (int input, int offset) const
 
Opinput (int input, int offset) const
 
Opinput0 () const
 return the primary input More...
 
Opinput1 () const
 return the second input, if it exists More...
 
const std::vector< Op * > & getInputs () const
 
const std::vector< Op * > & getChildren () const
 
virtual void set_input (int i, Op *op, int input, int offset)
 
void set_input0 (Op *op)
 
void set_input (int i, Op *op)
 
void set_input (int i, Op &op)
 
void set_input (int input, int offset, Op *op)
 
const OutputContextoutputContext () const
 
virtual void append (Hash &)
 
virtual float uses_input (int) const
 
virtual void build_splits ()
 
virtual int split_input (int) const
 
const Hashhash () const
 
virtual bool frameTransformImplemented () const
 
virtual bool frameTransformDownstream (const OutputContext &context, unsigned int input, float inFrame, float &outFrame) const
 
virtual bool frameTransformUpstream (const OutputContext &context, unsigned int input, float outFrame, float &inFrame) const
 
virtual DopeItemFlags::Mask getDopeItemFlags () const
 
virtual bool shouldHideInDopeSheet (Knob *knob) const
 
virtual DD::Image::KnobgetDopeItemKnob () const
 
virtual ViewSet viewsProduced () const
 
virtual ViewSet viewsWantOn (int i) const
 
virtual ViewSet splitForViews () const
 
bool requested () const
 
void setRequested ()
 
void forgetRequestShallow ()
 
void forget_request ()
 
void forget_request (std::set< Op * > &forgotten)
 
DD::Image::Hash curveHash () const
 
bool opCurrent () const
 
virtual const char * node_help () const =0
 
virtual std::string input_longlabel (int) const
 
void node_redraw ()
 
void print_name (std::ostream &o) const
 
NodeContext nodeContext () const
 
std::string node_name () const
 Returns the same string as printed by print_name(ostream).
 
void invalidateSameHash ()
 
bool invalidate ()
 
bool invalidate (const Hash &hash)
 
bool update (const Box *=nullptr)
 
void asapUpdate ()
 
void asapUpdate (const Box &box, int direction=0)
 
void validate (bool for_real=true)
 
virtual void force_validate (bool for_real=true)
 
void update_handles () const
 
bool valid () const
 Returns true if it has been validated - including if there was an error. More...
 
bool real_valid () const
 Returns true if it has been real-validated - including if there was an error. More...
 
bool inErrorState () const
 
bool inInvalidState () const
 
bool opened () const
 
void open ()
 
void unopen ()
 
bool running () const
 
void running (bool v)
 
bool not_closed () const
 
void close ()
 
void callCloseAfter (double seconds)
 
void copyState (Op *input)
 
bool cached () const
 
void cached (bool b)
 
virtual bool inUse () const
 
virtual Executableexecutable ()
 
void setKnobsToContext (const OutputContext &, bool force=false)
 
void gotoContext (const OutputContext &, bool update)
 
void progressFraction (double fraction, StatusFlags flags=StatusNone)
 
void progressFraction (int a, int b, StatusFlags flags=StatusNone)
 
void progressMessage (const char *fmt,...)
 
void progressModalMessage (const char *fmt,...)
 
void progressDismiss ()
 
int slowness () const
 
void slowness (int newval)
 
virtual bool firstEngineRendersWholeRequest () const
 
virtual bool updateUI (const OutputContext &context)
 
const Formatinput_format () const
 
const OutputContextuiContext () const
 
void error (const char *fmt,...)
 
void warning (const char *fmt,...)
 
void critical (const char *fmt,...)
 
void debug (const char *fmt,...)
 
void abort () const
 Abort all trees the op is in.
 
bool aborted () const
 True if one of the trees the op is in was aborted; ops should check this while processing and return quickly when true.
 
void cancel () const
 Cancel all trees the op is in. Make sure you also call abort() to stop processing.
 
bool cancelled () const
 True if one of the trees the op is in was cancelled (by user interaction)
 
bool addToTree (OpTree *lpTree)
 Returns true if the op was added to the tree, or false if its reference count increased.
 
bool removeFromTree (OpTree *lpTree)
 Returns false if the op was removed from the tree, or true if its reference count decreased.
 
bool isInTree (OpTree *lpTree) const
 Checks if an op is in a particular tree, for debugging purposes.
 
bool isInAnyTree () const
 Checks if an op is in any tree at all.
 
OpTreeHandlergetTreeHandler () const
 Returns the treeHandler for a given Op.
 
bool hasError () const
 
bool opOrChildHasError () const
 
const OpgetErroredOp () const
 
void setPopUpScheme (PopUpScheme lScheme)
 
PopUpScheme getPopUpScheme () const
 
bool arePopUpsEnabled ()
 Returns whether a pop-up should be enabled for the next message, modifying internal data when necessary.
 
OpMessageHandlergetMsgHandler ()
 
const OpMessageHandlergetMsgHandler () const
 
std::string getDebugInfo () const
 Returns a string of debug information about the op. For internal use.
 
std::string getDetailedDebugInfo () const
 
bool tryValidate (bool for_real=true)
 
virtual Iopiop ()
 Cast to an Iop. This is much cheaper and safer than using dynamic_cast.
 
virtual const Iopiop () const
 
virtual GeoOpgeoOp ()
 Cast to a GeoOp. This is much cheaper and safer than using dynamic_cast.
 
virtual const GeoOpgeoOp () const
 
virtual ParticleOpparticleOp ()
 Cast to a ParticleOp. This is much cheaper and safer than using dynamic_cast.
 
virtual const ParticleOpparticleOp () const
 
virtual DeepOnlyOpdeepOnlyOp ()
 Cast to a DeepOnlyOp. This is much cheaper and safer than using dynamic_cast.
 
virtual const DeepOnlyOpdeepOnlyOp () const
 
virtual LightOplightOp ()
 Cast to an LightOp. This is much cheaper and safer than using dynamic_cast.
 
virtual const LightOplightOp () const
 
virtual std::string getLibraryName () const
 Return a label and version string to display library version info for the Node.
 
virtual VersionInfo getLibraryVersion () const
 
virtual const char * Class () const =0
 
const std::string libraryDisplayName () const
 
virtual const char * displayName () const
 
virtual std::string docsPath () const
 
virtual bool onAction (const ViewerContext *c, const DD::Image::Flags f, void *d)
 
Opget (const Description *description)
 
- Public Member Functions inherited from DD::Image::LookAt
 LookAt (int defaultLookAxis=kAxisZPlus)
 
virtual Oplookat_input () const =0
 The lookat input op.
 
void knobs (Knob_Callback f)
 Adds the 'Look' tab and knobs for all the look at options.
 
int knobChanged (Op *parent, Knob *k)
 disables the look at input is not present
 
void lookAt (Matrix4 &matrix)
 performs the look at on the incoming matrix
 
void lookMatrixAt (const OutputContext &oc, Matrix4 &concatMatrix)
 performs the look at on the incoming matrix for a given context
 

Static Public Member Functions

static CameraOpdefault_camera ()
 
static void toFormat (fdk::Mat4f &, const Format *)
 
static void fromFormat (fdk::Mat4f &, const Format *)
 
- Static Public Member Functions inherited from DD::Image::GeomOp
static usg::StageRef getStage (const usg::ArgSet &request_args, GeomOp *geop0, GeomOp *geop1=nullptr, const fdk::TimeValueSet *addl_process_times=nullptr)
 
static usg::StageRef getStage (const usg::ArgSet &request_args, const GeomOpSet &geops, const fdk::TimeValueSet *addl_process_times=nullptr)
 Same as getStage(GeomOpSet) but for a set of GeomOps.
 
- Static Public Member Functions inherited from DD::Image::Op
static int treeVersion ()
 
static bool nukeBusy ()
 is nuke processing something on a parallel thread?
 
static Opcreate (Node *node, const char *name, Op *p_op)
 
static Opcreate (const char *name, Op *p_op)
 
static void resetTimers ()
 reset all the performance timers
 
static void setTimingEnabled (bool enabled)
 turn performance timing on or off
 
static bool isTimingEnabled ()
 return whether performance timing is on or not
 
static const char * script_result (bool py=false)
 
static void script_unlock ()
 
static OpretrieveOp (const char *node_path, GenerateType generate_op_type, const OutputContext *generate_op_context=nullptr)
 
static OpretrieveOp (const char *node_path, const Hash &op_hash, int tree_version)
 
static void all_forget_request ()
 
static void new_request_pass ()
 
static double callPendingClose (double seconds)
 
static void clearPendingClose ()
 
static Operror_op ()
 
static const char * error_message ()
 
static void clearAbortAndError ()
 To be removed.
 
static void SetDefaultPopUpEnable (bool lEnable)
 This is used by Nuke to indicate when ops using the default pop-up scheme should show pop-ups. Not recommended for customisation.
 
static std::string getVersionInfoStr (const VersionInfo &versionInfo)
 Helper function to convert a VersionInfo tuple into a string.
 
static const Descriptionfind_description (const char *name, const Op *op_)
 
static int message_f (char t, const char *,...)
 
static int message_vf (char t, const char *, va_list)
 
static void add_timeout (float t, TimeoutHandler, void *v=nullptr)
 
static void repeat_timeout (float t, TimeoutHandler, void *=nullptr)
 
static bool has_timeout (TimeoutHandler, void *=nullptr)
 
static void remove_timeout (TimeoutHandler, void *=nullptr)
 

Static Public Attributes

static const char * projection_modes []
 
static const char * projection_modes_renderer []
 
- Static Public Attributes inherited from DD::Image::Op
static unsigned current_request_pass
 
static void(* node_redraw_cb )(const Op *)
 
static void(* print_name_cb )(std::ostream &, const Op *)
 
static void(* status_callback )(const Op *, float, float, const char *, StatusFlags)
 
static const int kInvalidVersion
 
static const VersionInfo kUnsetVersion
 

Protected Member Functions

 mFnDeprecatedInNuke14 ("projection_ has been deprecated, use Mat4d _projectionMatrix instead.") Matrix4 projection_
 Camera's projection matrix - deprecated.
 
- Protected Member Functions inherited from DD::Image::AxisOp
 mFnDeprecatedInNuke14 ("isLegacyAxisOp() has been deprecated, port AxisOp sublass to new Nuke 14 api.") virtual bool _isLegacyAxisOp() const
 
 mFnDeprecatedInNuke14 ("localtransform_ has been deprecated, use Mat4d _localTransform instead.") Matrix4 localtransform_
 Local 'axis' matrix that Axis_Knob fills in - deprecated.
 
 mFnDeprecatedInNuke14 ("local_ has been deprecated, use Mat4d _localAxisMatrix instead.") Matrix4 local_
 Local matrix after look at performed - deprecated.
 
 mFnDeprecatedInNuke14 ("matrix_ has been deprecated, use Mat4d _worldTransform instead.") Matrix4 matrix_
 Object matrix - local&parent - deprecated.
 
 mFnDeprecatedInNuke14 ("imatrix_ has been deprecated, use Mat4d _invWorldTransform instead.") Matrix4 imatrix_
 Inverse object matrix - deprecated.
 
- Protected Member Functions inherited from DD::Image::GeomOp
 GeomOp (Node *node, GeomOpEngine::Builder engineBuilder)
 
 GeomOp (Node *)
 Ctor for MultiTypeNode support only! Do not implement for Engine-using subclasses.
 
void setOutputContext (const OutputContext &context) override
 Called by Nuke immediately AFTER Op::knobs().
 
int knob_changed (Knob *k) override
 
void _validate (bool for_real) override
 
virtual void updateGeneralInfo ()
 Default implemenation copies the GeneralInfo from input0.
 
virtual fdk::Mat4d handlesParentTransform (DD::Image::ViewerContext *ctx)
 
- Protected Member Functions inherited from DD::Image::Op
 Op (Node *node)
 The constructor is protected so only subclasses can create the base class.
 
virtual void _knobStorePrep (const OutputContext &storeContext)
 The subclass-specific portion of knobStorePrep(). See that method for more info.
 
virtual void _knobStorePost (const OutputContext &storeContext, Hash &hash)
 The subclass-specific portion of knobStorePost(). See that method for more info.
 
virtual void _invalidate ()
 
virtual void _open ()
 
virtual void _close ()
 
Opcreate (Node *node, const char *name)
 
Opcreate (const char *name)
 
HandlesMode anyInputHandles (ViewerContext *)
 return if any of the inputs (recursively) wish to draw handles More...
 
HandlesMode anyKnobHandles (ViewerContext *)
 return if any of the knobs on this node wish to draw handles More...
 
void build_input_handles (ViewerContext *)
 
void build_knob_handles (ViewerContext *)
 
void disallowNoTrees ()
 Call this to tell the op that it should always have op trees for normal behaviour (for internal use)
 
virtual PrevalidateResult doPreValidate (ViewerContext *ctx=nullptr, PreValidateContext *=nullptr)
 
- Protected Member Functions inherited from DD::Image::LookAt
void perform_lookat (Matrix4 &concatMatrix, const Matrix4 &axisMatrix)
 

Protected Attributes

union {
   double   _focalLength
 Focal length of lens (*** in millimeters ***)
 
}; 
 
union {
   double   _horizontalAperture
 Horizontal aperture size (film width) (*** in millimeters ***)
 
}; 
 
union {
   double   _verticalAperture
 Vertical aperture size (film height) (*** in millimeters ***)
 
}; 
 
union {
   double   _fStop
 Lens aperture diameter (*** unitless ratio tied to focal-length ***)
 
}; 
 
union {
   double   _nearPlaneDistance
 Near clipping plane distance (*** in world units ***)
 
}; 
 
union {
   double   _farPlaneDistance
 Far clipping plane distance (*** in world units ***)
 
}; 
 
union {
   double   _focusDistance
 Focus point distance (*** in world units ***)
 
}; 
 
union {
   fdk::Vec2f   _windowTranslate
 Window coords translate XY.
 
}; 
 
union {
   fdk::Vec2f   _windowScale
 Window coords scale XY.
 
}; 
 
union {
   double   _windowRotateZ
 Window coords rotate Z.
 
}; 
 
union {
   LensProjection   _lensProjectionMode
 Lens projection mode.
 
}; 
 
ShutterControls _shutter
 Shutter controls which may be referenced by a renderer.
 
double _shutterBias
 Weights the shutter samples towards shutter close with a power function.
 
double _worldToMeters
 World to meters - used to convert lens mm values to world scale.
 
bool _glWorldSizeIcon
 Always draw the camera icon at the 'real' world size (defined by _worldToMeters)
 
bool _glSolidFrustum
 Draw the camera frustum as solid.
 
bool _glInsideFrustum
 Indicated whether to draw the frustum as an inside or outside box.
 
bool use_vertical_lock_
 
double lens_distort_a_
 
double lens_distort_b_
 
double lens_distort_c_
 
double lens_distort_D_
 
double lens_distortion_
 
double lens_power_
 
bool lens_distort_enabled_
 
fdk::Mat4d _projectionMatrix
 Camera's projection matrix (only valid for linear projections)
 
- Protected Attributes inherited from DD::Image::AxisOp
std::string _primPath
 Path + name for the output prim to create (if needed)
 
int32_t _parentPrimType
 The type for missing parent prims we create.
 
bool _importEnabled
 If true this node imports prim attributes from scene input or file source.
 
bool _passthroughEnabled
 If true this node does not create or change any input scene prims.
 
bool _mergeEnabled
 If true any input scenegraph is merged into the output scenegraph.
 
struct DD::Image::AxisOp::ScenePrimImport  _importer
 Scene prim importer controls & state.
 
bool _importerChanged
 If true any knobs set by the importer need to be re-stored.
 
fdk::Vec3d _localParentTranslate
 Local-parent translation knob value.
 
fdk::Vec3d _localParentRotate
 Local-parent rotate knob value.
 
fdk::Vec3d _localParentScale
 Local-parent scale knob value.
 
fdk::Mat4d _localParentMatrix
 Parent transform derived from local parent TRS knobs.
 
fdk::Mat4d _localAxisMatrix
 Local matrix that Axis_Knob fills in (no lookat rotations)
 
fdk::Mat4d _parentTransform
 Input-parent & local-parent transform.
 
fdk::Mat4d _localTransform
 Local object transform - axis_matrix & lookat rotations.
 
fdk::Mat4d _worldTransform
 World transform - _parentTransform & _localTransform.
 
fdk::Mat4d _invWorldTransform
 Inverse world transform.
 
DD::Image::Hash _parentHash
 Does parent path or transform need to be updated?
 
union {
   bool   _xformInversionValid
 Is _invWorldTransform valid?
 
}; 
 
union {
   Axis_KnobI *   _axisKnob
 Reference to the node Axis_Knob.
 
}; 
 
WorldMatrixProvider_worldMatrixProvider
 'world_matrix' output knob
 
Knob_localParentTranslateKnob
 If not null apply parent_translate.
 
Knob_localParentRotateKnob
 If not null apply parent_rotate.
 
Knob_localParentScaleKnob
 If not null apply parent_scale.
 
int display3d_
 GUI display setting - deprecate?
 
bool selectable_
 GUI selectable checkmark - deprecate?
 
bool _editable
 Can the user change the knobs? (i.e. knobs not disabled)
 
- Protected Attributes inherited from DD::Image::GeomOp
GeomOpEngine * _engineNode
 GeomEngine graph processor shared between all Op instances of this GeomOp subclass.
 
GeneralInfo info_
 Global intended frame range (must remain 'info_' for MultiTypeNode support!)
 
- Protected Attributes inherited from DD::Image::Op
bool _haveHash
 whether the _hash actually has been set by a call to invalidate(Hash) ever.
 
bool _varyingOutputHash
 whether the hash value will animate over time
 
Hash _editState
 Op's current edit state, usually the combination of input & knob edit states.
 
- Protected Attributes inherited from DD::Image::LookAt
Matrix4 lookat_matrix_
 Matrix for rotating to look at the look input.
 
Matrix4 my_local
 For the Axis_Knob to store into.
 
bool my_transform_normals
 
int my_lookat_axis
 
bool my_rotate_x
 
bool my_rotate_y
 
bool my_rotate_z
 
bool my_lookat_use_quat
 
double my_lookat_strength
 

Additional Inherited Members

- Public Attributes inherited from DD::Image::AxisOp
Matrix4const
 
- Public Attributes inherited from DD::Image::Op
const MetaData::BundlemetaCache
 
Hash metaCacheHash
 
- Protected Types inherited from DD::Image::LookAt
enum  {
  kAxisZPlus, kAxisZMinus, kAxisYPlus, kAxisYMinus,
  kAxisXPlus, kAxisXMinus
}
 
- Static Protected Member Functions inherited from DD::Image::GeomOp
template<class Engine >
static GeomOpEngine::Builder BuildEngine ()
 A helper function you can use as the engineBuilder argument to the GeomOp constructor to reduce clutter.
 
- Static Protected Attributes inherited from DD::Image::LookAt
static const char *const ms_lookat_axis_choices []
 

Detailed Description

Op that defines a 3D camera.

Member Function Documentation

CameraOp * CameraOp::default_camera ( )
static

Return a default camera that can be used when the there is no camera attached to your renderer. This camera is at the origin, looking along -Z, and has a lens ratio focal-length/film-width of 1.

Referenced by DD::Image::Render::_validate(), DD::Image::RenderScene::build_handles(), and DD::Image::RenderScene::render_camera().

void CameraOp::knobs ( Knob_Callback  f)
overridevirtual

Default knobs puts the transform controls on the front tab, and the projection, shutter, and lens controls on tab 'Projection'.

Reimplemented from DD::Image::AxisOp.

References addLensKnobs(), addProjectionKnobs(), addShutterKnobs(), and DD::Image::Tab_knob().

void CameraOp::addExtraFrontPanelKnobs ( Knob_Callback  f)
overridevirtual

AxisOp::knobs() calls this after addTransformKnobs(), inserting the 'Projection' tab ahead of the 'Display' tab. The 'Projection' tab contains the projection, shutter, and lens controls.

Reimplemented from DD::Image::AxisOp.

References addLensKnobs(), addProjectionKnobs(), addShutterKnobs(), and DD::Image::Tab_knob().

void CameraOp::setHorizontalFov ( double  angle_in_degrees)

Sets _horizontalAperture using field-of-view angle in degrees. Focal length remains the same.

References _focalLength, _horizontalAperture, clamp(), and radians().

const fdk::Mat4d& DD::Image::CameraOp::projectionMatrix ( ) const
inline

Returns a transformation to an output image due to the camera lens. This will transform points at the left edge of the film to an x value of -1, and points at the right to an x value of +1. Vertically it will produce a square transform, ie for most film shapes the +/-1 value for y is outside the top or bottom of the rectangular frame.

The z output of this transformation is set to match the OpenGL near/far clipping planes at -1 and +1. These planes may be chosen by Nuke to make a nice display with OpenGL, and you should avoid having them have any effect on the output image. If you want the actual distance to an object from the camera, the w output of this transformation will give you that.

For most uses you want to multiply projectionMatrix()*xform() and pass the result through to_format() to get the transformation from world space to output pixels.

Mat4d CameraOp::projectionModeMatrix ( LensProjection  mode) const
virtual

Return a linear camera projection matrix for the projection mode arg using the CameraOp's current lens values (ie its focal_length, horizontal_aperture, etc.)

Only the predefined LensProjection enums are implemented in the base class implementation, but a subclass can override this method to implement custom projection calculations.

This method should be used in conjunction with isLinearProjection() to determine how to use the returned matrix, as not all projection modes can be supported by a linear matrix. For example uv and spherical, plus perspective/ortho projections become non linear if lens distortion is enabled. In non-linear cases the matrix returned is normally considered the 'base' projection for the camera based on its current lens settings. In other words although the projection mode may be 'perspective' and the matrix returned is a valid perspective projection, if lens distortion is enabled then the final projection is a combination of both the projection matrix and the distortion.

References _farPlaneDistance, _focalLength, _horizontalAperture, _nearPlaneDistance, _windowRotateZ, _windowScale, _windowTranslate, DD::Image::ORTHOGRAPHIC, DD::Image::PERSPECTIVE, and radians().

bool CameraOp::isLinearProjection ( LensProjection  mode) const
virtual

Returns true if projection mode arg can be described linearly with a 4x4 matrix, based on the camera's current settings. This is usually only true for perspective and orthographic modes if no lens distortion is being done.

A subclass should override this method if it's implementing custom projection calculations in projectionModeMatrix().

See projectionModeMatrix() for more info.

References DD::Image::ORTHOGRAPHIC, DD::Image::PERSPECTIVE, DD::Image::SPHERICAL, and DD::Image::UV.

LensProjectionFunc * CameraOp::lensProjectionFunction ( LensProjection  mode,
const Format format,
CameraLensContext context 
) const
virtual

Returns the current lens function used to distort vertices during software rendering. CameraLensContext is passed so the camera can configure the projection parameters. Base class default implementation calls LensProjectionFunction() for the standard (built-in) lens functions.

References DD::Image::LensProjectionFunction().

int CameraOp::importScenePrim ( const usg::StageRef &  stage,
const std::string &  prim_path 
)
overridevirtual

Try to import camera prim data from the provided stage. Will return 1(error) if stage is invalid. If prim_path is empty then -1 will be returned indicating no change has occured, otherwise if prim_path is invalid or not present in stage then 1(error) will be returned.

This will call AxisOp::importScenePrim() to import the XformablePrim data then import the CameraPrim attributes.

Return codes: -1 - no prim data was loaded and no error, usually due to empty prim path 0 - prim data was loaded with no error 1 - there was an error and no prim data was loaded

Reimplemented from DD::Image::AxisOp.

References DD::Image::AxisOp::_importer, DD::Image::Op::debug(), DD::Image::AxisOp::getAttribValuesTimeWarped(), DD::Image::AxisOp::importScenePrim(), DD::Image::Op::knob(), and DD::Image::Knob::set().

void CameraOp::toFormat ( fdk::Mat4f &  matrix,
const Format format 
)
static

Multiply the passed matrix by the necessary transformation to put x=-1 at the left edge of the format, +1 at the right, and to center it vertically, and compensate for any pixel aspect. The output z and w are left unchanged.

Most Iops will need to do this using their output format to get the actual transformation from input space to output space. You would do this first, then multiply by the projection*local*parent.

References DD::Image::Format::pixel_aspect(), DD::Image::Box::r(), DD::Image::Box::t(), DD::Image::Box::w(), DD::Image::Box::x(), and DD::Image::Box::y().

void CameraOp::fromFormat ( fdk::Mat4f &  matrix,
const Format format 
)
static

Opposite transformation of to_format(). Multiplies the passed matrix by a transformation that scales the input format to go from x = -1 to x = 1 and to center it vertically around y = 0, and to remove any pixel aspect ratio. You multiply by this matrix last.

The 3DCard iop scales further so the image covers a range so that if the camera lens and "taking lens" are equal the image fills the field of view.

References DD::Image::Format::pixel_aspect(), DD::Image::Box::r(), DD::Image::Box::t(), DD::Image::Box::w(), DD::Image::Box::x(), and DD::Image::Box::y().

void CameraOp::drawAperture ( const fdk::Vec3d &  P,
bool  dashed_lines = false 
)

Draw the aperture rectangle in millimeters, centered on xyz position P.

Draw the aperture rectangle in millimeters, centered on 'P'.

References _horizontalAperture, and _verticalAperture.

Referenced by draw_handle().

void CameraOp::drawSolidFrustum ( const fdk::Vec3d &  near_corner,
const fdk::Vec3d &  far_corner 
)

Draw the camera's frustum.

Draw the camera's frustum.

References _glInsideFrustum.

Referenced by draw_handle().

void CameraOp::drawWireFrustum ( const fdk::Vec3d &  near_corner,
const fdk::Vec3d &  far_corner,
bool  dashed_lines = false 
)

Draw the camera's frustum outline, dashed if 'dashed_lines'=true.

Draw the camera's frustum.

Referenced by draw_handle().

enum DD::Image::CameraOp::mFnDeprecatedInNuke14 ( "Enumeration  deprecated,
use enum class LensProjection instead."   
)
inline

< Standard perspective projection

< Standard orthographic projection

< Replace screen XY with UV coordinate

< 360x180 world spherically projected around camera

< Renderer uses this option

< Camera user projection



©2024 The Foundry Visionmongers, Ltd. All Rights Reserved.
www.foundry.com