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

usdview traceback when focusing in tree view with root prim selected #1619

Closed
mds-dwa opened this issue Sep 15, 2021 · 3 comments
Closed

usdview traceback when focusing in tree view with root prim selected #1619

mds-dwa opened this issue Sep 15, 2021 · 3 comments

Comments

@mds-dwa
Copy link

mds-dwa commented Sep 15, 2021

Description of Issue

usdview prints a traceback if you press 'f' to focus in the tree view with the root prim selected, since it calls item = item.parent() before checking if item.parent() is valid. That results in the following error:

AttributeError: 'NoneType' object has no attribute 'parent'

A simple change to ExpandItemRecursively in pxr/usdImaging/usdviewq/primTreeWidget.py should resolve this:

    def ExpandItemRecursively(self, item):
        while item.parent():
            item = item.parent()
            if not item.isExpanded():
                self.expandItem(item)

Steps to Reproduce

  1. Open usdview
  2. With mouse focus in the tree view and the 'root' prim still selected, press the 'f' key. Check the terminal for the (fortunately non-critical) traceback.

System Information (OS, Hardware)

  1. Linux, CentOS 7 (bug affects all platforms though)

Package Versions

  1. Tested bug and fix in 0.20.5, and relevant code doesn't seem to have changed and is still present in the latest builds.

Build Flags

N/A (non-compiled python code change only)

@jilliene
Copy link

Filed as internal issue #USD-6897

@a1744633
Copy link

Hello @mds-dwa Just letting you know that we are working on this as software engineers at the University of Adelaide for a software project. Thanks for the issue!

@sunyab
Copy link
Contributor

sunyab commented Aug 13, 2022

Closing, this was fixed by #1843 in the 22.08 release. Thanks!

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

4 participants