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

Conversation

dj-mcg
Copy link
Collaborator

@dj-mcg dj-mcg commented Dec 5, 2024

The PrimReaderWrapper and PrimWriterWrapper helper classes ignored the template parameter when deriving from TfPyPolymorphic. This caused unexpected duplicate entries in boost::python's type conversion table. boost::python silently accepted this, but the new pxr_boost::python in OpenUSD 24.11 flagged this with an assert in debug mode.

The wrappings for ShaderReaderWrapper and ShaderWriterWrapper incorrectly specified PrimReaderWrapper<> and PrimWriterWrapper<> as their bases. For example, this meant that passing an instance of a ShaderReader to a a Python-wrapped C++ function that takes a UsdMayaPrimReader would fail. This doesn't show up in practice since clients aren't expected to create their own instances of these types but it seemed good to fix anyway.

The PrimReaderWrapper<T> and PrimWriterWrapper<T> helper classes ignored the template parameter when deriving from TfPyPolymorphic. This caused unexpected duplicate entries in boost::python's type conversion table. boost::python silently accepted this, but the new pxr_boost::python in OpenUSD 24.11 flagged this with an assert in debug mode.

The wrappings for ShaderReaderWrapper and ShaderWriterWrapper incorrectly specified PrimReaderWrapper<> and PrimWriterWrapper<> as their bases. For example, this meant that passing an instance of a ShaderReader to a a Python-wrapped C++ function that takes a UsdMayaPrimReader would fail. This doesn't show up in practice since clients aren't expected to create their own instances of these types but it seemed good to fix anyway.
@seando-adsk seando-adsk added the core Related to core library label Dec 6, 2024
@seando-adsk
Copy link
Collaborator

Preflight failed - could be random failure that I've seen in the past. Re-running the preflight to confirm.

@seando-adsk seando-adsk assigned dj-mcg and unassigned dj-mcg Dec 10, 2024
@seando-adsk seando-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Dec 11, 2024
@seando-adsk seando-adsk merged commit 94ed067 into Autodesk:dev Dec 11, 2024
13 of 15 checks passed
@dj-mcg dj-mcg deleted the pr/Fix_Python_Wrappings branch December 13, 2024 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to core library ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants