-
Notifications
You must be signed in to change notification settings - Fork 203
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
MAYA-106190 - As a user, I would like see prim type icons #712
Conversation
* Implement new ancestorNodeTypes() method on Ufe::SceneItem.
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.
I also have changes in Maya to support this. Note: the USD icons are not ready yet. Once they are that will be a separate commit to add them.
// According to the USD docs GetAllAncestorTypes() is expensive, so we keep a cache. | ||
static std::map<TfType, std::vector<std::string>> ancestorTypesCache; | ||
const auto iter = ancestorTypesCache.find(schemaType); | ||
if (iter != ancestorTypesCache.end()) { | ||
return iter->second; | ||
} |
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.
Keep a cache (key'd by schema type) for faster lookup.
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.
Needs a test, but otherwise looks good.
* Adding test for UsdSceneItem.
@ppt-adsk The second after I created the pull-request I knew I was missing a test. |
@kxl-adsk Can we merge this. My preflight has failed twice on different OSX python2 builds (once in 2020 and once in master) with test errors. The latest test failure was:
|
* Rework to support previous versions (down to 19.11) of USD.
MAYA-106190 - As a user, I would like see prim type icons