File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed
source/MaterialXGenOslNodes Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ option(MATERIALX_BUILD_DOCS "Create HTML documentation using Doxygen. Requires t
4040
4141option (MATERIALX_BUILD_GEN_GLSL "Build the GLSL shader generator back-end." ON )
4242option (MATERIALX_BUILD_GEN_OSL "Build the OSL shader generator back-end." ON )
43- option (MATERIALX_BUILD_GEN_OSL_NODES "Build the OSL nodes shader generator back-end." ON )
43+ option (MATERIALX_BUILD_GEN_OSL_NODES "Build the OSL nodes shader generator back-end." OFF )
4444option (MATERIALX_BUILD_GEN_MDL "Build the MDL shader generator back-end." ON )
4545option (MATERIALX_BUILD_GEN_MSL "Build the MSL shader generator back-end." ON )
4646option (MATERIALX_BUILD_RENDER "Build the MaterialX Render modules." ON )
@@ -138,6 +138,12 @@ if(SKBUILD)
138138 set (MATERIALX_PYTHON_FOLDER_NAME "MaterialX" )
139139endif ()
140140
141+ if (MATERIALX_BUILD_GEN_OSL_NODES)
142+ set (MATERIALX_BUILD_GEN_OSL ON )
143+ set (MATERIALX_BUILD_RENDER ON )
144+ set (MATERIALX_BUILD_RENDER_PLATFORMS ON )
145+ endif ()
146+
141147# Helpers for MDL validation
142148if (MATERIALX_BUILD_GEN_MDL)
143149 set (MATERIALX_MDLC_EXECUTABLE "" CACHE FILEPATH "Full path to the mdlc binary." )
Original file line number Diff line number Diff line change 1-
2-
31file (GLOB GenNodes_SRC "${CMAKE_CURRENT_SOURCE_DIR} /LibsToOso.cpp" )
42
53set (MATERIALX_LIBRARIES
@@ -19,7 +17,8 @@ set_target_properties(
1917 MaterialXGenOslNodes_LibsToOso PROPERTIES
2018 INSTALL_RPATH "${MATERIALX_UP_ONE_RPATH} " )
2119
22- # TODO: We likely want to install that file elsewhere and not under `bin`...
20+ # TODO: We likely want to install that file elsewhere and not under `bin`,
21+ # if at all, as we maybe want to keep this executable available at build time only.
2322install (TARGETS MaterialXGenOslNodes_LibsToOso
2423 EXPORT MaterialX
2524 RUNTIME DESTINATION ${MATERIALX_INSTALL_BIN_PATH} )
Original file line number Diff line number Diff line change @@ -210,8 +210,9 @@ int main(int argc, char* const argv[])
210210
211211 // Setup the context of the OSL shader generator.
212212 mx::GenContext context (oslShaderGen);
213- context.getOptions ().addUpstreamDependencies = false ;
214213 context.registerSourceCodeSearchPath (librariesSearchPath);
214+ // TODO: It might be good to find a way to not hardcode these options, especially the texture flip.
215+ context.getOptions ().addUpstreamDependencies = false ;
215216 context.getOptions ().fileTextureVerticalFlip = true ;
216217
217218 // TODO: Add control over the name of the log file?
@@ -249,7 +250,7 @@ int main(int argc, char* const argv[])
249250 {
250251 logFile << " The following `NodeDef` does not provide a valid OSL implementation, "
251252 " and will be skipped: "
252- << nodeName << std::endl;
253+ << nodeDef-> getName () << std::endl;
253254
254255 continue ;
255256 }
You can’t perform that action at this time.
0 commit comments