Parse and provide information from UsdRenderers.json.
More...
#include <HUSD_RendererInfo.h>
|
| HUSD_RendererInfo () |
|
| HUSD_RendererInfo (const UT_StringHolder &name, const UT_StringHolder &displayname, const UT_StringHolder &menulabel, int menupriority, fpreal complexitymultiplier, bool isnative, HUSD_DepthStyle depth_style, const UT_StringArray &defaultpurposes, const UT_StringArray &restartrendersettings, const UT_StringArray &restartcamerasettings, const UT_StringArray &renderstats, const HuskMetadata &husk_metadata, const UT_StringHolder &husk_stats_metadata, const StatsDataPaths &statsdatapaths, const UT_StringHolder &husk_verbose_script, fpreal husk_verbose_interval, const UT_StringArray &preload_libraries, bool needsnativedepth, bool needsnativeselection, bool allowbackgroundupdate, bool aovsupport, bool viewportrenderer, bool drawmodesupport, bool husk_fastexit) |
|
const UT_StringHolder & | name () const |
|
const UT_StringHolder & | displayName () const |
|
const UT_StringHolder & | menuLabel () const |
|
int | menuPriority () const |
|
fpreal | drawComplexityMultiplier () const |
|
bool | isValid () const |
|
bool | isNativeRenderer () const |
|
HUSD_DepthStyle | depthStyle () const |
|
const UT_StringArray & | defaultPurposes () const |
|
const UT_StringArray & | restartRenderSettings () const |
|
const UT_StringArray & | restartCameraSettings () const |
|
const UT_StringArray & | renderViewStats () const |
|
bool | needsNativeDepthPass () const |
|
bool | needsNativeSelectionPass () const |
|
bool | allowBackgroundUpdate () const |
|
bool | aovSupport () const |
|
bool | viewportRenderer () const |
|
bool | drawModeSupport () const |
|
bool | huskFastExit () const |
|
const HuskMetadata & | huskMetadata () const |
|
const UT_StringHolder & | huskStatsMetadata () const |
|
const StatsDataPaths & | statsDataPaths () const |
|
void | extractStatsData (UT_Options &options, const UT_JSONValue &stats_dictionary) const |
|
const UT_JSONValue * | findStatsData (const UT_JSONValue &stats_dict, const char *key) const |
| Convenience method to find a JSON Value for a given key. More...
|
|
const UT_StringHolder & | huskVerboseScript () const |
| Python script used by husk for verbose callbacks. More...
|
|
fpreal | huskVerboseInterval () const |
|
void | preloadLibraries () const |
|
Parse and provide information from UsdRenderers.json.
Definition at line 39 of file HUSD_RendererInfo.h.
HUSD_RendererInfo::HUSD_RendererInfo |
( |
| ) |
|
|
inline |
HUSD_RendererInfo::HUSD_RendererInfo |
( |
const UT_StringHolder & |
name, |
|
|
const UT_StringHolder & |
displayname, |
|
|
const UT_StringHolder & |
menulabel, |
|
|
int |
menupriority, |
|
|
fpreal |
complexitymultiplier, |
|
|
bool |
isnative, |
|
|
HUSD_DepthStyle |
depth_style, |
|
|
const UT_StringArray & |
defaultpurposes, |
|
|
const UT_StringArray & |
restartrendersettings, |
|
|
const UT_StringArray & |
restartcamerasettings, |
|
|
const UT_StringArray & |
renderstats, |
|
|
const HuskMetadata & |
husk_metadata, |
|
|
const UT_StringHolder & |
husk_stats_metadata, |
|
|
const StatsDataPaths & |
statsdatapaths, |
|
|
const UT_StringHolder & |
husk_verbose_script, |
|
|
fpreal |
husk_verbose_interval, |
|
|
const UT_StringArray & |
preload_libraries, |
|
|
bool |
needsnativedepth, |
|
|
bool |
needsnativeselection, |
|
|
bool |
allowbackgroundupdate, |
|
|
bool |
aovsupport, |
|
|
bool |
viewportrenderer, |
|
|
bool |
drawmodesupport, |
|
|
bool |
husk_fastexit |
|
) |
| |
|
inline |
bool HUSD_RendererInfo::allowBackgroundUpdate |
( |
| ) |
const |
|
inline |
bool HUSD_RendererInfo::aovSupport |
( |
| ) |
const |
|
inline |
fpreal HUSD_RendererInfo::drawComplexityMultiplier |
( |
| ) |
const |
|
inline |
bool HUSD_RendererInfo::drawModeSupport |
( |
| ) |
const |
|
inline |
Convenience method to fill out a UT_Options with all the stats data required for the delegate
Convenience method to find a JSON Value for a given key.
Get standard renderer info for a particular render delegate. Either the internal renderer name or the display name can be provided. The other parameter can be an empty string.
Get renderer info for a particular render delegate, and also extract custom data. The "custom" map on input should contain empty entries for all extra data of interest. On output, the map will be filled with the values associated with these keys extracted from the UsdRenderers.json file.
bool HUSD_RendererInfo::huskFastExit |
( |
| ) |
const |
|
inline |
const HuskMetadata& HUSD_RendererInfo::huskMetadata |
( |
| ) |
const |
|
inline |
Return the husk.metadata map. This map is used by husk to add metadata when saving images. The metadata keys are specific to the format (see "iconvert --help"). When using the multi-part EXR writer, arbitrary typed metadata can also be saved (see the HDK documentation for more details), but examples might be "string OpenEXR:Software" or "mat4d
OpenEXR:custom_matrix".
Husk provides a JSON dictionary of metadata values which can be referenced in the value of the metadata map. The JSON dictionary will look something like:
{
"frame" : 42,
"command_line" : "husk -f 42 foo.usd",
"render_stats" : { "render_time" : [3.42, 0.24, 1.32] },
...
}
A delegate can specify metadata as either verbatim text or by expanding data referenced in the JSON dictionary (using the JSON Path syntax). For example:
- "float OpenEXR:frame" : "${frame}"
- "float OpenEXR:load_time_cpu" : "${render_stats.render_time[0]}"
Extracts the first time from the render_time array
- "float OpenEXR:load_time_sys" : "${render_stats.render_time[1]}"
- "float OpenEXR:load_time_wall" : "${render_stats.render_time[2]}"
- "string OpenEXR:stats_json" : "${render_stats}" Encodes all the render_stats as a string in JSON format
- Note
- that the render stats mapping is not used when performing render stat lookup.
Definition at line 212 of file HUSD_RendererInfo.h.
Some delegates prefer to pass metadata from GetRenderStats() directly to image metadata. This option passes a string pattern (see UT_String::multiMatch) for render stats which should be stored as metadata directly. This defaults to *
(meaning all the stats from GetRenderStats will be stored as metadata). If you set husk.metadata
, you probably want to set this to an empty string.
Definition at line 221 of file HUSD_RendererInfo.h.
fpreal HUSD_RendererInfo::huskVerboseInterval |
( |
| ) |
const |
|
inline |
bool HUSD_RendererInfo::isNativeRenderer |
( |
| ) |
const |
|
inline |
bool HUSD_RendererInfo::isValid |
( |
| ) |
const |
|
inline |
int HUSD_RendererInfo::menuPriority |
( |
| ) |
const |
|
inline |
bool HUSD_RendererInfo::needsNativeDepthPass |
( |
| ) |
const |
|
inline |
bool HUSD_RendererInfo::needsNativeSelectionPass |
( |
| ) |
const |
|
inline |
void HUSD_RendererInfo::preloadLibraries |
( |
| ) |
const |
Before doing anything that may cause this render delegate's library to be loaded, call this method to make sure any required libraries (most likely libpxr libraries) are already loaded. This saves third party libraries from having to worry about LD_LIBRARY_PATH.
const UT_StringArray& HUSD_RendererInfo::restartCameraSettings |
( |
| ) |
const |
|
inline |
const UT_StringArray& HUSD_RendererInfo::restartRenderSettings |
( |
| ) |
const |
|
inline |
Similar to the husk metadata, this returns the statsdatapaths, which gives the JSON path to the render stat required by the viewer or husk. Currently thses are:
- int peakMemory: The peak memory usage
- float percentDone: The percent complete (0 to 100)
- float totalClockTime: The wall clock time taken to render
- float totalUTime: The CPU time taken to render
- float totalSTime: The system time taken to render
- string renderProgressAnnotation: multi-line renderer status
- string renderStatsAnnotation: multi-line renderer status
- string rendererStage: The current stage of rendering for the delegate. This might be something like "displacing", "loading
textures", "rendering", etc.
- string rendererName: The name of the delegate (defaults to menuLabel())
In addition, each delegate may also specify a list of custom labels in the "viewstats" item.
One major difference between this and the husk.metadata is that for this setting, the value in the pair is a direct JSON Path (rather than being a string that undergoes variable expansion.
Definition at line 245 of file HUSD_RendererInfo.h.
bool HUSD_RendererInfo::viewportRenderer |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: