-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add displayName Metadata to Prim Spec #2055
Add displayName Metadata to Prim Spec #2055
Conversation
- Added displayName metadata field to prims - Adjusted tests to test for and modify authored displayName metadata - Did not add Get/Set DisplayName methods to prims - all access should be via Get/Set Metadata to keep ABI compatibility
This is part of the Omniverse work for UTF-8 support-- alongside @erslavin's implementation of Unicode identifiers which is not ABI-compatible, we are also offering displayName support so that stakeholders can use it for breadcrumbs back to their UTF-8 encoded source data, and view the displayNames in DCCs that support them. Thanks! |
Filed as internal issue #USD-7681 |
I know folks are probably busy putting the final touches on v22.11, and we don't expect to make this into there, but please let us know for now if there is any major objection to this PR in principle, as we'll need to deploy it ahead of an official USD release to unblock some key customer workflows-- thanks! |
Hi @asluk and @erslavin , without having done a proper review yet, we don't have any major objections but we feel it is important to include a minimum of support in usdview, something like:
I know we have yet to provide a similar treatment for property displayNames in the property browser, but we feel the potential for confusion is greater at the level of scene hierarchy... but also that especially anyone who is using the displayName feature would really expect to be able to navigate their scene in usdview using them. Thanks! |
Agreed - we'll work on the usdview side over the next week or so-- thanks! |
What if the displayName metadata is empty and the option is on - I would expect in this case the prim name would be used, what do you think? |
Absolutely, @erslavin - that is what we do in Presto, where Thanks! |
- Added context menu item to show prim display names (default = True) - Added support for showing prim display name in the prim tree - Added support for searching on prim display name in search box - Modified prim tree item tooltip to show both name and display name
Work in progress - no automated tests yet but modifications were made in |
- Augmented automated tests in usdview to account for displayName - Added displayName to field keys in wrapPrimSpec - Removed unnecessary comment blocks
Augmented the existing automated tests for |
@erslavin , can you please migrate all of the "DisplayName"-related methods on |
... and we'll also want to test that in testUsdMetadata |
pxr/usd/usd/testenv/testUsdSchemaRegistry/resources/schema.usda
Outdated
Show resolved
Hide resolved
...Imaging/bin/testusdview/testenv/testUsdviewPrimTreeExpansion/testUsdviewPrimTreeExpansion.py
Outdated
Show resolved
Hide resolved
- Moved displayName related methods from UsdProperty to UsdObject - Adjusted tests to better conform to user search expectations
Methods are now moved to |
- Rolled back changes to search - Updated condition to match on display name if authored or on name if not
- Ensured .ui file was saved from Qt designer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, so much, @erslavin - just a couple last things for you.
pxr/usdImaging/bin/testusdview/testenv/testUsdviewPrimSearch/testUsdviewPrimSearch.py
Outdated
Show resolved
Hide resolved
...Imaging/bin/testusdview/testenv/testUsdviewPrimTreeExpansion/testUsdviewPrimTreeExpansion.py
Show resolved
Hide resolved
- Refactored out pattern match code into separate method to avoid code duplication across prim and prototype search paths - Fixed documentation issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one quick performance note, @erslavin , otherwise this looks fantastic!
- Adjusted usdview search matching logic to directly invoke GetDisplayName and compare to empty string to avoid overhead of calling HasAuthoredDisplayName followed by GetDisplayName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corey on the USD team noted a few things that I missed - passing them on to you, @erslavin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that's all - thanks, Ed!
- Modified comments appropriately for methods moved to UsdObject - Made checks for valid displayName more pythonic
We won't be doing any more dev-pushes to github this year, but just wanted to let you know this one did get merged internally in time for 23.02, @erslavin - thanks for your patience! |
displayName
metadata field to primsdisplayName
metadataIt is important that we keep ABI compatibility on this change, so Get/Set DisplayName methods were not added to
UsdPrim
. This addition will be added to the PR later - all access todisplayName
on a prim at the moment should be via Get/Set Metadata.