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-122528 - MayaUSD should support UFE lights #2266

Merged
merged 11 commits into from
Apr 22, 2022
15 changes: 15 additions & 0 deletions lib/mayaUsd/ufe/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,14 @@ if(CMAKE_UFE_V3_FEATURES_AVAILABLE)
endif()

if(CMAKE_UFE_V4_FEATURES_AVAILABLE)
if (${UFE_PREVIEW_VERSION_NUM} GREATER_EQUAL 4004)
target_sources(${PROJECT_NAME}
PRIVATE
UsdLight.cpp
UsdLightHandler.cpp
)
endif()

if (${UFE_PREVIEW_VERSION_NUM} GREATER_EQUAL 4001)
target_sources(${PROJECT_NAME}
PRIVATE
Expand Down Expand Up @@ -165,6 +173,13 @@ if(CMAKE_UFE_V3_FEATURES_AVAILABLE)
endif()

if(CMAKE_UFE_V4_FEATURES_AVAILABLE)
if (${UFE_PREVIEW_VERSION_NUM} GREATER_EQUAL 4004)
list(APPEND HEADERS
UsdLight.h
UsdLightHandler.h
)
endif()

if (${UFE_PREVIEW_VERSION_NUM} GREATER_EQUAL 4001)
list(APPEND HEADERS
UsdShaderNodeDef.h
Expand Down
7 changes: 6 additions & 1 deletion lib/mayaUsd/ufe/Global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@
#include <mayaUsd/ufe/UsdPathMappingHandler.h>
#endif
#ifdef UFE_V4_FEATURES_AVAILABLE
#if (UFE_PREVIEW_VERSION_NUM >= 4004)
#include <mayaUsd/ufe/UsdLightHandler.h>
#endif
#if (UFE_PREVIEW_VERSION_NUM >= 4001)
#include <mayaUsd/ufe/UsdShaderNodeDefHandler.h>
#endif
Expand Down Expand Up @@ -158,8 +161,10 @@ MStatus initialize()
handlers.uiInfoHandler = UsdUIInfoHandler::create();
handlers.cameraHandler = UsdCameraHandler::create();
#ifdef UFE_V4_FEATURES_AVAILABLE
#if (UFE_PREVIEW_VERSION_NUM >= 4004)
handlers.lightHandler = UsdLightHandler::create();
#endif
#if (UFE_PREVIEW_VERSION_NUM >= 4001)

handlers.nodeDefHandler = UsdShaderNodeDefHandler::create();
#endif
#endif
Expand Down
Loading