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

Address remaning feedbacks for lib/mayaUsd #407

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/mayaUsd/fileio/importData.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <map>
#include <string>

#include <pxr/usd/usd/stage.h>
#include <pxr/usd/usd/prim.h>
#include <pxr/usd/sdf/types.h>
#include <pxr/usd/usd/prim.h>
#include <pxr/usd/usd/stage.h>

#include <mayaUsd/base/api.h>

Expand Down
2 changes: 1 addition & 1 deletion lib/mayaUsd/fileio/primUpdaterRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#include <pxr/base/tf/token.h>
#include <pxr/usd/usd/schemaBase.h>

#include <mayaUsd/fileio/registryHelper.h>
#include <mayaUsd/base/debugCodes.h>
#include <mayaUsd/fileio/registryHelper.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
3 changes: 1 addition & 2 deletions lib/mayaUsd/fileio/shading/shadingModeExporterContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#ifndef PXRUSDMAYA_SHADING_MODE_EXPORTER_CONTEXT_H
#define PXRUSDMAYA_SHADING_MODE_EXPORTER_CONTEXT_H

#include <mayaUsd/base/api.h>

#include <string>
#include <utility>
#include <vector>
Expand All @@ -32,6 +30,7 @@
#include <pxr/usd/usd/prim.h>
#include <pxr/usd/usd/stage.h>

#include <mayaUsd/base/api.h>
#include <mayaUsd/fileio/jobs/jobArgs.h>
#include <mayaUsd/fileio/writeJobContext.h>
#include <mayaUsd/utils/util.h>
Expand Down
8 changes: 4 additions & 4 deletions lib/mayaUsd/nodes/proxyShapeBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@
#include <pxr/usd/usdGeom/tokens.h>
#include <pxr/usd/usdUtils/stageCache.h>

#if defined(WANT_UFE_BUILD)
#include <ufe/path.h>
#endif

#include <mayaUsd/base/debugCodes.h>
#include <mayaUsd/listeners/proxyShapeNotice.h>
#include <mayaUsd/nodes/stageData.h>
#include <mayaUsd/utils/query.h>
#include <mayaUsd/utils/stageCache.h>
#include <mayaUsd/utils/utilFileSystem.h>

#if defined(WANT_UFE_BUILD)
#include <ufe/path.h>
#endif

PXR_NAMESPACE_OPEN_SCOPE

