All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GusdOBJ_usdcamera Class Reference

USD camera object node. More...

Inherits OBJ_Camera.

Public Types

enum  {

Public Member Functions

virtual bool runCreateScript () override
 Overridden to modify defaults of scripted properties. More...
virtual bool evalVariableValue (fpreal &val, int idx, int thread) override
 Evaluate the float value of a variable. More...
virtual bool evalVariableValue (UT_String &val, int idx, int thread) override

Static Public Member Functions

static OP_TemplatePair * GetTemplates ()
static OP_VariablePair * GetVariables ()
static OP_Node * creator (OP_Network *net, const char *name, OP_Operator *op)
static void Register (OP_OperatorTable *table)

Protected Member Functions

 GusdOBJ_usdcamera (OP_Network *net, const char *name, OP_Operator *op)
virtual int applyInputIndependentTransform (OP_Context &ctx, UT_DMatrix4 &mx) override
virtual bool updateParmsFlags () override
virtual void loadStart () override
virtual void loadFinished () override
virtual OP_ERROR cookMyObj (OP_Context &ctx) override

Detailed Description

USD camera object node.

Houdini cameras are evaluated based on a combination of node parameters and the object's computed transform. This implementation works by using custom local variables in expressions to pull in the corresponding data from USD. The reason for doing it this way is that, by default, we're able to have everything come from USD, but at any point, users are free to delete or modify the default expressions to change behavior (eg., maybe we want 2x the authored near/far range).

An additional oddity is that the camera parameters come from creation scripts. Specifically, see obj/, which simply calls out to the standard camera startup script. We do this because it means we don't have to replicate the parm interface ourselves. It also means we're guaranteed to get a default setup that looks just like a regular cam. That should be the goal here: a plain old cam that's driven by USD. The use of startup scripts is not without precedent; it's exactly how the standard camera node works.

Definition at line 60 of file OBJ_usdcamera.h.

Member Function Documentation

virtual bool evalVariableValue ( fpreal &  val,
int  idx,
int  thread 

Evaluate the float value of a variable.

This is where we hook in most of our USD queries.

virtual bool runCreateScript ( )

Overridden to modify defaults of scripted properties.

The documentation for this class was generated from the following file: