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

Usd.PrimRange.PruneChildren isn't available in Python #222

Closed
JasonGilholme opened this issue Jun 14, 2017 · 5 comments
Closed

Usd.PrimRange.PruneChildren isn't available in Python #222

JasonGilholme opened this issue Jun 14, 2017 · 5 comments

Comments

@JasonGilholme
Copy link

JasonGilholme commented Jun 14, 2017

Usd.PrimRange object doesn't expose the PruneChildren method to Python. The same build configuration with 0.7.2 worked correctly.

AttributeError: 'PrimRange' object has no attribute 'PruneChildren'

Steps to Reproduce

from pxr import Usd
stage = Usd.Stage.Open('/path/to/file.usda')
traverser = stage.Traverse()
for p in traverser:
    traverser.PruneChildren()

System Information (OS, Hardware)

CentOS 6.5

Package Versions

Boost-1.55
Python-2.7.3

@jtran56
Copy link

jtran56 commented Jun 14, 2017

Filed as internal issue #147576.

@gitamohr
Copy link
Contributor

gitamohr commented Jun 14, 2017 via email

@spiffmon
Copy link
Member

Hi Jason,
Going to close this out for now - please reopen if Alex's info doesn't resolve it for you?

@BigRoy
Copy link

BigRoy commented Jan 23, 2024

Sorry this was an API change. You have to get an iterator from the range to call PruneChildren, so change the third line to: traverser = iter(stage.Traverse()) and you should be good to go. Alex

On 6/14/17 12:54 AM, Jason Gilholme wrote: Usd.PrimRange object doesn't expose the PruneChildren method to Python. The same build configuration with 0.7.2 worked correctly. |AttributeError: 'PrimRange' object has no attribute 'PruneChildren'| Steps to Reproduce from pxr import Usd stage = Usd.Stage.Open('/path/to/file.usda') traverser = stage.Traverse() for p in traverser: p.PruneChildren() System Information (OS, Hardware) CentOS 6.5 Package Versions Boost-1.55 Python-2.7.3 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#222>, or mute the thread https://github.com/notifications/unsubscribe-auth/AGwYAb_arRTpDy69-TpgyJ6V_Q4hZ4p4ks5sD5HIgaJpZM4N5g3K.

Can we get this added to the docs? e.g. here. For some reason I had a hard time finding this solution.

@spiffmon
Copy link
Member

That's a good point, @BigRoy - I'm reopening the issue for a doc enhancement.

@spiffmon spiffmon reopened this Jan 23, 2024
AdamFelt pushed a commit to autodesk-forks/USD that referenced this issue Apr 16, 2024
…/internal-only/feature/pipeline_adsk

Refine Pipeline For Linux Build and Windows Test
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

No branches or pull requests

5 participants