TF_DEFINE_PUBLIC_TOKENS(MayaUsdProxyShapeBaseTokens,
Expand Down
16 changes: 0 additions & 16 deletions lib/mayaUsd/render/mayaToHydra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,6 @@ target_sources(${TARGET_NAME}
viewCommand.cpp
)

set(headers
defaultLightDelegate.h
pluginDebugCodes.h
renderGlobals.h
renderOverride.h
renderOverrideUtils.h
tokens.h
utils.h
viewCommand.h
)

# -----------------------------------------------------------------------------
# compile definitions
# -----------------------------------------------------------------------------
Expand All @@ -55,11 +44,6 @@ target_link_libraries(${TARGET_NAME}
# -----------------------------------------------------------------------------
maya_set_plugin_properties(${TARGET_NAME})

# -----------------------------------------------------------------------------
# promote headers
# -----------------------------------------------------------------------------
mayaUsd_promoteHeaderList(HEADERS ${headers} SUBDIR render/mayaToHydra)

# -----------------------------------------------------------------------------
# run-time search paths
# -----------------------------------------------------------------------------
Expand Down
22 changes: 11 additions & 11 deletions lib/mayaUsd/render/mayaToHydra/renderOverride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@
#include <pxr/base/vt/value.h>
#include <pxr/imaging/glf/contextCaps.h>
#include <pxr/imaging/hd/rprim.h>

#include <hdMaya/delegates/delegateRegistry.h>
#include <hdMaya/delegates/sceneDelegate.h>
#include <hdMaya/utils.h>
#include <mayaUsd/render/px_vp20/utils.h>

#include "pluginDebugCodes.h"
#include "renderOverrideUtils.h"
#include "tokens.h"
#include "utils.h"

#if USD_VERSION_NUM >= 1911
#include <pxr/imaging/hd/rendererPluginRegistry.h>
#else
Expand All @@ -57,17 +68,6 @@ PXR_NAMESPACE_CLOSE_SCOPE
#include <ufe/selectionNotification.h>
#endif // WANT_UFE_BUILD

#include <hdMaya/delegates/delegateRegistry.h>
#include <hdMaya/delegates/sceneDelegate.h>
#include <hdMaya/utils.h>

#include <mayaUsd/render/px_vp20/utils.h>

#include "pluginDebugCodes.h"
#include "renderOverrideUtils.h"
#include "tokens.h"
#include "utils.h"

PXR_NAMESPACE_OPEN_SCOPE

namespace {
Expand Down
8 changes: 4 additions & 4 deletions lib/mayaUsd/render/mayaToHydra/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@

#include <maya/MGlobal.h>

#include <pxr/imaging/glf/contextCaps.h>

#include "tokens.h"

#if USD_VERSION_NUM >= 1911
#include <pxr/imaging/hd/rendererPlugin.h>
#include <pxr/imaging/hd/rendererPluginRegistry.h>
Expand All @@ -28,10 +32,6 @@ using HdRendererPluginRegistry = HdxRendererPluginRegistry;
PXR_NAMESPACE_CLOSE_SCOPE
#endif

#include <pxr/imaging/glf/contextCaps.h>

#include "tokens.h"

PXR_NAMESPACE_OPEN_SCOPE

namespace {
Expand Down
10 changes: 5 additions & 5 deletions lib/mayaUsd/render/pxrUsdMayaGL/batchRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@
#include <pxr/imaging/hdx/tokens.h>
#include <pxr/usd/sdf/path.h>

#include <mayaUsd/render/px_vp20/utils.h>
#include <mayaUsd/render/px_vp20/utils_legacy.h>
#include <mayaUsd/render/pxrUsdMayaGL/debugCodes.h>
#include <mayaUsd/render/pxrUsdMayaGL/userData.h>

#if USD_VERSION_NUM > 2002
#include <pxr/imaging/hgi/hgi.h>
#include <pxr/imaging/hgi/tokens.h>
Expand All @@ -80,11 +85,6 @@
#include <pxr/usd/usdGeom/tokens.h>
#endif

#include <mayaUsd/render/px_vp20/utils.h>
#include <mayaUsd/render/px_vp20/utils_legacy.h>
#include <mayaUsd/render/pxrUsdMayaGL/debugCodes.h>
#include <mayaUsd/render/pxrUsdMayaGL/userData.h>

PXR_NAMESPACE_OPEN_SCOPE

TF_DEFINE_PRIVATE_TOKENS(
Expand Down
8 changes: 4 additions & 4 deletions lib/mayaUsd/render/pxrUsdMayaGL/batchRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@
#include <pxr/imaging/hdx/selectionTracker.h>
#include <pxr/usd/sdf/path.h>

#if USD_VERSION_NUM > 2002
#include <pxr/imaging/hd/driver.h>
#endif

#include <mayaUsd/base/api.h>
#include <mayaUsd/listeners/notice.h>
#include <mayaUsd/render/pxrUsdMayaGL/renderParams.h>
Expand All @@ -60,6 +56,10 @@
#include <mayaUsd/utils/diagnosticDelegate.h>
#include <mayaUsd/utils/util.h>

#if USD_VERSION_NUM > 2002
#include <pxr/imaging/hd/driver.h>
#endif

PXR_NAMESPACE_OPEN_SCOPE

/// UsdMayaGLBatchRenderer is a singleton that shapes can use to get consistent
Expand Down
4 changes: 2 additions & 2 deletions lib/mayaUsd/render/vp2RenderDelegate/proxyRenderDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
#include "tokens.h"

#if defined(WANT_UFE_BUILD)
#include <ufe/sceneItem.h>
#include <ufe/runTimeMgr.h>
#include <ufe/globalSelection.h>
#include <ufe/observableSelection.h>
#include <ufe/runTimeMgr.h>
#include <ufe/sceneItem.h>
#include <ufe/selectionNotification.h>
#endif

Expand Down
25 changes: 13 additions & 12 deletions lib/mayaUsd/ufe/Global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,26 @@
#include <ufe/hierarchyHandler.h>
#include <ufe/runTimeMgr.h>

#include <mayaUsd/ufe/ProxyShapeHandler.h>
#include <mayaUsd/ufe/ProxyShapeHierarchyHandler.h>
#include <mayaUsd/ufe/StagesSubject.h>
#include <mayaUsd/ufe/UsdHierarchyHandler.h>
#include <mayaUsd/ufe/UsdSceneItemOpsHandler.h>
#include <mayaUsd/ufe/UsdTransform3dHandler.h>

#include "private/InPathChange.h"

#ifdef UFE_V2_FEATURES_AVAILABLE
// Note: must come after include of ufe files so we have the define.
#include "UsdAttributesHandler.h"
#include "UsdObject3dHandler.h"
#include <mayaUsd/ufe/UsdAttributesHandler.h>
#include <mayaUsd/ufe/UsdObject3dHandler.h>
#if UFE_PREVIEW_VERSION_NUM >= 2009
#include "UsdContextOpsHandler.h"
#include <mayaUsd/ufe/UsdContextOpsHandler.h>
#endif
#else
#include "UfeVersionCompat.h"
#include <mayaUsd/ufe/UfeVersionCompat.h>
#endif

#include "private/InPathChange.h"
#include "ProxyShapeHandler.h"
#include "ProxyShapeHierarchyHandler.h"
#include "StagesSubject.h"
#include "UsdHierarchyHandler.h"
#include "UsdSceneItemOpsHandler.h"
#include "UsdTransform3dHandler.h"

namespace {
int gRegistrationCount = 0;
}
Expand Down
28 changes: 14 additions & 14 deletions lib/mayaUsd/ufe/StagesSubject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@
//
#include "StagesSubject.h"

#include <vector>

#include <maya/MSceneMessage.h>
#include <maya/MMessage.h>

#include <pxr/usd/usdGeom/tokens.h>
#include <pxr/usd/usdGeom/xformOp.h>

#include <mayaUsd/ufe/ProxyShapeHandler.h>
#include <mayaUsd/ufe/UsdStageMap.h>
#include <mayaUsd/ufe/Utils.h>

#include "private/InPathChange.h"

#ifdef UFE_V2_FEATURES_AVAILABLE
#include <ufe/attributes.h>
#endif
Expand All @@ -31,20 +45,6 @@
#include <unordered_map>
#endif

#include <vector>

#include <maya/MSceneMessage.h>
#include <maya/MMessage.h>

#include <pxr/usd/usdGeom/tokens.h>
#include <pxr/usd/usdGeom/xformOp.h>

#include <mayaUsd/ufe/ProxyShapeHandler.h>
#include <mayaUsd/ufe/UsdStageMap.h>
#include <mayaUsd/ufe/Utils.h>

#include "private/InPathChange.h"

#ifdef UFE_V2_FEATURES_AVAILABLE
namespace {

Expand Down
4 changes: 2 additions & 2 deletions lib/mayaUsd/ufe/UsdUndoDuplicateCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <ufe/sceneNotification.h>
#include <ufe/log.h>

#include <pxr/usd/usd/stage.h>
#include <pxr/usd/sdf/copyUtils.h>
#include <pxr/base/tf/token.h>
#include <pxr/usd/sdf/copyUtils.h>
#include <pxr/usd/usd/stage.h>

#include <mayaUsd/ufe/Utils.h>

Expand Down
15 changes: 8 additions & 7 deletions lib/mayaUsd/ufe/UsdUndoRenameCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,22 @@
#include <ufe/scene.h>
#include <ufe/sceneNotification.h>
#include <ufe/log.h>
#ifdef UFE_V2_FEATURES_AVAILABLE
#define UFE_ENABLE_ASSERTS
#include <ufe/ufeAssert.h>
#else
#include <cassert>
#endif

#include <pxr/usd/usd/stage.h>
#include <pxr/usd/usd/editContext.h>
#include <pxr/usd/sdf/copyUtils.h>
#include <pxr/base/tf/token.h>

#include <mayaUsd/ufe/Utils.h>

#include "private/InPathChange.h"

#include <mayaUsd/ufe/Utils.h>
#ifdef UFE_V2_FEATURES_AVAILABLE
#define UFE_ENABLE_ASSERTS
#include <ufe/ufeAssert.h>
#else
#include <cassert>
#endif

MAYAUSD_NS_DEF {
namespace ufe {
Expand Down
1 change: 0 additions & 1 deletion lib/mayaUsd/ufe/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <pxr/base/tf/token.h>

#include <mayaUsd/base/api.h>

#include <mayaUsd/ufe/UsdSceneItem.h>

PXR_NAMESPACE_USING_DIRECTIVE
Expand Down
6 changes: 3 additions & 3 deletions lib/mayaUsd/ufe/wrapUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

#include <pxr/base/tf/stringUtils.h>

#include "Global.h"
#include "UsdSceneItem.h"
#include "Utils.h"
#include <mayaUsd/ufe/Global.h>
#include <mayaUsd/ufe/UsdSceneItem.h>
#include <mayaUsd/ufe/Utils.h>

using namespace MayaUsd;
using namespace boost::python;
Expand Down
2 changes: 1 addition & 1 deletion lib/mayaUsd/utils/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
#include <pxr/usd/usdGeom/mesh.h>
#include <pxr/usd/usdGeom/metrics.h>

#include "colorSpace.h"
#include <mayaUsd/utils/colorSpace.h>

PXR_NAMESPACE_USING_DIRECTIVE

Expand Down