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 8c1d38c06358fec07145f16669178cc2e1a2493c..f76c8175e5090fdaa81fdb947361f7da2ec14a9b 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 803438cbd2a61a2ffce5f96d8e0a173644b0a7c9..6e51fb9ebe4ad7ef94f55f2b3990edcf63b68c63 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 0f22daf05b1fe0215c9dc2cc44ead8ef8914b128..498145463cfb97a665573ca732fb95fbf958b871 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 396bb3a318e03045f8a34ebf5d61021dd6113593..3c07fb3c08a3b21b5067775ac425f6312f715c67 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 9de776ddb55dc19324345ac32ba57982bed45b50..705aec9a9188c7060a9aeb6b6c0e3fd386552ade 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 4af0d8663e8f648ec47d11682db09f16eb033e37..727cbe243ac2151bcf7503807ed3fc1a056c5e72 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);