-
Notifications
You must be signed in to change notification settings - Fork 202
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
EMSUSD-215 support custom display name for USD attributes #3499
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add support to have custom names for USD attributes to have nicer names for UI display purpose. We already had an algorithm to automatically make the names prettier, this adds support for user-defined attribute names. We now read the USD 'displayName' metadata on each attribute. If the metadata exists then we use its value as the display name. The built-in function to make the name prettier has also been enhanced to remove the "xformOp:" prefix. Also, the prettyfying avoids generating two spaces in a row (if, for example, : was followed by _). Modify the USD attribute-related classes: - Add a displayName funtion to the UsdAttrbute class. - Add a displayName funtion to the UsdAttributeHolder class. - Add a displayName funtion to the UsdShaderAttributeHolder class. - The displayName function in UsdAttributeHolder prettify the name. Add support for display name in the Attribute Editor template: - Add a AttributeCustomControl base class to handle display names. - Make the default control creation use the display names. Added a simple unit test and fix some attribute unit tests.
pierrebai-adsk
requested review from
samuelliu-adsk
and removed request for
AramAzhari-adsk
December 8, 2023 13:39
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.
Overall looks good. Only a couple of minor questions regarding ifdefs
AramAzhari-adsk
previously approved these changes
Dec 12, 2023
AramAzhari-adsk
approved these changes
Dec 12, 2023
samuelliu-adsk
approved these changes
Dec 12, 2023
Only PF failure is the testVP2RenderDelegateDisplayLayers on Linux that is known to be flaky |
pierrebai-adsk
added
the
ready-for-merge
Development process is finished, PR is ready for merge
label
Dec 12, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
adsk
Related to Autodesk plugin
ready-for-merge
Development process is finished, PR is ready for merge
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support to have custom names for USD attributes to have nicer names for UI display purpose. We already had an algorithm to automatically make the names prettier, this adds support for user-defined attribute names. We now read the USD 'displayName' metadata on each attribute. If the metadata exists then we use its value as the display name.
The built-in function to make the name prettier has also been enhanced to remove the "xformOp:" prefix. Also, the prettyfying avoids generating two spaces in a row (if, for example, : was followed by _).
Modify the USD attribute-related classes:
Add support for display name in the Attribute Editor template:
Added a simple unit test and fix some attribute unit tests.