Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UsdMayaPrimWriter and UsdMayaPrimReader Python Wrappings #4037

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading