BLEN-356: Automatically configure PXR_MTLX_STDLIB_SEARCH_PATHS #9

Merged
Bogdan Nagirniak merged 4 commits from blen-356-pxr_mtlx_stdlib_search_paths into hydra-render 2023-03-06 17:29:17 +01:00
2 changed files with 6 additions and 0 deletions
Showing only changes of commit 46cf1e17f3 - Show all commits

View File

@ -1513,6 +1513,10 @@ if(WITH_USD)
absolute_include_dirs(../blender/io/usd)
endif()
if(WITH_MATERIALX)
add_definitions(-DWITH_MATERIALX)
endif()
# Always install USD shared library and datafiles regardless if Blender
# itself uses them, the bundled Python module still needs it.
if((DEFINED LIBDIR) AND TARGETDIR_LIB)

View File

@ -477,8 +477,10 @@ int main(int argc,
#ifdef WITH_USD
USD_ensure_plugin_path_registered();
# ifdef WITH_MATERIALX
George-Shakula marked this conversation as resolved
Review

do we need #ifdef WITH_MATERIALX ?

do we need `#ifdef WITH_MATERIALX` ?
Review

It's not a requirement but it makes sense to wrap it into an #ifdef. Because if there is no mtlx there is also no usdMtlx

It's not a requirement but it makes sense to wrap it into an #ifdef. Because if there is no mtlx there is also no usdMtlx
USD_setup_usd_mtlx_environment();
# endif
#endif
#ifndef WITH_PYTHON_MODULE
/* First test for background-mode (#Global.background) */