-
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
Cleanup UI folder #1037
Cleanup UI folder #1037
Conversation
* Suppress TBB deprecated messages. * Find proper debug TBB lib. * When Layer Editor is not built (i.e. Qt not found) do not add the menu or register command. * Moved importDialog into subfolder.
target_compile_definitions(${TARGET} | ||
PRIVATE | ||
TBB_SUPPRESS_DEPRECATED_MESSAGES | ||
) |
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 got tired of seeing hundreds of TBB warnings polluting our build log. This started with the update of TBB in Maya.
clew | ||
) | ||
if (CMAKE_BUILD_TYPE MATCHES Debug) | ||
list(APPEND MAYA_LIBS_TO_FIND tbb_debug) |
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 compile in debug all the time and just happened to notice one day that this one wasn't being found correctly in debug. We aren't using it in MayaUsd, which is why it never caused a problem.
lib/mayaUsd/ufe/UsdContextOps.cpp
Outdated
#ifdef WANT_QT_BUILD | ||
static constexpr char kUSDLayerEditorItem[] = "USD Layer Editor"; | ||
static constexpr char kUSDLayerEditorLabel[] = "USD Layer Editor..."; | ||
#endif |
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.
When we don't have Qt, we don't build the Layer Editor so it should not be available in any menu.
@@ -23,23 +23,14 @@ set(CMAKE_AUTOUIC ON) | |||
add_library(${PROJECT_NAME} SHARED) | |||
|
|||
add_subdirectory(layerEditor) | |||
add_subdirectory(importDialog) |
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.
With the addition of the Layer Editor, the "ui" folder now contains more than just the import dialog. So I moved the import dialog code to a sub-folder.
@@ -143,5 +125,5 @@ install(FILES ${HEADERS} | |||
# ----------------------------------------------------------------------------- | |||
if (BUILD_TESTS) | |||
# A simple executable used to test the import dialog. | |||
add_subdirectory(demo) | |||
add_subdirectory(importDialogDemo) |
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 just renamed this folder to make it more obvious what it is.
#if defined(WANT_QT_BUILD) | ||
registerCommandCheck<MayaUsd::LayerEditorWindowCommand>(plugin); | ||
#endif |
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.
When no Qt, don't register the command that is used to open the Layer Editor (since we didn't build the layer editor). Note: I left the two commands above in since they are built even when no Qt (they are in a different folder from the "ui/layerEditor"
if (`exists mayaUsdLayerEditorWindow`) { | ||
if (!`runTimeCommand -exists mayaUsdOpenUsdLayerEditor`) { | ||
runTimeCommand -default true | ||
-label "USD Layer Editor" | ||
-annotation "Organize and edit USD data in layers" | ||
-category "Menu items.Common.Windows.General Editors" | ||
-command "mayaUsdLayerEditorWindow mayaUsdLayerEditor" | ||
-image "USD_generic.png" | ||
mayaUsdOpenUsdLayerEditor; | ||
} | ||
} |
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.
Don't create the runtime command to open the LE if there is no command for the LE window.
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.
All of these "exists" checks are for the existence of the command and not the UI right?
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.
Yes. One of my other changes is only register the "mayaUsdLayerEditorWindow" command when the Layer Editor was built (i.e. Qt is found). So if we don't have this command we won't create the runtime command to open the LE either.
@@ -165,7 +167,7 @@ global proc mayaUsdMenu_windowMenuCallback() { | |||
// mayaUsdMenu_windowMenuCallback | |||
// setup the items in Maya's "Window->General Editors" menu | |||
global proc mayaUsdMenu_generalEditorsMenuCallback() { | |||
if (!(`menuItem -query -exists wmUsdLayerEditorMenuitem`)) | |||
if (`exists mayaUsdLayerEditorWindow` && !(`menuItem -query -exists wmUsdLayerEditorMenuitem`)) |
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.
This makes sure to not add the "USD Layer Editor" under the Maya "Windows" menu.
Note: this will fix the issue discovered in #1005 where they had built without Qt (so no Layer Editor), but the Layer Editor menu item was there and they got an error when clicking on it. |
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.
Looking good. Thank you for doing 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.
LGTM
Cleanup UI folder