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

MAYA-128473 - Move UFE to its own Project - Part11 (UIInfoHandler) #3252

Merged

Conversation

seando-adsk
Copy link
Collaborator

MAYA-128473 - Move UFE to its own Project - Part11 (UIInfoHandler)

  • Moved UsdUIInfoHandler to UsdUfe and split off Maya version.
  • Moved Outliner (treeView) icons to UsdUfe (except MayaReference).

* Moved UsdUIInfoHandler to UsdUfe and split off Maya version.
* Moved Outliner (treeView) icons to UsdUfe (except
  MayaReference).
@seando-adsk seando-adsk added the ufe-usd Related to UFE-USD plugin in Maya-Usd label Jul 28, 2023
Copy link
Collaborator Author

@seando-adsk seando-adsk left a 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.

Comment on lines +27 to +29
// Register a callback to invalidate the invisible color.
fColorChangedCallbackId = MEventMessage::addEventCallback(
"DisplayRGBColorChanged", onColorChanged, reinterpret_cast<void*>(this));
Copy link
Collaborator Author

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.

Comment on lines +78 to +89
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;
}
Copy link
Collaborator Author

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.

Comment on lines +46 to +47
install(FILES "out_USD_${ICON_BASE}_150.png" "out_USD_${ICON_BASE}_200.png"
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/icons"
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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).

Comment on lines +62 to +63
protected:
// Derived classes can set this color to override the default invisible color.
Copy link
Collaborator Author

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).

@seando-adsk seando-adsk requested review from ppt-adsk and deboisj July 28, 2023 14:17
@seando-adsk seando-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Aug 2, 2023
@seando-adsk seando-adsk merged commit 40d6357 into dev Aug 2, 2023
@seando-adsk seando-adsk deleted the donnels/MAYA-128473/move_ufe_into_own_project_part11 branch August 2, 2023 13:52
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