Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-08-01 21:13:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-08-01 21:13:58 +0400
commit567e0621029c55747c63b0ea39111913ad5ff126 (patch)
treef60780a3e36ad4c394a5c1445a5dd91c064fe84f
parented62c3873052c34f7eab05cf266cb18da05b1fb7 (diff)
parent7b83e3d6d7880124be4ed36d81c92953ec88bad0 (diff)
Merge branch 'master' into pie-menus
-rw-r--r--CMakeLists.txt16
-rw-r--r--build_files/scons/config/win64-vc-config.py5
-rwxr-xr-xbuild_files/scons/tools/Blender.py44
-rw-r--r--intern/cycles/blender/blender_session.cpp28
-rw-r--r--intern/cycles/kernel/shaders/stdosl.h1
-rw-r--r--release/darwin/README_codesigning.txt5
-rw-r--r--release/darwin/codesigning_rules_blender.plist14
-rw-r--r--release/darwin/codesigning_rules_player.plist15
-rw-r--r--source/blender/blenkernel/BKE_DerivedMesh.h3
-rw-r--r--source/blender/blenkernel/BKE_idprop.h24
-rw-r--r--source/blender/blenkernel/BKE_shrinkwrap.h51
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c22
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c11
-rw-r--r--source/blender/blenkernel/intern/constraint.c6
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c2
-rw-r--r--source/blender/blenkernel/intern/idprop.c2
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c71
-rw-r--r--source/blender/blenlib/BLI_math_matrix.h16
-rw-r--r--source/blender/blenlib/BLI_utildefines.h6
-rw-r--r--source/blender/blenlib/intern/math_matrix.c48
-rw-r--r--source/blender/blenlib/intern/path_util.c6
-rw-r--r--source/blender/blenlib/intern/string.c4
-rw-r--r--source/blender/bmesh/bmesh_class.h8
-rw-r--r--source/blender/editors/armature/pose_select.c3
-rw-r--r--source/blender/editors/curve/editcurve.c59
-rw-r--r--source/blender/editors/include/BIF_gl.h20
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c2
-rw-r--r--source/blender/editors/object/object_bake_api.c2
-rw-r--r--source/blender/modifiers/intern/MOD_shrinkwrap.c1
-rw-r--r--source/blender/modifiers/intern/MOD_simpledeform.c11
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c17
-rw-r--r--source/creator/CMakeLists.txt2
32 files changed, 274 insertions, 251 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e1ed090e53d..8ef906ad00c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -136,6 +136,11 @@ if(APPLE)
endif()
option(WITH_BUILDINFO "Include extra build details (only disable for development & faster builds)" ON)
+if(${CMAKE_VERSION} VERSION_LESS 2.8.8)
+ # add_library OBJECT arg unsupported
+ set(WITH_BUILDINFO OFF)
+endif()
+
option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON)
option(WITH_IK_SOLVER "Enable Legacy IK solver (only disable for development)" ON)
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke and audio effects)" ON)
@@ -996,6 +1001,7 @@ elseif(WIN32)
# We want to support Vista level ABI for x64
if(NOT MSVC_VERSION VERSION_LESS 1700)
add_definitions(-D_WIN32_WINNT=0x600)
+ add_definitions(-DOIIO_STATIC_BUILD)
endif()
endif()
@@ -1144,8 +1150,12 @@ elseif(WIN32)
${OPENCOLLADA}/lib/opencollada/xml.lib
${OPENCOLLADA}/lib/opencollada/buffer.lib
${OPENCOLLADA}/lib/opencollada/ftoa.lib
- ${OPENCOLLADA}/lib/opencollada/UTF.lib
)
+
+ if(NOT WITH_LLVM)
+ list(APPEND OPENCOLLADA_LIBRARIES ${OPENCOLLADA}/lib/opencollada/UTF.lib)
+ endif()
+
set(PCRE_LIBRARIES
${OPENCOLLADA}/lib/opencollada/pcre.lib
)
@@ -1278,7 +1288,9 @@ elseif(WIN32)
find_package(OpenImageIO)
set(OPENIMAGEIO ${LIBDIR}/openimageio)
set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
- set(OPENIMAGEIO_LIBRARIES optimized OpenImageIO debug OpenImageIO_d)
+ set(OIIO_OPTIMIZED OpenImageIO OpenImageIO_Util)
+ set(OIIO_DEBUG OpenImageIO_d OpenImageIO_Util_d)
+ set(OPENIMAGEIO_LIBRARIES optimized ${OIIO_OPTIMIZED} debug ${OIIO_DEBUG})
set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
set(OPENIMAGEIO_DEFINITIONS "-DUSE_TBB=0")
endif()
diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py
index d94de3b54e4..cb6559fb74b 100644
--- a/build_files/scons/config/win64-vc-config.py
+++ b/build_files/scons/config/win64-vc-config.py
@@ -157,7 +157,7 @@ BF_COLLADA_LIB = 'bf_collada'
BF_OPENCOLLADA = LIBDIR + '/opencollada'
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
-BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa UTF'
+BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
WITH_BF_3DMOUSE = True
@@ -186,7 +186,7 @@ WITH_BF_OIIO = True
BF_OIIO = '${LIBDIR}/openimageio'
BF_OIIO_INC = '${BF_OIIO}/include'
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
-BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib'
+BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib ${BF_OIIO_LIBPATH}/OpenImageIO_Util.lib'
WITH_BF_STATICOIIO = True
WITH_BF_OCIO = True
@@ -236,6 +236,7 @@ CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4
# We want to support Vista level ABI for x64
if VC_VERSION == '12.0':
CCFLAGS.append('/D_WIN32_WINNT=0x600')
+ CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
CXXFLAGS = ['/EHsc']
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast']
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index c3ac92c77b2..dcbf7e510e5 100755
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -702,37 +702,37 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,installdir, binary, binary)
commands.getoutput(cmd)
- cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/'%(installdir, binary, VERSION)
+ cmd = 'mkdir %s/%s.app/Contents/Resources/%s/'%(installdir, binary, VERSION)
commands.getoutput(cmd)
cmd = installdir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION)
# blenderplayer doesn't need all the files
if binary == 'blender':
- cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
+ cmd = 'mkdir %s/%s.app/Contents/Resources/%s/datafiles'%(installdir, binary, VERSION)
commands.getoutput(cmd)
- cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
+ cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/Resources/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
mo_dir = os.path.join(builddir[:-4], "locale")
for f in os.listdir(mo_dir):
- cmd = 'ditto %s/%s %s/%s.app/Contents/MacOS/%s/datafiles/locale/%s/LC_MESSAGES/blender.mo'%(mo_dir, f, installdir, binary, VERSION, f[:-3])
+ cmd = 'ditto %s/%s %s/%s.app/Contents/Resources/%s/datafiles/locale/%s/LC_MESSAGES/blender.mo'%(mo_dir, f, installdir, binary, VERSION, f[:-3])
commands.getoutput(cmd)
- cmd = 'cp %s/release/datafiles/locale/languages %s/%s.app/Contents/MacOS/%s/datafiles/locale/'%(bldroot, installdir, binary, VERSION)
+ cmd = 'cp %s/release/datafiles/locale/languages %s/%s.app/Contents/Resources/%s/datafiles/locale/'%(bldroot, installdir, binary, VERSION)
commands.getoutput(cmd)
if env['WITH_BF_OCIO']:
- cmd = 'cp -R %s/release/datafiles/colormanagement %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
+ cmd = 'cp -R %s/release/datafiles/colormanagement %s/%s.app/Contents/Resources/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
- cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
+ cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/Resources/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
if VERSION_RELEASE_CYCLE == "release":
- cmd = 'rm -rf %s/%s.app/Contents/MacOS/%s/scripts/addons_contrib'%(installdir,binary,VERSION)
+ cmd = 'rm -rf %s/%s.app/Contents/Resources/%s/scripts/addons_contrib'%(installdir,binary,VERSION)
commands.getoutput(cmd)
if env['WITH_BF_CYCLES']:
croot = '%s/intern/cycles' % (bldroot)
- cinstalldir = '%s/%s.app/Contents/MacOS/%s/scripts/addons/cycles' % (installdir,binary,VERSION)
+ cinstalldir = '%s/%s.app/Contents/Resources/%s/scripts/addons/cycles' % (installdir,binary,VERSION)
cmd = 'mkdir %s' % (cinstalldir)
commands.getoutput(cmd)
@@ -760,11 +760,11 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
if env['WITH_OSX_STATICPYTHON']:
- cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION)
+ cmd = 'mkdir %s/%s.app/Contents/Resources/%s/python/'%(installdir,binary, VERSION)
commands.getoutput(cmd)
- cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
+ cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/Resources/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
commands.getoutput(cmd)
- cmd = 'cp -R %s/release/site-packages/ %s/%s.app/Contents/MacOS/%s/python/lib/python%s/site-packages/'%(libdir,installdir,binary,VERSION,env['BF_PYTHON_VERSION'])
+ cmd = 'cp -R %s/release/site-packages/ %s/%s.app/Contents/Resources/%s/python/lib/python%s/site-packages/'%(libdir,installdir,binary,VERSION,env['BF_PYTHON_VERSION'])
commands.getoutput(cmd)
cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary)
@@ -781,28 +781,28 @@ def AppIt(target=None, source=None, env=None):
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.6.1': # for correct errorhandling with gcc >= 4.6.1 we need the gcc.dylib and gomp.dylib to link, thus distribute in app-bundle
print "Bundling libgcc and libgomp"
instname = env['BF_CXX']
- cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libgcc
+ cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libgcc
commands.getoutput(cmd)
- cmd = 'install_name_tool -id @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgcc_s.1.dylib'%(installdir, binary) # change id of libgcc
+ cmd = 'install_name_tool -id @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/libgcc_s.1.dylib'%(installdir, binary) # change id of libgcc
commands.getoutput(cmd)
- cmd = 'ditto --arch %s %s/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libgomp
+ cmd = 'ditto --arch %s %s/lib/libgomp.1.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libgomp
commands.getoutput(cmd)
- cmd = 'install_name_tool -id @executable_path/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/lib/libgomp.1.dylib'%(installdir, binary) # change id of libgomp
+ cmd = 'install_name_tool -id @executable_path/../Resources/lib/libgomp.1.dylib %s/%s.app/Contents/Resources/lib/libgomp.1.dylib'%(installdir, binary) # change id of libgomp
commands.getoutput(cmd)
- cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgomp.1.dylib'%(instname, installdir, binary) # change ref to libgcc
+ cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/libgomp.1.dylib'%(instname, installdir, binary) # change ref to libgcc
commands.getoutput(cmd)
- cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgcc ( blender )
+ cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgcc ( blender )
commands.getoutput(cmd)
- cmd = 'install_name_tool -change %s/lib/libgomp.1.dylib @executable_path/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgomp ( blender )
+ cmd = 'install_name_tool -change %s/lib/libgomp.1.dylib @executable_path/../Resources/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgomp ( blender )
commands.getoutput(cmd)
if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
print "Bundling libiomp5"
instname = env['LCGDIR'][1:] # made libiomp5 part of blender libs
- cmd = 'ditto --arch %s %s/openmp/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
+ cmd = 'ditto --arch %s %s/openmp/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
commands.getoutput(cmd)
- cmd = 'install_name_tool -id @loader_path/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/lib/libiomp5.dylib'%(installdir, binary) # change id of libiomp5
+ cmd = 'install_name_tool -id @loader_path/../Resources/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/libiomp5.dylib'%(installdir, binary) # change id of libiomp5
commands.getoutput(cmd)
- cmd = 'install_name_tool -change @loader_path/libiomp5.dylib @loader_path/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/%s'%(installdir, binary, binary) # change ref to libiomp5 ( blender )
+ cmd = 'install_name_tool -change @loader_path/libiomp5.dylib @loader_path/../Resources/lib/libiomp5.dylib %s/%s.app/Contents/MacOS/%s'%(installdir, binary, binary) # change ref to libiomp5 ( blender )
commands.getoutput(cmd)
# extract copy system python, be sure to update other build systems
diff --git a/intern/cycles/blender/blender_session.cpp b/intern/cycles/blender/blender_session.cpp
index 37aab76adbc..7e104d5bb41 100644
--- a/intern/cycles/blender/blender_session.cpp
+++ b/intern/cycles/blender/blender_session.cpp
@@ -88,6 +88,7 @@ void BlenderSession::create_session()
{
SceneParams scene_params = BlenderSync::get_scene_params(b_scene, background);
SessionParams session_params = BlenderSync::get_session_params(b_engine, b_userpref, b_scene, background);
+ bool session_pause = BlenderSync::get_session_pause(b_scene, background);
/* reset status/progress */
last_status = "";
@@ -107,15 +108,17 @@ void BlenderSession::create_session()
session->scene = scene;
session->progress.set_update_callback(function_bind(&BlenderSession::tag_redraw, this));
session->progress.set_cancel_callback(function_bind(&BlenderSession::test_cancel, this));
- session->set_pause(BlenderSync::get_session_pause(b_scene, background));
+ session->set_pause(session_pause);
/* create sync */
sync = new BlenderSync(b_engine, b_data, b_scene, scene, !background, session->progress, session_params.device.type == DEVICE_CPU);
if(b_v3d) {
- /* full data sync */
- sync->sync_data(b_v3d, b_engine.camera_override(), &python_thread_state);
- sync->sync_view(b_v3d, b_rv3d, width, height);
+ if(session_pause == false) {
+ /* full data sync */
+ sync->sync_data(b_v3d, b_engine.camera_override(), &python_thread_state);
+ sync->sync_view(b_v3d, b_rv3d, width, height);
+ }
}
else {
/* for final render we will do full data sync per render layer, only
@@ -627,6 +630,7 @@ void BlenderSession::synchronize()
/* on session/scene parameter changes, we recreate session entirely */
SceneParams scene_params = BlenderSync::get_scene_params(b_scene, background);
SessionParams session_params = BlenderSync::get_session_params(b_engine, b_userpref, b_scene, background);
+ bool session_pause = BlenderSync::get_session_pause(b_scene, background);
if(session->params.modified(session_params) ||
scene->params.modified(scene_params))
@@ -639,12 +643,18 @@ void BlenderSession::synchronize()
/* increase samples, but never decrease */
session->set_samples(session_params.samples);
- session->set_pause(BlenderSync::get_session_pause(b_scene, background));
+ session->set_pause(session_pause);
/* copy recalc flags, outside of mutex so we can decide to do the real
* synchronization at a later time to not block on running updates */
sync->sync_recalc();
+ /* don't do synchronization if on pause */
+ if(session_pause) {
+ tag_update();
+ return;
+ }
+
/* try to acquire mutex. if we don't want to or can't, come back later */
if(!session->ready_to_reset() || !session->scene->mutex.try_lock()) {
tag_update();
@@ -720,10 +730,12 @@ bool BlenderSession::draw(int w, int h)
if(reset) {
SessionParams session_params = BlenderSync::get_session_params(b_engine, b_userpref, b_scene, background);
BufferParams buffer_params = BlenderSync::get_buffer_params(b_render, b_scene, b_v3d, b_rv3d, scene->camera, width, height);
+ bool session_pause = BlenderSync::get_session_pause(b_scene, background);
- session->reset(buffer_params, session_params.samples);
-
- start_resize_time = 0.0;
+ if(session_pause == false) {
+ session->reset(buffer_params, session_params.samples);
+ start_resize_time = 0.0;
+ }
}
}
else {
diff --git a/intern/cycles/kernel/shaders/stdosl.h b/intern/cycles/kernel/shaders/stdosl.h
index 94ebae16ba3..f8e5fd510ee 100644
--- a/intern/cycles/kernel/shaders/stdosl.h
+++ b/intern/cycles/kernel/shaders/stdosl.h
@@ -508,6 +508,7 @@ closure color henyey_greenstein(float g) BUILTIN;
closure color absorption() BUILTIN;
// Renderer state
+int backfacing () BUILTIN;
int raytype (string typename) BUILTIN;
// the individual 'isFOOray' functions are deprecated
int iscameraray () { return raytype("camera"); }
diff --git a/release/darwin/README_codesigning.txt b/release/darwin/README_codesigning.txt
index d2ead00da8a..3724ad1b0ac 100644
--- a/release/darwin/README_codesigning.txt
+++ b/release/darwin/README_codesigning.txt
@@ -1,11 +1,12 @@
Tutorial for codesigning Blender releases on OSX ( atm. i do manually when needed ):
+Updated as by august 01.2014 - removed deprecated rules and not recommended deep codesigning
1. You need to obtain the certificates for blender foundation, they can bw pulled at Apple developer account for BF
2. Run the following commands from terminal:
-codesign -s <IDENTITY> <path_to_blender.app> --resource-rules <path_to_blender_source>/release/darwin/codesigning_rules_blender.plist --deep
+codesign -s <IDENTITY> <path_to_blender.app>
-codesign -s <IDENTITY> <path_to_blenderplayer.app> --resource-rules <path_to_blender_source>/release/darwin/codesigning_rules_player.plist --deep
+codesign -s <IDENTITY> <path_to_blenderplayer.app>
3. Checking:
diff --git a/release/darwin/codesigning_rules_blender.plist b/release/darwin/codesigning_rules_blender.plist
deleted file mode 100644
index 5e6198e8ce7..00000000000
--- a/release/darwin/codesigning_rules_blender.plist
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>rules</key>
- <dict>
- <!-- Exclude datafiles, python and scripts -->
- <key>^MacOS/2.71</key>
- <false/>
- <key>^Resources/</key>
- <true/>
- </dict>
-</dict>
-</plist>
diff --git a/release/darwin/codesigning_rules_player.plist b/release/darwin/codesigning_rules_player.plist
deleted file mode 100644
index acbdab20db9..00000000000
--- a/release/darwin/codesigning_rules_player.plist
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>rules</key>
- <dict>
- <!-- Exclude datafiles, python and scripts -->
- <key>^MacOS/2.71</key>
- <false/>
- <!-- Exclude Resources for placing game.blend and own icons -->
- <key>^Resources/</key>
- <false/>
- </dict>
-</dict>
-</plist>
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h
index 868d9768172..c8fa3a4e202 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -691,6 +691,9 @@ DerivedMesh *editbmesh_get_derived_cage(struct Scene *scene, struct Object *,
DerivedMesh *editbmesh_get_derived_cage_and_final(struct Scene *scene, struct Object *,
struct BMEditMesh *em, DerivedMesh **r_final,
CustomDataMask dataMask);
+
+DerivedMesh *object_get_derived_final(struct Object *ob, const bool for_render);
+
float (*editbmesh_get_vertex_cos(struct BMEditMesh *em, int *r_numVerts))[3];
bool editbmesh_modifier_is_enabled(struct Scene *scene, struct ModifierData *md, DerivedMesh *dm);
void makeDerivedMesh(struct Scene *scene, struct Object *ob, struct BMEditMesh *em,
diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h
index 3cf944fa236..0f3f4ef1018 100644
--- a/source/blender/blenkernel/BKE_idprop.h
+++ b/source/blender/blenkernel/BKE_idprop.h
@@ -121,11 +121,27 @@ void IDP_ClearProperty(IDProperty *prop);
void IDP_UnlinkProperty(struct IDProperty *prop);
#define IDP_Int(prop) ((prop)->data.val)
-#define IDP_Float(prop) (*(float *)&(prop)->data.val)
-#define IDP_Double(prop) (*(double *)&(prop)->data.val)
-#define IDP_String(prop) ((char *) (prop)->data.pointer)
#define IDP_Array(prop) ((prop)->data.pointer)
-#define IDP_IDPArray(prop) ((IDProperty *) (prop)->data.pointer)
+/* C11 const correctness for casts */
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
+# define IDP_Float(prop) _Generic(prop, \
+ IDProperty *: (*(float *)&(prop)->data.val), \
+ const IDProperty *: (*(const float *)&(prop)->data.val))
+# define IDP_Double(prop) _Generic(prop, \
+ IDProperty *: (*(double *)&(prop)->data.val), \
+ const IDProperty *: (*(const double *)&(prop)->data.val))
+# define IDP_String(prop) _Generic(prop, \
+ IDProperty *: ((char *) (prop)->data.pointer), \
+ const IDProperty *: ((const char *) (prop)->data.pointer))
+# define IDP_IDPArray(prop) _Generic(prop, \
+ IDProperty *: ((IDProperty *) (prop)->data.pointer), \
+ const IDProperty *: ((const IDProperty *) (prop)->data.pointer))
+#else
+# define IDP_Float(prop) (*(float *)&(prop)->data.val)
+# define IDP_Double(prop) (*(double *)&(prop)->data.val)
+# define IDP_String(prop) ((char *) (prop)->data.pointer)
+# define IDP_IDPArray(prop) ((IDProperty *) (prop)->data.pointer)
+#endif
#ifdef DEBUG
/* for printout only */
diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h
index 59de43af907..070cd4a9cf0 100644
--- a/source/blender/blenkernel/BKE_shrinkwrap.h
+++ b/source/blender/blenkernel/BKE_shrinkwrap.h
@@ -31,52 +31,6 @@
* \ingroup bke
*/
-/* mesh util */
-
-//TODO: move this somewhere else
-#include "BKE_customdata.h"
-struct DerivedMesh;
-struct Object;
-struct DerivedMesh *object_get_derived_final(struct Object *ob, bool for_render);
-
-
-/* SpaceTransform stuff */
-/*
- * TODO: move this somewhere else
- *
- * this structs encapsulates all needed data to convert between 2 coordinate spaces
- * (where conversion can be represented by a matrix multiplication)
- *
- * This is used to reduce the number of arguments to pass to functions that need to perform
- * this kind of operation and make it easier for the coder, as he/she doenst needs to recode
- * the matrix calculation.
- *
- * A SpaceTransform is initialized using:
- * SPACE_TRANSFORM_SETUP( &data, ob1, ob2 )
- *
- * After that the following calls can be used:
- * space_transform_apply (&data, co); //converts a coordinate in ob1 coords space to the corresponding ob2 coords
- * space_transform_invert(&data, co); //converts a coordinate in ob2 coords space to the corresponding ob1 coords
- *
- * //Same Concept as space_transform_apply and space_transform_invert, but no is normalized after conversion
- * space_transform_apply_normal (&data, &no);
- * space_transform_invert_normal(&data, &no);
- *
- */
-struct Object;
-
-typedef struct SpaceTransform {
- float local2target[4][4];
- float target2local[4][4];
-
-} SpaceTransform;
-
-void space_transform_from_matrixs(struct SpaceTransform *data, float local[4][4], float target[4][4]);
-void space_transform_apply(const struct SpaceTransform *data, float co[3]);
-void space_transform_invert(const struct SpaceTransform *data, float co[3]);
-
-#define SPACE_TRANSFORM_SETUP(data, local, target) space_transform_from_matrixs(data, (local)->obmat, (target)->obmat)
-
/* Shrinkwrap stuff */
#include "BKE_bvhutils.h"
@@ -100,6 +54,7 @@ struct MDeformVert;
struct ShrinkwrapModifierData;
struct MDeformVert;
struct BVHTree;
+struct SpaceTransform;
typedef struct ShrinkwrapCalcData {
@@ -115,7 +70,7 @@ typedef struct ShrinkwrapCalcData {
int vgroup; //Vertex group num
struct DerivedMesh *target; //mesh we are shrinking to
- SpaceTransform local2target; //transform to move between local and target space
+ struct SpaceTransform local2target; //transform to move between local and target space
float keepDist; //Distance to keep above target surface (units are in local space)
@@ -136,7 +91,7 @@ void shrinkwrapModifier_deform(struct ShrinkwrapModifierData *smd, struct Object
*/
bool BKE_shrinkwrap_project_normal(
char options, const float vert[3], const float dir[3],
- const SpaceTransform *transf, BVHTree *tree, BVHTreeRayHit *hit,
+ const struct SpaceTransform *transf, BVHTree *tree, BVHTreeRayHit *hit,
BVHTree_RayCastCallback callback, void *userdata);
/*
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index c3e8d2a98af..46f04ff03b2 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -2500,6 +2500,28 @@ DerivedMesh *editbmesh_get_derived_base(Object *obedit, BMEditMesh *em)
return getEditDerivedBMesh(em, obedit, NULL);
}
+/***/
+
+/* get derived mesh from an object, using editbmesh if available. */
+DerivedMesh *object_get_derived_final(Object *ob, const bool for_render)
+{
+ Mesh *me = ob->data;
+ BMEditMesh *em = me->edit_btmesh;
+
+ if (for_render) {
+ /* TODO(sergey): use proper derived render here in the future. */
+ return ob->derivedFinal;
+ }
+
+ if (em) {
+ DerivedMesh *dm = em->derivedFinal;
+ return dm;
+ }
+
+ return ob->derivedFinal;
+}
+
+
/* UNUSED */
#if 0
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index c7e2bb8c6c7..6e0033dad54 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -2338,6 +2338,17 @@ static void animsys_evaluate_nla(ListBase *echannels, PointerRNA *ptr, AnimData
/* 3. free temporary evaluation data that's not used elsewhere */
BLI_freelistN(&estrips);
+
+ /* Tag ID as updated so render engines will recognize changes in data
+ * which is nimated but doesn't have actions.
+ */
+ if (ptr->id.data != NULL) {
+ ID *id = ptr->id.data;
+ if (!(id->flag & LIB_ANIM_NO_RECALC)) {
+ id->flag |= LIB_ID_RECALC;
+ DAG_id_type_tag(G.main, GS(id->name));
+ }
+ }
}
/* NLA Evaluation function (mostly for use through do_animdata)
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 2f8690a8c40..d80529ee780 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -3375,7 +3375,7 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
unit_m4(ct->matrix);
if (target != NULL) {
- space_transform_from_matrixs(&transform, cob->matrix, ct->tar->obmat);
+ BLI_space_transform_from_matrices(&transform, cob->matrix, ct->tar->obmat);
switch (scon->shrinkType) {
case MOD_SHRINKWRAP_NEAREST_SURFACE:
@@ -3397,7 +3397,7 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
break;
}
- space_transform_apply(&transform, co);
+ BLI_space_transform_apply(&transform, co);
BLI_bvhtree_find_nearest(treeData.tree, co, &nearest, treeData.nearest_callback, &treeData);
@@ -3405,7 +3405,7 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra
if (dist != 0.0f) {
interp_v3_v3v3(co, co, nearest.co, (dist - scon->dist) / dist); /* linear interpolation */
}
- space_transform_invert(&transform, co);
+ BLI_space_transform_invert(&transform, co);
break;
}
case MOD_SHRINKWRAP_PROJECT:
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index aaf001316b1..5e01f9add1e 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -705,7 +705,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
ListBase *duplilist;
DupliObject *dob;
duplilist = object_duplilist(G.main->eval_ctx, scene, ob);
- for (dob= duplilist->first; dob; dob = dob->next) {
+ for (dob = duplilist->first; dob; dob = dob->next) {
node2 = dag_get_node(dag, dob->ob);
dag_add_relation(dag, node, node2, DAG_RL_DATA_DATA | DAG_RL_OB_DATA, "Object Font");
}
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index 3188676fb6c..95bfd72c9df 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -64,7 +64,7 @@ static char idp_size_table[] = {
/** \name IDP Array API
* \{ */
-#define GETPROP(prop, i) (((IDProperty *)(prop)->data.pointer) + (i))
+#define GETPROP(prop, i) &(IDP_IDPArray(prop)[i])
/* --------- property array type -------------*/
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index 757b4575b4b..d2a4d15a2c6 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -66,57 +66,6 @@
/* Util macros */
#define OUT_OF_MEMORY() ((void)printf("Shrinkwrap: Out of memory\n"))
-/* get derived mesh */
-/* TODO is anyfunction that does this? returning the derivedFinal without we caring if its in edit mode or not? */
-DerivedMesh *object_get_derived_final(Object *ob, bool for_render)
-{
- Mesh *me = ob->data;
- BMEditMesh *em = me->edit_btmesh;
-
- if (for_render) {
- /* TODO(sergey): use proper derived render here in the future. */
- return ob->derivedFinal;
- }
-
- if (em) {
- DerivedMesh *dm = em->derivedFinal;
- return dm;
- }
-
- return ob->derivedFinal;
-}
-
-/* Space transform */
-void space_transform_from_matrixs(SpaceTransform *data, float local[4][4], float target[4][4])
-{
- float itarget[4][4];
- invert_m4_m4(itarget, target);
- mul_m4_m4m4(data->local2target, itarget, local);
- invert_m4_m4(data->target2local, data->local2target);
-}
-
-void space_transform_apply(const SpaceTransform *data, float co[3])
-{
- mul_v3_m4v3(co, ((SpaceTransform *)data)->local2target, co);
-}
-
-void space_transform_invert(const SpaceTransform *data, float co[3])
-{
- mul_v3_m4v3(co, ((SpaceTransform *)data)->target2local, co);
-}
-
-static void space_transform_apply_normal(const SpaceTransform *data, float no[3])
-{
- mul_mat3_m4_v3(((SpaceTransform *)data)->local2target, no);
- normalize_v3(no); /* TODO: could we just determine de scale value from the matrix? */
-}
-
-static void space_transform_invert_normal(const SpaceTransform *data, float no[3])
-{
- mul_mat3_m4_v3(((SpaceTransform *)data)->target2local, no);
- normalize_v3(no); /* TODO: could we just determine de scale value from the matrix? */
-}
-
/*
* Shrinkwrap to the nearest vertex
*
@@ -159,7 +108,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
else {
copy_v3_v3(tmp_co, co);
}
- space_transform_apply(&calc->local2target, tmp_co);
+ BLI_space_transform_apply(&calc->local2target, tmp_co);
/* Use local proximity heuristics (to reduce the nearest search)
*
@@ -185,7 +134,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
/* Convert the coordinates back to mesh coordinates */
copy_v3_v3(tmp_co, nearest.co);
- space_transform_invert(&calc->local2target, tmp_co);
+ BLI_space_transform_invert(&calc->local2target, tmp_co);
interp_v3_v3v3(co, co, tmp_co, weight); /* linear interpolation */
}
@@ -224,11 +173,11 @@ bool BKE_shrinkwrap_project_normal(
/* Apply space transform (TODO readjust dist) */
if (transf) {
copy_v3_v3(tmp_co, vert);
- space_transform_apply(transf, tmp_co);
+ BLI_space_transform_apply(transf, tmp_co);
co = tmp_co;
copy_v3_v3(tmp_no, dir);
- space_transform_apply_normal(transf, tmp_no);
+ BLI_space_transform_apply_normal(transf, tmp_no);
no = tmp_no;
#ifdef USE_DIST_CORRECT
@@ -247,7 +196,7 @@ bool BKE_shrinkwrap_project_normal(
if (hit_tmp.index != -1) {
/* invert the normal first so face culling works on rotated objects */
if (transf) {
- space_transform_invert_normal(transf, hit_tmp.no);
+ BLI_space_transform_invert_normal(transf, hit_tmp.no);
}
if (options & (MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE | MOD_SHRINKWRAP_CULL_TARGET_BACKFACE)) {
@@ -262,7 +211,7 @@ bool BKE_shrinkwrap_project_normal(
if (transf) {
/* Inverting space transform (TODO make coeherent with the initial dist readjust) */
- space_transform_invert(transf, hit_tmp.co);
+ BLI_space_transform_invert(transf, hit_tmp.co);
#ifdef USE_DIST_CORRECT
hit_tmp.dist = len_v3v3(vert, hit_tmp.co);
#endif
@@ -327,7 +276,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc, bool for
auxMesh = object_get_derived_final(calc->smd->auxTarget, for_render);
if (!auxMesh)
return;
- SPACE_TRANSFORM_SETUP(&local2aux, calc->ob, calc->smd->auxTarget);
+ BLI_SPACE_TRANSFORM_SETUP(&local2aux, calc->ob, calc->smd->auxTarget);
}
/* After sucessufuly build the trees, start projection vertexs */
@@ -461,7 +410,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
else {
copy_v3_v3(tmp_co, co);
}
- space_transform_apply(&calc->local2target, tmp_co);
+ BLI_space_transform_apply(&calc->local2target, tmp_co);
/* Use local proximity heuristics (to reduce the nearest search)
*
@@ -495,7 +444,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
}
/* Convert the coordinates back to mesh coordinates */
- space_transform_invert(&calc->local2target, tmp_co);
+ BLI_space_transform_invert(&calc->local2target, tmp_co);
interp_v3_v3v3(co, co, tmp_co, weight); /* linear interpolation */
}
}
@@ -538,7 +487,7 @@ void shrinkwrapModifier_deform(ShrinkwrapModifierData *smd, Object *ob, DerivedM
/* TODO there might be several "bugs" on non-uniform scales matrixs
* because it will no longer be nearest surface, not sphere projection
* because space has been deformed */
- SPACE_TRANSFORM_SETUP(&calc.local2target, ob, smd->target);
+ BLI_SPACE_TRANSFORM_SETUP(&calc.local2target, ob, smd->target);
/* TODO: smd->keepDist is in global units.. must change to local */
calc.keepDist = smd->keepDist;
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index 68d8e3b9499..7bcaab1f939 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -224,6 +224,22 @@ bool is_negative_m4(float mat[4][4]);
bool is_zero_m3(float mat[3][3]);
bool is_zero_m4(float mat[4][4]);
+/* SpaceTransform helper */
+typedef struct SpaceTransform {
+ float local2target[4][4];
+ float target2local[4][4];
+
+} SpaceTransform;
+
+void BLI_space_transform_from_matrices(struct SpaceTransform *data, float local[4][4], float target[4][4]);
+void BLI_space_transform_apply(const struct SpaceTransform *data, float co[3]);
+void BLI_space_transform_invert(const struct SpaceTransform *data, float co[3]);
+void BLI_space_transform_apply_normal(const struct SpaceTransform *data, float no[3]);
+void BLI_space_transform_invert_normal(const struct SpaceTransform *data, float no[3]);
+
+#define BLI_SPACE_TRANSFORM_SETUP(data, local, target) \
+ BLI_space_transform_from_matrices((data), (local)->obmat, (target)->obmat)
+
/*********************************** Other ***********************************/
void print_m3(const char *str, float M[3][3]);
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 564b31f974a..5937880665d 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -174,10 +174,16 @@
(void)__tmp; \
}))
+#define CHECK_TYPE_NONCONST(var) { \
+ void *non_const = ((__typeof(var))NULL); \
+ (void)non_const; \
+} (void)0
+
#else
# define CHECK_TYPE(var, type)
# define CHECK_TYPE_PAIR(var_a, var_b)
# define CHECK_TYPE_PAIR_INLINE(var_a, var_b) (void)0
+# define CHECK_TYPE_NONCONST(var) (void)0
#endif
/* can be used in simple macros */
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 54bee803f9c..152b31754bb 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -2215,3 +2215,51 @@ void invert_m4_m4_safe(float Ainv[4][4], float A[4][4])
}
}
}
+
+/**
+ * SpaceTransform struct encapsulates all needed data to convert between two coordinate spaces
+ * (where conversion can be represented by a matrix multiplication).
+ *
+ * A SpaceTransform is initialized using:
+ * BLI_SPACE_TRANSFORM_SETUP(&data, ob1, ob2)
+ *
+ * After that the following calls can be used:
+ * BLI_space_transform_apply(&data, co); // converts a coordinate in ob1 space to the corresponding ob2 space
+ * BLI_space_transform_invert(&data, co); // converts a coordinate in ob2 space to the corresponding ob1 space
+ *
+ * Same concept as BLI_space_transform_apply and BLI_space_transform_invert, but no is normalized after conversion
+ * (and not translated at all!):
+ * BLI_space_transform_apply_normal(&data, no);
+ * BLI_space_transform_invert_normal(&data, no);
+ *
+ */
+
+void BLI_space_transform_from_matrices(SpaceTransform *data, float local[4][4], float target[4][4])
+{
+ float itarget[4][4];
+ invert_m4_m4(itarget, target);
+ mul_m4_m4m4(data->local2target, itarget, local);
+ invert_m4_m4(data->target2local, data->local2target);
+}
+
+void BLI_space_transform_apply(const SpaceTransform *data, float co[3])
+{
+ mul_v3_m4v3(co, ((SpaceTransform *)data)->local2target, co);
+}
+
+void BLI_space_transform_invert(const SpaceTransform *data, float co[3])
+{
+ mul_v3_m4v3(co, ((SpaceTransform *)data)->target2local, co);
+}
+
+void BLI_space_transform_apply_normal(const SpaceTransform *data, float no[3])
+{
+ mul_mat3_m4_v3(((SpaceTransform *)data)->local2target, no);
+ normalize_v3(no);
+}
+
+void BLI_space_transform_invert_normal(const SpaceTransform *data, float no[3])
+{
+ mul_mat3_m4_v3(((SpaceTransform *)data)->target2local, no);
+ normalize_v3(no);
+}
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index bcc51fc15a2..a7fa443cfc4 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1175,7 +1175,13 @@ static bool get_path_local(char *targetpath, const char *folder_name, const char
}
/* try EXECUTABLE_DIR/2.5x/folder_name - new default directory for local blender installed files */
+#ifdef __APPLE__
+ static char osx_resourses[FILE_MAX]; /* due new codesign situation in OSX > 10.9.5 we must move the blender_version dir with contents to Resources */
+ sprintf(osx_resourses, "%s../Resources", bprogdir);
+ return test_path(targetpath, osx_resourses, blender_version_decimal(ver), relfolder);
+#else
return test_path(targetpath, bprogdir, blender_version_decimal(ver), relfolder);
+#endif
}
/**
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index aa705aaf63e..eeafc1a9e8f 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -648,7 +648,7 @@ int BLI_str_rstrip_float_zero(char *str, const char pad)
* \param str_array_len The length of the array, or -1 for a NULL-terminated array.
* \return The index of str in str_array or -1.
*/
-int BLI_str_index_in_array_n(const char *str, const char **str_array, const int str_array_len)
+int BLI_str_index_in_array_n(const char *__restrict str, const char **__restrict str_array, const int str_array_len)
{
int index;
const char **str_iter = str_array;
@@ -668,7 +668,7 @@ int BLI_str_index_in_array_n(const char *str, const char **str_array, const int
* \param str_array Array of strings, (must be NULL-terminated).
* \return The index of str in str_array or -1.
*/
-int BLI_str_index_in_array(const char *str, const char **str_array)
+int BLI_str_index_in_array(const char *__restrict str, const char **__restrict str_array)
{
int index;
const char **str_iter = str_array;
diff --git a/source/blender/bmesh/bmesh_class.h b/source/blender/bmesh/bmesh_class.h
index 01745396cd1..39359b97a4e 100644
--- a/source/blender/bmesh/bmesh_class.h
+++ b/source/blender/bmesh/bmesh_class.h
@@ -285,8 +285,8 @@ extern void bpy_bm_generic_invalidate(struct BPy_BMGeneric *self);
typedef bool (*BMElemFilterFunc)(BMElem *, void *user_data);
/* defines */
-#define BM_ELEM_CD_SET_INT(ele, offset, f) \
- { assert(offset != -1); *((int *)((char *)(ele)->head.data + (offset))) = (f); } (void)0
+#define BM_ELEM_CD_SET_INT(ele, offset, f) { CHECK_TYPE_NONCONST(ele); \
+ assert(offset != -1); *((int *)((char *)(ele)->head.data + (offset))) = (f); } (void)0
#define BM_ELEM_CD_GET_INT(ele, offset) \
(assert(offset != -1), *((int *)((char *)(ele)->head.data + (offset))))
@@ -294,8 +294,8 @@ typedef bool (*BMElemFilterFunc)(BMElem *, void *user_data);
#define BM_ELEM_CD_GET_VOID_P(ele, offset) \
(assert(offset != -1), (void *)((char *)(ele)->head.data + (offset)))
-#define BM_ELEM_CD_SET_FLOAT(ele, offset, f) \
- { assert(offset != -1); *((float *)((char *)(ele)->head.data + (offset))) = (f); } (void)0
+#define BM_ELEM_CD_SET_FLOAT(ele, offset, f) { CHECK_TYPE_NONCONST(ele); \
+ assert(offset != -1); *((float *)((char *)(ele)->head.data + (offset))) = (f); } (void)0
#define BM_ELEM_CD_GET_FLOAT(ele, offset) \
(assert(offset != -1), *((float *)((char *)(ele)->head.data + (offset))))
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index 61386615934..76284ba44de 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -70,7 +70,8 @@
/* ***************** Pose Select Utilities ********************* */
/* Note: SEL_TOGGLE is assumed to have already been handled! */
-static void pose_do_bone_select(bPoseChannel *pchan, const int select_mode) {
+static void pose_do_bone_select(bPoseChannel *pchan, const int select_mode)
+{
/* select pchan only if selectable, but deselect works always */
switch (select_mode) {
case SEL_SELECT:
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 4db22154e68..b0371b8dd6c 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -1165,7 +1165,7 @@ int ED_curve_updateAnimPaths(Curve *cu)
/* ********************* LOAD and MAKE *************** */
-static int *initialize_index_map(Object *obedit, int *r_old_totvert, bool reverse)
+static int *initialize_index_map(Object *obedit, int *r_old_totvert)
{
Curve *curve = (Curve *) obedit->data;
EditNurb *editnurb = curve->editnurb;
@@ -1200,29 +1200,15 @@ static int *initialize_index_map(Object *obedit, int *r_old_totvert, bool revers
while (a--) {
keyIndex = getCVKeyIndex(editnurb, bezt);
if (keyIndex) {
- if (reverse) {
- if (keyIndex->switched) {
- old_to_new_map[vertex_index] = keyIndex->vertex_index + 2;
- old_to_new_map[vertex_index + 1] = keyIndex->vertex_index + 1;
- old_to_new_map[vertex_index + 2] = keyIndex->vertex_index;
- }
- else {
- old_to_new_map[vertex_index] = keyIndex->vertex_index;
- old_to_new_map[vertex_index + 1] = keyIndex->vertex_index + 1;
- old_to_new_map[vertex_index + 2] = keyIndex->vertex_index + 2;
- }
+ if (keyIndex->switched) {
+ old_to_new_map[keyIndex->vertex_index] = vertex_index + 2;
+ old_to_new_map[keyIndex->vertex_index + 1] = vertex_index + 1;
+ old_to_new_map[keyIndex->vertex_index + 2] = vertex_index;
}
else {
- if (keyIndex->switched) {
- old_to_new_map[keyIndex->vertex_index] = vertex_index + 2;
- old_to_new_map[keyIndex->vertex_index + 1] = vertex_index + 1;
- old_to_new_map[keyIndex->vertex_index + 2] = vertex_index;
- }
- else {
- old_to_new_map[keyIndex->vertex_index] = vertex_index;
- old_to_new_map[keyIndex->vertex_index + 1] = vertex_index + 1;
- old_to_new_map[keyIndex->vertex_index + 2] = vertex_index + 2;
- }
+ old_to_new_map[keyIndex->vertex_index] = vertex_index;
+ old_to_new_map[keyIndex->vertex_index + 1] = vertex_index + 1;
+ old_to_new_map[keyIndex->vertex_index + 2] = vertex_index + 2;
}
}
vertex_index += 3;
@@ -1236,12 +1222,7 @@ static int *initialize_index_map(Object *obedit, int *r_old_totvert, bool revers
while (a--) {
keyIndex = getCVKeyIndex(editnurb, bp);
if (keyIndex) {
- if (reverse) {
- old_to_new_map[vertex_index] = keyIndex->vertex_index;
- }
- else {
- old_to_new_map[keyIndex->vertex_index] = vertex_index;
- }
+ old_to_new_map[keyIndex->vertex_index] = vertex_index;
}
vertex_index++;
bp++;
@@ -1253,7 +1234,7 @@ static int *initialize_index_map(Object *obedit, int *r_old_totvert, bool revers
return old_to_new_map;
}
-static void remap_hooks_and_vertex_parents(Object *obedit, bool reverse)
+static void remap_hooks_and_vertex_parents(Object *obedit)
{
Object *object;
Curve *curve = (Curve *) obedit->data;
@@ -1268,9 +1249,7 @@ static void remap_hooks_and_vertex_parents(Object *obedit, bool reverse)
ELEM(object->partype, PARVERT1, PARVERT3))
{
if (old_to_new_map == NULL) {
- old_to_new_map = initialize_index_map(obedit,
- &old_totvert,
- reverse);
+ old_to_new_map = initialize_index_map(obedit, &old_totvert);
}
if (object->par1 < old_totvert) {
@@ -1299,9 +1278,7 @@ static void remap_hooks_and_vertex_parents(Object *obedit, bool reverse)
int i, j;
if (old_to_new_map == NULL) {
- old_to_new_map = initialize_index_map(obedit,
- &old_totvert,
- reverse);
+ old_to_new_map = initialize_index_map(obedit, &old_totvert);
}
for (i = j = 0; i < hmd->totindex; i++) {
@@ -1338,6 +1315,8 @@ void load_editNurb(Object *obedit)
Nurb *nu, *newnu;
ListBase newnurb = {NULL, NULL}, oldnurb = cu->nurb;
+ remap_hooks_and_vertex_parents(obedit);
+
for (nu = editnurb->first; nu; nu = nu->next) {
newnu = BKE_nurb_duplicate(nu);
BLI_addtail(&newnurb, newnu);
@@ -6892,9 +6871,8 @@ void CURVE_OT_tilt_clear(wmOperatorType *ot)
/****************** undo for curves ****************/
-static void undoCurve_to_editCurve(void *ucu, void *edata, void *cu_v)
+static void undoCurve_to_editCurve(void *ucu, void *UNUSED(edata), void *cu_v)
{
- Object *obedit = (Object *) edata;
Curve *cu = cu_v;
UndoCurve *undoCurve = ucu;
ListBase *undobase = &undoCurve->nubase;
@@ -6903,8 +6881,6 @@ static void undoCurve_to_editCurve(void *ucu, void *edata, void *cu_v)
EditNurb *editnurb = cu->editnurb;
AnimData *ad = BKE_animdata_from_id(&cu->id);
- remap_hooks_and_vertex_parents(obedit, true);
-
BKE_nurbList_free(editbase);
if (undoCurve->undoIndex) {
@@ -6938,9 +6914,8 @@ static void undoCurve_to_editCurve(void *ucu, void *edata, void *cu_v)
ED_curve_updateAnimPaths(cu);
}
-static void *editCurve_to_undoCurve(void *edata, void *cu_v)
+static void *editCurve_to_undoCurve(void *UNUSED(edata), void *cu_v)
{
- Object *obedit = (Object *) edata;
Curve *cu = cu_v;
ListBase *nubase = BKE_curve_editNurbs_get(cu);
UndoCurve *undoCurve;
@@ -6976,8 +6951,6 @@ static void *editCurve_to_undoCurve(void *edata, void *cu_v)
undoCurve->actvert = cu->actvert;
undoCurve->actnu = cu->actnu;
- remap_hooks_and_vertex_parents(obedit, false);
-
return undoCurve;
}
diff --git a/source/blender/editors/include/BIF_gl.h b/source/blender/editors/include/BIF_gl.h
index 477a7c0ce17..4258bbcd359 100644
--- a/source/blender/editors/include/BIF_gl.h
+++ b/source/blender/editors/include/BIF_gl.h
@@ -58,8 +58,24 @@
* */
void cpack(unsigned int x);
-#define glMultMatrixf(x) glMultMatrixf( (float *)(x))
-#define glLoadMatrixf(x) glLoadMatrixf( (float *)(x))
+
+#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
+# define glMultMatrixf(x) \
+ glMultMatrixf(_Generic(x, \
+ float *: (float *)(x), \
+ float (*)[4]: (float *)(x), \
+ const float *: (float *)(x), \
+ const float (*)[4]: (float *)(x)) \
+)
+# define glLoadMatrixf(x) \
+ glLoadMatrixf(_Generic(x, \
+ float *: (float *)(x), \
+ float (*)[4]: (float *)(x)) \
+)
+#else
+# define glMultMatrixf(x) glMultMatrixf((float *)(x))
+# define glLoadMatrixf(x) glLoadMatrixf((float *)(x))
+#endif
#define GLA_PIXEL_OFS 0.375f
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 3609abf6cb5..92bbd9482e2 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -3496,7 +3496,9 @@ static int edbm_dissolve_verts_exec(bContext *C, wmOperator *op)
if (!EDBM_op_callf(em, op,
"dissolve_verts verts=%hv use_face_split=%b use_boundary_tear=%b",
BM_ELEM_SELECT, use_face_split, use_boundary_tear))
+ {
return OPERATOR_CANCELLED;
+ }
EDBM_update_generic(em, true, true);
diff --git a/source/blender/editors/object/object_bake_api.c b/source/blender/editors/object/object_bake_api.c
index 57b7bab2275..66236bf9ace 100644
--- a/source/blender/editors/object/object_bake_api.c
+++ b/source/blender/editors/object/object_bake_api.c
@@ -178,7 +178,7 @@ static bool write_internal_bake_pixels(
void *lock;
bool is_float;
char *mask_buffer = NULL;
- const size_t num_pixels = width * height;
+ const size_t num_pixels = (size_t)width * (size_t)height;
ibuf = BKE_image_acquire_ibuf(image, NULL, &lock);
diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c
index eebb687aa8d..229f4911ab4 100644
--- a/source/blender/modifiers/intern/MOD_shrinkwrap.c
+++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c
@@ -37,6 +37,7 @@
#include "DNA_object_types.h"
+#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c
index ccba2097264..3314196b776 100644
--- a/source/blender/modifiers/intern/MOD_simpledeform.c
+++ b/source/blender/modifiers/intern/MOD_simpledeform.c
@@ -42,7 +42,6 @@
#include "BKE_cdderivedmesh.h"
#include "BKE_modifier.h"
#include "BKE_deform.h"
-#include "BKE_shrinkwrap.h"
#include "depsgraph_private.h"
@@ -166,7 +165,7 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object
/* Calculate matrixs do convert between coordinate spaces */
if (smd->origin) {
transf = &tmp_transf;
- space_transform_from_matrixs(transf, ob->obmat, smd->origin->obmat);
+ BLI_SPACE_TRANSFORM_SETUP(transf, ob, smd->origin);
}
/* Setup vars,
@@ -182,7 +181,9 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object
float tmp[3];
copy_v3_v3(tmp, vertexCos[i]);
- if (transf) space_transform_apply(transf, tmp);
+ if (transf) {
+ BLI_space_transform_apply(transf, tmp);
+ }
lower = min_ff(lower, tmp[limit_axis]);
upper = max_ff(upper, tmp[limit_axis]);
@@ -220,7 +221,7 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object
float co[3], dcut[3] = {0.0f, 0.0f, 0.0f};
if (transf) {
- space_transform_apply(transf, vertexCos[i]);
+ BLI_space_transform_apply(transf, vertexCos[i]);
}
copy_v3_v3(co, vertexCos[i]);
@@ -236,7 +237,7 @@ static void SimpleDeformModifier_do(SimpleDeformModifierData *smd, struct Object
interp_v3_v3v3(vertexCos[i], vertexCos[i], co, weight); /* Use vertex weight has coef of linear interpolation */
if (transf) {
- space_transform_invert(transf, vertexCos[i]);
+ BLI_space_transform_invert(transf, vertexCos[i]);
}
}
}
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index 06b29d15f2e..010fe1d5a29 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -43,7 +43,6 @@
#include "BKE_deform.h"
#include "BKE_library.h"
#include "BKE_modifier.h"
-#include "BKE_shrinkwrap.h" /* For SpaceTransform stuff. */
#include "BKE_texture.h" /* Texture masking. */
#include "depsgraph_private.h"
@@ -73,12 +72,12 @@ static void get_vert2geom_distance(int numVerts, float (*v_cos)[3],
DerivedMesh *target, const SpaceTransform *loc2trgt)
{
int i;
- BVHTreeFromMesh treeData_v = NULL_BVHTreeFromMesh;
- BVHTreeFromMesh treeData_e = NULL_BVHTreeFromMesh;
- BVHTreeFromMesh treeData_f = NULL_BVHTreeFromMesh;
- BVHTreeNearest nearest_v = NULL_BVHTreeNearest;
- BVHTreeNearest nearest_e = NULL_BVHTreeNearest;
- BVHTreeNearest nearest_f = NULL_BVHTreeNearest;
+ BVHTreeFromMesh treeData_v = {0};
+ BVHTreeFromMesh treeData_e = {0};
+ BVHTreeFromMesh treeData_f = {0};
+ BVHTreeNearest nearest_v = {0};
+ BVHTreeNearest nearest_e = {0};
+ BVHTreeNearest nearest_f = {0};
if (dist_v) {
/* Create a bvh-tree of the given target's verts. */
@@ -120,7 +119,7 @@ static void get_vert2geom_distance(int numVerts, float (*v_cos)[3],
/* Convert the vertex to tree coordinates. */
copy_v3_v3(tmp_co, v_cos[i]);
- space_transform_apply(loc2trgt, tmp_co);
+ BLI_space_transform_apply(loc2trgt, tmp_co);
/* Use local proximity heuristics (to reduce the nearest search).
*
@@ -484,7 +483,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *der
float *dists_e = use_trgt_edges ? MEM_mallocN(sizeof(float) * numIdx, "dists_e") : NULL;
float *dists_f = use_trgt_faces ? MEM_mallocN(sizeof(float) * numIdx, "dists_f") : NULL;
- SPACE_TRANSFORM_SETUP(&loc2trgt, ob, obr);
+ BLI_SPACE_TRANSFORM_SETUP(&loc2trgt, ob, obr);
get_vert2geom_distance(numIdx, v_cos, dists_v, dists_e, dists_f,
target_dm, &loc2trgt);
for (i = 0; i < numIdx; i++) {
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index a6970444947..bd9fc90abaf 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -274,7 +274,7 @@ elseif(APPLE)
if(WITH_PYTHON_MODULE)
set(TARGETDIR_VER ${TARGETDIR}/${BLENDER_VERSION})
else()
- set(TARGETDIR_VER ${TARGETDIR}/blender.app/Contents/MacOS/${BLENDER_VERSION})
+ set(TARGETDIR_VER ${TARGETDIR}/blender.app/Contents/Resources/${BLENDER_VERSION})
endif()
endif()