#include <ModifyGeomOp.h>
Public Member Functions | |
usg::PathArray | filteredPrims () |
Public Member Functions inherited from DD::Image::GeomOpEngine | |
std::string | name () const override |
Op * | firstOp () const |
void | addMemberGeomOp (GeomOp *geop) |
Add to the node's GeomOp member set. | |
void | removeMemberGeomOp (GeomOp *geop) |
Remove from the node's GeomOp member set. | |
const GeomOpSet & | memberGeomOps () const |
GeomOp * | geomOpAt (double frame, int32_t view=-1) const |
GeomOp * | geomOpAtContext (const OutputContext &context) const |
Same as geomOpAt() but takes OutputContext. | |
GeomOpSet | geomOpsFor (const std::set< int32_t > &views, const fdk::TimeValueSet ×) const |
Find all the GeomOps matching the views and times. | |
KnobBinding | knob (const char *knob_name) const |
Return a read handle to the named Knob from the engine. | |
template<typename T > | |
T | getValue (const KnobBinding &knob) const |
Convenience method to get a value from a KnobBinding, if it's valid. | |
template<typename T > | |
T | getValue (const char *knobName) const |
Convenience method to get a value from a named Knob, if it exists. | |
template<typename T > | |
T | getValue (const T &defaultValue, const char *knobName, double frame, int view=-1) const |
Convenience method to get a value from a named Knob, if it exists, otherwise return defaultValue. | |
template<typename T > | |
T | getValue (const T &defaultValue, const char *knobName) const |
getValue() variant for uniform (non-animating) Knobs, or if the default uiContext() is desired. | |
template<typename T > | |
void | getValue (T &v, const char *knobName, double frame, int view=-1) const |
template<typename T > | |
void | getValue (T &v, const char *knobName) const |
getValue(&T) variant for uniform (non-animating) Knobs, or if the default uiContext() is desired. | |
template<typename T > | |
T | getValue (const T &defaultValue, const KnobBinding &knob, double frame, int view=-1) const |
Convenience method to get a value from a KnobBinding, if it's valid, otherwise return defaultValue. | |
template<typename T > | |
T | getValue (const T &defaultValue, const KnobBinding &knob) const |
getValue() variant for uniform (non-animating) Knobs, or if the default uiContext() is desired. | |
Op * | inputOpAt (uint32_t node_input, double frame, const OutputContext &ctx) |
Op * | inputOpAt (uint32_t node_input, double frame, int32_t view=-1) |
size_t | nInputs () const override |
size_t | nInputOps () const |
Returns the sum of all InputBinding op_split_counts. | |
const InputBinding & | inputBinding (uint32_t node_input) const |
GeomEngine * | inputEngine (uint32_t node_input) const override |
GeomEngine * | inputEngine0 () const override |
GeomEngine * | inputEngine1 () const override |
Op * | inputBaseOp (uint32_t node_input) |
void | printInputBindings (std::ostream &, const char *prefix="") const |
Prints the contents of the current InputBindings. | |
void | processScenegraph (usg::GeomSceneContext &context) override |
This just sets the nuke:node data on the edit layer so we can go back from the Layer to the Node that created it. | |
void | updateGeomEngineState (const usg::ArgSet &request_args, const GeomOpSet &geops, fdk::TimeValueSet &active_times) |
const fdk::Hash & | lastRequestHash () const |
void | setRequestHash (const fdk::Hash &hash) |
Assign the value of the request hash, usually done in GeomOp::buildStage(). | |
Protected Member Functions | |
ModifyEngine (Op *parent) | |
bool | updateFilteredPrimPaths (GeomEngine *inputEngine, const usg::StageRef &stage) |
virtual void | appendFilterHash (fdk::Hash &filterHash) const |
void | processScenegraph (usg::GeomSceneContext &context) override |
virtual usg::PathArray | filteredPrimPaths (const usg::StageRef &srcStage) |
virtual bool | secondaryFilterPrimPaths (const usg::StageRef &srcStage, const usg::PathArray &inPrimPaths, usg::PathArray &outPrimPaths) |
virtual void | processPrimSelection (usg::GeomSceneContext &context, const usg::StageRef &srcStage, const usg::PathArray &primPaths) |
virtual void | processPrim (usg::GeomSceneContext &context, const usg::StageRef &srcStage, const usg::Path &primPath) |
Protected Member Functions inherited from DD::Image::GeomOpEngine | |
GeomOpEngine (Op *parent) | |
virtual usg::Path | importShaderOp (bool create_mode, usg::GeomSceneContext &scene_context, const std::vector< Op * > &source_ops, uint32_t material_group_index, const usg::Path &material_library_path) |
virtual usg::Path | importLightOp (bool create_mode, usg::GeomSceneContext &scene_context, const std::vector< LightOp * > &source_light_ops, const usg::Path &light_prim_path, const usg::Path &material_library_path=usg::Path()) |
virtual void | assignMaterialBinding (usg::GeomSceneContext &context, bool create_mode, const usg::Path &material_path, const usg::PathArray &primPaths) |
void | setOwnerNode () |
Sets the owner node data in the edit layer to point to the owning node. | |
Protected Attributes | |
std::string | _filter_source |
Raw mask pattern string. | |
bool | _filter_do_all |
Filter applies to all objects. | |
fdk::Hash | _filter_hash |
Indicates when _filtered_prims need updating. | |
usg::PathArray | _masked_prims |
Results of path masking. | |
usg::PathArray | _filtered_prims |
Results of filtering the masked paths. | |
Protected Attributes inherited from DD::Image::GeomOpEngine | |
Op * | _firstOp |
Op that's guaranteed to exist and offer access to Nuke Node. | |
GeomOpSet | _memberGeomOps |
All GeomOps sharing this engine - NOT the current active engine set! | |
fdk::Hash | _lastVersionsHash |
The last combined GeomOp versions hashes. | |
fdk::Hash | _lastRequestHash |
The last combined GeomOp hashes passed to the most recent buildStage() | |
usg::ShaderDescGroupPtrMap | _shaderDescGroups |
Groups of locally-created ShaderDescs. | |
Additional Inherited Members | |
Public Types inherited from DD::Image::GeomOpEngine | |
using | Builder = std::function< GeomOpEngine *(Op *)> |
'parent' is automatically provided when the first GeomOpEngine request is made. | |
using | OpInput = std::pair< Op *, OutputContext > |
Combination of input Op and its OutputContext when cached in map. | |
using | OpInputTimeMap = std::map< double, OpInput > |
using | OpInputTimeMapList = std::vector< OpInputTimeMap > |
using | OpInputTimeWarpMap = std::map< double, double > |
using | InputBindingList = std::vector< InputBinding > |
The plugin author should at least implement the processPrim() method.
|
protected |
Call this to re-evaluate the filtered paths defined by the mask expression and any additional filter logic a subclass may want to apply in filteredPrimPaths() and secondaryFilterPrimPaths(). Returns true if the path set changed.
References _filter_do_all, _filter_hash, _filter_source, _filtered_prims, _masked_prims, appendFilterHash(), filteredPrimPaths(), DD::Image::GeomOpEngine::inputEngine(), and DD::Image::GeomOpEngine::name().
|
inlineprotectedvirtual |
Change the hash of the current filter. Subclasses can implement this to force the prim filter methods to be re-run, usually because the subclass has knobs that can affect the result of the filtering. Default implementation does nothing.
Referenced by updateFilteredPrimPaths().
|
overrideprotected |
Calls buildScenegraph() on input 0 then the subclass processPrimSelection() method.
References DD::Image::GeomOpEngine::processScenegraph().
|
protectedvirtual |
Get the list of filtered prim paths from the provided stage using the current scenegraph filter. ModifyEngine calls this in updateFilteredPrimPaths() when the mesh expression or input stage compose state changes, and saves the resulting path list to _filtered_prims.
Subclasses can override this method to extend/replace the filtering logic of the builtin PathExpression knob, or implement secondaryFilterPrimPaths() to do Prim type testing, etc.
References DD::Image::Op::knob(), and DD::Image::PathExpression_KnobI::match().
Referenced by updateFilteredPrimPaths().
|
protectedvirtual |
Loops through the selected prim paths calling processPrim().
This method is called from processScenegraph() only if the input or local state is dirty.
This is virtual to allow a subclass that needs the entire prim selection a chance to do something before the per-prim loop is run. For example finding the total bbox of the selected prims.
So a subclass would implement this method, do something with the prim paths first, then call ModifyGeomOp::processPrimSelection() to have the prim loop run. Or it can just do all the work in here and not bother calling the base class implementation.
|
inlineprotectedvirtual |
Per-prim processing method.
This method is called from a prim path loop in processPrimSelection() only if the input or local state is dirty.
If your subclass needs to work with the entire selection set then just implement processPrimSelection().
©2024 The Foundry Visionmongers, Ltd. All Rights Reserved. |