Skip to content

Commit

Permalink
Merge pull request #137 from materialx/dev_1.36
Browse files Browse the repository at this point in the history
Merge branch 'dev_1.36' into master
  • Loading branch information
jstone-lucasfilm authored Jul 23, 2018
2 parents d16eff0 + 9b13158 commit 05e7b4a
Show file tree
Hide file tree
Showing 78 changed files with 9,412 additions and 5,329 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Change Log

## [1.36.0] - 2018-07-23

Updated the MaterialX library to the v1.36 specification.

### Added
- Added support for Element namespaces.
- Added support for NodeDef inheritance.
- Added support for root-level node elements.
- Added support for inheritance attributes on MaterialX\:\:Material and MaterialX\:\:Look.
- Added support for include and exclude attributes on MaterialX\:\:Collection.
- Added the MaterialX\:\:Token class for string substitutions.
- Added the MaterialX\:\:Variant, MaterialX\:\:VariantSet, and MaterialX\:\:VariantAssign classes.
- Added the MaterialX\:\:GeomPath class for geometry name comparisons.
- Added the Collection\:\:matchesGeomString method, for testing matches between collections and geometries.
- Added the Material\:\:getGeometryBindings method, for finding the bindings of a material to specific geometries.

### Removed
- Removed the MaterialX\:\:MaterialInherit and MaterialX\:\:LookInherit classes.
- Removed the MaterialX\:\:CollectionAdd and MaterialX\:\:CollectionRemove classes.
- Removed the MaterialX\:\:Override class and support for public names.
- Removed the 'channels' attribute from MaterialX\:\:InterfaceElement.
- Removed the Material::getReferencingMaterialAssigns method (deprecated in Python).

## [1.35.5] - 2018-05-07

### Added
Expand Down
9 changes: 3 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(MaterialX)
set(MATERIALX_MAJOR_VERSION 1)
set(MATERIALX_MINOR_VERSION 35)
set(MATERIALX_BUILD_VERSION 5)
set(MATERIALX_MINOR_VERSION 36)
set(MATERIALX_BUILD_VERSION 0)
set(MATERIALX_LIBRARY_VERSION ${MATERIALX_MAJOR_VERSION}.${MATERIALX_MINOR_VERSION}.${MATERIALX_BUILD_VERSION})

cmake_minimum_required(VERSION 3.1)
Expand Down Expand Up @@ -68,12 +68,9 @@ endif()
add_subdirectory(source/MaterialXCore)
add_subdirectory(source/MaterialXFormat)
add_subdirectory(source/MaterialXTest)
add_subdirectory(documents)

if(MATERIALX_BUILD_PYTHON)
add_subdirectory(source/PyMaterialX)
add_subdirectory(python)
endif(MATERIALX_BUILD_PYTHON)

if(MATERIALX_BUILD_DOCS)
add_subdirectory(documents)
endif(MATERIALX_BUILD_DOCS)
41 changes: 23 additions & 18 deletions documents/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(DOXYGEN_HTML_OUTPUT_DIR ${DOXYGEN_OUTPUT_DIR}/MaterialXDocs)
set(DOXYGEN_INPUT_LIST ${CMAKE_SOURCE_DIR}/documents/DeveloperGuide
${CMAKE_SOURCE_DIR}/source/MaterialXCore
${CMAKE_SOURCE_DIR}/source/MaterialXFormat)
string (REPLACE ";" " " DOXYGEN_INPUT_STR "${DOXYGEN_INPUT_LIST}")
install(DIRECTORY ${CMAKE_SOURCE_DIR}/documents/Libraries/
DESTINATION "${CMAKE_INSTALL_PREFIX}/documents/Libraries")

