HDK
|
#include <COP_SlapcompProgramManager.h>
Public Types | |
using | Callbacks = COP_SlapcompManager::Callbacks |
Public Member Functions | |
COP_SlapcompProgramManager () | |
COP_SlapcompProgramManager (const COP_SlapcompProgramManager &)=delete | |
COP_SlapcompProgramManager (COP_SlapcompProgramManager &&) | |
COP_SlapcompProgramManager & | operator= (const COP_SlapcompProgramManager &)=delete |
COP_SlapcompProgramManager & | operator= (COP_SlapcompProgramManager &&) |
void | enable (int target_node_id, const OP_Context &) override |
Enable and set up the slapcomp program. More... | |
void | disable () override |
Disable the slapcomp program. More... | |
bool | isEnabled () const override |
Returns true if slapcomp is enabled. More... | |
bool | hasErrors () const override |
Returns true if the last run of slapcomp had errors. More... | |
int | getTargetNode () const override |
Returns the id of the node slapcomp was built from. More... | |
bool | buildForInputs (const COP_CableStructure &, const OP_Context &) override |
void | runSlapcompImpl (COP_SlapcompInputFetcher &, const OP_Context &) override |
IMX_LayerPtr | getOutputLayer (const UT_StringHolder &name) const override |
Returns the specified slapcomp output. More... | |
bool | isSlapcompAOV (const UT_StringHolder &name) const override |
bool | expectsLayerCameras () const override |
COP_CableStructure | getOutputStructure () const override |
Should return the outputs that this slapcomp produces. More... | |
const COP_ApexProgram & | getProgram () const |
Get the managed slapcomp program. More... | |
bool | hasStateChanged () const override |
int | getVersion () const override |
void | setErrorCallback (void(*cb)(void *, const char *), void *data) override |
Sets a callback that gets called when reporting errors. More... | |
void | setWarningCallback (void(*cb)(void *, const char *), void *data) override |
Sets a callback that gets called when reporting warnings. More... | |
void | setRunCallback (void(*cb)(void *), void *data) override |
Sets a callback that gets called when the slapcomp program is run. More... | |
void | setUpdateCallback (void(*cb)(void *), void *data) override |
Sets a callback that gets called when the slapcomp program is updated. More... | |
void | update (const OP_Context &) |
Called by the slapcomp program callback when it is updated. More... | |
void | setVersion (int version) override |
![]() | |
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 |
void | enable (OP_Node *const node, const OP_Context &ctx) |
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... | |
UT_StringMap< Output > | getOutputs () const |
void | setCallbacks (const Callbacks &cbs) |
Set all callbacks using a struct. More... | |
Protected Member Functions | |
void | reportError (const char *message) override |
Reports an error (through the callback if possible). More... | |
void | reportWarning (const char *message) override |
Reports a warning (through the callback if possible). More... | |
![]() | |
void | reportAllErrorManagerErrors (const UT_ErrorManager &) |
Relays all warnings and messages from the error manager. More... | |
Manages building and running a slapcomp program from a block, including handling of errors.
Definition at line 164 of file COP_SlapcompProgramManager.h.
Definition at line 167 of file COP_SlapcompProgramManager.h.
COP_SlapcompProgramManager::COP_SlapcompProgramManager | ( | ) |
|
delete |
COP_SlapcompProgramManager::COP_SlapcompProgramManager | ( | COP_SlapcompProgramManager && | ) |
|
overridevirtual |
Rebuilds the slapcomp program if necessary. Any errors or warnings are reported through the callbacks.
Implements COP_SlapcompManager.
|
overridevirtual |
Disable the slapcomp program.
Implements COP_SlapcompManager.
|
overridevirtual |
Enable and set up the slapcomp program.
Implements COP_SlapcompManager.
|
overridevirtual |
Should return true if this slapcomp requires the input layers to bring in their cameras.
Reimplemented from COP_SlapcompManager.
|
overridevirtual |
Returns the specified slapcomp output.
Implements COP_SlapcompManager.
|
overridevirtual |
Should return the outputs that this slapcomp produces.
Implements COP_SlapcompManager.
|
inline |
Get the managed slapcomp program.
Definition at line 217 of file COP_SlapcompProgramManager.h.
|
overridevirtual |
Returns the id of the node slapcomp was built from.
Implements COP_SlapcompManager.
|
inlineoverridevirtual |
Slapcomp program version number that is incremented each time the program is sucessfully rebuilt.
Implements COP_SlapcompManager.
Definition at line 227 of file COP_SlapcompProgramManager.h.
|
inlineoverridevirtual |
Returns true if the last run of slapcomp had errors.
Implements COP_SlapcompManager.
Definition at line 184 of file COP_SlapcompProgramManager.h.
|
inlineoverridevirtual |
If this returns true, then the last attempted application of slapcomp may have changed the possible outputs. This flag is reset before each application of slapcomp.
Implements COP_SlapcompManager.
Definition at line 222 of file COP_SlapcompProgramManager.h.
|
inlineoverridevirtual |
Returns true if slapcomp is enabled.
Implements COP_SlapcompManager.
Definition at line 182 of file COP_SlapcompProgramManager.h.
|
overridevirtual |
Returns true if the slapcomp program ouputs an AOV with the given name. Accepts "color" as an alias for the "C" AOV.
Implements COP_SlapcompManager.
|
delete |
COP_SlapcompProgramManager& COP_SlapcompProgramManager::operator= | ( | COP_SlapcompProgramManager && | ) |
|
overrideprotectedvirtual |
Reports an error (through the callback if possible).
Implements COP_SlapcompManager.
|
overrideprotectedvirtual |
Reports a warning (through the callback if possible).
Implements COP_SlapcompManager.
|
overridevirtual |
Run the slapcomp program using the latest build. It is likely you want to rebuild the program prior to running it. Any errors or warnings are reported through the callbacks.
Implements COP_SlapcompManager.
|
inlineoverridevirtual |
Sets a callback that gets called when reporting errors.
Implements COP_SlapcompManager.
Definition at line 231 of file COP_SlapcompProgramManager.h.
|
inlineoverridevirtual |
Sets a callback that gets called when the slapcomp program is run.
Implements COP_SlapcompManager.
Definition at line 245 of file COP_SlapcompProgramManager.h.
|
inlineoverridevirtual |
Sets a callback that gets called when the slapcomp program is updated.
Implements COP_SlapcompManager.
Definition at line 251 of file COP_SlapcompProgramManager.h.
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.
Implements COP_SlapcompManager.
Definition at line 261 of file COP_SlapcompProgramManager.h.
|
inlineoverridevirtual |
Sets a callback that gets called when reporting warnings.
Implements COP_SlapcompManager.
Definition at line 238 of file COP_SlapcompProgramManager.h.
void COP_SlapcompProgramManager::update | ( | const OP_Context & | ) |
Called by the slapcomp program callback when it is updated.