diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2016-05-19 12:56:08 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2016-05-19 12:56:08 +0300 |
commit | a7c8327c8ac3aae86bc441d8c2c311d57decae3e (patch) | |
tree | 6170d44b1c6f71591bca1a627ab23cab90a12f51 | |
parent | 31976ca62445cf1b1f25d9c6d90e99f7b94ef949 (diff) | |
parent | 03f846ea12ba38d4686edfeef01a571329bd9385 (diff) |
Merge remote-tracking branch 'origin/master' into decklink
-rw-r--r-- | CMakeLists.txt | 15 | ||||
-rw-r--r-- | build_files/cmake/macros.cmake | 13 | ||||
-rw-r--r-- | extern/recastnavigation/CMakeLists.txt | 60 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 21 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subsurf_ccg.c | 23 |
5 files changed, 69 insertions, 63 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9121c167eee..63053502027 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -826,21 +826,6 @@ set(PLATFORM_LINKFLAGS "") set(PLATFORM_LINKFLAGS_DEBUG "") -# For alternate Python locations the commandline can be used to override detected/default cache settings, e.g: -# On Unix: -# cmake ../blender \ -# -D PYTHON_VERSION=3.5 \ -# -D PYTHON_INCLUDE_DIR=/opt/py35/include/python3.5d \ -# -D PYTHON_LIBRARY=/opt/py35/lib/libpython3.5d.so -# -# On Macs: -# cmake ../blender \ -# -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.5/include/python3.5 \ -# -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/config \ -# -G Xcode -# -# When changing any of this remember to update the notes in doc/build_systems/cmake.txt - #----------------------------------------------------------------------------- #Platform specifics diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 8558b7ab4fb..a73eb9f3eaf 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -1058,6 +1058,19 @@ macro(remove_strict_flags_file endmacro() +# External libs may need 'signed char' to be default. +macro(remove_cc_flag_unsigned_char) + if(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang|Intel)$") + remove_cc_flag("-funsigned-char") + elseif(MSVC) + remove_cc_flag("/J") + else() + message(WARNING + "Compiler '${CMAKE_C_COMPILER_ID}' failed to disable 'unsigned char' flag." + "Build files need updating." + ) + endif() +endmacro() function(ADD_CHECK_C_COMPILER_FLAG _CFLAGS diff --git a/extern/recastnavigation/CMakeLists.txt b/extern/recastnavigation/CMakeLists.txt index d6c7fd357b1..19ac6e9dde8 100644 --- a/extern/recastnavigation/CMakeLists.txt +++ b/extern/recastnavigation/CMakeLists.txt @@ -23,9 +23,11 @@ # # ***** END GPL LICENSE BLOCK ***** +remove_cc_flag_unsigned_char() + set(INC - Recast/Include - Detour/Include + Recast/Include + Detour/Include ) set(INC_SYS @@ -33,38 +35,38 @@ set(INC_SYS ) set(SRC - recast-capi.cpp - recast-capi.h + recast-capi.cpp + recast-capi.h - Detour/Source/DetourCommon.cpp - Detour/Source/DetourNode.cpp - Detour/Source/DetourStatNavMesh.cpp - Detour/Source/DetourStatNavMeshBuilder.cpp - Detour/Source/DetourTileNavMesh.cpp - Detour/Source/DetourTileNavMeshBuilder.cpp + Detour/Source/DetourCommon.cpp + Detour/Source/DetourNode.cpp + Detour/Source/DetourStatNavMesh.cpp + Detour/Source/DetourStatNavMeshBuilder.cpp + Detour/Source/DetourTileNavMesh.cpp + Detour/Source/DetourTileNavMeshBuilder.cpp - Detour/Include/DetourCommon.h - Detour/Include/DetourNode.h - Detour/Include/DetourStatNavMesh.h - Detour/Include/DetourStatNavMeshBuilder.h - Detour/Include/DetourTileNavMesh.h - Detour/Include/DetourTileNavMeshBuilder.h + Detour/Include/DetourCommon.h + Detour/Include/DetourNode.h + Detour/Include/DetourStatNavMesh.h + Detour/Include/DetourStatNavMeshBuilder.h + Detour/Include/DetourTileNavMesh.h + Detour/Include/DetourTileNavMeshBuilder.h - Recast/Source/Recast.cpp - Recast/Source/RecastAlloc.cpp - Recast/Source/RecastArea.cpp - Recast/Source/RecastContour.cpp - Recast/Source/RecastFilter.cpp - Recast/Source/RecastLayers.cpp - Recast/Source/RecastMesh.cpp - Recast/Source/RecastMeshDetail.cpp - Recast/Source/RecastRasterization.cpp - Recast/Source/RecastRegion.cpp + Recast/Source/Recast.cpp + Recast/Source/RecastAlloc.cpp + Recast/Source/RecastArea.cpp + Recast/Source/RecastContour.cpp + Recast/Source/RecastFilter.cpp + Recast/Source/RecastLayers.cpp + Recast/Source/RecastMesh.cpp + Recast/Source/RecastMeshDetail.cpp + Recast/Source/RecastRasterization.cpp + Recast/Source/RecastRegion.cpp - Recast/Include/Recast.h - Recast/Include/RecastAlloc.h - Recast/Include/RecastAssert.h + Recast/Include/Recast.h + Recast/Include/RecastAlloc.h + Recast/Include/RecastAssert.h ) blender_add_lib(extern_recastnavigation "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index e6741657f47..af1ad4900b3 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -495,11 +495,12 @@ static void cdDM_drawFacesTex_common( CDDerivedMesh *cddm = (CDDerivedMesh *) dm; const MPoly *mpoly = cddm->mpoly; MTexPoly *mtexpoly = DM_get_poly_data_layer(dm, CD_MTEXPOLY); - const MLoopCol *mloopcol; + const MLoopCol *mloopcol = NULL; int i; int colType, start_element, tot_drawn; const bool use_hide = (flag & DM_DRAW_SKIP_HIDDEN) != 0; const bool use_tface = (flag & DM_DRAW_USE_ACTIVE_UV) != 0; + const bool use_colors = (flag & DM_DRAW_USE_COLORS) != 0; int totpoly; int next_actualFace; int mat_index; @@ -529,15 +530,17 @@ static void cdDM_drawFacesTex_common( } } - colType = CD_TEXTURE_MLOOPCOL; - mloopcol = dm->getLoopDataArray(dm, colType); - if (!mloopcol) { - colType = CD_PREVIEW_MLOOPCOL; - mloopcol = dm->getLoopDataArray(dm, colType); - } - if (!mloopcol) { - colType = CD_MLOOPCOL; + if (use_colors) { + colType = CD_TEXTURE_MLOOPCOL; mloopcol = dm->getLoopDataArray(dm, colType); + if (!mloopcol) { + colType = CD_PREVIEW_MLOOPCOL; + mloopcol = dm->getLoopDataArray(dm, colType); + } + if (!mloopcol) { + colType = CD_MLOOPCOL; + mloopcol = dm->getLoopDataArray(dm, colType); + } } GPU_vertex_setup(dm); diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index a84b8352417..5fd418fadfc 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -3370,13 +3370,14 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm, CCGSubSurf *ss = ccgdm->ss; CCGKey key; int colType; - const MLoopCol *mloopcol; + const MLoopCol *mloopcol = NULL; MTexPoly *mtexpoly = DM_get_poly_data_layer(dm, CD_MTEXPOLY); DMFlagMat *faceFlags = ccgdm->faceFlags; DMDrawOption draw_option; int i, totpoly; bool flush; - bool use_tface = (flag & DM_DRAW_USE_ACTIVE_UV) != 0; + const bool use_tface = (flag & DM_DRAW_USE_ACTIVE_UV) != 0; + const bool use_colors = (flag & DM_DRAW_USE_COLORS) != 0; unsigned int next_actualFace; unsigned int gridFaces = ccgSubSurf_getGridSize(ss) - 1; int mat_index; @@ -3395,15 +3396,17 @@ static void ccgDM_drawFacesTex_common(DerivedMesh *dm, CCG_key_top_level(&key, ss); ccgdm_pbvh_update(ccgdm); - colType = CD_TEXTURE_MLOOPCOL; - mloopcol = dm->getLoopDataArray(dm, colType); - if (!mloopcol) { - colType = CD_PREVIEW_MLOOPCOL; - mloopcol = dm->getLoopDataArray(dm, colType); - } - if (!mloopcol) { - colType = CD_MLOOPCOL; + if (use_colors) { + colType = CD_TEXTURE_MLOOPCOL; mloopcol = dm->getLoopDataArray(dm, colType); + if (!mloopcol) { + colType = CD_PREVIEW_MLOOPCOL; + mloopcol = dm->getLoopDataArray(dm, colType); + } + if (!mloopcol) { + colType = CD_MLOOPCOL; + mloopcol = dm->getLoopDataArray(dm, colType); + } } GPU_vertex_setup(dm); |