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

Make it safe for Pcp.NodeRef to refer to a null PcpNodeRef #2943

Merged

Conversation

marktucker
Copy link
Contributor

Description of Change(s)

Add a proper cast-to-bool operation to pxr.Pcp.NodeRef which returns false if the referenced PcpNodeRef cast to bool returns false. Override the implementation of getattribute so that trying to call any method on a null PcpNodeRef raises a python exception (instead of crashing).

Fixes Issue(s)

false if the referenced PcpNodeRef cast to bool returns false.
Override the implementation of __getattribute__ so that trying to
call any method on a null PcpNodeRef raises a python exception
(instead of crashing).
@marktucker marktucker changed the title Add a proper cast-to-bool operation to pxr.Pcp.NodeRef which returns Make it safe for Pcp.NodeRef to refer to a null PcpNodeRef Feb 9, 2024
@jesschimein
Copy link
Collaborator

Filed as internal issue #USD-9289

@pixar-oss pixar-oss merged commit e4ca314 into PixarAnimationStudios:dev Mar 5, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants