-
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
MAYA-128473 - Move UFE to its own Project - Part11 (UIInfoHandler) #3252
MAYA-128473 - Move UFE to its own Project - Part11 (UIInfoHandler) #3252
Conversation
* Moved UsdUIInfoHandler to UsdUfe and split off Maya version. * Moved Outliner (treeView) icons to UsdUfe (except MayaReference).
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.
It looks bad with 103 files, but most of those are just moving of icons. The actual number of files to review is much less and changes are not that big.
// Register a callback to invalidate the invisible color. | ||
fColorChangedCallbackId = MEventMessage::addEventCallback( | ||
"DisplayRGBColorChanged", onColorChanged, reinterpret_cast<void*>(this)); |
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.
Split off Maya stuff into this derived class. Mostly to handle this Maya callback when the color prefs changed.
UsdUfe::UsdUIInfoHandler::SupportedTypesMap MayaUsdUIInfoHandler::getSupportedIconTypes() const | ||
{ | ||
auto supportedTypes = Parent::getSupportedIconTypes(); | ||
|
||
// We support these node types directly. | ||
static const UsdUfe::UsdUIInfoHandler::SupportedTypesMap mayaSupportedTypes { | ||
{ "MayaReference", "out_USD_MayaReference.png" }, | ||
{ "ALMayaReference", "out_USD_MayaReference.png" }, // Same as mayaRef | ||
}; | ||
supportedTypes.insert(mayaSupportedTypes.begin(), mayaSupportedTypes.end()); | ||
return supportedTypes; | ||
} |
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.
Overridden method to add the two Maya reference icon types.
install(FILES "out_USD_${ICON_BASE}_150.png" "out_USD_${ICON_BASE}_200.png" | ||
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/icons" |
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.
Install most of the TreeView (Outliner) icons from UsdUfe. After discussing with Julien I kept the original naming "out_USD_XXX.png" (with the 150/200 versions).
@@ -159,15 +114,10 @@ bool UsdUIInfoHandler::treeViewCellInfo(const Ufe::SceneItem::Ptr& item, Ufe::Ce | |||
return changed; | |||
} | |||
|
|||
Ufe::UIInfoHandler::Icon UsdUIInfoHandler::treeViewIcon(const Ufe::SceneItem::Ptr& item) const | |||
UsdUIInfoHandler::SupportedTypesMap UsdUIInfoHandler::getSupportedIconTypes() const |
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.
New virtual method to return the list of supported icon types. Can be overridden by derived class to add extra icons (such as from the MayaUsdUIInfoHandler).
protected: | ||
// Derived classes can set this color to override the default invisible color. |
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.
Made fInvisibleColor protected so it can be modified by derived class (as it is in MayaUsdUIInfoHandler).
MAYA-128473 - Move UFE to its own Project - Part11 (UIInfoHandler)