diff --git a/source/MaterialXRenderGlsl/CMakeLists.txt b/source/MaterialXRenderGlsl/CMakeLists.txt index 32e68a5f36..c9cc9a3e66 100644 --- a/source/MaterialXRenderGlsl/CMakeLists.txt +++ b/source/MaterialXRenderGlsl/CMakeLists.txt @@ -1,5 +1,7 @@ -file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.c*") -file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*") +file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/*.c") +file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h") + +message(STATUS "The value of MY_VARIABLE is: ${materialx_source}") if(POLICY CMP0072) cmake_policy(SET CMP0072 NEW) diff --git a/source/PyMaterialX/PyMaterialXRender/PyTinyObjLoader.cpp b/source/PyMaterialX/PyMaterialXRender/PyTinyObjLoader.cpp index 13677453b9..e4448e6cd4 100644 --- a/source/PyMaterialX/PyMaterialXRender/PyTinyObjLoader.cpp +++ b/source/PyMaterialX/PyMaterialXRender/PyTinyObjLoader.cpp @@ -6,14 +6,24 @@ #include #include +#include namespace py = pybind11; namespace mx = MaterialX; +std::pair load_meshes_wrapper_tuple(mx::TinyObjLoader& self, + const mx::FilePath& filePath, + bool texcoordVerticalFlip) +{ + mx::MeshList meshList; + bool success = self.load(filePath, meshList, texcoordVerticalFlip); + return {success, meshList}; +} + void bindPyTinyObjLoader(py::module& mod) { py::class_(mod, "TinyObjLoader") .def_static("create", &mx::TinyObjLoader::create) .def(py::init<>()) - .def("load", &mx::TinyObjLoader::load); + .def("load", &load_meshes_wrapper_tuple); }