find_package(Doxygen)
if(MATERIALX_BUILD_DOCS)
set(DOXYGEN_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(DOXYGEN_HTML_OUTPUT_DIR ${DOXYGEN_OUTPUT_DIR}/MaterialXDocs)
set(DOXYGEN_INPUT_LIST ${CMAKE_SOURCE_DIR}/documents/DeveloperGuide
${CMAKE_SOURCE_DIR}/source/MaterialXCore
${CMAKE_SOURCE_DIR}/source/MaterialXFormat)
string (REPLACE ";" " " DOXYGEN_INPUT_STR "${DOXYGEN_INPUT_LIST}")

if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
add_custom_target(MaterialXDocs ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating HTML documentation: ${DOXYGEN_HTML_OUTPUT_DIR}/index.html")
add_custom_command(TARGET MaterialXDocs PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/documents/Images ${CMAKE_CURRENT_BINARY_DIR})
install(DIRECTORY ${DOXYGEN_HTML_OUTPUT_DIR}
DESTINATION "${CMAKE_INSTALL_PREFIX}/documents")
endif(DOXYGEN_FOUND)
find_package(Doxygen)

if(DOXYGEN_FOUND)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile)
add_custom_target(MaterialXDocs ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating HTML documentation: ${DOXYGEN_HTML_OUTPUT_DIR}/index.html")
add_custom_command(TARGET MaterialXDocs PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/documents/Images ${CMAKE_CURRENT_BINARY_DIR})
install(DIRECTORY ${DOXYGEN_HTML_OUTPUT_DIR}
DESTINATION "${CMAKE_INSTALL_PREFIX}/documents")
endif(DOXYGEN_FOUND)
endif(MATERIALX_BUILD_DOCS)
7 changes: 4 additions & 3 deletions documents/Examples/BxDF/Disney_BRDF_2012.mtlx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<materialx version="1.35" cms="ocio" colorspace="lin_rec709">
<nodedef name="nd_d2012" type="surfaceshader" node="Disney_BRDF_2012">
<materialx version="1.36" cms="ocio" colorspace="lin_rec709">
<nodedef name="ND_DisneyBRDF2012_surface" type="surfaceshader" node="Disney_BRDF_2012">
<input name="baseColor" type="color3" value="0.16, 0.16, 0.16"/>
<input name="metallic" type="float" value="0"/>
<input name="subsurface" type="float" value="0"/>
Expand All @@ -13,5 +13,6 @@
<input name="clearcoat" type="float" value="0"/>
<input name="clearcoatGloss" type="float" value="1"/>
</nodedef>
<implementation name="im_d2012" nodedef="nd_d2012" target="BRDF_Explorer" language="glsl" file="https://github.com/wdas/brdf/blob/master/src/brdfs/disney.brdf"/>
<implementation name="IM_DisneyBRDF2012_surface_brdfExplorer" nodedef="ND_DisneyBRDF2012_surface"
target="BRDF_Explorer" language="glsl" file="https://github.com/wdas/brdf/blob/master/src/brdfs/disney.brdf"/>
</materialx>
9 changes: 5 additions & 4 deletions documents/Examples/BxDF/Disney_BSDF_2015.mtlx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<materialx version="1.35" cms="ocio" colorspace="lin_rec709">
<nodedef name="nd_d2015" type="surfaceshader" node="Disney_BSDF_2015">
<materialx version="1.36" cms="ocio" colorspace="lin_rec709">
<nodedef name="ND_DisneyBSDF2015_surface" type="surfaceshader" node="Disney_BSDF_2015">
<input name="baseColor" type="color3" value="0.16, 0.16, 0.16"/>
<input name="metallic" type="float" value="0"/>
<input name="roughness" type="float" value="0.5"/>
Expand All @@ -15,9 +15,10 @@
<input name="scatterDistance" type="vector3" value="0, 0, 0"/>
<input name="flatness" type="float" value="0"/>
<input name="diffTrans" type="float" value="0"/>
<parameter name="thin" type="bool" value="false"/>
<parameter name="thin" type="boolean" value="false"/>
</nodedef>
<implementation name="im_d2015" nodedef="nd_d2015" target="pbrt" language="c++" file="https://github.com/mmp/pbrt-v3/blob/master/src/materials/disney.cpp" function="DisneyMaterial::DisneyMaterial">
<implementation name="IM_DisneyBSDF2015_surface_pbrt" nodedef="ND_DisneyBSDF2015_surface" target="pbrt" language="cpp"
file="https://github.com/mmp/pbrt-v3/blob/master/src/materials/disney.cpp" function="DisneyMaterial::DisneyMaterial">
<input name="baseColor" type="color3" implname="color"/>
<input name="ior" type="float" implname="eta"/>
</implementation>
Expand Down
Loading

0 comments on commit 05e7b4a

Please sign in to comment.