HDK
|
#include <HUSD_ShaderTranslator.h>
Public Member Functions | |
void | registerShaderTranslator (HUSD_ShaderTranslator &translator) |
Adds the translator to the list of known translators. More... | |
void | unregisterShaderTranslator (HUSD_ShaderTranslator &translator) |
Removes the translator from the list of known translators. More... | |
HUSD_ShaderTranslator * | findShaderTranslator (const OP_Node &node) const |
int | findShaderTranslatorID (const OP_Node &node) const |
void | registerPreviewShaderTranslator (HUSD_PreviewShaderTranslator &t) |
Adds the translator to the list of known translators. More... | |
void | unregisterPreviewShaderTranslator (HUSD_PreviewShaderTranslator &t) |
Removes the translator from the list of known translators. More... | |
HUSD_PreviewShaderTranslator * | findPreviewShaderTranslator (const UT_StringRef &usd_render_context_name) const |
Returns a translator that accepts the given USD render context name. More... | |
void | clear () |
void | reportShaderTranslation (const OP_Node &node, const UT_StringRef &usd_shader_path) |
Informs the registry about a new translation of node into a USD prim. More... | |
Static Public Member Functions | |
static HUSD_ShaderTranslatorRegistry & | get () |
Returns a singelton instance. More... | |
using | TranslationRecord = std::pair< int, UT_StringHolder > |
using | TranslationRecords = UT_Array< TranslationRecord > |
void | addTranslationObserver (const OP_Node &node) |
TranslationRecords | removeTranslationObserver (const OP_Node &node) |
Keeps a list of known translators that define a USD shader prim from Houdini shader nodes.
Definition at line 218 of file HUSD_ShaderTranslator.h.
using HUSD_ShaderTranslatorRegistry::TranslationRecord = std::pair<int, UT_StringHolder> |
Adds and removes a node from the translation observers list. Observers are basicaly interested in creation of any new USD shader primitive and the original VOP node based on which it was created. Translators report such creation events with reportShaderTranslation(), and observer LOPs can use that info to selectively re-translate single USD prim when a only single VOP changed.
Definition at line 264 of file HUSD_ShaderTranslator.h.
Adds and removes a node from the translation observers list. Observers are basicaly interested in creation of any new USD shader primitive and the original VOP node based on which it was created. Translators report such creation events with reportShaderTranslation(), and observer LOPs can use that info to selectively re-translate single USD prim when a only single VOP changed.
Definition at line 265 of file HUSD_ShaderTranslator.h.
Adds and removes a node from the translation observers list. Observers are basicaly interested in creation of any new USD shader primitive and the original VOP node based on which it was created. Translators report such creation events with reportShaderTranslation(), and observer LOPs can use that info to selectively re-translate single USD prim when a only single VOP changed.
void HUSD_ShaderTranslatorRegistry::clear | ( | ) |
Removes all translators from the registry. Should only be called on shutdown of the process.
HUSD_PreviewShaderTranslator* HUSD_ShaderTranslatorRegistry::findPreviewShaderTranslator | ( | const UT_StringRef & | usd_render_context_name | ) | const |
Returns a translator that accepts the given USD render context name.
HUSD_ShaderTranslator* HUSD_ShaderTranslatorRegistry::findShaderTranslator | ( | const OP_Node & | node | ) | const |
Returns a translator that accepts the given render target mask. If no translator is found, returns nullptr.
Returns the internal ID number of a translator that handles the translation of the given node.
|
static |
Returns a singelton instance.
void HUSD_ShaderTranslatorRegistry::registerPreviewShaderTranslator | ( | HUSD_PreviewShaderTranslator & | t | ) |
Adds the translator to the list of known translators.
void HUSD_ShaderTranslatorRegistry::registerShaderTranslator | ( | HUSD_ShaderTranslator & | translator | ) |
Adds the translator to the list of known translators.
TranslationRecords HUSD_ShaderTranslatorRegistry::removeTranslationObserver | ( | const OP_Node & | node | ) |
Adds and removes a node from the translation observers list. Observers are basicaly interested in creation of any new USD shader primitive and the original VOP node based on which it was created. Translators report such creation events with reportShaderTranslation(), and observer LOPs can use that info to selectively re-translate single USD prim when a only single VOP changed.
void HUSD_ShaderTranslatorRegistry::reportShaderTranslation | ( | const OP_Node & | node, |
const UT_StringRef & | usd_shader_path | ||
) |
Informs the registry about a new translation of node into a USD prim.
void HUSD_ShaderTranslatorRegistry::unregisterPreviewShaderTranslator | ( | HUSD_PreviewShaderTranslator & | t | ) |
Removes the translator from the list of known translators.
void HUSD_ShaderTranslatorRegistry::unregisterShaderTranslator | ( | HUSD_ShaderTranslator & | translator | ) |
Removes the translator from the list of known translators.