Merge branch 'blender2.7'
authorCampbell Barton <ideasman42@gmail.com>
Tue, 15 Jan 2019 13:27:10 +0000 (00:27 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 15 Jan 2019 13:27:10 +0000 (00:27 +1100)
build_files/build_environment/CMakeLists.txt
build_files/build_environment/cmake/png.cmake
build_files/build_environment/cmake/tiff.cmake
build_files/build_environment/cmake/zlib.cmake
intern/cycles/graph/node_enum.h
intern/cycles/render/nodes.cpp

index 8c1d38c..f76c817 100644 (file)
@@ -114,7 +114,7 @@ endif()
 
 if(NOT WIN32 OR ENABLE_MINGW64)
        include(cmake/openjpeg.cmake)
-       if(BUILD_MODE STREQUAL Release)
+       if(NOT WIN32 OR BUILD_MODE STREQUAL Release)
                if(WIN32)
                        include(cmake/zlib_mingw.cmake)
                endif()
index 803438c..6e51fb9 100644 (file)
@@ -36,7 +36,7 @@ add_dependencies(
        external_zlib
 )
 
-if(BUILD_MODE STREQUAL Debug)
+if(WIN32 AND BUILD_MODE STREQUAL Debug)
        ExternalProject_Add_Step(external_png after_install
                COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/png/lib/libpng16_staticd${LIBEXT} ${LIBDIR}/png/lib/libpng16${LIBEXT}
                DEPENDEES install
index 0f22daf..4981454 100644 (file)
@@ -39,7 +39,7 @@ add_dependencies(
        external_zlib
 )
 
-if(BUILD_MODE STREQUAL Debug)
+if(WIN32 AND BUILD_MODE STREQUAL Debug)
        ExternalProject_Add_Step(external_tiff after_install
                COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/tiff/lib/tiffd${LIBEXT} ${LIBDIR}/tiff/lib/tiff${LIBEXT}
                DEPENDEES install
index 396bb3a..3c07fb3 100644 (file)
@@ -40,16 +40,8 @@ if (WIN32)
                )
        endif()
 else()
-       if(BUILD_MODE STREQUAL Debug)
-               ExternalProject_Add_Step(external_zlib after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/zlibstaticd${LIBEXT} ${LIBDIR}/zlib/lib/${ZLIB_LIBRARY}
-                       DEPENDEES install
-               )
-       endif()
-       if (UNIX)
-               ExternalProject_Add_Step(external_zlib after_install
-                       COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
-                       DEPENDEES install
-               )
-       endif()
+       ExternalProject_Add_Step(external_zlib after_install
+               COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/zlib/lib/libz.a ${LIBDIR}/zlib/lib/libz_pic.a
+               DEPENDEES install
+       )
 endif()
index 9de776d..705aec9 100644 (file)
@@ -39,6 +39,9 @@ struct NodeEnum {
        int operator[](ustring x) const { return left.find(x)->second; }
        ustring operator[](int y) const { return right.find(y)->second; }
 
+       unordered_map<ustring, int, ustringHash>::const_iterator begin() const { return left.begin(); }
+       unordered_map<ustring, int, ustringHash>::const_iterator end() const { return left.end(); }
+
 private:
        unordered_map<ustring, int, ustringHash> left;
        unordered_map<int, ustring> right;
index 4af0d86..727cbe2 100644 (file)
@@ -3732,7 +3732,7 @@ void LightPathNode::compile(OSLCompiler& compiler)
 
 NODE_DEFINE(LightFalloffNode)
 {
-       NodeType* type = NodeType::add("light_fallof", create, NodeType::SHADER);
+       NodeType* type = NodeType::add("light_falloff", create, NodeType::SHADER);
 
        SOCKET_IN_FLOAT(strength, "Strength", 100.0f);
        SOCKET_IN_FLOAT(smooth, "Smooth", 0.0f);
@@ -5840,7 +5840,7 @@ NODE_DEFINE(NormalMapNode)
        space_enum.insert("world", NODE_NORMAL_MAP_WORLD);
        space_enum.insert("blender_object", NODE_NORMAL_MAP_BLENDER_OBJECT);
        space_enum.insert("blender_world", NODE_NORMAL_MAP_BLENDER_WORLD);
-       SOCKET_ENUM(space, "Space", space_enum, NODE_TANGENT_RADIAL);
+       SOCKET_ENUM(space, "Space", space_enum, NODE_NORMAL_MAP_TANGENT);
 
        SOCKET_STRING(attribute, "Attribute", ustring());
 
@@ -6051,7 +6051,7 @@ NODE_DEFINE(DisplacementNode)
        space_enum.insert("object", NODE_NORMAL_MAP_OBJECT);
        space_enum.insert("world", NODE_NORMAL_MAP_WORLD);
 
-       SOCKET_ENUM(space, "Space", space_enum, NODE_NORMAL_MAP_TANGENT);
+       SOCKET_ENUM(space, "Space", space_enum, NODE_NORMAL_MAP_OBJECT);
 
        SOCKET_IN_FLOAT(height, "Height", 0.0f);
        SOCKET_IN_FLOAT(midlevel, "Midlevel", 0.5f);