|
HDK
|
Abstract interface for managing slapcomp. More...
#include <COP_SlapCompProgramManager.h>
Inheritance diagram for COP_SlapCompManager:Classes | |
| struct | Callbacks |
| struct | Output |
Public Member Functions | |
| COP_SlapCompManager ()=default | |
| COP_SlapCompManager (const COP_SlapCompManager &)=delete | |
| COP_SlapCompManager (COP_SlapCompManager &&)=default | |
| COP_SlapCompManager & | operator= (const COP_SlapCompManager &)=delete |
| COP_SlapCompManager & | operator= (COP_SlapCompManager &&)=default |
| virtual | ~COP_SlapCompManager ()=default |
| virtual void | setStage (const UT_Span< const int > &target_nodes, const OP_Context &)=0 |
| Set the image filters defined on the USD Stage. More... | |
| virtual void | setViewport (const OP_Node *node, const OP_Context &ctx)=0 |
| void | clearAllFilters () |
| Clear all filters. More... | |
| void | enable () |
| void | disable () |
| Disable all slapcomp. More... | |
| void | setEnabled (bool state) |
| virtual void | updateEnableState ()=0 |
| Called when slapcomp is enabled disabled. More... | |
| bool | isEnabled () const |
| Returns the on-off state of slapcomp. More... | |
| bool | getEnableState () const |
| Returns the enable state. More... | |
| virtual bool | hasStageFilters () const =0 |
| Returns whether the viewport slapcomp is enabled. More... | |
| virtual bool | hasViewportFilters () const =0 |
| Returns whether the viewport slapcomp is enabled. More... | |
| virtual bool | hasErrors () const =0 |
| Returns true if the last run of slapcomp had errors. More... | |
| virtual UT_Array< int > | getStageTargetNodes () const =0 |
| virtual int | getViewportTargetNode () const =0 |
| Return the viewport target node. More... | |
| virtual void | setErrorCallback (void(*cb)(void *, const char *), void *data)=0 |
| Sets a callback that gets called when reporting slapcomp errors. More... | |
| virtual void | setWarningCallback (void(*cb)(void *, const char *), void *data)=0 |
| Sets a callback that gets called when reporting slapcomp warnings. More... | |
| virtual void | setRunCallback (void(*cb)(void *), void *data)=0 |
| Sets a callback that gets called when slapcomp is run. More... | |
| virtual void | setUpdateCallback (void(*cb)(void *), void *data)=0 |
| Sets a callback that gets called when slapcomp changes. More... | |
| virtual bool | isSlapCompAOV (const UT_StringHolder &name) const =0 |
| virtual bool | expectsLayerCameras () const |
| bool | runSlapComp (COP_SlapCompInputFetcher &input_fetcher, const OP_Context &context, bool should_build=true) |
| bool | build (const COP_SlapCompInputFetcher &input_fetcher, const OP_Context &context) |
| Prepares for applying slapcomp for the provided set of inputs. More... | |
| virtual bool | buildForInputs (const COP_CableStructure &inputs, const OP_Context &context)=0 |
| Prepares for applying slapcomp for inputs of the given types. More... | |
| virtual void | runSlapCompImpl (COP_SlapCompInputFetcher &input_fetcher, const OP_Context &context)=0 |
| Should run slapcomp with the specified inputs and context. More... | |
| virtual COP_CableStructure | getOutputStructure () const =0 |
| Should return the outputs that this slapcomp produces. More... | |
| virtual IMX_LayerPtr | getOutputLayer (const UT_StringHolder &name) const =0 |
| Returns a particular output by name. More... | |
| virtual int | getVersion () const =0 |
| virtual bool | hasStateChanged () const =0 |
| UT_StringMap< Output > | getOutputs () const |
| void | setCallbacks (const Callbacks &cbs) |
| Set all callbacks using a struct. More... | |
| virtual void | setVersion (int version)=0 |
Protected Member Functions | |
| virtual void | reportError (const char *message)=0 |
| Reports an error (through the callback if possible). More... | |
| virtual void | reportWarning (const char *message)=0 |
| Reports a warning (through the callback if possible). More... | |
| void | reportAllErrorManagerErrors (const UT_ErrorManager &) |
| Relays all warnings and messages from the error manager. More... | |
Abstract interface for managing slapcomp.
Definition at line 19 of file COP_SlapCompProgramManager.h.
|
default |
|
delete |
|
default |
|
virtualdefault |
|
inline |
Prepares for applying slapcomp for the provided set of inputs.
Definition at line 121 of file COP_SlapCompProgramManager.h.
|
pure virtual |
Prepares for applying slapcomp for inputs of the given types.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
inline |
Clear all filters.
Definition at line 40 of file COP_SlapCompProgramManager.h.
|
inline |
Disable all slapcomp.
Definition at line 55 of file COP_SlapCompProgramManager.h.
|
inline |
Enable all/any slapcomp. This sets the state (whether there are actually filters to be run or not).
Definition at line 49 of file COP_SlapCompProgramManager.h.
|
inlinevirtual |
Should return true if this slapcomp requires the input layers to bring in their cameras.
Reimplemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
Definition at line 106 of file COP_SlapCompProgramManager.h.
|
inline |
Returns the enable state.
Definition at line 77 of file COP_SlapCompProgramManager.h.
|
pure virtual |
Returns a particular output by name.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
| UT_StringMap<Output> COP_SlapCompManager::getOutputs | ( | ) | const |
Returns an output map constructed from the outputs of the last execution of the slapcomp program. This map is safe to use even after the program outputs change as a result of building or running it. If the program is not enabled or in an error state, the returned map will be empty.
|
pure virtual |
Should return the outputs that this slapcomp produces.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
Return target nodes the slapcomp programs this was built for (typically size==1, but may be mode if there are chained programs).
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
pure virtual |
Returns a version number, which is incremented every time the program is rebuilt.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
pure virtual |
Return the viewport target node.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
pure virtual |
Returns true if the last run of slapcomp had errors.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
pure virtual |
Returns whether the viewport slapcomp is enabled.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
pure virtual |
Returns true if the last attempted application of slapcomp may have changed the possible outputs. This flag is is reset before each application of slapcomp.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
pure virtual |
Returns whether the viewport slapcomp is enabled.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
inline |
Returns the on-off state of slapcomp.
Definition at line 72 of file COP_SlapCompProgramManager.h.
|
pure virtual |
Returns true if the slapcomp program ouputs an AOV with the given name. Should accept "color" as an alias for the "C" AOV.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
delete |
|
default |
|
protected |
Relays all warnings and messages from the error manager.
|
protectedpure virtual |
Reports an error (through the callback if possible).
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
protectedpure virtual |
Reports a warning (through the callback if possible).
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
inline |
Optionally builds and then runs slapcomp with the specified inputs and context. Returns successfulness.
Definition at line 110 of file COP_SlapCompProgramManager.h.
|
pure virtual |
Should run slapcomp with the specified inputs and context.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
Set all callbacks using a struct.
Definition at line 189 of file COP_SlapCompProgramManager.h.
|
inline |
Definition at line 60 of file COP_SlapCompProgramManager.h.
|
pure virtual |
Sets a callback that gets called when reporting slapcomp errors.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
Sets a callback that gets called when slapcomp is run.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
pure virtual |
Set the image filters defined on the USD Stage.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
pure virtual |
Sets a callback that gets called when slapcomp changes.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
This should really be private, but due to difficult visibility rules, we just settle for this... This should only be called by higher-level managers that interface with other managers.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
pure virtual |
Set the image filter from the viewport control (which gets applied after the stage filters)
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
pure virtual |
Sets a callback that gets called when reporting slapcomp warnings.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.
|
pure virtual |
Called when slapcomp is enabled disabled.
Implemented in COP_SlapCompProgramManager, and COP_SlapCompDispatcher.