Skip to content

Commit

Permalink
Conforming Pass and DenoisePass to match naming conventions
Browse files Browse the repository at this point in the history
(Internal change: 2239451)
  • Loading branch information
pixar-oss committed Jun 25, 2022
1 parent e448de8 commit e097b79
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 102 deletions.
4 changes: 2 additions & 2 deletions pxr/usd/usdRender/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ pxr_library(usdRender

PUBLIC_CLASSES
denoisePass
pass
product
renderPass
settings
settingsBase
spec
Expand All @@ -27,8 +27,8 @@ pxr_library(usdRender
PYMODULE_CPPFILES
module.cpp
wrapDenoisePass.cpp
wrapPass.cpp
wrapProduct.cpp
wrapRenderPass.cpp
wrapSettingsBase.cpp
wrapSettings.cpp
wrapTokens.cpp
Expand Down
6 changes: 3 additions & 3 deletions pxr/usd/usdRender/denoisePass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ TF_REGISTRY_FUNCTION(TfType)

// Register the usd prim typename as an alias under UsdSchemaBase. This
// enables one to call
// TfType::Find<UsdSchemaBase>().FindDerivedByName("DenoisePass")
// TfType::Find<UsdSchemaBase>().FindDerivedByName("RenderDenoisePass")
// to find TfType<UsdRenderDenoisePass>, which is how IsA queries are
// answered.
TfType::AddAlias<UsdSchemaBase, UsdRenderDenoisePass>("DenoisePass");
TfType::AddAlias<UsdSchemaBase, UsdRenderDenoisePass>("RenderDenoisePass");
}

/* virtual */
Expand All @@ -65,7 +65,7 @@ UsdRenderDenoisePass
UsdRenderDenoisePass::Define(
const UsdStagePtr &stage, const SdfPath &path)
{
static TfToken usdPrimTypeName("DenoisePass");
static TfToken usdPrimTypeName("RenderDenoisePass");
if (!stage) {
TF_CODING_ERROR("Invalid stage");
return UsdRenderDenoisePass();
Expand Down
14 changes: 7 additions & 7 deletions pxr/usd/usdRender/denoisePass.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,20 @@ PXR_NAMESPACE_OPEN_SCOPE
class SdfAssetPath;

// -------------------------------------------------------------------------- //
// DENOISEPASS //
// RENDERDENOISEPASS //
// -------------------------------------------------------------------------- //

/// \class UsdRenderDenoisePass
///
/// A DenoisePass generates renders via a denoising process. This may
/// be the same renderer that a pipeline uses for UsdRender, or may be a separate
/// one. Notably, a DenoisePass requires another Pass to be present for it to
/// operate. The denoising process itself is not generative, and requires
/// images inputs to operate.
/// A RenderDenoisePass generates renders via a denoising process.
/// This may be the same renderer that a pipeline uses for UsdRender,
/// or may be a separate one. Notably, a RenderDenoisePass requires
/// another Pass to be present for it to operate. The denoising process
/// itself is not generative, and requires images inputs to operate.
///
/// As denoising integration varies so widely across pipelines, all
/// implementation details are left to pipeline-specific prims
/// that inherit from DenoisePass.
/// that inherit from RenderDenoisePass.
///
///
class UsdRenderDenoisePass : public UsdTyped
Expand Down
14 changes: 7 additions & 7 deletions pxr/usd/usdRender/generatedSchema.usda
Original file line number Diff line number Diff line change
Expand Up @@ -466,16 +466,16 @@ class RenderPass "RenderPass" (
)
}

class DenoisePass "DenoisePass" (
doc = """A DenoisePass generates renders via a denoising process. This may
be the same renderer that a pipeline uses for UsdRender, or may be a separate
one. Notably, a DenoisePass requires another Pass to be present for it to
operate. The denoising process itself is not generative, and requires
images inputs to operate.
class RenderDenoisePass "RenderDenoisePass" (
doc = """A RenderDenoisePass generates renders via a denoising process.
This may be the same renderer that a pipeline uses for UsdRender,
or may be a separate one. Notably, a RenderDenoisePass requires
another Pass to be present for it to operate. The denoising process
itself is not generative, and requires images inputs to operate.

As denoising integration varies so widely across pipelines, all
implementation details are left to pipeline-specific prims
that inherit from DenoisePass.
that inherit from RenderDenoisePass.
"""
)
{
Expand Down
2 changes: 1 addition & 1 deletion pxr/usd/usdRender/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ TF_WRAP_MODULE
TF_WRAP(UsdRenderProduct);
TF_WRAP(UsdRenderVar);
TF_WRAP(UsdRenderTokens);
TF_WRAP(UsdRenderRenderPass);
TF_WRAP(UsdRenderPass);
TF_WRAP(UsdRenderDenoisePass);
}
68 changes: 34 additions & 34 deletions pxr/usd/usdRender/renderPass.cpp → pxr/usd/usdRender/pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// KIND, either express or implied. See the Apache License for the specific
// language governing permissions and limitations under the Apache License.
//
#include "pxr/usd/usdRender/renderPass.h"
#include "pxr/usd/usdRender/pass.h"
#include "pxr/usd/usd/schemaRegistry.h"
#include "pxr/usd/usd/typed.h"

Expand All @@ -33,84 +33,84 @@ PXR_NAMESPACE_OPEN_SCOPE
// Register the schema with the TfType system.
TF_REGISTRY_FUNCTION(TfType)
{
TfType::Define<UsdRenderRenderPass,
TfType::Define<UsdRenderPass,
TfType::Bases< UsdTyped > >();

// Register the usd prim typename as an alias under UsdSchemaBase. This
// enables one to call
// TfType::Find<UsdSchemaBase>().FindDerivedByName("RenderPass")
// to find TfType<UsdRenderRenderPass>, which is how IsA queries are
// to find TfType<UsdRenderPass>, which is how IsA queries are
// answered.
TfType::AddAlias<UsdSchemaBase, UsdRenderRenderPass>("RenderPass");
TfType::AddAlias<UsdSchemaBase, UsdRenderPass>("RenderPass");
}

/* virtual */
UsdRenderRenderPass::~UsdRenderRenderPass()
UsdRenderPass::~UsdRenderPass()
{
}

/* static */
UsdRenderRenderPass
UsdRenderRenderPass::Get(const UsdStagePtr &stage, const SdfPath &path)
UsdRenderPass
UsdRenderPass::Get(const UsdStagePtr &stage, const SdfPath &path)
{
if (!stage) {
TF_CODING_ERROR("Invalid stage");
return UsdRenderRenderPass();
return UsdRenderPass();
}
return UsdRenderRenderPass(stage->GetPrimAtPath(path));
return UsdRenderPass(stage->GetPrimAtPath(path));
}

/* static */
UsdRenderRenderPass
UsdRenderRenderPass::Define(
UsdRenderPass
UsdRenderPass::Define(
const UsdStagePtr &stage, const SdfPath &path)
{
static TfToken usdPrimTypeName("RenderPass");
if (!stage) {
TF_CODING_ERROR("Invalid stage");
return UsdRenderRenderPass();
return UsdRenderPass();
}
return UsdRenderRenderPass(
return UsdRenderPass(
stage->DefinePrim(path, usdPrimTypeName));
}

/* virtual */
UsdSchemaKind UsdRenderRenderPass::_GetSchemaKind() const
UsdSchemaKind UsdRenderPass::_GetSchemaKind() const
{
return UsdRenderRenderPass::schemaKind;
return UsdRenderPass::schemaKind;
}

/* static */
const TfType &
UsdRenderRenderPass::_GetStaticTfType()
UsdRenderPass::_GetStaticTfType()
{
static TfType tfType = TfType::Find<UsdRenderRenderPass>();
static TfType tfType = TfType::Find<UsdRenderPass>();
return tfType;
}

/* static */
bool
UsdRenderRenderPass::_IsTypedSchema()
UsdRenderPass::_IsTypedSchema()
{
static bool isTyped = _GetStaticTfType().IsA<UsdTyped>();
return isTyped;
}

/* virtual */
const TfType &
UsdRenderRenderPass::_GetTfType() const
UsdRenderPass::_GetTfType() const
{
return _GetStaticTfType();
}

UsdAttribute
UsdRenderRenderPass::GetPassTypeAttr() const
UsdRenderPass::GetPassTypeAttr() const
{
return GetPrim().GetAttribute(UsdRenderTokens->passType);
}

UsdAttribute
UsdRenderRenderPass::CreatePassTypeAttr(VtValue const &defaultValue, bool writeSparsely) const
UsdRenderPass::CreatePassTypeAttr(VtValue const &defaultValue, bool writeSparsely) const
{
return UsdSchemaBase::_CreateAttr(UsdRenderTokens->passType,
SdfValueTypeNames->Token,
Expand All @@ -121,13 +121,13 @@ UsdRenderRenderPass::CreatePassTypeAttr(VtValue const &defaultValue, bool writeS
}

UsdAttribute
UsdRenderRenderPass::GetCommandAttr() const
UsdRenderPass::GetCommandAttr() const
{
return GetPrim().GetAttribute(UsdRenderTokens->command);
}

UsdAttribute
UsdRenderRenderPass::CreateCommandAttr(VtValue const &defaultValue, bool writeSparsely) const
UsdRenderPass::CreateCommandAttr(VtValue const &defaultValue, bool writeSparsely) const
{
return UsdSchemaBase::_CreateAttr(UsdRenderTokens->command,
SdfValueTypeNames->StringArray,
Expand All @@ -138,13 +138,13 @@ UsdRenderRenderPass::CreateCommandAttr(VtValue const &defaultValue, bool writeSp
}

UsdAttribute
UsdRenderRenderPass::GetFileNameAttr() const
UsdRenderPass::GetFileNameAttr() const
{
return GetPrim().GetAttribute(UsdRenderTokens->fileName);
}

UsdAttribute
UsdRenderRenderPass::CreateFileNameAttr(VtValue const &defaultValue, bool writeSparsely) const
UsdRenderPass::CreateFileNameAttr(VtValue const &defaultValue, bool writeSparsely) const
{
return UsdSchemaBase::_CreateAttr(UsdRenderTokens->fileName,
SdfValueTypeNames->Asset,
Expand All @@ -155,13 +155,13 @@ UsdRenderRenderPass::CreateFileNameAttr(VtValue const &defaultValue, bool writeS
}

UsdAttribute
UsdRenderRenderPass::GetDenoiseEnableAttr() const
UsdRenderPass::GetDenoiseEnableAttr() const
{
return GetPrim().GetAttribute(UsdRenderTokens->denoiseEnable);
}

UsdAttribute
UsdRenderRenderPass::CreateDenoiseEnableAttr(VtValue const &defaultValue, bool writeSparsely) const
UsdRenderPass::CreateDenoiseEnableAttr(VtValue const &defaultValue, bool writeSparsely) const
{
return UsdSchemaBase::_CreateAttr(UsdRenderTokens->denoiseEnable,
SdfValueTypeNames->Bool,
Expand All @@ -172,39 +172,39 @@ UsdRenderRenderPass::CreateDenoiseEnableAttr(VtValue const &defaultValue, bool w
}

UsdRelationship
UsdRenderRenderPass::GetRenderSourceRel() const
UsdRenderPass::GetRenderSourceRel() const
{
return GetPrim().GetRelationship(UsdRenderTokens->renderSource);
}

UsdRelationship
UsdRenderRenderPass::CreateRenderSourceRel() const
UsdRenderPass::CreateRenderSourceRel() const
{
return GetPrim().CreateRelationship(UsdRenderTokens->renderSource,
/* custom = */ false);
}

UsdRelationship
UsdRenderRenderPass::GetInputPassesRel() const
UsdRenderPass::GetInputPassesRel() const
{
return GetPrim().GetRelationship(UsdRenderTokens->inputPasses);
}

UsdRelationship
UsdRenderRenderPass::CreateInputPassesRel() const
UsdRenderPass::CreateInputPassesRel() const
{
return GetPrim().CreateRelationship(UsdRenderTokens->inputPasses,
/* custom = */ false);
}

UsdRelationship
UsdRenderRenderPass::GetDenoisePassRel() const
UsdRenderPass::GetDenoisePassRel() const
{
return GetPrim().GetRelationship(UsdRenderTokens->denoisePass);
}

UsdRelationship
UsdRenderRenderPass::CreateDenoisePassRel() const
UsdRenderPass::CreateDenoisePassRel() const
{
return GetPrim().CreateRelationship(UsdRenderTokens->denoisePass,
/* custom = */ false);
Expand All @@ -224,7 +224,7 @@ _ConcatenateAttributeNames(const TfTokenVector& left,const TfTokenVector& right)

/*static*/
const TfTokenVector&
UsdRenderRenderPass::GetSchemaAttributeNames(bool includeInherited)
UsdRenderPass::GetSchemaAttributeNames(bool includeInherited)
{
static TfTokenVector localNames = {
UsdRenderTokens->passType,
Expand Down
Loading

0 comments on commit e097b79

Please sign in to comment.