21 #ifndef __XUSD_RenderSettings__
22 #define __XUSD_RenderSettings__
63 virtual TfToken renderer()
const = 0;
72 virtual GfVec2i defaultResolution()
const = 0;
95 const char *p = overridePurpose();
97 p =
"geometry,render";
102 virtual fpreal startFrame()
const = 0;
111 virtual const std::vector<fpreal> *
frameList()
const {
return nullptr; }
188 const TfToken &sourceType()
const;
215 bool loadFrom(
const UsdStageRefPtr &usd,
218 bool resolveFrom(
const UsdStageRefPtr &usd,
225 void updateSettings(
const UsdStageRefPtr &use,
232 bool isRaster()
const;
243 template <
typename T>
246 void clear() { myAuthored =
false; }
257 bool myAuthored =
false;
261 if (myCameraPath.IsEmpty())
271 bool disableDepthOfField(
bool &
val)
const;
281 static bool specificPixelAspect(
float &
val,
const ProductList &products);
283 static bool specificDisableMotionBlur(
bool &
val,
const ProductList &products);
284 static bool specificDisableDepthOfField(
bool &
val,
const ProductList &products);
296 int product_index,
int frame);
313 return UTmakeUnique<XUSD_RenderVar>();
354 bool init(
const UsdStageRefPtr &usd,
358 bool init(
const UsdStageRefPtr &usd,
363 bool updateFrame(
const UsdStageRefPtr &usd,
368 bool resolveProducts(
const UsdStageRefPtr &usd,
412 void printSettings()
const;
435 template <
typename T>
437 T &vaperture,
T &pixel_aspect,
438 T cam_aspect,
T img_aspect);
441 template <
typename T>
443 T &vaperture,
T &pixel_aspect,
444 T cam_aspect,
T img_aspect)
const;
452 {
return renderProducts(product_group,
false); }
456 {
return renderProducts(product_group,
true); }
458 virtual bool supportedDelegate(
const TfToken &
name)
const;
462 {
return UTmakeUnique<XUSD_RenderProduct>(); }
464 void partitionProducts();
465 void computeImageWindows(
const UsdStageRefPtr &usd,
467 void setDefaults(
const UsdStageRefPtr &usd,
469 bool loadFromPrim(
const UsdStageRefPtr &usd,
471 bool loadFromOptions(
const UsdStageRefPtr &usd,
473 void buildRenderSettings(
const UsdStageRefPtr &usd,
476 {
return myProducts.size() >= 1 && myProducts[0]->isDefault(); }
480 bool accountForExtraProducts(
const SdfPathVector &paths)
const;
482 VtValue renderProducts(
int product_group,
bool raster)
const;
const_iterator end() const
hboost::math::policies::policy< hboost::math::policies::domain_error< hboost::math::policies::ignore_error >, hboost::math::policies::pole_error< hboost::math::policies::ignore_error >, hboost::math::policies::overflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::underflow_error< hboost::math::policies::ignore_error >, hboost::math::policies::denorm_error< hboost::math::policies::ignore_error >, hboost::math::policies::rounding_error< hboost::math::policies::ignore_error >, hboost::math::policies::evaluation_error< hboost::math::policies::ignore_error >, hboost::math::policies::indeterminate_result_error< hboost::math::policies::ignore_error > > policy
const RenderVarList & vars() const
const TfToken & renderer() const
Rendering head.
SettingOverride< bool > myDisableMotionBlur
virtual SdfPath overrideCamera() const
Override the path to the camera.
UsdRenderSettings myUsdSettings
XUSD_RenderSettingsContext()
PXL_DataFormat pxlFormat() const
const VtArray< TfToken > & purpose() const
XUSD_RenderSettings contains the HdRenderSettings for the render.
virtual void setDefaultSettings(const XUSD_RenderSettings &rset, HdRenderSettingsMap &settings) const
Build initial render settings map.
GLsizei const GLchar *const * string
virtual const char * overrideSnapshotPath(const XUSD_RenderProduct &p, int pidx) const
Optionally, override the path to the snapshots.
bool cameraPath(SdfPath &val) const
ProductGroupList myProductGroups
virtual GfVec2i overrideResolution(const GfVec2i &res) const
Optionally override the resolution of the product.
bool pixelAspect(float &val) const
Class which writes ASCII or binary JSON streams.
const SdfPath & cameraPath() const
const UT_StringHolder & outputName() const
const_iterator begin() const
SettingOverride< GfVec4f > myDataWindowF
virtual const char * defaultPurpose() const
Return the default purpose (this is a comma separated list)
virtual bool overrideDisableMotionBlur(bool v) const
Optionally, override the disableMotionBlur.
SettingOverride< GfVec2d > myShutter
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
const TfToken & aovToken() const
virtual const char * overrideProductName(const XUSD_RenderProduct &p, int pidx) const
Return a product name override.
virtual UT_UniquePtr< XUSD_RenderVar > newRenderVar() const
If you have a sub-class of XUSD_RenderVar, you can create it here.
virtual void overrideSettings(const XUSD_RenderSettings &rset, HdRenderSettingsMap &settings) const
After the products have been loaded, apply any overrides.
virtual const char * defaultProductName() const
Default product name.
PXL_DataFormat myDataFormat
const_iterator begin() const
bool myDisableDepthOfField
PXR_NAMESPACE_OPEN_SCOPE typedef TfHashMap< TfToken, VtValue, TfToken::HashFunctor > HdAovSettingsMap
bool isDefaultProduct() const
HdAovSettingsMap mySettings
const HdAovDescriptor & desc() const
virtual HdAovDescriptor defaultAovDescriptor(const TfToken &aov) const
Get a default rendering descriptor for a given AOV.
SettingOverride< bool > myDisableDepthOfField
const_iterator end() const
const HdAovSettingsMap & settings() const
User settings for this product.
UT_StringHolder myFilename
const HdRenderSettingsMap & renderSettings() const
VtValue rasterRenderProducts(int product_group) const
HUSD_API const char * raster()
std::vector< HdAovDescriptor > HdAovDescriptorList
virtual const char * overrideSnapshotSuffix(const XUSD_RenderProduct &p, int pidx) const
Optionally, override the suffix on snapshots.
std::vector< TfToken > TfTokenVector
Convenience types.
GLuint const GLchar * name
virtual GfVec4f overrideDataWindow(const GfVec4f &w) const
Optionally, override the data window.
std::vector< class SdfPath > SdfPathVector
A vector of SdfPaths.
virtual bool allowCameraless() const
Allow render options to be applied without a camera present.
const ProductList & products() const
bool res(GfVec2i &val) const
VtValue delegateRenderProducts(int product_group) const
PXL_Packing pxlPacking() const
VtArray< TfToken > myPurpose
const ProductGroupList & productGroups() const
UT_StringHolder myPartname
SettingOverride< GfVec2i > myRes
bool dataWindow(GfVec4f &val) const
const std::string & aovName() const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
virtual void initFromUSD(UsdRenderSettings &settings)
virtual const std::vector< fpreal > * frameList() const
Start frame for a render sequence.
virtual const char * overridePurpose() const
Return if there's an overridden purpose for the render.
virtual UT_UniquePtr< XUSD_RenderProduct > newRenderProduct() const
#define PXR_NAMESPACE_CLOSE_SCOPE
virtual const char * tileSuffix() const
Get the tile suffix, if there is one.
HdRenderSettingsMap mySettings
virtual fpreal frameInc() const
Frame increment, when computing sequences.
GLubyte GLubyte GLubyte GLubyte w
HUSD_API const char * productType()
SettingOverride< bool > myInstantaneousShutter
UsdPrim prim() const
Get the render settings.
SettingOverride< float > myPixelAspect
virtual fpreal fps() const
Return the fps.
virtual int tileIndex() const
Get the tile index, defaults to 0.
HUSD_API const char * dataType()
HUSD_API const char * productName()
bool shutter(GfVec2d &val) const
virtual fpreal overridePixelAspect(fpreal pa) const
Optionally, override the pixel aspect ratio.
virtual int frameCount() const
Return the number of frames being rendered.
HUSD_API const char * disableMotionBlur()