21 #ifndef __XUSD_RenderSettings__
22 #define __XUSD_RenderSettings__
69 virtual GfVec2i defaultResolution()
const = 0;
92 const char *p = overridePurpose();
94 p =
"geometry,render";
99 virtual fpreal startFrame()
const = 0;
108 virtual const std::vector<fpreal> *
frameList()
const {
return nullptr; }
181 const std::string &
aovName()
const {
return myAovName; }
184 const std::string &sourceName()
const;
185 const TfToken &sourceType()
const;
212 bool loadFrom(
const UsdStageRefPtr &usd,
215 bool resolveFrom(
const UsdStageRefPtr &usd,
222 void updateSettings(
const UsdStageRefPtr &use,
229 bool isRaster()
const;
245 const char *
path =
nullptr);
251 template <
typename T>
254 void clear() { myAuthored =
false; }
265 bool myAuthored =
false;
269 if (myCameraPath.IsEmpty())
279 bool disableDepthOfField(
bool &
val)
const;
289 static bool specificPixelAspect(
float &
val,
const ProductList &products);
291 static bool specificDisableMotionBlur(
bool &
val,
const ProductList &products);
292 static bool specificDisableDepthOfField(
bool &
val,
const ProductList &products);
304 int product_index,
int frame,
309 bool collectImageFilterLists(
const UsdStageRefPtr &usd,
326 return UTmakeUnique<XUSD_RenderVar>();
368 bool init(
const UsdStageRefPtr &usd,
372 bool init(
const UsdStageRefPtr &usd,
377 bool updateFrame(
const UsdStageRefPtr &usd,
382 bool resolveProducts(
const UsdStageRefPtr &usd,
421 bool delegate_products);
424 void printSettings()
const;
432 bool collectImageFilterLists(
const UsdStageRefPtr &usd,
435 bool collect_products)
const;
453 template <
typename T>
455 T &vaperture,
T &pixel_aspect,
456 T cam_aspect,
T img_aspect);
459 template <
typename T>
461 T &vaperture,
T &pixel_aspect,
462 T cam_aspect,
T img_aspect)
const;
470 {
return renderProducts(product_group,
false); }
474 {
return renderProducts(product_group,
true); }
476 virtual bool supportedDelegate(
const TfToken &
name)
const;
479 bool getKarmaRandomSeed(
int64 &seed,
489 static bool updateHoudiniImageFilterList(
490 const UsdStageRefPtr &stage,
502 {
return UTmakeUnique<XUSD_RenderProduct>(); }
504 void partitionProducts();
505 void computeImageWindows(
const UsdStageRefPtr &usd,
507 void setDefaults(
const UsdStageRefPtr &usd,
509 bool loadFromPrim(
const UsdStageRefPtr &usd,
511 bool loadFromOptions(
const UsdStageRefPtr &usd,
513 void buildRenderSettings(
const UsdStageRefPtr &usd,
516 {
return myProducts.size() >= 1 && myProducts[0]->isDefault(); }
520 bool accountForExtraProducts(
const SdfPathVector &paths)
const;
522 VtValue renderProducts(
int product_group,
bool raster)
const;
GT_API const UT_StringHolder filename
const_iterator end() const
const RenderVarList & vars() const
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.
UT_StringHolder myFullFilename
#define PXR_NAMESPACE_OPEN_SCOPE
virtual const char * overrideSnapshotPath(const XUSD_RenderProduct &p, int pidx) const
Optionally, override the path to the snapshots.
GLsizei const GLchar *const * path
bool cameraPath(SdfPath &val) const
ProductGroupList myProductGroups
virtual GfVec2i overrideResolution(const GfVec2i &res) const
Optionally override the resolution of the product.
std::size_t SYS_HashType
Define the type for hash values.
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 UT_StringHolder addTileSuffix(const UT_StringHolder &fname) const
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
std::vector< class SdfPath > SdfPathVector
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.
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
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
HdRenderSettingsMap mySettings
virtual fpreal frameInc() const
Frame increment, when computing sequences.
GLubyte GLubyte GLubyte GLubyte w
HUSD_API const char * productType()
const UT_StringHolder & fullOutputName() const
SettingOverride< bool > myInstantaneousShutter
UsdPrim prim() const
Get the render settings.
SettingOverride< float > myPixelAspect
virtual fpreal fps() const
Return the fps.
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()