From b4df54151a5fe9e81e44bb75f6c9b3026b13d2e9 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Tue, 16 Aug 2011 08:40:25 +0000 Subject: [PATCH 01/16] 2.6 Node Muting: * Removing check if Node is in between, so in-/output nodes can be muted as well. Useful for example if you want to temporarily mute a file output node. --- source/blender/editors/space_node/node_edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index e8fc13e340e..9cafc46ca53 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -3007,10 +3007,10 @@ static int node_mute_exec(bContext *C, wmOperator *UNUSED(op)) for(node= snode->edittree->nodes.first; node; node= node->next) { if(node->flag & SELECT) { - if(node->inputs.first && node->outputs.first) { + /* Be able to mute in-/output nodes as well. - DingTo + if(node->inputs.first && node->outputs.first) { */ node->flag ^= NODE_MUTED; snode_tag_changed(snode, node); - } } } From 93f135cfda5d8f9872e241920d24786af5d64bee Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Aug 2011 09:36:15 +0000 Subject: [PATCH 02/16] added cmake configureation presets, so on *nix systems you can do... # minal blender with debug info make debug lite # blender with no ui make headless # blender as a python module make bpy --- GNUmakefile | 24 ++++++++--- .../cmake/config/blender_headless.cmake | 24 +++++++++++ build_files/cmake/config/blender_lite.cmake | 43 +++++++++++++++++++ build_files/cmake/config/bpy_module.cmake | 34 +++++++++++++++ 4 files changed, 119 insertions(+), 6 deletions(-) create mode 100644 build_files/cmake/config/blender_headless.cmake create mode 100644 build_files/cmake/config/blender_lite.cmake create mode 100644 build_files/cmake/config/bpy_module.cmake diff --git a/GNUmakefile b/GNUmakefile index b6741d7e5f0..efdb9e05e28 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -35,16 +35,26 @@ OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]') # Source and Build DIR's BLENDER_DIR:=$(shell pwd -P) BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build/$(OS_NCASE) - +BUILD_TYPE:=Release +BUILD_CMAKE_ARGS:="" # support 'make debug' ifneq "$(findstring debug, $(MAKECMDGOALS))" "" BUILD_DIR:=$(BUILD_DIR)_debug BUILD_TYPE:=Debug -else - BUILD_TYPE:=Release endif - +ifneq "$(findstring lite, $(MAKECMDGOALS))" "" + BUILD_DIR:=$(BUILD_DIR)_lite + BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake +endif +ifneq "$(findstring headless, $(MAKECMDGOALS))" "" + BUILD_DIR:=$(BUILD_DIR)_bpy + BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake +endif +ifneq "$(findstring bpy, $(MAKECMDGOALS))" "" + BUILD_DIR:=$(BUILD_DIR)_bpy + BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake +endif # Get the number of cores for threaded build NPROCS:=1 @@ -68,7 +78,7 @@ all: @echo Configuring Blender ... if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \ - cmake -H$(BLENDER_DIR) -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE) ; \ + cmake $(BUILD_CMAKE_ARGS) -H$(BLENDER_DIR) -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE); \ fi @echo @@ -80,7 +90,9 @@ all: @echo debug: all - # pass +lite: all +headless: all +bpy: all # package types package_debian: diff --git a/build_files/cmake/config/blender_headless.cmake b/build_files/cmake/config/blender_headless.cmake new file mode 100644 index 00000000000..bd69eed30dd --- /dev/null +++ b/build_files/cmake/config/blender_headless.cmake @@ -0,0 +1,24 @@ +# headless configuration, useful in for servers or renderfarms +# builds without a windowing system (X11/Windows/Cocoa). +# +# Example usage: +# cmake -C../blender/build_files/cmake/config/blender_headless.cmake ../blender +# + +set(WITH_HEADLESS ON CACHE FORCE BOOL) +set(WITH_GAMEENGINE OFF CACHE FORCE BOOL) + +# disable audio, its possible some devs may want this but for now disable +# so the python module doesnt hold the audio device and loads quickly. +set(WITH_AUDASPACE OFF CACHE FORCE BOOL) +set(WITH_SAMPLERATE OFF CACHE FORCE BOOL) +set(WITH_FFTW3 OFF CACHE FORCE BOOL) +set(WITH_JACK OFF CACHE FORCE BOOL) +set(WITH_SDL OFF CACHE FORCE BOOL) +set(WITH_OPENAL OFF CACHE FORCE BOOL) +set(WITH_CODEC_FFMPEG OFF CACHE FORCE BOOL) +set(WITH_CODEC_SNDFILE OFF CACHE FORCE BOOL) + +# other features which are not especially useful as a python module +set(WITH_X11_XINPUT OFF CACHE FORCE BOOL) +set(WITH_INPUT_NDOF OFF CACHE FORCE BOOL) diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake new file mode 100644 index 00000000000..d2b791baede --- /dev/null +++ b/build_files/cmake/config/blender_lite.cmake @@ -0,0 +1,43 @@ +# turn everything OFF CACHE FORCE BOOL) except for python which defaults to ON +# and is needed for the UI +# +# Example usage: +# cmake -C../blender/build_files/cmake/config/blender_lite.cmake ../blender +# + +set(WITH_INSTALL_PORTABLE ON CACHE FORCE BOOL) + +set(WITH_BUILDINFO OFF CACHE FORCE BOOL) +set(WITH_BUILTIN_GLEW OFF CACHE FORCE BOOL) +set(WITH_BULLET OFF CACHE FORCE BOOL) +set(WITH_CODEC_FFMPEG OFF CACHE FORCE BOOL) +set(WITH_CODEC_SNDFILE OFF CACHE FORCE BOOL) +set(WITH_FFTW3 OFF CACHE FORCE BOOL) +set(WITH_GAMEENGINE OFF CACHE FORCE BOOL) +set(WITH_IK_ITASC OFF CACHE FORCE BOOL) +set(WITH_IMAGE_CINEON OFF CACHE FORCE BOOL) +set(WITH_IMAGE_DDS OFF CACHE FORCE BOOL) +set(WITH_IMAGE_FRAMESERVER OFF CACHE FORCE BOOL) +set(WITH_IMAGE_HDR OFF CACHE FORCE BOOL) +set(WITH_IMAGE_OPENEXR OFF CACHE FORCE BOOL) +set(WITH_IMAGE_OPENJPEG OFF CACHE FORCE BOOL) +set(WITH_IMAGE_REDCODE OFF CACHE FORCE BOOL) +set(WITH_IMAGE_TIFF OFF CACHE FORCE BOOL) +set(WITH_INPUT_NDOF OFF CACHE FORCE BOOL) +set(WITH_INTERNATIONAL OFF CACHE FORCE BOOL) +set(WITH_JACK OFF CACHE FORCE BOOL) +set(WITH_LZMA OFF CACHE FORCE BOOL) +set(WITH_LZO OFF CACHE FORCE BOOL) +set(WITH_MOD_BOOLEAN OFF CACHE FORCE BOOL) +set(WITH_MOD_DECIMATE OFF CACHE FORCE BOOL) +set(WITH_MOD_FLUID OFF CACHE FORCE BOOL) +set(WITH_MOD_SMOKE OFF CACHE FORCE BOOL) +set(WITH_AUDASPACE OFF CACHE FORCE BOOL) +set(WITH_OPENAL OFF CACHE FORCE BOOL) +set(WITH_OPENCOLLADA OFF CACHE FORCE BOOL) +set(WITH_OPENMP OFF CACHE FORCE BOOL) +set(WITH_PYTHON_INSTALL OFF CACHE FORCE BOOL) +set(WITH_RAYOPTIMIZATION OFF CACHE FORCE BOOL) +set(WITH_SAMPLERATE OFF CACHE FORCE BOOL) +set(WITH_SDL OFF CACHE FORCE BOOL) +set(WITH_X11_XINPUT OFF CACHE FORCE BOOL) diff --git a/build_files/cmake/config/bpy_module.cmake b/build_files/cmake/config/bpy_module.cmake new file mode 100644 index 00000000000..5392705f0dc --- /dev/null +++ b/build_files/cmake/config/bpy_module.cmake @@ -0,0 +1,34 @@ +# defaults for building blender as a python module 'bpy' +# +# Example usage: +# cmake -C../blender/build_files/cmake/config/bpy_module.cmake ../blender +# + +set(WITH_PYTHON_MODULE ON CACHE FORCE BOOL) + +# install into the systems python dir +set(WITH_INSTALL_PORTABLE OFF CACHE FORCE BOOL) + +# no point int copying python into python +set(WITH_PYTHON_INSTALL OFF CACHE FORCE BOOL) + +# dont build the game engine +set(WITH_GAMEENGINE OFF CACHE FORCE BOOL) + +# disable audio, its possible some devs may want this but for now disable +# so the python module doesnt hold the audio device and loads quickly. +set(WITH_AUDASPACE OFF CACHE FORCE BOOL) +set(WITH_SAMPLERATE OFF CACHE FORCE BOOL) +set(WITH_FFTW3 OFF CACHE FORCE BOOL) +set(WITH_JACK OFF CACHE FORCE BOOL) +set(WITH_SDL OFF CACHE FORCE BOOL) +set(WITH_OPENAL OFF CACHE FORCE BOOL) +set(WITH_CODEC_FFMPEG OFF CACHE FORCE BOOL) +set(WITH_CODEC_SNDFILE OFF CACHE FORCE BOOL) + +# other features which are not especially useful as a python module +set(WITH_X11_XINPUT OFF CACHE FORCE BOOL) +set(WITH_INPUT_NDOF OFF CACHE FORCE BOOL) +set(WITH_OPENCOLLADA OFF CACHE FORCE BOOL) +set(WITH_INTERNATIONAL OFF CACHE FORCE BOOL) +set(WITH_BULLET OFF CACHE FORCE BOOL) From 989f67f5228b5b92f91d39818b29571f8ed8ec24 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Aug 2011 10:01:19 +0000 Subject: [PATCH 03/16] 'make help' message for the convenience makefile which lists optional targets. --- GNUmakefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/GNUmakefile b/GNUmakefile index efdb9e05e28..7b705e66750 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -126,4 +126,24 @@ test_deprecated: clean: $(MAKE) -C $(BUILD_DIR) clean +help: + @echo "" + @echo "Convenience targets provided for building blender, (multiple at once can be used)" + @echo " * debug - build a debug binary" + @echo " * lite - disable non essential features for a smaller binary and faster build" + @echo " * headless - build without an interface (renderfarm or server automation)" + @echo " * bpy - build as a python module which can be loaded from python directly" + @echo "" + @echo "Package Targets" + @echo " * package_debian - build a debian package" + @echo " * package_pacman - build an arch linux pacmanpackage" + @echo " * package_archive - build an archive package" + @echo "" + @echo "Testing Targets (not assosiated with building blender)" + @echo " * test - run ctest, currently tests import/export, operator execution and that python modules load" + @echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions" + @echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting" + @echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed" + @echo "" + .PHONY: all From c7f9e9a80f474cde25fa3da574b2dd1259700481 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 16 Aug 2011 10:31:28 +0000 Subject: [PATCH 04/16] Fix #28273: Crash playing with Follow path+Bevel+Material Crash was caused by old refactor of displists. Added additional check to makeDispListCurveTypes. --- source/blender/blenkernel/intern/displist.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 8f57490d057..c2ed6468643 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1369,6 +1369,11 @@ void makeDispListCurveTypes(Scene *scene, Object *ob, int forOrco) Curve *cu= ob->data; ListBase *dispbase; + /* The same check for duplis as in do_makeDispListCurveTypes. + Happens when curve used for constraint/bevel was converted to mesh. + check there is still needed for render displist and orco displists. */ + if(!ELEM3(ob->type, OB_SURF, OB_CURVE, OB_FONT)) return; + freedisplist(&(ob->disp)); dispbase= &(ob->disp); freedisplist(dispbase); From b7302f9d5a6f1fdb49b049ef4c4ce9b509e9e585 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Aug 2011 10:34:52 +0000 Subject: [PATCH 05/16] Convenience targets for project files: Project Files for IDE's * project_qtcreator - QtCreator Project Files * project_netbeans - NetBeans Project Files * project_eclipse - Eclipse CDT4 Project Files --- GNUmakefile | 80 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 58 insertions(+), 22 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 7b705e66750..4aaa77ee52d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -38,6 +38,10 @@ BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build/$(OS_NCASE) BUILD_TYPE:=Release BUILD_CMAKE_ARGS:="" + +# ----------------------------------------------------------------------------- +# additional targets for the build configuration + # support 'make debug' ifneq "$(findstring debug, $(MAKECMDGOALS))" "" BUILD_DIR:=$(BUILD_DIR)_debug @@ -56,6 +60,8 @@ ifneq "$(findstring bpy, $(MAKECMDGOALS))" "" BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake endif + +# ----------------------------------------------------------------------------- # Get the number of cores for threaded build NPROCS:=1 ifeq ($(OS), Linux) @@ -72,6 +78,35 @@ ifeq ($(OS), NetBSD) endif +# ----------------------------------------------------------------------------- +# Helo for build targets +help: + @echo "" + @echo "Convenience targets provided for building blender, (multiple at once can be used)" + @echo " * debug - build a debug binary" + @echo " * lite - disable non essential features for a smaller binary and faster build" + @echo " * headless - build without an interface (renderfarm or server automation)" + @echo " * bpy - build as a python module which can be loaded from python directly" + @echo "" + @echo "Project Files for IDE's" + @echo " * project_qtcreator - QtCreator Project Files" + @echo " * project_netbeans - NetBeans Project Files" + @echo " * project_eclipse - Eclipse CDT4 Project Files" + @echo "" + @echo "Package Targets" + @echo " * package_debian - build a debian package" + @echo " * package_pacman - build an arch linux pacmanpackage" + @echo " * package_archive - build an archive package" + @echo "" + @echo "Testing Targets (not assosiated with building blender)" + @echo " * test - run ctest, currently tests import/export, operator execution and that python modules load" + @echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions" + @echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting" + @echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed" + @echo "" + + +# ----------------------------------------------------------------------------- # Build Blender all: @echo @@ -94,7 +129,10 @@ lite: all headless: all bpy: all -# package types + +# ----------------------------------------------------------------------------- +# Packages +# package_debian: cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh @@ -105,7 +143,10 @@ package_archive: make -C $(BUILD_DIR) -s package_archive @echo archive in "$(BUILD_DIR)/release" -# forward build targets + +# ----------------------------------------------------------------------------- +# Tests +# test: cd $(BUILD_DIR) ; ctest . --output-on-failure @@ -123,27 +164,22 @@ test_cmake: test_deprecated: python3 source/tests/check_deprecated.py + +# ----------------------------------------------------------------------------- +# Project Files +# + +project_qtcreator: + python3 build_files/cmake/cmake_qtcreator_project.py $(BUILD_DIR) + +project_netbeans: + python3 build_files/cmake/cmake_netbeans_project.py $(BUILD_DIR) + +project_eclipse: + cmake -G"Eclipse CDT4 - Unix Makefiles" -H$(BLENDER_DIR) -B$(BUILD_DIR) + + clean: $(MAKE) -C $(BUILD_DIR) clean -help: - @echo "" - @echo "Convenience targets provided for building blender, (multiple at once can be used)" - @echo " * debug - build a debug binary" - @echo " * lite - disable non essential features for a smaller binary and faster build" - @echo " * headless - build without an interface (renderfarm or server automation)" - @echo " * bpy - build as a python module which can be loaded from python directly" - @echo "" - @echo "Package Targets" - @echo " * package_debian - build a debian package" - @echo " * package_pacman - build an arch linux pacmanpackage" - @echo " * package_archive - build an archive package" - @echo "" - @echo "Testing Targets (not assosiated with building blender)" - @echo " * test - run ctest, currently tests import/export, operator execution and that python modules load" - @echo " * test_cmake - runs our own cmake file checker which detects errors in the cmake file list definitions" - @echo " * test_pep8 - checks all python script are pep8 which are tagged to use the stricter formatting" - @echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed" - @echo "" - .PHONY: all From f0259542e103d306a1dac5611ccf6c1fda95f0ac Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Tue, 16 Aug 2011 12:37:23 +0000 Subject: [PATCH 06/16] Front/Back togles should not disable when curve is 2D and bevel object is used http://www.pasteall.org/pic/show.php?id=16449 --- release/scripts/startup/bl_ui/properties_data_curve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py index 7bc136c8ce0..6448b9a5229 100644 --- a/release/scripts/startup/bl_ui/properties_data_curve.py +++ b/release/scripts/startup/bl_ui/properties_data_curve.py @@ -109,7 +109,7 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel): if (is_curve or is_text): col.label(text="Fill:") sub = col.column() - sub.active = (curve.bevel_object is None) + sub.active = (curve.dimensions == '2D' or (curve.bevel_object is None and curve.dimensions == '3D')) sub.prop(curve, "use_fill_front") sub.prop(curve, "use_fill_back") col.prop(curve, "use_fill_deform", text="Fill Deformed") From 45cf8d673ee41fd984bae85ac9dfd099d2c71dad Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Aug 2011 13:07:46 +0000 Subject: [PATCH 07/16] add numpad key input for ghost/sdl --- intern/ghost/intern/GHOST_SystemSDL.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/intern/ghost/intern/GHOST_SystemSDL.cpp b/intern/ghost/intern/GHOST_SystemSDL.cpp index aebb94d5cdf..f2cc45731fa 100644 --- a/intern/ghost/intern/GHOST_SystemSDL.cpp +++ b/intern/ghost/intern/GHOST_SystemSDL.cpp @@ -385,8 +385,26 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event) GHOST_TKey gkey= convertSDLKey(sdl_sub_evt.keysym.scancode); /* note, the sdl_sub_evt.keysym.sym is truncated, for unicode support ghost has to be modified */ + /* printf("%d\n", sym); */ if(sym > 127) { - sym= 0; + switch(sym) { + case SDLK_KP_DIVIDE: sym= '/'; break; + case SDLK_KP_MULTIPLY: sym= '*'; break; + case SDLK_KP_MINUS: sym= '-'; break; + case SDLK_KP_PLUS: sym= '+'; break; + case SDLK_KP_1: sym= '1'; break; + case SDLK_KP_2: sym= '2'; break; + case SDLK_KP_3: sym= '3'; break; + case SDLK_KP_4: sym= '4'; break; + case SDLK_KP_5: sym= '5'; break; + case SDLK_KP_6: sym= '6'; break; + case SDLK_KP_7: sym= '7'; break; + case SDLK_KP_8: sym= '8'; break; + case SDLK_KP_9: sym= '9'; break; + case SDLK_KP_0: sym= '0'; break; + case SDLK_KP_PERIOD: sym= '.'; break; + default: sym= 0; break; + } } else { if(sdl_sub_evt.keysym.mod & (KMOD_LSHIFT|KMOD_RSHIFT)) { From e98074d327217d1fcc205aaff995a1bded08971a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Aug 2011 13:10:46 +0000 Subject: [PATCH 08/16] remove support for deprecated Vector() * Matrix(), eventually this will be added back as row_vector_multiplication bu to avoid confusion for a bit just disable it altogether so script authors get an error on use and update their scripts. --- .../python/mathutils/mathutils_Vector.c | 105 ++++++------------ 1 file changed, 36 insertions(+), 69 deletions(-) diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index 9d52f45665f..56c1334ecac 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -37,8 +37,6 @@ #include "BLI_math.h" #include "BLI_utildefines.h" -extern void PyC_LineSpit(void); - #define MAX_DIMENSIONS 4 /* Swizzle axes get packed into a single value that is used as a closure. Each @@ -1161,28 +1159,18 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2) } else if (vec1) { if (MatrixObject_Check(v2)) { - extern void PyC_LineSpit(void); - - /* VEC * MATRIX */ - /* this is deprecated!, use the reverse instead */ - float tvec[MAX_DIMENSIONS]; - /* ------ to be removed ------*/ -#ifndef MATH_STANDALONE -#ifdef WITH_ASSERT_ABORT +#if 1 PyErr_SetString(PyExc_ValueError, "(Vector * Matrix) is now removed, reverse the " "order (promoted to an Error for Debug builds)"); return NULL; #else - printf("Warning: (Vector * Matrix) is now deprecated, " - "reverse the multiplication order in the script.\n"); - PyC_LineSpit(); -#endif -#endif /* ifndef MATH_STANDALONE */ -/* ------ to be removed ------*/ + /* VEC * MATRIX */ + /* this is deprecated!, use the reverse instead */ + float tvec[MAX_DIMENSIONS]; if(BaseMath_ReadCallback((MatrixObject *)v2) == -1) return NULL; @@ -1191,9 +1179,18 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2) } return newVectorObject(tvec, vec1->size, Py_NEW, Py_TYPE(vec1)); +#endif +/* ------ to be removed ------*/ } else if (QuaternionObject_Check(v2)) { /* VEC * QUAT */ +/* ------ to be removed ------*/ +#if 1 + PyErr_SetString(PyExc_ValueError, + "(Vector * Quat) is now removed, reverse the " + "order (promoted to an Error for Debug builds)"); + return NULL; +#else QuaternionObject *quat2 = (QuaternionObject*)v2; float tvec[3]; @@ -1207,26 +1204,11 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2) return NULL; } - -/* ------ to be removed ------*/ -#ifndef MATH_STANDALONE -#ifdef WITH_ASSERT_ABORT - PyErr_SetString(PyExc_ValueError, - "(Vector * Quat) is now removed, reverse the " - "order (promoted to an Error for Debug builds)"); - return NULL; -#else - printf("Warning: (Vector * Quat) is now deprecated, " - "reverse the multiplication order in the script.\n"); - PyC_LineSpit(); -#endif -#endif /* ifndef MATH_STANDALONE */ -/* ------ to be removed ------*/ - - copy_v3_v3(tvec, vec1->vec); mul_qt_v3(quat2->quat, tvec); return newVectorObject(tvec, 3, Py_NEW, Py_TYPE(vec1)); +#endif +/* ------ to be removed ------*/ } else if (((scalar= PyFloat_AsDouble(v2)) == -1.0f && PyErr_Occurred())==0) { /* VEC * FLOAT */ return vector_mul_float(vec1, scalar); @@ -1260,6 +1242,14 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) /* only support vec*=float and vec*=mat vec*=vec result is a float so that wont work */ if (MatrixObject_Check(v2)) { +/* ------ to be removed ------*/ +#if 1 + PyErr_SetString(PyExc_ValueError, + "(Vector *= Matrix) is now removed, reverse the " + "order (promoted to an Error for Debug builds) " + "and uses the non in-place multiplication."); + return NULL; +#else float rvec[MAX_DIMENSIONS]; if(BaseMath_ReadCallback((MatrixObject *)v2) == -1) return NULL; @@ -1267,28 +1257,21 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) if(column_vector_multiplication(rvec, vec, (MatrixObject*)v2) == -1) return NULL; - -/* ------ to be removed ------*/ -#ifndef MATH_STANDALONE -#ifdef WITH_ASSERT_ABORT - PyErr_SetString(PyExc_ValueError, - "(Vector *= Matrix) is now removed, reverse the " - "order (promoted to an Error for Debug builds) " - "and uses the non in-place multiplication."); - return NULL; -#else - printf("Warning: (Vector *= Matrix) is now deprecated, " - "reverse the (non in-place) multiplication order in the script.\n"); - PyC_LineSpit(); -#endif -#endif /* ifndef MATH_STANDALONE */ -/* ------ to be removed ------*/ - - memcpy(vec->vec, rvec, sizeof(float) * vec->size); +#endif +/* ------ to be removed ------*/ } else if (QuaternionObject_Check(v2)) { /* VEC *= QUAT */ + +/* ------ to be removed ------*/ +#if 1 + PyErr_SetString(PyExc_ValueError, + "(Vector *= Quat) is now removed, reverse the " + "order (promoted to an Error for Debug builds) " + "and uses the non in-place multiplication."); + return NULL; +#else QuaternionObject *quat2 = (QuaternionObject*)v2; if(vec->size != 3) { @@ -1302,25 +1285,9 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) return NULL; } - -/* ------ to be removed ------*/ -#ifndef MATH_STANDALONE -#ifdef WITH_ASSERT_ABORT - PyErr_SetString(PyExc_ValueError, - "(Vector *= Quat) is now removed, reverse the " - "order (promoted to an Error for Debug builds) " - "and uses the non in-place multiplication."); - return NULL; -#else - printf("Warning: (Vector *= Quat) is now deprecated, " - "reverse the (non in-place) multiplication order in the script.\n"); - PyC_LineSpit(); -#endif -#endif /* ifndef MATH_STANDALONE */ -/* ------ to be removed ------*/ - - mul_qt_v3(quat2->quat, vec->vec); +#endif +/* ------ to be removed ------*/ } else if (((scalar= PyFloat_AsDouble(v2)) == -1.0f && PyErr_Occurred())==0) { /* VEC *= FLOAT */ mul_vn_fl(vec->vec, vec->size, scalar); From 6b1fd66e3b7c03b4521b7184b900dce858f57d9d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Aug 2011 13:45:17 +0000 Subject: [PATCH 09/16] turns out recent commit made 'make' on its own fail. --- GNUmakefile | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 4aaa77ee52d..8446541cfae 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -77,6 +77,28 @@ ifeq ($(OS), NetBSD) NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 ) endif +# ----------------------------------------------------------------------------- +# Build Blender +all: + @echo + @echo Configuring Blender ... + + if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \ + cmake $(BUILD_CMAKE_ARGS) -H$(BLENDER_DIR) -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE); \ + fi + + @echo + @echo Building Blender ... + $(MAKE) -C $(BUILD_DIR) -s -j $(NPROCS) install + @echo + @echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild. + @echo blender installed, run from: "$(BUILD_DIR)/bin/blender" + @echo + +debug: all +lite: all +headless: all +bpy: all # ----------------------------------------------------------------------------- # Helo for build targets @@ -105,31 +127,6 @@ help: @echo " * test_deprecated - checks for deprecation tags in our code which may need to be removed" @echo "" - -# ----------------------------------------------------------------------------- -# Build Blender -all: - @echo - @echo Configuring Blender ... - - if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \ - cmake $(BUILD_CMAKE_ARGS) -H$(BLENDER_DIR) -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE); \ - fi - - @echo - @echo Building Blender ... - $(MAKE) -C $(BUILD_DIR) -s -j $(NPROCS) install - @echo - @echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild. - @echo blender installed, run from: "$(BUILD_DIR)/bin/blender" - @echo - -debug: all -lite: all -headless: all -bpy: all - - # ----------------------------------------------------------------------------- # Packages # From dddfb5e1738830c325e796a474d0ea14d64654f3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Aug 2011 13:46:51 +0000 Subject: [PATCH 10/16] minor fix, armature selection outline was not being drawn for non-active, selected armature object when they were in pose mode. --- source/blender/editors/space_view3d/drawobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 78788777f49..f5c178267aa 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -5477,7 +5477,7 @@ static void drawObjectSelect(Scene *scene, View3D *v3d, ARegion *ar, Base *base) } } else if(ob->type==OB_ARMATURE) { - if(!(ob->mode & OB_MODE_POSE)) + if(!(ob->mode & OB_MODE_POSE && base == scene->basact)) draw_armature(scene, v3d, ar, base, OB_WIRE, FALSE, TRUE); } From 2cece7b221ebf0c1f9ae1b904d6961cb898b0eb3 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Tue, 16 Aug 2011 17:43:39 +0000 Subject: [PATCH 11/16] Bugfix for [#28258] [UV editor] missing snapping option. *Added back "snap_target" as we had in 2.4x. I removed the "snap_element" though, as only Vertex Snapping is supported in the UV Image Editor. --- release/scripts/startup/bl_ui/space_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 5d72482ce9c..2042fa1729d 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -387,7 +387,7 @@ class IMAGE_HT_header(Header): row = layout.row(align=True) row.prop(toolsettings, "use_snap", text="") - row.prop(toolsettings, "snap_element", text="", icon_only=True) + row.prop(toolsettings, "snap_target", text="") mesh = context.edit_object.data layout.prop_search(mesh.uv_textures, "active", mesh, "uv_textures", text="") From feb52de6b500fe889f8a2b28d2b510087107ec88 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Aug 2011 22:18:24 +0000 Subject: [PATCH 12/16] fix for error calling RNA_property_float_get_index on non array float rotations when displaying. --- source/blender/editors/interface/interface_regions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 8bce27e366b..a55ee01202c 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -424,7 +424,8 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) if (unit_type == PROP_UNIT_ROTATION) { if (RNA_property_type(but->rnaprop) == PROP_FLOAT) { - BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Radians: %f", RNA_property_float_get_index(&but->rnapoin, but->rnaprop, but->rnaindex)); + float value= RNA_property_array_check(but->rnaprop) ? RNA_property_float_get_index(&but->rnapoin, but->rnaprop, but->rnaindex) : RNA_property_float_get(&but->rnapoin, but->rnaprop); + BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Radians: %f", value); data->color[data->totline]= 0x888888; data->totline++; } From dd8d24ff9d48d4103e414cbe18e6c40644051f19 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Aug 2011 22:44:12 +0000 Subject: [PATCH 13/16] fix [#28274] Cant select aditional object in edit mode. missing feature from 2.4x --- source/blender/editors/space_view3d/view3d_select.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index c6835b0cad3..86112a42d99 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -1335,9 +1335,9 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short obce if(oldbasact != basact) { ED_base_object_activate(C, basact); /* adds notifier */ } - - WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene); } + + WM_event_add_notifier(C, NC_SCENE|ND_OB_SELECT, scene); } return retval; @@ -1841,8 +1841,8 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event) int retval = 0; view3d_operator_needs_opengl(C); - - if(obedit) { + + if(obedit && center==FALSE) { if(obedit->type==OB_MESH) retval = mouse_mesh(C, event->mval, extend); else if(obedit->type==OB_ARMATURE) @@ -1889,7 +1889,7 @@ void VIEW3D_OT_select(wmOperatorType *ot) /* properties */ RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first."); - RNA_def_boolean(ot->srna, "center", 0, "Center", "Use the object center when selecting (object mode only)."); + RNA_def_boolean(ot->srna, "center", 0, "Center", "Use the object center when selecting, in editmode used to extend object selection."); RNA_def_boolean(ot->srna, "enumerate", 0, "Enumerate", "List objects under the mouse (object mode only)."); } From 0bac3e17dfb1cfc0b65adf1a29960cab2213d6a3 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 17 Aug 2011 12:09:02 +0000 Subject: [PATCH 14/16] Fix #28194, #28269: proxy object was not showing pose mode as available in 3d view header mode menu. A recent bugfix was incorrectly hiding pose and particle mode when the object data was library linked, but these modes edit object level settings so should be available. --- .../editors/space_view3d/view3d_header.c | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 5b95ae63e56..70b2a3d3628 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -281,31 +281,32 @@ static char *view3d_modeselect_pup(Scene *scene) str += sprintf(str, formatstr, "Object Mode", OB_MODE_OBJECT, ICON_OBJECT_DATA); if(ob==NULL || ob->data==NULL) return string; - if(ob->id.lib || ((ID *)ob->data)->lib) return string; + if(ob->id.lib) return string; - /* if active object is editable */ - if ( ((ob->type == OB_MESH) - || (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT) - || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) { - - str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT); - } - else if (ob->type == OB_ARMATURE) { - if (ob->mode & OB_MODE_POSE) - str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT); - else + if(!((ID *)ob->data)->lib) { + /* if active object is editable */ + if ( ((ob->type == OB_MESH) + || (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT) + || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) { + str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT); + } + else if (ob->type == OB_ARMATURE) { + if (ob->mode & OB_MODE_POSE) + str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT); + else + str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT); + } + + if (ob->type == OB_MESH) { + + str += sprintf(str, formatstr, "Sculpt Mode", OB_MODE_SCULPT, ICON_SCULPTMODE_HLT); + str += sprintf(str, formatstr, "Vertex Paint", OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT); + str += sprintf(str, formatstr, "Texture Paint", OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT); + str += sprintf(str, formatstr, "Weight Paint", OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT); + } } - - if (ob->type == OB_MESH) { - - str += sprintf(str, formatstr, "Sculpt Mode", OB_MODE_SCULPT, ICON_SCULPTMODE_HLT); - str += sprintf(str, formatstr, "Vertex Paint", OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT); - str += sprintf(str, formatstr, "Texture Paint", OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT); - str += sprintf(str, formatstr, "Weight Paint", OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT); - } - - + /* if active object is an armature */ if (ob->type==OB_ARMATURE) { str += sprintf(str, formatstr, "Pose Mode", OB_MODE_POSE, ICON_POSE_HLT); From b6dcf3b1c24fe43193ae4697b383cf1514a3caff Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 17 Aug 2011 12:52:38 +0000 Subject: [PATCH 15/16] Fix #28277: changing smoke border collision type did not reset cache, making it seem like the option wasn't working. --- source/blender/makesrna/intern/rna_smoke.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index 43d1aa24229..8abf774ff52 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -247,7 +247,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "border_collisions"); RNA_def_property_enum_items(prop, smoke_domain_colli_items); RNA_def_property_ui_text(prop, "Border Collisions", "Selects which domain border will be treated as collision object."); - RNA_def_property_update(prop, 0, NULL); + RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset"); prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "EffectorWeights"); From 853620926019b242dbc34336addcf1c4eaaf7569 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Wed, 17 Aug 2011 13:04:28 +0000 Subject: [PATCH 16/16] 2.6 RNA: * Remove some NULL RNA property update calls, they do nothing. --- source/blender/makesrna/intern/rna_object_force.c | 1 - source/blender/makesrna/intern/rna_smoke.c | 7 ------- 2 files changed, 8 deletions(-) diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index ca679239dd3..463f65fd3d5 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -770,7 +770,6 @@ static void rna_def_pointcache(BlenderRNA *brna) prop= RNA_def_property(srna, "compression", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, point_cache_compress_items); RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used"); - RNA_def_property_update(prop, 0, NULL); /* flags */ prop= RNA_def_property(srna, "is_baked", PROP_BOOLEAN, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c index 8abf774ff52..d439c2551f1 100644 --- a/source/blender/makesrna/intern/rna_smoke.c +++ b/source/blender/makesrna/intern/rna_smoke.c @@ -241,7 +241,6 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna) RNA_def_property_enum_sdna(prop, NULL, "cache_comp"); RNA_def_property_enum_items(prop, smoke_cache_comp_items); RNA_def_property_ui_text(prop, "Cache Compression", "Compression method to be used"); - RNA_def_property_update(prop, 0, NULL); prop= RNA_def_property(srna, "collision_extents", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "border_collisions"); @@ -290,14 +289,12 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna) RNA_def_property_range(prop, 0.001, 1); RNA_def_property_ui_range(prop, 0.001, 1.0, 1.0, 4); RNA_def_property_ui_text(prop, "Density", ""); - RNA_def_property_update(prop, 0, NULL); // NC_OBJECT|ND_MODIFIER prop= RNA_def_property(srna, "temperature", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "temp"); RNA_def_property_range(prop, -10, 10); RNA_def_property_ui_range(prop, -10, 10, 1, 1); RNA_def_property_ui_text(prop, "Temp. Diff.", "Temperature difference to ambient temperature"); - RNA_def_property_update(prop, 0, NULL); prop= RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "psys"); @@ -309,24 +306,20 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna) prop= RNA_def_property(srna, "use_outflow", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "type", MOD_SMOKE_FLOW_TYPE_OUTFLOW); RNA_def_property_ui_text(prop, "Outflow", "Deletes smoke from simulation"); - RNA_def_property_update(prop, 0, NULL); prop= RNA_def_property(srna, "use_absolute", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_ABSOLUTE); RNA_def_property_ui_text(prop, "Absolute Density", "Only allows given density value in emitter area."); - RNA_def_property_update(prop, 0, NULL); prop= RNA_def_property(srna, "initial_velocity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_INITVELOCITY); RNA_def_property_ui_text(prop, "Initial Velocity", "Smoke inherits it's velocity from the emitter particle"); - RNA_def_property_update(prop, 0, NULL); prop= RNA_def_property(srna, "velocity_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "vel_multi"); RNA_def_property_range(prop, -2.0, 2.0); RNA_def_property_ui_range(prop, -2.0, 2.0, 0.05, 5); RNA_def_property_ui_text(prop, "Multiplier", "Multiplier to adjust velocity passed to smoke"); - RNA_def_property_update(prop, 0, NULL); } static void rna_def_smoke_coll_settings(BlenderRNA *brna)