.SetDisableMotionBlur(
HdRetainedTypedSampledDataSource<bool>::New(
hdProduct.disableMotionBlur))
+ .SetDisableDepthOfField(
+ HdRetainedTypedSampledDataSource<bool>::New(
+ hdProduct.disableDepthOfField))
.SetNamespacedSettings(
_ToContainerDS(hdProduct.namespacedSettings))
.Build());
// --(BEGIN CUSTOM CODE: Schema Methods)--
// --(END CUSTOM CODE: Schema Methods)--
-
-
-
HdPathDataSourceHandle
HdRenderProductSchema::GetPath()
{
HdRenderProductSchemaTokens->disableMotionBlur);
}
+HdBoolDataSourceHandle
+HdRenderProductSchema::GetDisableDepthOfField()
+{
+ return _GetTypedDataSource<HdBoolDataSource>(
+ HdRenderProductSchemaTokens->disableDepthOfField);
+}
+
HdContainerDataSourceHandle
HdRenderProductSchema::GetNamespacedSettings()
{
const HdVec2fDataSourceHandle &apertureSize,
const HdVec4fDataSourceHandle &dataWindowNDC,
const HdBoolDataSourceHandle &disableMotionBlur,
+ const HdBoolDataSourceHandle &disableDepthOfField,
const HdContainerDataSourceHandle &namespacedSettings
)
{
- TfToken _names[12];
- HdDataSourceBaseHandle _values[12];
+ TfToken _names[13];
+ HdDataSourceBaseHandle _values[13];
size_t _count = 0;
+
if (path) {
_names[_count] = HdRenderProductSchemaTokens->path;
_values[_count++] = path;
_values[_count++] = disableMotionBlur;
}
+ if (disableDepthOfField) {
+ _names[_count] = HdRenderProductSchemaTokens->disableDepthOfField;
+ _values[_count++] = disableDepthOfField;
+ }
+
if (namespacedSettings) {
_names[_count] = HdRenderProductSchemaTokens->namespacedSettings;
_values[_count++] = namespacedSettings;
}
-
return HdRetainedContainerDataSource::New(_count, _names, _values);
}
-/*static*/
-HdRenderProductSchema
-HdRenderProductSchema::GetFromParent(
- const HdContainerDataSourceHandle &fromParentContainer)
-{
- return HdRenderProductSchema(
- fromParentContainer
- ? HdContainerDataSource::Cast(fromParentContainer->Get(
- HdRenderProductSchemaTokens->renderProduct))
- : nullptr);
-}
-
-/*static*/
-const TfToken &
-HdRenderProductSchema::GetSchemaToken()
-{
- return HdRenderProductSchemaTokens->renderProduct;
-}
-
-/*static*/
-const HdDataSourceLocator &
-HdRenderProductSchema::GetDefaultLocator()
-{
- static const HdDataSourceLocator locator(GetSchemaToken());
- return locator;
-}
-
-/* static */
-const HdDataSourceLocator &
-HdRenderProductSchema::GetResolutionLocator()
-{
- static const HdDataSourceLocator locator =
- GetDefaultLocator().Append(
- HdRenderProductSchemaTokens->resolution);
- return locator;
-}
-
-/* static */
-const HdDataSourceLocator &
-HdRenderProductSchema::GetRenderVarsLocator()
-{
- static const HdDataSourceLocator locator =
- GetDefaultLocator().Append(
- HdRenderProductSchemaTokens->renderVars);
- return locator;
-}
-
-/* static */
-const HdDataSourceLocator &
-HdRenderProductSchema::GetNamespacedSettingsLocator()
-{
- static const HdDataSourceLocator locator =
- GetDefaultLocator().Append(
- HdRenderProductSchemaTokens->namespacedSettings);
- return locator;
-}
HdRenderProductSchema::Builder &
HdRenderProductSchema::Builder::SetPath(
const HdPathDataSourceHandle &path)
return *this;
}
+HdRenderProductSchema::Builder &
+HdRenderProductSchema::Builder::SetDisableDepthOfField(
+ const HdBoolDataSourceHandle &disableDepthOfField)
+{
+ _disableDepthOfField = disableDepthOfField;
+ return *this;
+}
+
HdRenderProductSchema::Builder &
HdRenderProductSchema::Builder::SetNamespacedSettings(
const HdContainerDataSourceHandle &namespacedSettings)
_apertureSize,
_dataWindowNDC,
_disableMotionBlur,
+ _disableDepthOfField,
_namespacedSettings
);
}
+/*static*/
+HdRenderProductSchema
+HdRenderProductSchema::GetFromParent(
+ const HdContainerDataSourceHandle &fromParentContainer)
+{
+ return HdRenderProductSchema(
+ fromParentContainer
+ ? HdContainerDataSource::Cast(fromParentContainer->Get(
+ HdRenderProductSchemaTokens->renderProduct))
+ : nullptr);
+}
+
+/*static*/
+const TfToken &
+HdRenderProductSchema::GetSchemaToken()
+{
+ return HdRenderProductSchemaTokens->renderProduct;
+}
+
+/*static*/
+const HdDataSourceLocator &
+HdRenderProductSchema::GetDefaultLocator()
+{
+ static const HdDataSourceLocator locator(GetSchemaToken());
+ return locator;
+}
+
+/* static */
+const HdDataSourceLocator &
+HdRenderProductSchema::GetResolutionLocator()
+{
+ static const HdDataSourceLocator locator =
+ GetDefaultLocator().Append(
+ HdRenderProductSchemaTokens->resolution);
+ return locator;
+}
+
+/* static */
+const HdDataSourceLocator &
+HdRenderProductSchema::GetRenderVarsLocator()
+{
+ static const HdDataSourceLocator locator =
+ GetDefaultLocator().Append(
+ HdRenderProductSchemaTokens->renderVars);
+ return locator;
+}
+
+/* static */
+const HdDataSourceLocator &
+HdRenderProductSchema::GetNamespacedSettingsLocator()
+{
+ static const HdDataSourceLocator locator =
+ GetDefaultLocator().Append(
+ HdRenderProductSchemaTokens->namespacedSettings);
+ return locator;
+}
PXR_NAMESPACE_CLOSE_SCOPE
\ No newline at end of file
#ifndef PXR_IMAGING_HD_RENDER_PRODUCT_SCHEMA_H
#define PXR_IMAGING_HD_RENDER_PRODUCT_SCHEMA_H
+/// \file
+
#include "pxr/imaging/hd/api.h"
#include "pxr/imaging/hd/vectorSchemaTypeDefs.h"
PXR_NAMESPACE_OPEN_SCOPE
-//-----------------------------------------------------------------------------
-
// --(BEGIN CUSTOM CODE: Declares)--
// --(END CUSTOM CODE: Declares)--
-//-----------------------------------------------------------------------------
-
#define HD_RENDER_PRODUCT_SCHEMA_TOKENS \
(renderProduct) \
(path) \
(apertureSize) \
(dataWindowNDC) \
(disableMotionBlur) \
+ (disableDepthOfField) \
(namespacedSettings) \
TF_DECLARE_PUBLIC_TOKENS(HdRenderProductSchemaTokens, HD_API,
HD_RENDER_PRODUCT_SCHEMA_TOKENS);
//-----------------------------------------------------------------------------
+
+
class HdRenderProductSchema : public HdSchema
{
public:
+ /// \name Schema retrieval
+ /// @{
+
HdRenderProductSchema(HdContainerDataSourceHandle container)
- : HdSchema(container) {}
+ : HdSchema(container) {}
+
+ /// Retrieves a container data source with the schema's default name token
+ /// "renderProduct" from the parent container and constructs a
+ /// HdRenderProductSchema instance.
+ /// Because the requested container data source may not exist, the result
+ /// should be checked with IsDefined() or a bool comparison before use.
+ HD_API
+ static HdRenderProductSchema GetFromParent(
+ const HdContainerDataSourceHandle &fromParentContainer);
+
+ /// @}
// --(BEGIN CUSTOM CODE: Schema Methods)--
// --(END CUSTOM CODE: Schema Methods)--
- //ACCESSORS
-
+ /// \name Member accessor
+ /// @{
HD_API
HdPathDataSourceHandle GetPath();
HdBoolDataSourceHandle GetDisableMotionBlur();
HD_API
- HdContainerDataSourceHandle GetNamespacedSettings();
+ HdBoolDataSourceHandle GetDisableDepthOfField();
+
+ HD_API
+ HdContainerDataSourceHandle GetNamespacedSettings();
- // RETRIEVING AND CONSTRUCTING
+ /// @}
+
+ /// \name Schema location
+ /// @{
+
+ /// Returns a token where the container representing this schema is found in
+ /// a container by default.
+ HD_API
+ static const TfToken &GetSchemaToken();
+
+ /// Returns an HdDataSourceLocator (relative to the prim-level data source)
+ /// where the container representing this schema is found by default.
+ HD_API
+ static const HdDataSourceLocator &GetDefaultLocator();
+
+ /// @}
+
+ /// \name Data source locators for members
+ ///
+ /// The following methods return an HdDataSourceLocator (relative to the
+ /// prim-level data source) where the data source for a member can be found.
+ ///
+ /// This is often useful for checking intersection against the
+ /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
+ /// @{
+
+ /// Prim-level relative data source locator to locate resolution.
+ HD_API
+ static const HdDataSourceLocator &GetResolutionLocator();
+
+ /// Prim-level relative data source locator to locate renderVars.
+ HD_API
+ static const HdDataSourceLocator &GetRenderVarsLocator();
+ /// Prim-level relative data source locator to locate namespacedSettings.
+ HD_API
+ static const HdDataSourceLocator &GetNamespacedSettingsLocator();
+ /// @}
+
+ /// \name Schema construction
+ /// @{
+
+ /// \deprecated Use Builder instead.
+ ///
/// Builds a container data source which includes the provided child data
/// sources. Parameters with nullptr values are excluded. This is a
/// low-level interface. For cases in which it's desired to define
const HdVec2fDataSourceHandle &apertureSize,
const HdVec4fDataSourceHandle &dataWindowNDC,
const HdBoolDataSourceHandle &disableMotionBlur,
+ const HdBoolDataSourceHandle &disableDepthOfField,
const HdContainerDataSourceHandle &namespacedSettings
);
Builder &SetDisableMotionBlur(
const HdBoolDataSourceHandle &disableMotionBlur);
HD_API
+ Builder &SetDisableDepthOfField(
+ const HdBoolDataSourceHandle &disableDepthOfField);
+ HD_API
Builder &SetNamespacedSettings(
const HdContainerDataSourceHandle &namespacedSettings);
HdVec2fDataSourceHandle _apertureSize;
HdVec4fDataSourceHandle _dataWindowNDC;
HdBoolDataSourceHandle _disableMotionBlur;
+ HdBoolDataSourceHandle _disableDepthOfField;
HdContainerDataSourceHandle _namespacedSettings;
- };
-
- /// Retrieves a container data source with the schema's default name token
- /// "renderProduct" from the parent container and constructs a
- /// HdRenderProductSchema instance.
- /// Because the requested container data source may not exist, the result
- /// should be checked with IsDefined() or a bool comparison before use.
- HD_API
- static HdRenderProductSchema GetFromParent(
- const HdContainerDataSourceHandle &fromParentContainer);
-
- /// Returns a token where the container representing this schema is found in
- /// a container by default.
- HD_API
- static const TfToken &GetSchemaToken();
-
- /// Returns an HdDataSourceLocator (relative to the prim-level data source)
- /// where the container representing this schema is found by default.
- HD_API
- static const HdDataSourceLocator &GetDefaultLocator();
-
- // DATA SOURCE LOCATORS FOR MEMBERS
- //
- // The following methods return an HdDataSourceLocator (relative to the
- // prim-level data source) where the data source for a member can be found.
- //
- // This is often useful for checking intersection against the
- // HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
-
-
- /// Prim-level relative data source locator to locate resolution.
- HD_API
- static const HdDataSourceLocator &GetResolutionLocator();
-
- /// Prim-level relative data source locator to locate renderVars.
- HD_API
- static const HdDataSourceLocator &GetRenderVarsLocator();
-
- /// Prim-level relative data source locator to locate namespacedSettings.
- HD_API
- static const HdDataSourceLocator &GetNamespacedSettingsLocator();
+ };
+ /// @}
};
PXR_NAMESPACE_CLOSE_SCOPE
rp.apertureSize,
rp.dataWindowNDC,
rp.disableMotionBlur,
+ rp.disableDepthOfField,
rp.namespacedSettings);
}
&& lhs.apertureSize == rhs.apertureSize
&& lhs.dataWindowNDC == rhs.dataWindowNDC
&& lhs.disableMotionBlur == rhs.disableMotionBlur
+ && lhs.disableDepthOfField == rhs.disableDepthOfField
&& lhs.namespacedSettings == rhs.namespacedSettings;
}
/// Settings overrides
//
bool disableMotionBlur;
+ bool disableDepthOfField;
VtDictionary namespacedSettings;
};
if (auto h = productSchema.GetDisableMotionBlur()) {
prod.disableMotionBlur = h->GetTypedValue(0);
}
+ if (auto h = productSchema.GetDisableDepthOfField()) {
+ prod.disableDepthOfField = h->GetTypedValue(0);
+ }
if (auto h = productSchema.GetNamespacedSettings()) {
prod.namespacedSettings = _ToDictionary(h);
}
// HdMaterialNode::GetParameters, GetInputConnections
// return Hydra schemas instead of just container data sources.
// schemaTypeDefs.h replaces vectorSchemaTypeDefs.h.
+// 63 -> 64: Adding disableDepthOfField to HdRenderSettings::RenderProduct
+//
-#define HD_API_VERSION 63
+#define HD_API_VERSION 64
// 1 -> 2: SimpleLighting -> FallbackLighting
#define HD_SHADER_API 2
aspectRatioConformPolicy.
"""
)
+ uniform bool disableDepthOfField = 0 (
+ doc = """Disable all depth of field by setting F-stop of the targeted
+ camera to infinity."""
+ )
uniform bool disableMotionBlur = 0 (
doc = """Disable all motion blur by setting the shutter interval
of the targeted camera to [0,0] - that is, take only one sample,
aspectRatioConformPolicy.
"""
)
+ uniform bool disableDepthOfField = 0 (
+ doc = """Disable all depth of field by setting F-stop of the targeted
+ camera to infinity."""
+ )
uniform bool disableMotionBlur = 0 (
doc = """Disable all motion blur by setting the shutter interval
of the targeted camera to [0,0] - that is, take only one sample,
aspectRatioConformPolicy.
"""
)
+ uniform bool disableDepthOfField = 0 (
+ doc = """Disable all depth of field by setting F-stop of the targeted
+ camera to infinity."""
+ )
uniform bool disableMotionBlur = 0 (
doc = """Disable all motion blur by setting the shutter interval
of the targeted camera to [0,0] - that is, take only one sample,
of the targeted camera to [0,0] - that is, take only one sample,
namely at the current time code."""
)
+ uniform bool disableDepthOfField = false (
+ doc = """Disable all depth of field by setting F-stop of the targeted
+ camera to infinity."""
+ )
}
class RenderSettings "RenderSettings" (
writeSparsely);
}
+UsdAttribute
+UsdRenderSettingsBase::GetDisableDepthOfFieldAttr() const
+{
+ return GetPrim().GetAttribute(UsdRenderTokens->disableDepthOfField);
+}
+
+UsdAttribute
+UsdRenderSettingsBase::CreateDisableDepthOfFieldAttr(VtValue const &defaultValue, bool writeSparsely) const
+{
+ return UsdSchemaBase::_CreateAttr(UsdRenderTokens->disableDepthOfField,
+ SdfValueTypeNames->Bool,
+ /* custom = */ false,
+ SdfVariabilityUniform,
+ defaultValue,
+ writeSparsely);
+}
+
UsdRelationship
UsdRenderSettingsBase::GetCameraRel() const
{
UsdRenderTokens->dataWindowNDC,
UsdRenderTokens->instantaneousShutter,
UsdRenderTokens->disableMotionBlur,
+ UsdRenderTokens->disableDepthOfField,
};
static TfTokenVector allNames =
_ConcatenateAttributeNames(
USDRENDER_API
UsdAttribute CreateDisableMotionBlurAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
+public:
+ // --------------------------------------------------------------------- //
+ // DISABLEDEPTHOFFIELD
+ // --------------------------------------------------------------------- //
+ /// Disable all depth of field by setting F-stop of the targeted
+ /// camera to infinity.
+ ///
+ /// | ||
+ /// | -- | -- |
+ /// | Declaration | `uniform bool disableDepthOfField = 0` |
+ /// | C++ Type | bool |
+ /// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->Bool |
+ /// | \ref SdfVariability "Variability" | SdfVariabilityUniform |
+ USDRENDER_API
+ UsdAttribute GetDisableDepthOfFieldAttr() const;
+
+ /// See GetDisableDepthOfFieldAttr(), and also
+ /// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
+ /// If specified, author \p defaultValue as the attribute's default,
+ /// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
+ /// the default for \p writeSparsely is \c false.
+ USDRENDER_API
+ UsdAttribute CreateDisableDepthOfFieldAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;
+
public:
// --------------------------------------------------------------------- //
// CAMERA
pd->disableMotionBlur = true;
}
}
+
+ _Get(rsBase.GetDisableDepthOfFieldAttr(),
+ &pd->disableDepthOfField, getDefault);
}
// TODO: Consolidate with CameraUtilConformedWindow(). Resolve policy
SdfPath cameraPath;
/// If set to true, disables motion blur.
bool disableMotionBlur;
+ /// If set to true, disables depth of field.
+ bool disableDepthOfField;
/// The pixel resolution of the product.
GfVec2i resolution;
/// The pixel aspect ratio as adjusted by aspectRatioConformPolicy.
dataWindowNDC("dataWindowNDC", TfToken::Immortal),
denoiseEnable("denoise:enable", TfToken::Immortal),
denoisePass("denoise:pass", TfToken::Immortal),
+ disableDepthOfField("disableDepthOfField", TfToken::Immortal),
disableMotionBlur("disableMotionBlur", TfToken::Immortal),
expandAperture("expandAperture", TfToken::Immortal),
fileName("fileName", TfToken::Immortal),
dataWindowNDC,
denoiseEnable,
denoisePass,
+ disableDepthOfField,
disableMotionBlur,
expandAperture,
fileName,
///
/// UsdRenderPass
const TfToken denoisePass;
+ /// \brief "disableDepthOfField"
+ ///
+ /// UsdRenderSettingsBase
+ const TfToken disableDepthOfField;
/// \brief "disableMotionBlur"
///
/// UsdRenderSettingsBase
return self.CreateDisableMotionBlurAttr(
UsdPythonToSdfType(defaultVal, SdfValueTypeNames->Bool), writeSparsely);
}
+
+static UsdAttribute
+_CreateDisableDepthOfFieldAttr(UsdRenderSettingsBase &self,
+ object defaultVal, bool writeSparsely) {
+ return self.CreateDisableDepthOfFieldAttr(
+ UsdPythonToSdfType(defaultVal, SdfValueTypeNames->Bool), writeSparsely);
+}
static std::string
_Repr(const UsdRenderSettingsBase &self)
&_CreateDisableMotionBlurAttr,
(arg("defaultValue")=object(),
arg("writeSparsely")=false))
+
+ .def("GetDisableDepthOfFieldAttr",
+ &This::GetDisableDepthOfFieldAttr)
+ .def("CreateDisableDepthOfFieldAttr",
+ &_CreateDisableDepthOfFieldAttr,
+ (arg("defaultValue")=object(),
+ arg("writeSparsely")=false))
.def("GetCameraRel",
_AddToken(cls, "dataWindowNDC", UsdRenderTokens->dataWindowNDC);
_AddToken(cls, "denoiseEnable", UsdRenderTokens->denoiseEnable);
_AddToken(cls, "denoisePass", UsdRenderTokens->denoisePass);
+ _AddToken(cls, "disableDepthOfField", UsdRenderTokens->disableDepthOfField);
_AddToken(cls, "disableMotionBlur", UsdRenderTokens->disableMotionBlur);
_AddToken(cls, "expandAperture", UsdRenderTokens->expandAperture);
_AddToken(cls, "fileName", UsdRenderTokens->fileName);
hdProduct.dataWindowNDC = product.dataWindowNDC;
hdProduct.disableMotionBlur = product.disableMotionBlur;
+ hdProduct.disableDepthOfField = product.disableDepthOfField;
hdProduct.namespacedSettings = product.namespacedSettings;
hdProducts.push_back(std::move(hdProduct));
(renderSettings_depOn_usdRenderSettings_aspectRatioConformPolicy)
(renderSettings_depOn_usdRenderSettings_dataWindowNDC)
(renderSettings_depOn_usdRenderSettings_disableMotionBlur)
+ (renderSettings_depOn_usdRenderSettings_disableDepthOfField)
(renderSettings_depOn_usdRenderSettings_camera)
(__dependencies_depOn_usdRenderSettings_products)
);
UsdImagingUsdRenderSettingsSchema::GetDisableMotionBlurLocator(),
HdRenderSettingsSchema::GetRenderProductsLocator(),
},
+ {
+ _tokens->renderSettings_depOn_usdRenderSettings_disableDepthOfField,
+ UsdImagingUsdRenderSettingsSchema::GetDisableDepthOfFieldLocator(),
+ HdRenderSettingsSchema::GetRenderProductsLocator(),
+ },
{
_tokens->renderSettings_depOn_usdRenderSettings_camera,
UsdImagingUsdRenderSettingsSchema::GetCameraLocator(),
_Resolve(p.GetDataWindowNDC(), s.GetDataWindowNDC()))
.SetDisableMotionBlur(
_Resolve(p.GetDisableMotionBlur(), s.GetDisableMotionBlur()))
+ .SetDisableDepthOfField(
+ _Resolve(p.GetDisableDepthOfField(), s.GetDisableDepthOfField()))
.SetNamespacedSettings(p.GetNamespacedSettings())
.Build();
}
/* ************************************************************************** */
#include "pxr/usdImaging/usdImaging/usdRenderProductSchema.h"
+
#include "pxr/imaging/hd/retainedDataSource.h"
#include "pxr/base/trace/trace.h"
// --(BEGIN CUSTOM CODE: Schema Methods)--
// --(END CUSTOM CODE: Schema Methods)--
-
-
-
HdVec2iDataSourceHandle
UsdImagingUsdRenderProductSchema::GetResolution()
{
UsdImagingUsdRenderProductSchemaTokens->disableMotionBlur);
}
+HdBoolDataSourceHandle
+UsdImagingUsdRenderProductSchema::GetDisableDepthOfField()
+{
+ return _GetTypedDataSource<HdBoolDataSource>(
+ UsdImagingUsdRenderProductSchemaTokens->disableDepthOfField);
+}
+
HdPathDataSourceHandle
UsdImagingUsdRenderProductSchema::GetCamera()
{
const HdTokenDataSourceHandle &aspectRatioConformPolicy,
const HdVec4fDataSourceHandle &dataWindowNDC,
const HdBoolDataSourceHandle &disableMotionBlur,
+ const HdBoolDataSourceHandle &disableDepthOfField,
const HdPathDataSourceHandle &camera,
const HdTokenDataSourceHandle &productType,
const HdTokenDataSourceHandle &productName,
const HdContainerDataSourceHandle &namespacedSettings
)
{
- TfToken _names[10];
- HdDataSourceBaseHandle _values[10];
+ TfToken _names[11];
+ HdDataSourceBaseHandle _values[11];
size_t _count = 0;
+
if (resolution) {
_names[_count] = UsdImagingUsdRenderProductSchemaTokens->resolution;
_values[_count++] = resolution;
_values[_count++] = disableMotionBlur;
}
+ if (disableDepthOfField) {
+ _names[_count] = UsdImagingUsdRenderProductSchemaTokens->disableDepthOfField;
+ _values[_count++] = disableDepthOfField;
+ }
+
if (camera) {
_names[_count] = UsdImagingUsdRenderProductSchemaTokens->camera;
_values[_count++] = camera;
_names[_count] = UsdImagingUsdRenderProductSchemaTokens->namespacedSettings;
_values[_count++] = namespacedSettings;
}
-
return HdRetainedContainerDataSource::New(_count, _names, _values);
}
-/*static*/
-UsdImagingUsdRenderProductSchema
-UsdImagingUsdRenderProductSchema::GetFromParent(
- const HdContainerDataSourceHandle &fromParentContainer)
-{
- return UsdImagingUsdRenderProductSchema(
- fromParentContainer
- ? HdContainerDataSource::Cast(fromParentContainer->Get(
- UsdImagingUsdRenderProductSchemaTokens->__usdRenderProduct))
- : nullptr);
-}
-
-/*static*/
-const TfToken &
-UsdImagingUsdRenderProductSchema::GetSchemaToken()
-{
- return UsdImagingUsdRenderProductSchemaTokens->__usdRenderProduct;
-}
-
-/*static*/
-const HdDataSourceLocator &
-UsdImagingUsdRenderProductSchema::GetDefaultLocator()
-{
- static const HdDataSourceLocator locator(GetSchemaToken());
- return locator;
-}
-
-/* static */
-const HdDataSourceLocator &
-UsdImagingUsdRenderProductSchema::GetNamespacedSettingsLocator()
-{
- static const HdDataSourceLocator locator =
- GetDefaultLocator().Append(
- UsdImagingUsdRenderProductSchemaTokens->namespacedSettings);
- return locator;
-}
UsdImagingUsdRenderProductSchema::Builder &
UsdImagingUsdRenderProductSchema::Builder::SetResolution(
const HdVec2iDataSourceHandle &resolution)
return *this;
}
+UsdImagingUsdRenderProductSchema::Builder &
+UsdImagingUsdRenderProductSchema::Builder::SetDisableDepthOfField(
+ const HdBoolDataSourceHandle &disableDepthOfField)
+{
+ _disableDepthOfField = disableDepthOfField;
+ return *this;
+}
+
UsdImagingUsdRenderProductSchema::Builder &
UsdImagingUsdRenderProductSchema::Builder::SetCamera(
const HdPathDataSourceHandle &camera)
_aspectRatioConformPolicy,
_dataWindowNDC,
_disableMotionBlur,
+ _disableDepthOfField,
_camera,
_productType,
_productName,
);
}
+/*static*/
+UsdImagingUsdRenderProductSchema
+UsdImagingUsdRenderProductSchema::GetFromParent(
+ const HdContainerDataSourceHandle &fromParentContainer)
+{
+ return UsdImagingUsdRenderProductSchema(
+ fromParentContainer
+ ? HdContainerDataSource::Cast(fromParentContainer->Get(
+ UsdImagingUsdRenderProductSchemaTokens->__usdRenderProduct))
+ : nullptr);
+}
+
+/*static*/
+const TfToken &
+UsdImagingUsdRenderProductSchema::GetSchemaToken()
+{
+ return UsdImagingUsdRenderProductSchemaTokens->__usdRenderProduct;
+}
+
+/*static*/
+const HdDataSourceLocator &
+UsdImagingUsdRenderProductSchema::GetDefaultLocator()
+{
+ static const HdDataSourceLocator locator(GetSchemaToken());
+ return locator;
+}
+
+/* static */
+const HdDataSourceLocator &
+UsdImagingUsdRenderProductSchema::GetNamespacedSettingsLocator()
+{
+ static const HdDataSourceLocator locator =
+ GetDefaultLocator().Append(
+ UsdImagingUsdRenderProductSchemaTokens->namespacedSettings);
+ return locator;
+}
PXR_NAMESPACE_CLOSE_SCOPE
\ No newline at end of file
#ifndef PXR_USD_IMAGING_USD_IMAGING_USD_RENDER_PRODUCT_SCHEMA_H
#define PXR_USD_IMAGING_USD_IMAGING_USD_RENDER_PRODUCT_SCHEMA_H
+/// \file
+
#include "pxr/usdImaging/usdImaging/api.h"
-#include "pxr/imaging/hd/schema.h"
+#include "pxr/imaging/hd/schema.h"
// --(BEGIN CUSTOM CODE: Includes)--
// --(END CUSTOM CODE: Includes)--
PXR_NAMESPACE_OPEN_SCOPE
-//-----------------------------------------------------------------------------
-
// --(BEGIN CUSTOM CODE: Declares)--
// --(END CUSTOM CODE: Declares)--
-//-----------------------------------------------------------------------------
-
#define USD_IMAGING_USD_RENDER_PRODUCT_SCHEMA_TOKENS \
(__usdRenderProduct) \
(resolution) \
(aspectRatioConformPolicy) \
(dataWindowNDC) \
(disableMotionBlur) \
+ (disableDepthOfField) \
(camera) \
(productType) \
(productName) \
USD_IMAGING_USD_RENDER_PRODUCT_SCHEMA_TOKENS);
//-----------------------------------------------------------------------------
+
+
class UsdImagingUsdRenderProductSchema : public HdSchema
{
public:
+ /// \name Schema retrieval
+ /// @{
+
UsdImagingUsdRenderProductSchema(HdContainerDataSourceHandle container)
- : HdSchema(container) {}
+ : HdSchema(container) {}
+
+ /// Retrieves a container data source with the schema's default name token
+ /// "__usdRenderProduct" from the parent container and constructs a
+ /// UsdImagingUsdRenderProductSchema instance.
+ /// Because the requested container data source may not exist, the result
+ /// should be checked with IsDefined() or a bool comparison before use.
+ USDIMAGING_API
+ static UsdImagingUsdRenderProductSchema GetFromParent(
+ const HdContainerDataSourceHandle &fromParentContainer);
+
+ /// @}
// --(BEGIN CUSTOM CODE: Schema Methods)--
// --(END CUSTOM CODE: Schema Methods)--
- //ACCESSORS
-
+ /// \name Member accessor
+ /// @{
USDIMAGING_API
HdVec2iDataSourceHandle GetResolution();
USDIMAGING_API
HdBoolDataSourceHandle GetDisableMotionBlur();
+ USDIMAGING_API
+ HdBoolDataSourceHandle GetDisableDepthOfField();
+
USDIMAGING_API
HdPathDataSourceHandle GetCamera();
HdPathArrayDataSourceHandle GetOrderedVars();
USDIMAGING_API
- HdContainerDataSourceHandle GetNamespacedSettings();
+ HdContainerDataSourceHandle GetNamespacedSettings();
+
+ /// @}
+
+ /// \name Schema location
+ /// @{
+
+ /// Returns a token where the container representing this schema is found in
+ /// a container by default.
+ USDIMAGING_API
+ static const TfToken &GetSchemaToken();
+
+ /// Returns an HdDataSourceLocator (relative to the prim-level data source)
+ /// where the container representing this schema is found by default.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetDefaultLocator();
+
+ /// @}
- // RETRIEVING AND CONSTRUCTING
+ /// \name Data source locators for members
+ ///
+ /// The following methods return an HdDataSourceLocator (relative to the
+ /// prim-level data source) where the data source for a member can be found.
+ ///
+ /// This is often useful for checking intersection against the
+ /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
+ /// @{
+ /// Prim-level relative data source locator to locate namespacedSettings.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetNamespacedSettingsLocator();
+ /// @}
+
+ /// \name Schema construction
+ /// @{
+
+ /// \deprecated Use Builder instead.
+ ///
/// Builds a container data source which includes the provided child data
/// sources. Parameters with nullptr values are excluded. This is a
/// low-level interface. For cases in which it's desired to define
const HdTokenDataSourceHandle &aspectRatioConformPolicy,
const HdVec4fDataSourceHandle &dataWindowNDC,
const HdBoolDataSourceHandle &disableMotionBlur,
+ const HdBoolDataSourceHandle &disableDepthOfField,
const HdPathDataSourceHandle &camera,
const HdTokenDataSourceHandle &productType,
const HdTokenDataSourceHandle &productName,
Builder &SetDisableMotionBlur(
const HdBoolDataSourceHandle &disableMotionBlur);
USDIMAGING_API
+ Builder &SetDisableDepthOfField(
+ const HdBoolDataSourceHandle &disableDepthOfField);
+ USDIMAGING_API
Builder &SetCamera(
const HdPathDataSourceHandle &camera);
USDIMAGING_API
HdTokenDataSourceHandle _aspectRatioConformPolicy;
HdVec4fDataSourceHandle _dataWindowNDC;
HdBoolDataSourceHandle _disableMotionBlur;
+ HdBoolDataSourceHandle _disableDepthOfField;
HdPathDataSourceHandle _camera;
HdTokenDataSourceHandle _productType;
HdTokenDataSourceHandle _productName;
HdPathArrayDataSourceHandle _orderedVars;
HdContainerDataSourceHandle _namespacedSettings;
- };
-
- /// Retrieves a container data source with the schema's default name token
- /// "__usdRenderProduct" from the parent container and constructs a
- /// UsdImagingUsdRenderProductSchema instance.
- /// Because the requested container data source may not exist, the result
- /// should be checked with IsDefined() or a bool comparison before use.
- USDIMAGING_API
- static UsdImagingUsdRenderProductSchema GetFromParent(
- const HdContainerDataSourceHandle &fromParentContainer);
-
- /// Returns a token where the container representing this schema is found in
- /// a container by default.
- USDIMAGING_API
- static const TfToken &GetSchemaToken();
-
- /// Returns an HdDataSourceLocator (relative to the prim-level data source)
- /// where the container representing this schema is found by default.
- USDIMAGING_API
- static const HdDataSourceLocator &GetDefaultLocator();
-
- // DATA SOURCE LOCATORS FOR MEMBERS
- //
- // The following methods return an HdDataSourceLocator (relative to the
- // prim-level data source) where the data source for a member can be found.
- //
- // This is often useful for checking intersection against the
- // HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
-
-
- /// Prim-level relative data source locator to locate namespacedSettings.
- USDIMAGING_API
- static const HdDataSourceLocator &GetNamespacedSettingsLocator();
+ };
+ /// @}
};
PXR_NAMESPACE_CLOSE_SCOPE
/* ************************************************************************** */
#include "pxr/usdImaging/usdImaging/usdRenderSettingsSchema.h"
+
#include "pxr/imaging/hd/retainedDataSource.h"
#include "pxr/base/trace/trace.h"
// --(BEGIN CUSTOM CODE: Schema Methods)--
// --(END CUSTOM CODE: Schema Methods)--
-
-
-
HdVec2iDataSourceHandle
UsdImagingUsdRenderSettingsSchema::GetResolution()
{
UsdImagingUsdRenderSettingsSchemaTokens->disableMotionBlur);
}
+HdBoolDataSourceHandle
+UsdImagingUsdRenderSettingsSchema::GetDisableDepthOfField()
+{
+ return _GetTypedDataSource<HdBoolDataSource>(
+ UsdImagingUsdRenderSettingsSchemaTokens->disableDepthOfField);
+}
+
HdPathDataSourceHandle
UsdImagingUsdRenderSettingsSchema::GetCamera()
{
const HdTokenDataSourceHandle &aspectRatioConformPolicy,
const HdVec4fDataSourceHandle &dataWindowNDC,
const HdBoolDataSourceHandle &disableMotionBlur,
+ const HdBoolDataSourceHandle &disableDepthOfField,
const HdPathDataSourceHandle &camera,
const HdTokenArrayDataSourceHandle &includedPurposes,
const HdTokenArrayDataSourceHandle &materialBindingPurposes,
const HdContainerDataSourceHandle &namespacedSettings
)
{
- TfToken _names[11];
- HdDataSourceBaseHandle _values[11];
+ TfToken _names[12];
+ HdDataSourceBaseHandle _values[12];
size_t _count = 0;
+
if (resolution) {
_names[_count] = UsdImagingUsdRenderSettingsSchemaTokens->resolution;
_values[_count++] = resolution;
_values[_count++] = disableMotionBlur;
}
+ if (disableDepthOfField) {
+ _names[_count] = UsdImagingUsdRenderSettingsSchemaTokens->disableDepthOfField;
+ _values[_count++] = disableDepthOfField;
+ }
+
if (camera) {
_names[_count] = UsdImagingUsdRenderSettingsSchemaTokens->camera;
_values[_count++] = camera;
_names[_count] = UsdImagingUsdRenderSettingsSchemaTokens->namespacedSettings;
_values[_count++] = namespacedSettings;
}
-
return HdRetainedContainerDataSource::New(_count, _names, _values);
}
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetResolution(
+ const HdVec2iDataSourceHandle &resolution)
+{
+ _resolution = resolution;
+ return *this;
+}
+
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetPixelAspectRatio(
+ const HdFloatDataSourceHandle &pixelAspectRatio)
+{
+ _pixelAspectRatio = pixelAspectRatio;
+ return *this;
+}
+
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetAspectRatioConformPolicy(
+ const HdTokenDataSourceHandle &aspectRatioConformPolicy)
+{
+ _aspectRatioConformPolicy = aspectRatioConformPolicy;
+ return *this;
+}
+
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetDataWindowNDC(
+ const HdVec4fDataSourceHandle &dataWindowNDC)
+{
+ _dataWindowNDC = dataWindowNDC;
+ return *this;
+}
+
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetDisableMotionBlur(
+ const HdBoolDataSourceHandle &disableMotionBlur)
+{
+ _disableMotionBlur = disableMotionBlur;
+ return *this;
+}
+
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetDisableDepthOfField(
+ const HdBoolDataSourceHandle &disableDepthOfField)
+{
+ _disableDepthOfField = disableDepthOfField;
+ return *this;
+}
+
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetCamera(
+ const HdPathDataSourceHandle &camera)
+{
+ _camera = camera;
+ return *this;
+}
+
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetIncludedPurposes(
+ const HdTokenArrayDataSourceHandle &includedPurposes)
+{
+ _includedPurposes = includedPurposes;
+ return *this;
+}
+
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetMaterialBindingPurposes(
+ const HdTokenArrayDataSourceHandle &materialBindingPurposes)
+{
+ _materialBindingPurposes = materialBindingPurposes;
+ return *this;
+}
+
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetRenderingColorSpace(
+ const HdTokenDataSourceHandle &renderingColorSpace)
+{
+ _renderingColorSpace = renderingColorSpace;
+ return *this;
+}
+
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetProducts(
+ const HdPathArrayDataSourceHandle &products)
+{
+ _products = products;
+ return *this;
+}
+
+UsdImagingUsdRenderSettingsSchema::Builder &
+UsdImagingUsdRenderSettingsSchema::Builder::SetNamespacedSettings(
+ const HdContainerDataSourceHandle &namespacedSettings)
+{
+ _namespacedSettings = namespacedSettings;
+ return *this;
+}
+
+HdContainerDataSourceHandle
+UsdImagingUsdRenderSettingsSchema::Builder::Build()
+{
+ return UsdImagingUsdRenderSettingsSchema::BuildRetained(
+ _resolution,
+ _pixelAspectRatio,
+ _aspectRatioConformPolicy,
+ _dataWindowNDC,
+ _disableMotionBlur,
+ _disableDepthOfField,
+ _camera,
+ _includedPurposes,
+ _materialBindingPurposes,
+ _renderingColorSpace,
+ _products,
+ _namespacedSettings
+ );
+}
+
/*static*/
UsdImagingUsdRenderSettingsSchema
UsdImagingUsdRenderSettingsSchema::GetFromParent(
{
static const HdDataSourceLocator locator(GetSchemaToken());
return locator;
-}
+}
/* static */
const HdDataSourceLocator &
return locator;
}
+/* static */
+const HdDataSourceLocator &
+UsdImagingUsdRenderSettingsSchema::GetDisableDepthOfFieldLocator()
+{
+ static const HdDataSourceLocator locator =
+ GetDefaultLocator().Append(
+ UsdImagingUsdRenderSettingsSchemaTokens->disableDepthOfField);
+ return locator;
+}
+
/* static */
const HdDataSourceLocator &
UsdImagingUsdRenderSettingsSchema::GetCameraLocator()
GetDefaultLocator().Append(
UsdImagingUsdRenderSettingsSchemaTokens->namespacedSettings);
return locator;
-}
-UsdImagingUsdRenderSettingsSchema::Builder &
-UsdImagingUsdRenderSettingsSchema::Builder::SetResolution(
- const HdVec2iDataSourceHandle &resolution)
-{
- _resolution = resolution;
- return *this;
-}
-
-UsdImagingUsdRenderSettingsSchema::Builder &
-UsdImagingUsdRenderSettingsSchema::Builder::SetPixelAspectRatio(
- const HdFloatDataSourceHandle &pixelAspectRatio)
-{
- _pixelAspectRatio = pixelAspectRatio;
- return *this;
-}
-
-UsdImagingUsdRenderSettingsSchema::Builder &
-UsdImagingUsdRenderSettingsSchema::Builder::SetAspectRatioConformPolicy(
- const HdTokenDataSourceHandle &aspectRatioConformPolicy)
-{
- _aspectRatioConformPolicy = aspectRatioConformPolicy;
- return *this;
-}
-
-UsdImagingUsdRenderSettingsSchema::Builder &
-UsdImagingUsdRenderSettingsSchema::Builder::SetDataWindowNDC(
- const HdVec4fDataSourceHandle &dataWindowNDC)
-{
- _dataWindowNDC = dataWindowNDC;
- return *this;
-}
-
-UsdImagingUsdRenderSettingsSchema::Builder &
-UsdImagingUsdRenderSettingsSchema::Builder::SetDisableMotionBlur(
- const HdBoolDataSourceHandle &disableMotionBlur)
-{
- _disableMotionBlur = disableMotionBlur;
- return *this;
-}
-
-UsdImagingUsdRenderSettingsSchema::Builder &
-UsdImagingUsdRenderSettingsSchema::Builder::SetCamera(
- const HdPathDataSourceHandle &camera)
-{
- _camera = camera;
- return *this;
-}
-
-UsdImagingUsdRenderSettingsSchema::Builder &
-UsdImagingUsdRenderSettingsSchema::Builder::SetIncludedPurposes(
- const HdTokenArrayDataSourceHandle &includedPurposes)
-{
- _includedPurposes = includedPurposes;
- return *this;
-}
-
-UsdImagingUsdRenderSettingsSchema::Builder &
-UsdImagingUsdRenderSettingsSchema::Builder::SetMaterialBindingPurposes(
- const HdTokenArrayDataSourceHandle &materialBindingPurposes)
-{
- _materialBindingPurposes = materialBindingPurposes;
- return *this;
-}
-
-UsdImagingUsdRenderSettingsSchema::Builder &
-UsdImagingUsdRenderSettingsSchema::Builder::SetRenderingColorSpace(
- const HdTokenDataSourceHandle &renderingColorSpace)
-{
- _renderingColorSpace = renderingColorSpace;
- return *this;
-}
-
-UsdImagingUsdRenderSettingsSchema::Builder &
-UsdImagingUsdRenderSettingsSchema::Builder::SetProducts(
- const HdPathArrayDataSourceHandle &products)
-{
- _products = products;
- return *this;
-}
-
-UsdImagingUsdRenderSettingsSchema::Builder &
-UsdImagingUsdRenderSettingsSchema::Builder::SetNamespacedSettings(
- const HdContainerDataSourceHandle &namespacedSettings)
-{
- _namespacedSettings = namespacedSettings;
- return *this;
-}
-
-HdContainerDataSourceHandle
-UsdImagingUsdRenderSettingsSchema::Builder::Build()
-{
- return UsdImagingUsdRenderSettingsSchema::BuildRetained(
- _resolution,
- _pixelAspectRatio,
- _aspectRatioConformPolicy,
- _dataWindowNDC,
- _disableMotionBlur,
- _camera,
- _includedPurposes,
- _materialBindingPurposes,
- _renderingColorSpace,
- _products,
- _namespacedSettings
- );
-}
-
+}
PXR_NAMESPACE_CLOSE_SCOPE
\ No newline at end of file
#ifndef PXR_USD_IMAGING_USD_IMAGING_USD_RENDER_SETTINGS_SCHEMA_H
#define PXR_USD_IMAGING_USD_IMAGING_USD_RENDER_SETTINGS_SCHEMA_H
+/// \file
+
#include "pxr/usdImaging/usdImaging/api.h"
-#include "pxr/imaging/hd/schema.h"
+#include "pxr/imaging/hd/schema.h"
// --(BEGIN CUSTOM CODE: Includes)--
// --(END CUSTOM CODE: Includes)--
PXR_NAMESPACE_OPEN_SCOPE
-//-----------------------------------------------------------------------------
-
// --(BEGIN CUSTOM CODE: Declares)--
// --(END CUSTOM CODE: Declares)--
-//-----------------------------------------------------------------------------
-
#define USD_IMAGING_USD_RENDER_SETTINGS_SCHEMA_TOKENS \
(__usdRenderSettings) \
(resolution) \
(aspectRatioConformPolicy) \
(dataWindowNDC) \
(disableMotionBlur) \
+ (disableDepthOfField) \
(camera) \
(includedPurposes) \
(materialBindingPurposes) \
USD_IMAGING_USD_RENDER_SETTINGS_SCHEMA_TOKENS);
//-----------------------------------------------------------------------------
+
+
class UsdImagingUsdRenderSettingsSchema : public HdSchema
{
public:
+ /// \name Schema retrieval
+ /// @{
+
UsdImagingUsdRenderSettingsSchema(HdContainerDataSourceHandle container)
- : HdSchema(container) {}
+ : HdSchema(container) {}
+
+ /// Retrieves a container data source with the schema's default name token
+ /// "__usdRenderSettings" from the parent container and constructs a
+ /// UsdImagingUsdRenderSettingsSchema instance.
+ /// Because the requested container data source may not exist, the result
+ /// should be checked with IsDefined() or a bool comparison before use.
+ USDIMAGING_API
+ static UsdImagingUsdRenderSettingsSchema GetFromParent(
+ const HdContainerDataSourceHandle &fromParentContainer);
+
+ /// @}
// --(BEGIN CUSTOM CODE: Schema Methods)--
// --(END CUSTOM CODE: Schema Methods)--
- //ACCESSORS
-
+ /// \name Member accessor
+ /// @{
USDIMAGING_API
HdVec2iDataSourceHandle GetResolution();
USDIMAGING_API
HdBoolDataSourceHandle GetDisableMotionBlur();
+ USDIMAGING_API
+ HdBoolDataSourceHandle GetDisableDepthOfField();
+
USDIMAGING_API
HdPathDataSourceHandle GetCamera();
HdPathArrayDataSourceHandle GetProducts();
USDIMAGING_API
- HdContainerDataSourceHandle GetNamespacedSettings();
+ HdContainerDataSourceHandle GetNamespacedSettings();
+
+ /// @}
+
+ /// \name Schema location
+ /// @{
+
+ /// Returns a token where the container representing this schema is found in
+ /// a container by default.
+ USDIMAGING_API
+ static const TfToken &GetSchemaToken();
- // RETRIEVING AND CONSTRUCTING
+ /// Returns an HdDataSourceLocator (relative to the prim-level data source)
+ /// where the container representing this schema is found by default.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetDefaultLocator();
+
+ /// @}
+
+ /// \name Data source locators for members
+ ///
+ /// The following methods return an HdDataSourceLocator (relative to the
+ /// prim-level data source) where the data source for a member can be found.
+ ///
+ /// This is often useful for checking intersection against the
+ /// HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
+ /// @{
+
+ /// Prim-level relative data source locator to locate resolution.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetResolutionLocator();
+ /// Prim-level relative data source locator to locate pixelAspectRatio.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetPixelAspectRatioLocator();
+
+ /// Prim-level relative data source locator to locate aspectRatioConformPolicy.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetAspectRatioConformPolicyLocator();
+
+ /// Prim-level relative data source locator to locate dataWindowNDC.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetDataWindowNDCLocator();
+
+ /// Prim-level relative data source locator to locate disableMotionBlur.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetDisableMotionBlurLocator();
+
+ /// Prim-level relative data source locator to locate disableDepthOfField.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetDisableDepthOfFieldLocator();
+
+ /// Prim-level relative data source locator to locate camera.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetCameraLocator();
+
+ /// Prim-level relative data source locator to locate includedPurposes.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetIncludedPurposesLocator();
+
+ /// Prim-level relative data source locator to locate materialBindingPurposes.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetMaterialBindingPurposesLocator();
+
+ /// Prim-level relative data source locator to locate renderingColorSpace.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetRenderingColorSpaceLocator();
+
+ /// Prim-level relative data source locator to locate products.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetProductsLocator();
+
+ /// Prim-level relative data source locator to locate namespacedSettings.
+ USDIMAGING_API
+ static const HdDataSourceLocator &GetNamespacedSettingsLocator();
+ /// @}
+
+ /// \name Schema construction
+ /// @{
+
+ /// \deprecated Use Builder instead.
+ ///
/// Builds a container data source which includes the provided child data
/// sources. Parameters with nullptr values are excluded. This is a
/// low-level interface. For cases in which it's desired to define
const HdTokenDataSourceHandle &aspectRatioConformPolicy,
const HdVec4fDataSourceHandle &dataWindowNDC,
const HdBoolDataSourceHandle &disableMotionBlur,
+ const HdBoolDataSourceHandle &disableDepthOfField,
const HdPathDataSourceHandle &camera,
const HdTokenArrayDataSourceHandle &includedPurposes,
const HdTokenArrayDataSourceHandle &materialBindingPurposes,
Builder &SetDisableMotionBlur(
const HdBoolDataSourceHandle &disableMotionBlur);
USDIMAGING_API
+ Builder &SetDisableDepthOfField(
+ const HdBoolDataSourceHandle &disableDepthOfField);
+ USDIMAGING_API
Builder &SetCamera(
const HdPathDataSourceHandle &camera);
USDIMAGING_API
HdTokenDataSourceHandle _aspectRatioConformPolicy;
HdVec4fDataSourceHandle _dataWindowNDC;
HdBoolDataSourceHandle _disableMotionBlur;
+ HdBoolDataSourceHandle _disableDepthOfField;
HdPathDataSourceHandle _camera;
HdTokenArrayDataSourceHandle _includedPurposes;
HdTokenArrayDataSourceHandle _materialBindingPurposes;
HdTokenDataSourceHandle _renderingColorSpace;
HdPathArrayDataSourceHandle _products;
HdContainerDataSourceHandle _namespacedSettings;
- };
-
- /// Retrieves a container data source with the schema's default name token
- /// "__usdRenderSettings" from the parent container and constructs a
- /// UsdImagingUsdRenderSettingsSchema instance.
- /// Because the requested container data source may not exist, the result
- /// should be checked with IsDefined() or a bool comparison before use.
- USDIMAGING_API
- static UsdImagingUsdRenderSettingsSchema GetFromParent(
- const HdContainerDataSourceHandle &fromParentContainer);
-
- /// Returns a token where the container representing this schema is found in
- /// a container by default.
- USDIMAGING_API
- static const TfToken &GetSchemaToken();
-
- /// Returns an HdDataSourceLocator (relative to the prim-level data source)
- /// where the container representing this schema is found by default.
- USDIMAGING_API
- static const HdDataSourceLocator &GetDefaultLocator();
-
- // DATA SOURCE LOCATORS FOR MEMBERS
- //
- // The following methods return an HdDataSourceLocator (relative to the
- // prim-level data source) where the data source for a member can be found.
- //
- // This is often useful for checking intersection against the
- // HdDataSourceLocatorSet sent with HdDataSourceObserver::PrimsDirtied.
-
-
- /// Prim-level relative data source locator to locate resolution.
- USDIMAGING_API
- static const HdDataSourceLocator &GetResolutionLocator();
-
- /// Prim-level relative data source locator to locate pixelAspectRatio.
- USDIMAGING_API
- static const HdDataSourceLocator &GetPixelAspectRatioLocator();
-
- /// Prim-level relative data source locator to locate aspectRatioConformPolicy.
- USDIMAGING_API
- static const HdDataSourceLocator &GetAspectRatioConformPolicyLocator();
-
- /// Prim-level relative data source locator to locate dataWindowNDC.
- USDIMAGING_API
- static const HdDataSourceLocator &GetDataWindowNDCLocator();
-
- /// Prim-level relative data source locator to locate disableMotionBlur.
- USDIMAGING_API
- static const HdDataSourceLocator &GetDisableMotionBlurLocator();
-
- /// Prim-level relative data source locator to locate camera.
- USDIMAGING_API
- static const HdDataSourceLocator &GetCameraLocator();
-
- /// Prim-level relative data source locator to locate includedPurposes.
- USDIMAGING_API
- static const HdDataSourceLocator &GetIncludedPurposesLocator();
-
- /// Prim-level relative data source locator to locate materialBindingPurposes.
- USDIMAGING_API
- static const HdDataSourceLocator &GetMaterialBindingPurposesLocator();
-
- /// Prim-level relative data source locator to locate renderingColorSpace.
- USDIMAGING_API
- static const HdDataSourceLocator &GetRenderingColorSpaceLocator();
-
- /// Prim-level relative data source locator to locate products.
- USDIMAGING_API
- static const HdDataSourceLocator &GetProductsLocator();
-
- /// Prim-level relative data source locator to locate namespacedSettings.
- USDIMAGING_API
- static const HdDataSourceLocator &GetNamespacedSettingsLocator();
+ };
+ /// @}
};
PXR_NAMESPACE_CLOSE_SCOPE
TfToken(outputFilename), // name
SdfPath(), // camera path
false, // disableMotionBlur
+ false, // disableDepthOfField
s_fallbackResolution, // resolution
1.0f, // PixelAspectRatio
s_fallbackConformPolicy, // aspectRatioConformPolicy