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

Shorten nice names by trimming schema name #2818

Merged
merged 2 commits into from
Jan 13, 2023

Conversation

JGamache-autodesk
Copy link
Collaborator

Some attribute names use namespaces that are copies of the schema name. When displaying UI names we want to strip that redundant information.

Some attribute names use namespaces that are copies of the schema name.
When displaying UI names we want to strip that redundant information.
@JGamache-autodesk
Copy link
Collaborator Author

Before and after for an exported spotlight:
UiNameSpotLight

@JGamache-autodesk
Copy link
Collaborator Author

Before and after for a shading node with a NodeGraph API applied:
UiNameNodeGraphNode

# will return ["CollectionAPI:instance1","CollectionAPI:instance2"] but we want to group
# both instance inside a "CollectionAPI" section.
# We do not group the collections API. We rather create a section that
# includes the instance in the title. This allows up to optimally trim
Copy link
Collaborator

Choose a reason for hiding this comment

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

allows up -> allows us

prefix = prefix.substr(0, dunderPos) + typeNameAndInstance.second.GetString()
+ ":";

// If the parameter name does not start with the templte, it does not belong to
Copy link
Collaborator

Choose a reason for hiding this comment

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

templte -> template

@feldstj
Copy link
Collaborator

feldstj commented Jan 12, 2023

Pretty cool change. Just a few minor spelling issues.

@JGamache-autodesk JGamache-autodesk added the ufe-usd Related to UFE-USD plugin in Maya-Usd label Jan 12, 2023
@JGamache-autodesk JGamache-autodesk added the ready-for-merge Development process is finished, PR is ready for merge label Jan 12, 2023
@JGamache-autodesk
Copy link
Collaborator Author

@seando-adsk Ready for merge.

@seando-adsk seando-adsk merged commit 8c31164 into dev Jan 13, 2023
@seando-adsk seando-adsk deleted the gamaj/strip_api_schema_name_from_attribute_nice_name branch January 13, 2023 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge Development process is finished, PR is ready for merge ufe-usd Related to UFE-USD plugin in Maya-Usd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants