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

Removing code blocks for USD 19.07 #734

Merged
merged 2 commits into from
Aug 25, 2020
Merged

Conversation

kxl-adsk
Copy link

With recent support added for USD 20.08, we are dropping support for fairly old 19.07.

@kxl-adsk kxl-adsk added the build Related to building maya-usd repository label Aug 23, 2020
Copy link
Contributor

@HamedSabri-adsk HamedSabri-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kxl-adsk my search shows other places where these checks can be removed. Please see the list below:

shadingModeExporterContext.cpp
mayaToHydra\renderGlobals.cpp
mayaToHydra\renderGlobals.h
mayaToHydra\renderOverride.cpp
mayaToHydra\renderOverride.h
mayaToHydra\utils.cpp
pxrUsdMayaGL\sceneDelegate.cpp
pxrUsdMayaGL\usdProxyShapeAdapter.cpp
vp2RenderDelegate\material.cpp
adapters\materialAdapter.h
adapters\materialNetworkConverter.cpp
adapters\materialNetworkConverter.h
delegates\delegate.h
delegates\delegateDebugCodes.cpp
delegates\delegateDebugCodes.h
delegates\sceneDelegate.cpp
delegates\sceneDelegate.h
usdmaya\nodes\ProxyShape.cpp
usdmaya\nodes\ProxyShapeUI.cpp

@kxl-adsk
Copy link
Author

kxl-adsk commented Aug 24, 2020

@HamedSabri-adsk what's the string that you were looking for? I examined a few files that you have listed, but they do not have code conditionally compiled for 19.07. Is it possible that you made a mistake and looked for 19.11?

@HamedSabri-adsk
Copy link
Contributor

@kxl-adsk right, I explicitly searched for both 19.07 and 19.11.

The places that I mentioned above are where we have 19.11. If I am not mistaking, there are places in those files that we still implicitly use code from earlier version of 19.11.

e.g lib/mayaUsd/render/mayaToHydra/renderOverride.cpp

#if USD_VERSION_NUM >= 1911
#include <pxr/imaging/hd/rendererPluginRegistry.h>
#else
#include <pxr/imaging/hdx/rendererPluginRegistry.h>
PXR_NAMESPACE_OPEN_SCOPE
using HdRendererPluginRegistry = HdxRendererPluginRegistry;
PXR_NAMESPACE_CLOSE_SCOPE
#endif

The else condition above happens to older version of 19.11. I was under the impression that these needs to be also removed?

@kxl-adsk
Copy link
Author

Good catch...my weekend brain missed that!

@kxl-adsk
Copy link
Author

@HamedSabri-adsk see 4a38768

@HamedSabri-adsk
Copy link
Contributor

@kxl-adsk Thank you for the changes.

There are couple of places in lib/mayaUsd/render/pxrUsdMayaGL/batchRenderer.cpp that can be cleaned up :

line 880 - 888
line 990 - 1006
line 1266 -1276

@kxl-adsk
Copy link
Author

@HamedSabri-adsk what exactly you propose to remove at these lines? For example

#if USD_VERSION_NUM > 1911
                "        HIT:\n"
                "            delegateId      : %s\n"
                "            objectId        : %s\n"
                "            normalizedDepth : %f\n",
                hit.delegateId.GetText(),
                hit.objectId.GetText(),
                hit.normalizedDepth);
#else
                "        HIT:\n"
                "            delegateId: %s\n"
                "            objectId  : %s\n"
                "            ndcDepth  : %f\n",
                hit.delegateId.GetText(),
                hit.objectId.GetText(),
                hit.ndcDepth);
#endif

Else case is required for 19.11 version.

@HamedSabri-adsk
Copy link
Contributor

@kxl-adsk the else condition applies to older version of 19.11

#else
" HIT:\n"
" delegateId: %s\n"
" objectId : %s\n"
" ndcDepth : %f\n",
hit.delegateId.GetText(),
hit.objectId.GetText(),
hit.ndcDepth);
#endif

Copy link
Contributor

@HamedSabri-adsk HamedSabri-adsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kxl-adsk lgtm! Thank you.

@kxl-adsk kxl-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Aug 25, 2020
@kxl-adsk kxl-adsk merged commit 623c155 into dev Aug 25, 2020
@kxl-adsk kxl-adsk deleted the kxl-adsk/drop_19_07_support branch August 25, 2020 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Related to building maya-usd repository ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants