Skip to content

Commit

Permalink
Merge pull request #4037 from dj-mcg/pr/Fix_Python_Wrappings
Browse files Browse the repository at this point in the history
Fix UsdMayaPrimWriter and UsdMayaPrimReader Python Wrappings
  • Loading branch information
seando-adsk authored Dec 11, 2024
2 parents e56cdc5 + 29fc5fa commit 94ed067
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/mayaUsd/python/wrapPrimReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PXR_NAMESPACE_USING_DIRECTIVE
template <typename T = UsdMayaPrimReader>
class PrimReaderWrapper
: public T
, public TfPyPolymorphic<UsdMayaPrimReader>
, public TfPyPolymorphic<T>
{
public:
typedef PrimReaderWrapper This;
Expand Down Expand Up @@ -580,7 +580,7 @@ void wrapShaderReader()

typedef UsdMayaShaderReader This;

class_<ShaderReaderWrapper, bases<PrimReaderWrapper<>>, PXR_BOOST_PYTHON_NAMESPACE::noncopyable>
class_<ShaderReaderWrapper, bases<UsdMayaPrimReader>, PXR_BOOST_PYTHON_NAMESPACE::noncopyable>
c("ShaderReader", no_init);

scope s(c);
Expand Down
8 changes: 4 additions & 4 deletions lib/mayaUsd/python/wrapPrimWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PXR_NAMESPACE_USING_DIRECTIVE
template <typename T = UsdMayaPrimWriter>
class PrimWriterWrapper
: public T
, public TfPyPolymorphic<UsdMayaPrimWriter>
, public TfPyPolymorphic<T>
{
public:
typedef PrimWriterWrapper This;
Expand Down Expand Up @@ -99,7 +99,7 @@ class PrimWriterWrapper
const SdfPathVector& default_GetModelPaths() const { return base_t::GetModelPaths(); }
const SdfPathVector& GetModelPaths() const override
{
if (Override o = GetOverride("GetModelPaths")) {
if (TfPyOverride o = this->GetOverride("GetModelPaths")) {
auto res = std::function<PXR_BOOST_PYTHON_NAMESPACE::object()>(
TfPyCall<PXR_BOOST_PYTHON_NAMESPACE::object>(o))();
if (res) {
Expand Down Expand Up @@ -131,7 +131,7 @@ class PrimWriterWrapper
}
const UsdMayaUtil::MDagPathMap<SdfPath>& GetDagToUsdPathMapping() const override
{
if (Override o = GetOverride("GetDagToUsdPathMapping")) {
if (TfPyOverride o = this->GetOverride("GetDagToUsdPathMapping")) {
auto res = std::function<PXR_BOOST_PYTHON_NAMESPACE::object()>(
TfPyCall<PXR_BOOST_PYTHON_NAMESPACE::object>(o))();
if (res) {
Expand Down Expand Up @@ -735,7 +735,7 @@ void wrapShaderWriter()
{
PXR_BOOST_PYTHON_NAMESPACE::class_<
ShaderWriterWrapper,
PXR_BOOST_PYTHON_NAMESPACE::bases<PrimWriterWrapper<>>,
PXR_BOOST_PYTHON_NAMESPACE::bases<UsdMayaPrimWriter>,
PXR_BOOST_PYTHON_NAMESPACE::noncopyable>
c("ShaderWriter", PXR_BOOST_PYTHON_NAMESPACE::no_init);

Expand Down

0 comments on commit 94ed067

Please sign in to comment.