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: Display resolved labels in attribute editor #3300

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

nvaszabo
Copy link

Description of Change(s)

This PR uses the usdSemantics schema and API to compute the taxonomies and the associated labels and display them in UsdView's attribute editor under a new row named Resolved Labels.

The Resolved Labels for a selected prim include the labels on the prim itself and those on all its ancestors (inherited labels).
For each taxonomy, the unique set of labels is computed and sorted lexicographically by the 'UsdSemantics.LabelsQuery.ComputeUniqueInheritedLabels()` API.

Performance considerations

The computation of direct and indirect taxonomies and their labels is instantaneous for prim hierarchies that are ~30 items deep with ~10 taxonomies and ~10 labels each. The same seems to lag just very slightly with hierarchies that are ~30 items deep and with a random number of maximum of 100 taxonomies, each with a random number of maximum of of 100 labels.

image

Fixes Issue(s)

  • I have verified that all unit tests pass with the proposed changes
  • I have submitted a signed Contributor License Agreement

@@ -5,7 +5,8 @@
# https://openusd.org/license.
#

from pxr import Usd, UsdGeom, UsdShade
from collections import defaultdict
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems unused.

@nvaszabo nvaszabo force-pushed the nvaszabo/usdview-add-resolved-labels-to-attribute-editor branch from 3f9c8da to 7c02ddd Compare September 18, 2024 23:03
@jesschimein
Copy link

Filed as internal issue #USD-10151

@jesschimein
Copy link

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@nvaszabo nvaszabo force-pushed the nvaszabo/usdview-add-resolved-labels-to-attribute-editor branch from 7c02ddd to cb279f6 Compare September 23, 2024 16:56
@jesschimein
Copy link

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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