7#ifndef PXR_USD_IMAGING_USD_APP_UTILS_FRAME_RECORDER_H
8#define PXR_USD_IMAGING_USD_APP_UTILS_FRAME_RECORDER_H
13#include "pxr/usdImaging/usdAppUtils/api.h"
18#include "pxr/usd/usd/timeCode.h"
25PXR_NAMESPACE_OPEN_SCOPE
54 bool gpuEnabled =
true,
55 bool enableUsdDrawModes =
true);
97 if (imageWidth == 0u) {
101 _imageWidth = imageWidth;
108 _complexity = complexity;
162 const UsdStagePtr& stage,
165 const std::string& outputImagePath);
174 SdfPath _renderSettingsPrimPath;
175 bool _cameraLightEnabled;
176 bool _domeLightsVisible;
180PXR_NAMESPACE_CLOSE_SCOPE
Low-level utilities for informing users of various internal and external diagnostic conditions.
A path value used to locate objects in layers or scenegraphs.
Token for efficient comparison, assignment, and hashing of known strings.
A utility class for recording images of USD stages.
USDAPPUTILS_API void SetPrimaryCameraPrimPath(const SdfPath &cameraPath)
Sets the primary camera prim path.
USDAPPUTILS_API void SetColorCorrectionMode(const TfToken &colorCorrectionMode)
Sets the color correction mode to be used for recording.
void SetImageWidth(const size_t imageWidth)
Sets the width of the recorded image.
USDAPPUTILS_API void SetCameraLightEnabled(bool cameraLightEnabled)
Turns the built-in camera light on or off.
bool SetRendererPlugin(const TfToken &id)
Sets the Hydra renderer plugin to be used for recording.
USDAPPUTILS_API UsdAppUtilsFrameRecorder(const TfToken &rendererPluginId=TfToken(), bool gpuEnabled=true, bool enableUsdDrawModes=true)
The rendererPluginId argument indicates the renderer plugin that Hyrda should use.
TfToken GetCurrentRendererId() const
Gets the ID of the Hydra renderer plugin that will be used for recording.
USDAPPUTILS_API void SetDomeLightVisibility(bool domeLightsVisible)
Sets the camera visibility of dome lights.
USDAPPUTILS_API void SetActiveRenderSettingsPrimPath(SdfPath const &path)
Sets the path to the render settings prim to use.
void SetComplexity(const float complexity)
Sets the level of refinement complexity.
USDAPPUTILS_API void SetIncludedPurposes(const TfTokenVector &purposes)
Sets the UsdGeomImageable purposes to be used for rendering.
USDAPPUTILS_API bool Record(const UsdStagePtr &stage, const UsdGeomCamera &usdCamera, const UsdTimeCode timeCode, const std::string &outputImagePath)
Records an image and writes the result to outputImagePath.
USDAPPUTILS_API void SetActiveRenderPassPrimPath(SdfPath const &path)
Sets the path to the render pass prim to use.
The UsdImagingGLEngine is the main entry point API for rendering USD scenes.
USDIMAGINGGL_API void SetEnablePresentation(bool enabled)
Enable / disable presenting the render to bound framebuffer.
USDIMAGINGGL_API bool SetRendererPlugin(TfToken const &id)
Set the current render-graph delegate to id.
USDIMAGINGGL_API TfToken GetCurrentRendererId() const
Return the id of the currently used renderer plugin.
Represent a time value, which may be either numeric, holding a double value, or a sentinel value UsdT...
#define TF_CODING_ERROR(fmt, args)
Issue an internal programming error, but continue execution.
TfToken class for efficient string referencing and hashing, plus conversions to and from stl string c...
std::vector< TfToken > TfTokenVector
Convenience types.