-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HYDRA-307: Add the FootPrint node as an Hydra example (#75)
* HYDRA-307: Add the FootPrint node as an Hydra example * Remove mtoa from test scenes. * Remove some mtoa attributes in the scenes * HYDRA-307 : Fixes from code review. * HYDRA-307 : Fix an issue with multiple nodes * HYDRA-307 : Avoid crashing when mayaHydra is not loaded and creating this node * Forgot a file. * HYDRA-307 : modifications from code review * Use a postConstructor method * Fix tests failing. * Do not use localized strings yet for error messages. * HYDRA-307 : Modifs from code review. * HYDRA-307 : Integrate changes from Pierre. * HYDRA-307 : Remove usage of obsolete attributes, fix tests.
- Loading branch information
1 parent
5c4eac3
commit b4fb348
Showing
35 changed files
with
1,251 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
add_subdirectory(flowViewportAPIMayaLocator) | ||
add_subdirectory(footPrintNode) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
set(TARGET_NAME mayaHydraFootPrintNode) | ||
|
||
add_library(${TARGET_NAME} SHARED) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# sources | ||
# ----------------------------------------------------------------------------- | ||
target_sources(${TARGET_NAME} | ||
PRIVATE | ||
mhFootPrintNode.cpp | ||
) | ||
|
||
set(HEADERS | ||
PRIVATE | ||
) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# compiler configuration | ||
# ----------------------------------------------------------------------------- | ||
target_compile_definitions(${TARGET_NAME} | ||
PRIVATE | ||
# M3dView needs this (technically, MNativeWindowHdl.h) | ||
# private atm because M3dView is only used in .cpp right now | ||
# gcc will NOT set this automatically | ||
$<$<BOOL:${IS_LINUX}>:LINUX> | ||
MFB_ALT_PACKAGE_NAME="${TARGET_NAME}" # This is used by Pixar HdSceneIndexPluginRegistry::Define to create a unique name | ||
) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# include directories | ||
# ----------------------------------------------------------------------------- | ||
if(DEFINED MAYAUSD_VERSION) | ||
target_compile_definitions(${TARGET_NAME} | ||
PRIVATE | ||
MAYAUSD_VERSION=${MAYAUSD_VERSION} | ||
) | ||
endif() | ||
|
||
if(NOT DEFINED MAYAHYDRA_VERSION) | ||
message(FATAL_ERROR "No MAYAHYDRA_VERSION defined, aborting configuration." ) | ||
endif() | ||
|
||
target_compile_definitions(${TARGET_NAME} | ||
PRIVATE | ||
MAYAHYDRA_VERSION=${MAYAHYDRA_VERSION} | ||
) | ||
|
||
mayaHydra_compile_config(${TARGET_NAME}) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# link libraries | ||
# ----------------------------------------------------------------------------- | ||
target_link_libraries(${TARGET_NAME} | ||
PRIVATE | ||
mayaHydraLib | ||
) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# properties | ||
# ----------------------------------------------------------------------------- | ||
maya_set_plugin_properties(${TARGET_NAME}) | ||
|
||
# ----------------------------------------------------------------------------- | ||
# run-time search paths | ||
# ----------------------------------------------------------------------------- | ||
if(IS_MACOSX OR IS_LINUX) | ||
mayaUsd_init_rpath(rpath "lib/maya") | ||
if(DEFINED MAYAUSD_TO_USD_RELATIVE_PATH) | ||
mayaUsd_add_rpath(rpath "../../${MAYAUSD_TO_USD_RELATIVE_PATH}/lib") | ||
if (IS_LINUX) | ||
mayaUsd_add_rpath(rpath "../../${MAYAUSD_TO_USD_RELATIVE_PATH}/lib64") | ||
endif() | ||
if(IS_MACOSX) | ||
mayaUsd_add_rpath(rpath "../../../../Maya.app/Contents/MacOS") | ||
endif() | ||
elseif(DEFINED PXR_USD_LOCATION) | ||
mayaUsd_add_rpath(rpath "${PXR_USD_LOCATION}/lib") | ||
endif() | ||
|
||
mayaUsd_add_rpath(rpath "../") | ||
mayaUsd_install_rpath(rpath ${TARGET_NAME}) | ||
endif() | ||
|
||
# ----------------------------------------------------------------------------- | ||
# install | ||
# ----------------------------------------------------------------------------- | ||
install(TARGETS ${TARGET_NAME} | ||
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/maya) | ||
|
||
if(IS_WINDOWS) | ||
install(FILES $<TARGET_PDB_FILE:${TARGET_NAME}> | ||
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/maya OPTIONAL) | ||
endif() | ||
|
||
set(LIBFILENAME ${CMAKE_SHARED_LIBRARY_PREFIX}${TARGET_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) | ||
set(PLUG_INFO_LIBRARY_PATH "../../../${LIBFILENAME}") | ||
set(PLUG_INFO_RESOURCE_PATH "resources") |
Oops, something went wrong.