#include <GeomOp.h>
Classes | |
| class | Description |
Public Member Functions | |
| const GeneralInfo & | generalInfo () const override |
| const GeomOp * | geomOp () const override |
| Cast to a GeomOp. This is much cheaper and safer than using dynamic_cast. | |
| GeomOp * | geomOp () override |
| GeomOpEngine * | engineNode () const |
| Op * | getGeometryProviderOp () override |
| GeometryProviderI: Return the Op the interface is attached to. | |
| GeometryProviderI * | asGeometryProvider () override |
| GeometryProviderI: Allow subclasses to gain access to sibling functions. | |
| GeometryProviderI * | geometryProvider () override |
| Cast to a GeometryProviderI interface. This is much cheaper and safer than using dynamic_cast. | |
| const GeometryProviderI * | geometryProvider () const override |
| fdk::Hash | geometryComposeState () override |
| Returns the compose state of the GeomOpEngine. | |
| fdk::Hash | geometryEditVersionState () override |
| Returns the edit state of the GeomOpEngine. | |
| bool | geometryStateVaries () override |
| Returns the animating state of the GeomOpEngine. | |
| usg::LayerRef | buildGeometryLayer (bool, const fdk::TimeValueSet &) override |
| Base class returns an empty layer. | |
| bool | canProvideGeometryStage () const override |
| Provide a fully constructed usg::Stage via getGeometryStage(). | |
| void | buildGeometryStage (usg::StageRef &stage, const usg::ArgSet &requestArgs, const fdk::TimeValueSet &sampleTimes=fdk::TimeValueSet()) override |
| 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. | |
| Op * | default_input (int nodeInput) 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. | |
| virtual int | mergeInput () const |
| Returns the node input to use for the merge geometry source. Always defaults to input 0. | |
| virtual const char * | mergeInputLabel () const |
| Returns the merge input label for use in Op::input_label() | |
| virtual bool | testMergeInput (Op *op) const |
| For use in Op::test_input(). Allows connections to GeomOp and GeometryProviderI ops. | |
| virtual void | AppendKnobToTarget (const Knob_Closure &f, const usg::Token &target_id, bool targetCanAnimate=true) |
| virtual void | AppendKnobToTarget (const char *knobName, const usg::Token &target_id, bool targetCanAnimate=true) |
| 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 > | |
| T | getKnobValue (const char *knobName, const OutputContext &context, const T &default_value) const |
| template<typename T > | |
| bool | setKnobValue (const char *knobName, const T &value, double time, int32_t element_offset=0, int32_t view=-1) |
| template<typename T > | |
| bool | setKnobValues (const char *knobName, bool clear_keys, const std::vector< T > &values, const std::vector< double > ×, int32_t element_offset=0, int32_t view=-1) |
| GeomOp * | input0 () const |
| GeomOp * | input1 () const |
| virtual bool | selectable () const |
| virtual bool | selection3DChanged (ViewerContext *ctx) |
| virtual bool | selection3DCleared () |
| virtual bool | selection3DMouseDown (ViewerContext *ctx) |
| virtual bool | selection3DMouseUp (ViewerContext *ctx) |
| virtual bool | selection3DMouseDrag (ViewerContext *ctx) |
| void | selectionChanged () const |
| Handles updates from node selection changes. | |
| void | build_handles (ViewerContext *ctx) override |
| virtual void | buildXformHandles (ViewerContext *ctx, const fdk::Mat4d &localMatrix) |
| const usg::GeomState & | inputGeomState () const |
| const usg::GeomState & | localGeomState () const |
| const usg::GeomState & | outputGeomState () const |
| void | resetGeomState () |
| void | buildGeomState (DD::Image::Hash &newOpHash, DD::Image::Hash &newOpEditVersionHash) |
| void | appendToTarget (const usg::Token &target_id, bool targetCanAnimate, const fdk::Hash &editVersion, bool isAnimatingSource=false) |
| void | appendToTarget (const usg::Token &target_id, bool targetCanAnimate, const Hash &editVersion, bool isAnimatingSource=false) |
| void | appendToTarget (const usg::Token &target_id, bool targetCanAnimate, Knob *knob) |
| void | appendToTarget (const usg::Token &target_id, bool targetCanAnimate, const Op::Input &opConnection, bool includeTopologyHash=true) |
| void | appendToDefineGeometryTarget (const fdk::Hash &editVersion) |
| void | appendToDefineGeometryTarget (const Hash &editVersion) |
| void | appendToDefineGeometryTarget (const Op::Input &opConnection, bool includeTopologyHash=true) |
| void | appendToDefineGeometryTarget (Knob *knob) |
| void | appendToModifyValuesTarget (const fdk::Hash &editVersion, bool isAnimatingSource=false) |
| void | appendToModifyValuesTarget (const Hash &editVersion, bool isAnimatingSource=false) |
| void | appendToModifyValuesTarget (const Op::Input &opConnection, bool includeTopologyHash=true) |
| void | appendToModifyValuesTarget (Knob *knob) |
Public Member Functions inherited from DD::Image::Op | |
| PrevalidateResult | preValidate (ViewerContext *ctx=nullptr, PreValidateContext *=nullptr) |
| Op * | rootOp () const |
| bool | preValidateAborted (int treeStartingVersion, PrevalidateResult &result) const |
| const OutputSet & | getOutputs () 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 | |
| virtual bool | can_link () const |
| returns whether or not an op can be linked in the dag | |
| const Hash & | hash () const |
| 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 | editVersionHash () const |
| virtual void | setEditVersionHash (const Hash &h) |
| virtual std::vector< DD::Image::OutputContext > | getPrevVersionsWanted () const |
| virtual const MetaData::Bundle & | _fetchMetaData (const char *keyname) |
| const MetaData::Bundle & | fetchMetaData (const char *keyname) |
| Node * | node () const |
| DD::Image::NodeI * | getNode () const |
| void | node (Node *v) |
| virtual const char * | nodeClass () const |
| virtual const char * | nodeName () const |
| virtual std::string | nodeFullPath (char separator='.') const |
| Hash | nodeTopologyHash () const |
| Hash | nodeEditVersionHash () const |
| Op * | firstOp () const |
| void | firstOp (Op *v) |
| Op * | parent () 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 &opStoreContext) |
| virtual void | knobs (Knob_Callback) |
| void | knobStorePost (const OutputContext &opStoreContext, Hash &newOpHash, Hash &newOpEditVersionHash) |
| 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 () |
| Knob * | knob (const char *name) const |
| Knob * | knob (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_changed (Knob *) |
| 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) |
| virtual void | build_handles (ViewerContext *) |
| void | add_draw_handle (ViewerContext *) |
| virtual void | 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 |
| virtual int | optional_input () const |
| virtual int | minimum_inputs () const |
| virtual int | maximum_inputs () const |
| virtual bool | test_input (int, Op *) const |
| int | inputs () const |
| int | node_inputs () const |
| OpGraphLocation | nodeInputConnection (int32_t nodeInput, GenerateType type=OUTPUT_OP) const |
| OpGraphLocation | nodeInputConnection (int32_t nodeInput, GenerateType type, const OutputContext *context) const |
| Op * | node_input (int, GenerateType=OUTPUT_OP) const |
| Op * | node_input (int, GenerateType, const OutputContext *context) const |
| Op * | input_op (int n=0) const |
| virtual void | inputs (int n) |
| Op * | input (int) const |
| Op * | inputAt (int input, const OutputContext &context, GenerateType type=EXECUTABLE_INPUT) const |
| int | inputNumber (int input, int offset) const |
| Op * | input (int input, int offset) const |
| Op * | input0 () const |
| return the primary input | |
| Op * | input1 () const |
| return the second input, if it exists | |
| const Input & | inputConnection (int32_t input) const |
| const Input & | inputConnection (int32_t base, int32_t offset) const |
| mFnDeprecatedInNuke17 ("getInputs() has been deprecated, use getInputOps() instead") const OpList &getInputs() const | |
| OpList | getInputOps () const |
| const InputList & | getInputConnections () const |
| const OpList & | getChildren () const |
| mFnDeprecatedInNuke17 ("set_input(int, Op*, int, int) has been deprecated, use setInput(int, Input) and implement _setInput() instead") virtual void set_input(int i | |
| 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) |
| Same as setInput(inputNumber(n, offset), op, n, offset);. | |
| void | setInput (int32_t input, const OpGraphLocation &connection) |
| Same as setInput(input, connection, input, 0). | |
| void | setInput (int32_t input, const OpGraphLocation &connection, int32_t base, int32_t offset) |
| const OutputContext & | outputContext () const |
| virtual void | setOutputContext (const OutputContext &c) |
| virtual void | append (Hash &) |
| virtual float | uses_input (int) const |
| virtual void | build_splits () |
| virtual int | split_input (int) const |
| virtual const OutputContext & | inputContext (int n, int offset, OutputContext &) const |
| virtual const OutputContext * | inputUIContext (int n, OutputContext &) const |
| virtual Op * | default_input (int) 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::Knob * | getDopeItemKnob () 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 (OpSet &forgotten) |
| virtual const char * | node_shape () const |
| DD::Image::Hash | curveHash () const |
| bool | opCurrent () const |
| virtual unsigned | node_color () const |
| virtual const char * | node_help () const =0 |
| virtual const char * | input_label (int, char *) const |
| 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. | |
| bool | real_valid () const |
| Returns true if it has been real-validated - including if there was an error. | |
| 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) |
| void | setRecycling (bool recycling) |
| bool | recycling () const |
| virtual bool | inUse () const |
| virtual Executable * | executable () |
| 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 Format & | input_format () const |
| const OutputContext & | uiContext () 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. | |
| OpTreeHandler * | getTreeHandler () const |
| Returns the treeHandler for a given Op. | |
| bool | hasError () const |
| bool | opOrChildHasError () const |
| const Op * | getErroredOp () 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. | |
| OpMessageHandler & | getMsgHandler () |
| const OpMessageHandler & | getMsgHandler () 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 Iop * | iop () |
| Cast to an Iop. This is much cheaper and safer than using dynamic_cast. | |
| virtual const Iop * | iop () const |
| virtual ParticleOp * | particleOp () |
| Cast to a ParticleOp. This is much cheaper and safer than using dynamic_cast. | |
| virtual const ParticleOp * | particleOp () const |
| virtual DeepOnlyOp * | deepOnlyOp () |
| Cast to a DeepOnlyOp. This is much cheaper and safer than using dynamic_cast. | |
| virtual const DeepOnlyOp * | deepOnlyOp () const |
| virtual AxisOp * | axisOp () |
| Cast to an AxisOp. This is much cheaper and safer than using dynamic_cast. | |
| virtual const AxisOp * | axisOp () const |
| virtual AxisSceneOp * | axisSceneOp () |
| Cast to an AxisSceneOp. This is much cheaper and safer than using dynamic_cast. | |
| virtual const AxisSceneOp * | axisSceneOp () const |
| virtual CameraOp * | cameraOp () |
| Cast to an CameraOp. This is much cheaper and safer than using dynamic_cast. | |
| virtual const CameraOp * | cameraOp () const |
| virtual CameraSceneOp * | cameraSceneOp () |
| Cast to an AxisSceneOp. This is much cheaper and safer than using dynamic_cast. | |
| virtual const CameraSceneOp * | cameraSceneOp () const |
| virtual LightOp * | lightOp () |
| Cast to an LightOp. This is much cheaper and safer than using dynamic_cast. | |
| virtual const LightOp * | lightOp () const |
| virtual LightSceneOp * | lightSceneOp () |
| Cast to an LightSceneOp. This is much cheaper and safer than using dynamic_cast. | |
| virtual const LightSceneOp * | lightSceneOp () const |
| virtual SceneOpI * | sceneOpI () |
| Cast to a SceneOpI, if Op has that interface. | |
| virtual const SceneOpI * | sceneOpI () const |
| virtual GeometryProviderI * | geometryProvider () |
| Cast to a GeometryProviderI, if Op has that interface. | |
| virtual const GeometryProviderI * | geometryProvider () const |
| virtual GeoOp * | geoOp () |
| Cast to a GeoOp. This is much cheaper and safer than using dynamic_cast. | |
| virtual const GeoOp * | geoOp () const |
| virtual GeomOp * | geomOp () |
| Cast to a GeomOp. This is much cheaper and safer than using dynamic_cast. | |
| virtual const GeomOp * | geomOp () 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 OpHints | opHints () const |
| Return hints to control when and how this op will be evaluated by the top-down system. | |
| virtual bool | resolveKnobAsset (Knob *knob, const std::string &assetPath, std::string &resolvedAssetPath) |
| virtual bool | updateKnobsFromAsset (Knob *knob) |
| virtual void | _updateKnobsFromAsset (Knob *assetKnob, const ndk::asset::AssetData &assetData) |
| 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) |
| Op * | get (const Description *description) |
Public Member Functions inherited from DD::Image::GeometryProviderI | |
| virtual GeometryProviderI * | asGeometryProvider ()=0 |
| virtual Op * | getGeometryProviderOp ()=0 |
| Op * | getGeometryProviderOp () const |
| Same as getGeometryProviderOp() but const. | |
| virtual fdk::Hash | geometryComposeState ()=0 |
| virtual fdk::Hash | geometryEditVersionState ()=0 |
| virtual bool | geometryStateVaries ()=0 |
| virtual usg::LayerRef | buildGeometryLayer (bool appendTo=false, const fdk::TimeValueSet &sampleTimes=fdk::TimeValueSet())=0 |
| virtual usg::LayerRef | getGeometryLayer (const fdk::TimeValueSet &sampleTimes=fdk::TimeValueSet()) |
| virtual bool | canProvideGeometryStage () const |
| virtual bool | canProvideGeometryFor (const usg::Token &purpose) const |
| virtual void | buildGeometryStage (usg::StageRef &stage, const usg::ArgSet &requestArgs, const fdk::TimeValueSet &sampleTimes=fdk::TimeValueSet()) |
| virtual usg::StageRef | getGeometryStage (const fdk::TimeValueSet &sampleTimes=fdk::TimeValueSet()) |
Protected Member Functions | |
| GeomOp (Node *node, GeomOpEngineBuilder engineBuilder) | |
| GeomOp (Node *) | |
| Ctor for MultiTypeNode support only! Do not implement for Engine-using subclasses. | |
| const char * | nodeClass () const override |
| GeomOps are owned by the 'GeomNode' Node identifier. | |
| OpHints | opHints () const override |
| Return hints to control when and how this op will be evaluated by the top-down system. | |
| void | _knobStorePrep (const OutputContext &opStoreContext) override |
| Called by Nuke immediately BEFORE Op::knobs() store. Calls resetGeomState(). | |
| void | _knobStorePost (const OutputContext &opStoreContext, Hash &newOpHash, Hash &newOpEditVersionHash) override |
| Called by Nuke immediately AFTER Op::knobs() store. Calls buildGeomState(). | |
| void | setOutputContext (const OutputContext &context) override |
| int | knob_changed (Knob *k) override |
| virtual void | appendGeomState (DD::Image::Hash &newOpHash) |
| void | _validate (bool for_real) override |
| virtual void | updateGeneralInfo () |
| Default implemenation copies the GeneralInfo from input0. | |
| virtual fdk::Mat4d | handlesParentTransform (DD::Image::ViewerContext *ctx) |
| virtual void | buildXformHandles (ViewerContext *ctx, const fdk::Mat4d *localMatrix) |
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 | _setInput (int32_t input, const OpGraphLocation &connection, int32_t base, int32_t offset) |
| The subclass-specific portion of setInput(). See that method for more info. | |
| virtual void | _knobStorePrep (const OutputContext &opStoreContext) |
| The subclass-specific portion of knobStorePrep(). See that method for more info. | |
| virtual void | _knobStorePost (const OutputContext &opStoreContext, Hash &newOpHash, Hash &newOpEditVersionHash) |
| The subclass-specific portion of knobStorePost(). See that method for more info. | |
| virtual void | _invalidate () |
| virtual void | _validate (bool for_real) |
| virtual void | _open () |
| virtual void | _close () |
| Op * | create (Node *node, const char *name) |
| Op * | create (const char *name) |
| HandlesMode | anyInputHandles (ViewerContext *) |
| return if any of the inputs (recursively) wish to draw handles | |
| HandlesMode | anyKnobHandles (ViewerContext *) |
| return if any of the knobs on this node wish to draw handles | |
| 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 HandlesMode | doAnyHandles (ViewerContext *ctx) |
| virtual void | _setRecycling (bool recycling) |
| virtual PrevalidateResult | doPreValidate (ViewerContext *ctx=nullptr, PreValidateContext *=nullptr) |
Static Protected Member Functions | |
| template<class Engine > | |
| static GeomOpEngineBuilder | BuildEngine () |
| A helper function to use as the engineBuilder argument to the GeomOp constructor. | |
| static void | _buildGeometryStage (GeomOp *firstGeomOp, const fdk::Hash &newRequestHash, usg::StageRef &stage, const usg::ArgSet &requestArgs, const fdk::TimeValueSet &sampleTimes, const std::set< int32_t > &sampleViews) |
| Non-Op (timeless) version of GeomOp::buildGeometryStage() forwarded from that method. | |
Protected Attributes | |
| 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 | _editVersionHash |
| Op's current edit version state, usually the combination of input Op & knob edit version states. | |
Friends | |
| class | NullGeomOp |
| class | GeomOpEngine |
| class | GeomOpNodeImpl |
Additional Inherited Members | |
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. | |
| using | InputList = std::vector< Input > |
| using | InputConnectionContext = std::pair< Input, OutputContext > |
| Combination of Op input and the OutputContext it is being referenced at. | |
| using | InputConnectionContextList = std::vector< InputConnectionContext > |
| using | Output = std::pair< int, DD::Image::Op * > |
| Combination of input number and pointer to downstream Op input is on. | |
| using | OutputSet = std::set< Output > |
| 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. | |
Static Public Member Functions inherited from DD::Image::Op | |
| static int | treeVersion () |
| static bool | nukeBusy () |
| is nuke processing something on a parallel thread? | |
| static Op * | create (Node *node, const char *name, Op *p_op) |
| static Op * | create (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 Op * | BuildOpAt (Op *baseOp, const OutputContext &context, GenerateType type=EXECUTABLE_SKIP) |
| static Op * | retrieveOp (const char *node_path, GenerateType generate_op_type, const OutputContext *generate_op_context=nullptr) |
| static Op * | retrieveOp (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 Op * | error_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 Description * | find_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 Member Functions inherited from DD::Image::GeometryProviderI | |
| static void | BuildStage (usg::StageRef &stage, const usg::ArgSet &requestArgs, const OpGraphLocation &geometryProviderOp, const fdk::TimeValueSet &sampleTimes) |
| static void | BuildStage (usg::StageRef &stage, const OpGraphLocation &geometryProviderOp, const fdk::TimeValueSet &sampleTimes) |
| Same as buildStage(OpSet) but with no request args. | |
| static void | BuildStage (usg::StageRef &stage, const OpGraphLocation &geometryProviderOp, const fdk::TimeValue &sampleTime) |
| Same as buildStage(OpSet) but with only one sample time. | |
Public Attributes inherited from DD::Image::Op | |
| const MetaData::Bundle * | metaCache |
| Hash | metaCacheHash |
| Op * | op |
| Op int | input |
| Op int int | offset |
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 |
Base class for an Op that processes a usg::Stage containing scenegraph and 3D geometry data.
This Op subclass acts somewhat different from other Nuke Ops as it actively avoids processing in a time/view sampled mode. Since stage scenegraph prims and attributes contain their own time sampled values and don't support Nuke's concept of 'views', Nuke's default behavior of splitting Ops into explicit time/view instances means there is no obvious 'primary' or principal GeomOp to process the scenegraph with. For example if a TimeWarp node asks Nuke for five split input GeomOps at different times Nuke will create those GeomOps and sample their Knobs at each unique time. Normally each of those GeomOps are not aware of each other and would need to individually process the scenegraph to produce their output, possibly doing 4x more work than neccessary.
To avoid this all GeomOps Nuke creates from the same Node share a single GeomOpEngine subclass which is what does the actual scenegraph processing. If any of the GeomOps are asked to build a stage the same GeomOpEngine instance is used, the same stage object processes, and the results cached so the next GeomOp will produce the same result.
The scene data is created by calling the static GeometryProviderI::buildStage() method with the set of GeomOps constituting the 'request set' which is typically the set of input GeomOps feeding into the consumer node - ie. a viewer, renderer, etc. Combining the OutputContexts of all GeomOps in the set defines the frames & views that the stage should be explicitly evaluated for in the GeomOpEngines, however the GeomOpEngine is not restricted to only processing those times & views. For example if a renderer intends to output a single linear motionblur step it would request two GeomOps, one at shutter-open and one at shutter-close, but each GeomOpEngine is free to create no requested samples, all the requested samples, more samples than was requested, etc.
The primary advantage of this 'timeless' scheme is that Prims passing through the GeomOpEngines are not stripped of their existing time samples or restricted to just the requested set. So if an animated mesh is imported and then transformed, the GeomOpEngine applying the transform does not automatically strip the imported Prims of their animation data which is then made available to the downstream consumer regardless of the explicitly requested time samples.
|
protected |
Base class constructor requires a GeomOpEngine builder method, only subclasses can create an instance. The Engine builder method is usually declared in a GeomOp subclass like so:
class MyGeomOp : public GeomOp { static const Description description; const char* Class() const override { return description.name; } const char* node_help() const override { return "Does something cool"; }
class MyEngine : public Engine { MyEngine(GeomOpNode* parent) : Engine(parent) {}
void processScenegraph(usg::GeomSceneContext& context) override { do something cool } };
MyGeomOp(Node* node) : GeomOp(node, BuildEngine<MyEngine>()) {} };
static Op* build(Node* node) { return new MyGeomOp(node); } const GeomOp::Description MyGeomOp::description("MyGeom", build);
|
inlineoverrideprotectedvirtual |
GeomOps are owned by the 'GeomNode' Node identifier.
Reimplemented from DD::Image::Op.
Referenced by buildGeometryStage().
|
overrideprotectedvirtual |
Return hints to control when and how this op will be evaluated by the top-down system.
Reimplemented from DD::Image::Op.
References DD::Image::eIgnore, and DD::Image::eIgnoreInputs.
|
inlineoverridevirtual |
Cast to a GeomOp. This is much cheaper and safer than using dynamic_cast.
Reimplemented from DD::Image::Op.
Referenced by DD::Image::GeomOpEngine::_updateState().
|
inlineoverridevirtual |
Reimplemented from DD::Image::Op.
|
inlineoverridevirtual |
GeometryProviderI: Return the Op the interface is attached to.
Implements DD::Image::GeometryProviderI.
|
inlineoverridevirtual |
GeometryProviderI: Allow subclasses to gain access to sibling functions.
Implements DD::Image::GeometryProviderI.
|
inlineoverridevirtual |
Cast to a GeometryProviderI interface. This is much cheaper and safer than using dynamic_cast.
Reimplemented from DD::Image::Op.
|
inlineoverridevirtual |
Reimplemented from DD::Image::Op.
|
overridevirtual |
Returns the compose state of the GeomOpEngine.
Implements DD::Image::GeometryProviderI.
References DD::Image::GeomOpEngine::_updateState(), DD::Image::Op::outputContext(), and DD::Image::GeomOpEngine::validateState().
|
overridevirtual |
Returns the edit state of the GeomOpEngine.
Implements DD::Image::GeometryProviderI.
References DD::Image::GeomOpEngine::_updateState(), DD::Image::Op::outputContext(), and DD::Image::GeomOpEngine::validateState().
|
overridevirtual |
Returns the animating state of the GeomOpEngine.
Implements DD::Image::GeometryProviderI.
References DD::Image::GeomOpEngine::_updateState(), DD::Image::Op::outputContext(), and DD::Image::GeomOpEngine::validateState().
|
inlineoverridevirtual |
Base class returns an empty layer.
Implements DD::Image::GeometryProviderI.
|
inlineoverridevirtual |
Provide a fully constructed usg::Stage via getGeometryStage().
Reimplemented from DD::Image::GeometryProviderI.
|
overridevirtual |
Build the provided usg::Stage which is owned by the caller. This will forward to the GeomOp's firstOp() since we need to use a 'timeless' methodology, appending this GeomOp's OutputContext frame to sampleTimes.
Reimplemented from DD::Image::GeometryProviderI.
References DD::Image::Op::Class(), DD::Image::OutputContext::graphScopeId(), nodeClass(), DD::Image::Op::nodeEditVersionHash(), DD::Image::Op::nodeTopologyHash(), DD::Image::Op::outputContext(), DD::Image::root_real_fps, and DD::Image::Op::treeVersion().
|
overridevirtual |
Draw a round sided box.
Reimplemented from DD::Image::Op.
|
overridevirtual |
Reimplemented from DD::Image::Op.
|
inlineoverridevirtual |
Minimum number of Node inputs for this class - GeomOp base class has only one input.
Reimplemented from DD::Image::Op.
Reimplemented in DD::Image::SourceGeomOp.
|
inlineoverridevirtual |
Maximum number of Node inputs for this class.
Reimplemented from DD::Image::Op.
Reimplemented in DD::Image::SourceGeomOp.
|
overridevirtual |
Return a default NullGeomOp op for Node input0.
Reimplemented from DD::Image::Op.
Reimplemented in DD::Image::SourceGeomOp.
Referenced by DD::Image::SourceGeomOp::default_input().
|
overridevirtual |
Allows only GeomOp inputs by default.
Reimplemented from DD::Image::Op.
Reimplemented in DD::Image::SourceGeomOp.
References DD::Image::Op::geomOp().
Referenced by DD::Image::SourceGeomOp::test_input().
|
virtual |
Returns the node input to use for the merge geometry source. Always defaults to input 0.
Reimplemented in DD::Image::SourceGeomOp.
|
virtual |
Correlate a Knob value with a GeomOpEngine manipulation, specified by the GeomStateTarget target_id identifier.
This method associates the Knob with a named GeomStateTarget owned by the GeomOpEngine which then affects the engine's local GeomState. The current edit state and hash of the knob, calculated during Knob::store(), is appended to the version state and hash of the named target.
Call this in the knobs() method right after defining a knob which is intended to affect the geometry output in some way.
For example in the knobs() method of a GeomOp subclass that wants a 'scale' parameter to modify existing Prim attributes: XYZ_knob(f, ¶ms.scale.x, "scale"); AppendKnobToTarget(f, usg::EngineTokens.target.modifyValues);
The GeomOpEngine class has built-in targets which trigger GeomState flags: 'define-geometry' (usg::EngineTokens.target.defineGeometry) 'modify-values' (usg::EngineTokens.target.modifyValues) 'edit-stage' (usg::EngineTokens.target.editStage) 'affect-stereo' (usg::EngineTokens.target.affectStereo) See usg::GeomStateTarget for more info.
You must do this after the knob to be bound's declaration, as the Knob_Callback var passed to the declaration method (Int_knob(f), XYZ_knob(f), etc) contains the results from the most recent knob store(), like the frame, view and edit state of the knob. This info is used during binding to track the animation state of the knob.
References appendToTarget().
Referenced by DD::Image::SourceGeomOp::knobs().
|
virtual |
Like AppendKnobToTarget() but for knobs with no current Op OutputContext (ie no frame or view.) Intended for global non-animating Node knobs like 'name' and 'tile_color'.
References appendToTarget(), and DD::Image::Op::knob().
|
inline |
Use this method if the Knob's value will affect the 3D scenegraph topology by adding/removing Prims or Attributes, or by changing their names or paths in the scenegraph.
Convenience method that calls AppendKnobToTarget() with the 'define-geometry' target.
Important note - knob changes affecting the GeomState::defineGeometryState will cause Stage recomposition whenever the Knob's value changes. Stage recomposition can be expensive (slow) so ONLY bind this knob to GeomState::defineGeometryState when stage recomposition is absolutely required. If the knob is just changing the contents of an existing attribute rather than explicitly creating that attribute, use KnobModifiesAttribValues() instead.
Referenced by DD::Image::SourceGeomOp::knobs().
|
inline |
Use this method if the Knob's value is changing the contents of an existing attribute. The most common type of geometry manipulation.
Convenience method that calls AppendKnobToTarget() with the 'modify-values' target and appendToDefineGeometryTarget() with the Knob's authoring mode.
Referenced by DD::Image::SourceGeomOp::addDisplayOptionsKnobs(), DD::Image::ImageableAndModelKnobs::knobsWithoutGroup(), DD::Image::ColorKnobs::knobsWithoutGroup(), DD::Image::MeshKnobs::knobsWithoutGroup(), and DD::Image::SlrRenderOptionsKnobs::knobsWithoutGroup().
| void DD::Image::GeomOp::KnobEditsLayer | ( | const Knob_Closure & | f | ) |
Use this method if the Knob's value is performing non-specific changes to the engine's editLayer().
Convenience method that calls AppendKnobToTarget() with the 'edit-layer' target.
|
inline |
Use this method if the Knob's value is performing non-specific changes to the stage passing through, or generated by, the engine.
Convenience method that calls AppendKnobToTarget() with the 'edit-stage' target.
|
inline |
Convenience to get a Knob pointer and retrieve its value in one step. See Knob::get() for more info. Same as calling: T value; Knob* k = knob("foo"); if (k) value = k->get<T>(context);
References DD::Image::Knob::get(), and DD::Image::GeomOpEngine::knob().
|
inline |
Convenience to get a Knob pointer and set its value in one step. See Knob::set() for more info. Same as calling: Knob* k = knob("foo"); if (k) k->set(value, time, element_offset, view); Return true on success.
References DD::Image::GeomOpEngine::knob(), and DD::Image::Knob::set().
|
inline |
Convenience to get a Knob pointer and set its values in one step. See Knob::set() for more info. Same as calling: Knob* k = knob("foo"); if (k) k->set(clear_keys, values, times, element_offset, view); Return true on success.
References DD::Image::GeomOpEngine::knob(), and DD::Image::Knob::set().
|
virtual |
Whether the geometry the node is managing should be pickable in the Viewer. Base class returns true.
Reimplemented in DD::Image::SourceGeomOp.
|
overridevirtual |
Reimplemented from DD::Image::Op.
Reimplemented in DD::Image::SourceGeomOp.
|
virtual |
Build_handles with the context model matrix multiplied by the (global) local matrix so nodes up the tree are displayed correctly.
References buildXformHandles().
Referenced by DD::Image::SourceGeomOp::build_handles(), and buildXformHandles().
| void GeomOp::resetGeomState | ( | ) |
Clear the GeomOp's local GeomStateTarget hashes which get built in knobs() and appendGeomState(). This is called by GeomOp::knobStorePrep().
Warning - do not call this method unless you know exactly what you're doing otherwise unexpected behavior of the geometry system may result.
Referenced by _knobStorePrep().
| void GeomOp::buildGeomState | ( | DD::Image::Hash & | newOpHash, |
| DD::Image::Hash & | newOpEditVersionHash | ||
| ) |
Make changes to the GeomStateTargets registered to this GeomEngine which contribute to the dirtiness(out-of-dateness) state of the layers and stage this node affects or processes. This is called by GeomOp::knobStorePost().
Warning - do not call this method unless you know exactly what you're doing otherwise unexpected behavior of the geometry system may result.
Each GeomStateTarget affects a specific aspect of the 3D scene and there are several pre-defined ones such as 'define-geometry' and 'modify-values' which in turn affect Hash values in the GeomState stored in the GeomEngine.
Knob::editVersionHash() values are typically appended to the GeomStateTargets the knob wants to influence. This should be done in the knobs() method.
For arbitrary hash contributions to GeomStateTargets, such as input Op::editVersionHash() values, subclasses should implement the virtual appendGeomState() method and append to the local GeomStateTargets via appendToTarget().
References appendGeomState(), DD::Image::Op::inputs(), DD::Image::Op::nodeName(), and DD::Image::Op::outputContext().
Referenced by _knobStorePost().
| void GeomOp::appendToTarget | ( | const usg::Token & | target_id, |
| bool | targetCanAnimate, | ||
| const fdk::Hash & | editVersion, | ||
| bool | isAnimatingSource = false |
||
| ) |
Append an 'edit version' state hash to GeomStateTarget target_id. If isAnimatingSource is true then the GeomStateTarget is marked as animating regardless of whether the data actually changed over time.
An edit version is an overall change in the data that may affect the target, not whether the data for a particular frame or view changes, but whether the -global- contents of the data is changed. For a Knob this is usually due to a user editing the Knob's value, and for an Op/Node it's the edit versions of all its Knobs combined.
Not thread safe - assuming this is called on main thread.
References DD::Image::Op::node(), DD::Image::Op::nodeName(), and DD::Image::Op::outputContext().
Referenced by AppendKnobToTarget(), DD::Image::MaterialBindingOpI::appendMaterialGeomState(), and appendToTarget().
| void GeomOp::appendToTarget | ( | const usg::Token & | target_id, |
| bool | targetCanAnimate, | ||
| Knob * | knob | ||
| ) |
Convenience variant that appends knob->editVersionHash() and uses knob->isAnimated() for 'isAnimatingSource'.
References appendToTarget(), DD::Image::Knob::editVersionHash(), DD::Image::OutputContext::graphScope(), DD::Image::Knob::isAnimated(), DD::Image::Op::knob(), and DD::Image::Op::uiContext().
| void GeomOp::appendToTarget | ( | const usg::Token & | target_id, |
| bool | targetCanAnimate, | ||
| const Op::Input & | opConnection, | ||
| bool | includeTopologyHash = true |
||
| ) |
Convenience variant that appends the OpState from opConnection, and optionally opConnection.topologyHash(). If targetCanAnimate == true then OpState.opHashAnimates is used for the target's 'isAnimatingSource'.
References appendToTarget(), DD::Image::OpState::editVersionHash, DD::Image::OpGraphLocation::graphState, DD::Image::Op::nodeName(), DD::Image::OpGraphLocation::op, DD::Image::OpState::opHashAnimates, and DD::Image::OpGraphLocation::topologyHash().
|
overrideprotectedvirtual |
Called by Nuke immediately BEFORE Op::knobs() store. Calls resetGeomState().
Reimplemented from DD::Image::Op.
References resetGeomState().
|
overrideprotectedvirtual |
Called by Nuke immediately AFTER Op::knobs() store. Calls buildGeomState().
Reimplemented from DD::Image::Op.
References buildGeomState().
|
overrideprotectedvirtual |
Called by Nuke after knobStorePost() to assign the Op's OutputContext, allowing changes to be applied. GeomOp rounds the frame to 3 decimal points (ie .001, a thousandth of a frame) to avoid tiny double-precision differences from adversely affecting the state hashes.
Reimplemented from DD::Image::Op.
References DD::Image::Op::setOutputContext().
|
overrideprotectedvirtual |
Reimplemented from DD::Image::Op.
|
protectedvirtual |
Append arbitrary hash contributions to this GeoOp's GeomStateTargets which affect the local GeomState. These hash contribution sources are normally from non-Knob sources like inputs or some other Op value like frame or view. newOpHash is provided as a convenience to allow the GeomOp to affect the Op's output hash at the same time without needing to reimplement the hash calcs in Op::append(), which will be called soon afterwards.
This is called after GeomOp::knobs() so the targets will already include any Knob contributions. It's called from within GeomOp::buildGeomState() just prior to the construction of the GeoOp's _inputGeomState, _localGeomState, and _outputGeomState private vars.
A GeomOp subclass should affect the assigned GeomStateTargets via appendToTarget() which indirectly contribute to the _localGeomState hash when the target graph is queried for its concatenated GeomStateTarget::hash().
Default implementation handles input0 connections to scene prim exporters.
Referenced by buildGeomState().
|
overrideprotectedvirtual |
GeomOp subclass-dependent portion of validate(). This calls validate on the inputs and updates GeneralInfo.
Reimplemented from DD::Image::Op.
References DD::Image::Op::_validate(), DD::Image::Knob::DISABLED, DD::Image::Op::error(), DD::Image::Path_KnobI::errorMessage(), DD::Image::Knob::flag(), DD::Image::Knob::HIDDEN, DD::Image::Path_KnobI::inError(), DD::Image::Knob::INVISIBLE, DD::Image::Path_KnobI::inWarning(), DD::Image::Op::knob(), updateGeneralInfo(), and DD::Image::Op::warning().
|
protectedvirtual |
Default implemenation copies the GeneralInfo from input0.
Reimplemented in DD::Image::SourceGeomOp.
References DD::Image::Op::geomOp(), info_, DD::Image::Op::input0(), and DD::Image::Op::validate().
Referenced by _validate(), and DD::Image::SourceGeomOp::updateGeneralInfo().
|
inlineprotectedvirtual |
Return the parent transformation for the handles.
This is called in build_handles() when the handles are building.
Reimplemented in DD::Image::SourceGeomOp.
Referenced by buildXformHandles().
|
protectedvirtual |
Called directly by both build_handles and buildXformHandles so can share common code.
References DD::Image::Op::add_input_handle(), DD::Image::Op::build_knob_handles(), DD::Image::CONNECTED, DD::Image::ViewerContext::connected(), DD::Image::Op::deepOnlyOp(), handlesParentTransform(), DD::Image::IopInfoOwner::info(), DD::Image::Op::inputs(), DD::Image::Op::iop(), DD::Image::ViewerContext::modelmatrix, DD::Image::Op::node_disabled(), DD::Image::ViewerContext::pImpl(), DD::Image::Matrix4::scale(), DD::Image::SHOW_OBJECT, DD::Image::SHOW_PUSHED_OBJECT, DD::Image::ViewerContext::transform_mode(), DD::Image::Op::validate(), DD::Image::VIEWER_2D, and DD::Image::ViewerContext::viewer_mode().
| ©2026 The Foundry Visionmongers, Ltd. All Rights Reserved. |