[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36827] trunk/blender/source/blender: fix [#26618] StringProperty with sub_type of FILE_PATH not updated correctly from icon
Revision: 36827 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36827 Author: campbellbarton Date: 2011-05-23 10:14:07 + (Mon, 23 May 2011) Log Message: --- fix [#26618] StringProperty with sub_type of FILE_PATH not updated correctly from icon Modified Paths: -- trunk/blender/source/blender/editors/space_buttons/buttons_ops.c trunk/blender/source/blender/editors/space_view3d/view3d_toolbar.c trunk/blender/source/blender/windowmanager/WM_api.h trunk/blender/source/blender/windowmanager/intern/wm_operators.c Modified: trunk/blender/source/blender/editors/space_buttons/buttons_ops.c === --- trunk/blender/source/blender/editors/space_buttons/buttons_ops.c 2011-05-23 08:14:29 UTC (rev 36826) +++ trunk/blender/source/blender/editors/space_buttons/buttons_ops.c 2011-05-23 10:14:07 UTC (rev 36827) @@ -51,6 +51,7 @@ #include WM_types.h #include ED_screen.h +#include ED_util.h #include RNA_access.h @@ -131,7 +132,19 @@ RNA_property_update(C, fbo-ptr, fbo-prop); MEM_freeN(str); + + /* special, annoying exception, filesel on redo panel [#26618] */ + { + wmOperator *redo_op= WM_operator_last_redo(C); + if(redo_op) { + if(fbo-ptr.data == redo_op-ptr-data) { + ED_undo_operator_repeat(C, redo_op); + } + } + } + MEM_freeN(op-customdata); + return OPERATOR_FINISHED; } Modified: trunk/blender/source/blender/editors/space_view3d/view3d_toolbar.c === --- trunk/blender/source/blender/editors/space_view3d/view3d_toolbar.c 2011-05-23 08:14:29 UTC (rev 36826) +++ trunk/blender/source/blender/editors/space_view3d/view3d_toolbar.c 2011-05-23 10:14:07 UTC (rev 36827) @@ -69,19 +69,6 @@ /* *** view3d space buttons ** */ -static wmOperator *view3d_last_operator(const bContext *C) -{ - wmWindowManager *wm= CTX_wm_manager(C); - wmOperator *op; - - /* only for operators that are registered and did an undo push */ - for(op= wm-operators.last; op; op= op-prev) - if((op-type-flag OPTYPE_REGISTER) (op-type-flag OPTYPE_UNDO)) - break; - - return op; -} - static void view3d_panel_operator_redo_buts(const bContext *C, Panel *pa, wmOperator *op) { uiLayoutOperatorButs(C, pa-layout, op, NULL, 'V', 0); @@ -89,7 +76,7 @@ static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa) { - wmOperator *op= view3d_last_operator(C); + wmOperator *op= WM_operator_last_redo(C); if(op) BLI_strncpy(pa-drawname, op-type-name, sizeof(pa-drawname)); else BLI_strncpy(pa-drawname, Operator, sizeof(pa-drawname)); @@ -110,7 +97,7 @@ static void view3d_panel_operator_redo(const bContext *C, Panel *pa) { - wmOperator *op= view3d_last_operator(C); + wmOperator *op= WM_operator_last_redo(C); uiBlock *block; if(op==NULL) Modified: trunk/blender/source/blender/windowmanager/WM_api.h === --- trunk/blender/source/blender/windowmanager/WM_api.h 2011-05-23 08:14:29 UTC (rev 36826) +++ trunk/blender/source/blender/windowmanager/WM_api.h 2011-05-23 10:14:07 UTC (rev 36827) @@ -247,6 +247,8 @@ void WM_operator_properties_gesture_straightline(struct wmOperatorType *ot, int cursor); void WM_operator_properties_select_all(struct wmOperatorType *ot); +wmOperator *WM_operator_last_redo(const struct bContext *C); + /* MOVE THIS SOMEWHERE ELSE */ #defineSEL_TOGGLE 0 #defineSEL_SELECT 1 Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c === --- trunk/blender/source/blender/windowmanager/intern/wm_operators.c 2011-05-23 08:14:29 UTC (rev 36826) +++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c 2011-05-23 10:14:07 UTC (rev 36827) @@ -882,6 +882,19 @@ return 1; } +wmOperator *WM_operator_last_redo(const bContext *C) +{ + wmWindowManager *wm= CTX_wm_manager(C); + wmOperator *op; + + /* only for operators that are registered and did an undo push */ + for(op= wm-operators.last; op; op= op-prev) + if((op-type-flag OPTYPE_REGISTER) (op-type-flag OPTYPE_UNDO)) + break; + + return op; +} + static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op) { wmOperator *op= arg_op; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36828] branches/soc-2011-carrot/: Creating GSoC 2011 carrot branch.
Revision: 36828 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36828 Author: nexyon Date: 2011-05-23 13:19:33 + (Mon, 23 May 2011) Log Message: --- Creating GSoC 2011 carrot branch. Added Paths: --- branches/soc-2011-carrot/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36829] branches/soc-2011-cucumber/: Creating GSoC 2011 cucumber branch.
Revision: 36829 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36829 Author: nexyon Date: 2011-05-23 13:19:58 + (Mon, 23 May 2011) Log Message: --- Creating GSoC 2011 cucumber branch. Added Paths: --- branches/soc-2011-cucumber/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36830] branches/soc-2011-pepper/: Creating GSoC 2011 pepper branch.
Revision: 36830 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36830 Author: nexyon Date: 2011-05-23 13:20:13 + (Mon, 23 May 2011) Log Message: --- Creating GSoC 2011 pepper branch. Added Paths: --- branches/soc-2011-pepper/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36831] branches/soc-2011-tomato/: Creating GSoC 2011 tomato branch.
Revision: 36831 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36831 Author: nexyon Date: 2011-05-23 13:20:25 + (Mon, 23 May 2011) Log Message: --- Creating GSoC 2011 tomato branch. Added Paths: --- branches/soc-2011-tomato/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36832] branches/soc-2011-garlic/: Creating GSoC 2011 garlic branch.
Revision: 36832 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36832 Author: nexyon Date: 2011-05-23 13:20:35 + (Mon, 23 May 2011) Log Message: --- Creating GSoC 2011 garlic branch. Added Paths: --- branches/soc-2011-garlic/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36833] branches/soc-2011-onion/: Creating GSoC 2011 onion branch.
Revision: 36833 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36833 Author: nexyon Date: 2011-05-23 13:20:49 + (Mon, 23 May 2011) Log Message: --- Creating GSoC 2011 onion branch. Added Paths: --- branches/soc-2011-onion/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36834] branches/soc-2011-salad/: Creating GSoC 2011 salad branch.
Revision: 36834 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36834 Author: nexyon Date: 2011-05-23 13:21:00 + (Mon, 23 May 2011) Log Message: --- Creating GSoC 2011 salad branch. Added Paths: --- branches/soc-2011-salad/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36835] branches/soc-2011-radish/: Creating GSoC 2011 radish branch.
Revision: 36835 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36835 Author: nexyon Date: 2011-05-23 13:37:18 + (Mon, 23 May 2011) Log Message: --- Creating GSoC 2011 radish branch. Added Paths: --- branches/soc-2011-radish/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36836] trunk/blender/source/blender/ blenlib/intern/rct.c: Fix print_rctf not printing y max correct.
Revision: 36836 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36836 Author: blendix Date: 2011-05-23 14:51:31 + (Mon, 23 May 2011) Log Message: --- Fix print_rctf not printing y max correct. Modified Paths: -- trunk/blender/source/blender/blenlib/intern/rct.c Modified: trunk/blender/source/blender/blenlib/intern/rct.c === --- trunk/blender/source/blender/blenlib/intern/rct.c 2011-05-23 13:37:18 UTC (rev 36835) +++ trunk/blender/source/blender/blenlib/intern/rct.c 2011-05-23 14:51:31 UTC (rev 36836) @@ -241,7 +241,7 @@ void print_rctf(const char *str, rctf *rect) { - printf(%s: xmin %.3f, xmax %.3f, ymin %.3f, ymax %.3f (%.3fx%.3f)\n, str, rect-xmin, rect-xmax, rect-ymin, rect-xmax, rect-xmax - rect-xmin, rect-ymax - rect-ymin); + printf(%s: xmin %.3f, xmax %.3f, ymin %.3f, ymax %.3f (%.3fx%.3f)\n, str, rect-xmin, rect-xmax, rect-ymin, rect-ymax, rect-xmax - rect-xmin, rect-ymax - rect-ymin); } void print_rcti(const char *str, rcti *rect) ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36837] trunk/blender: CMake changes
Revision: 36837 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36837 Author: campbellbarton Date: 2011-05-23 14:56:14 + (Mon, 23 May 2011) Log Message: --- CMake changes - don't allow building if the LIBDIR is not found on mac/windows. - by default use -O2 rather then -O3 for GCC release flags, was crashing some GCC versions and blender releases are supposed to use -O2. Modified Paths: -- trunk/blender/CMakeLists.txt trunk/blender/build_files/cmake/macros.cmake Modified: trunk/blender/CMakeLists.txt === --- trunk/blender/CMakeLists.txt2011-05-23 14:51:31 UTC (rev 36836) +++ trunk/blender/CMakeLists.txt2011-05-23 14:56:14 UTC (rev 36837) @@ -55,33 +55,19 @@ # quiet output for Makefiles, 'make -s' helps too # set_property(GLOBAL PROPERTY RULE_MESSAGES OFF) -# ignore system set flag, use our own -# must be before project(...) -# if the user wants to add their own its ok after first run. -if(DEFINED CMAKE_C_STANDARD_LIBRARIES) - set(_reset_standard_libraries OFF) -else() - set(_reset_standard_libraries ON) -endif() +#- +# Load some macros. +include(build_files/cmake/macros.cmake) -project(Blender) +#- +# Initialize project. +blender_project_hack_pre() -if (_reset_standard_libraries) - # Must come after project(...) - # - # MINGW workaround for -ladvapi32 being included which surprisingly causes - # string formatting of floats, eg: printf(%.*f, 3, value). to crash blender - # with a meaningless stack trace. by overriding this flag we ensure we only - # have libs we define and that cmake scons builds match. - set(CMAKE_C_STANDARD_LIBRARIES CACHE STRING FORCE) - set(CMAKE_CXX_STANDARD_LIBRARIES CACHE STRING FORCE) - mark_as_advanced(CMAKE_C_STANDARD_LIBRARIES) - mark_as_advanced(CMAKE_CXX_STANDARD_LIBRARIES) -endif() -unset(_reset_standard_libraries) +project(Blender) +blender_project_hack_post() enable_testing() @@ -92,10 +78,6 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL FORCE ) #- -# Load some macros. -include(build_files/cmake/macros.cmake) - -#- # Set default config options get_blender_version() @@ -984,6 +966,12 @@ #- # Common. +if(APPLE OR WIN32) + if(NOT IS_DIRECTORY ${LIBDIR}) + message(FATAL_ERROR Apple and Windows require pre-compiled libs at: '${LIBDIR}') + endif() +endif() + if(WITH_RAYOPTIMIZATION) if(CMAKE_COMPILER_IS_GNUCC) if(SUPPORT_SSE_BUILD) Modified: trunk/blender/build_files/cmake/macros.cmake === --- trunk/blender/build_files/cmake/macros.cmake2011-05-23 14:51:31 UTC (rev 36836) +++ trunk/blender/build_files/cmake/macros.cmake2011-05-23 14:56:14 UTC (rev 36837) @@ -388,3 +388,71 @@ # message(STATUS Version (Internal): ${BLENDER_VERSION}.${BLENDER_SUBVERSION}, Version (external): ${BLENDER_VERSION}${BLENDER_VERSION_CHAR}-${BLENDER_VERSION_CYCLE}) endmacro() + + +# hacks to override initial project settings +# these macros must be called directly before/after project(Blender) +macro(blender_project_hack_pre) + # + # MINGW HACK START + # ignore system set flag, use our own + # must be before project(...) + # if the user wants to add their own its ok after first run. + if(DEFINED CMAKE_C_STANDARD_LIBRARIES) + set(_reset_standard_libraries OFF) + else() + set(_reset_standard_libraries ON) + endif() + + # -- + # GCC -O3 HACK START + # needed because O3 can cause problems but + # allow the builder to set O3 manually after. + if(DEFINED CMAKE_C_FLAGS_RELEASE) + set(_reset_standard_cflags_rel OFF) + else() + set(_reset_standard_cflags_rel ON) + endif() + if(DEFINED CMAKE_CXX_FLAGS_RELEASE) + set(_reset_standard_cxxflags_rel OFF) + else() + set(_reset_standard_cxxflags_rel ON) + endif() +endmacro() + + +macro(blender_project_hack_post) + # -- + # MINGW HACK END + if (_reset_standard_libraries) + # Must come after project(...) + # + # MINGW workaround for -ladvapi32 being included which surprisingly causes + # string formatting of floats, eg: printf(%.*f, 3, value). to crash blender +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36838] trunk/blender/source/blender: remove unused code, comment some that may be useful ( maintainers can remove).
Revision: 36838 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36838 Author: campbellbarton Date: 2011-05-23 15:23:31 + (Mon, 23 May 2011) Log Message: --- remove unused code, comment some that may be useful (maintainers can remove). Modified Paths: -- trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c trunk/blender/source/blender/blenlib/intern/pbvh.c trunk/blender/source/blender/blenloader/intern/readfile.c trunk/blender/source/blender/editors/animation/keyframes_draw.c trunk/blender/source/blender/editors/physics/particle_edit.c trunk/blender/source/blender/editors/screen/screen_edit.c trunk/blender/source/blender/gpu/intern/gpu_material.c trunk/blender/source/blender/imbuf/intern/targa.c trunk/blender/source/blender/makesdna/intern/makesdna.c Modified: trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c === --- trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c 2011-05-23 14:56:14 UTC (rev 36837) +++ trunk/blender/source/blender/blenlib/intern/BLI_kdopbvh.c 2011-05-23 15:23:31 UTC (rev 36838) @@ -1687,13 +1687,13 @@ { if(node-totnode == 0) { - +#if 0 /*UNUSED*/ //Calculate the node min-coords (if the node was a point then this is the point coordinates) float co[3]; co[0] = node-bv[0]; co[1] = node-bv[2]; co[2] = node-bv[4]; - +#endif } else { Modified: trunk/blender/source/blender/blenlib/intern/pbvh.c === --- trunk/blender/source/blender/blenlib/intern/pbvh.c 2011-05-23 14:56:14 UTC (rev 36837) +++ trunk/blender/source/blender/blenlib/intern/pbvh.c 2011-05-23 15:23:31 UTC (rev 36838) @@ -1437,7 +1437,7 @@ { float (*planes)[4] = data; int i, axis; - float vmin[3], vmax[3], bb_min[3], bb_max[3]; + float vmin[3] /*, vmax[3]*/, bb_min[3], bb_max[3]; BLI_pbvh_node_get_BB(node, bb_min, bb_max); @@ -1445,11 +1445,11 @@ for(axis = 0; axis 3; ++axis) { if(planes[i][axis] 0) { vmin[axis] = bb_min[axis]; - vmax[axis] = bb_max[axis]; + /*vmax[axis] = bb_max[axis];*/ /*UNUSED*/ } else { vmin[axis] = bb_max[axis]; - vmax[axis] = bb_min[axis]; + /*vmax[axis] = bb_min[axis];*/ /*UNUSED*/ } } Modified: trunk/blender/source/blender/blenloader/intern/readfile.c === --- trunk/blender/source/blender/blenloader/intern/readfile.c 2011-05-23 14:56:14 UTC (rev 36837) +++ trunk/blender/source/blender/blenloader/intern/readfile.c 2011-05-23 15:23:31 UTC (rev 36838) @@ -2115,7 +2115,7 @@ } { - int has_old_groups=0; + /*int has_old_groups=0;*/ /*UNUSED*/ /* XXX this should actually be part of do_versions, but since we need * finished library linking, it is not possible there. Instead in do_versions * we have set the NTREE_DO_VERSIONS flag, so at this point we can do the @@ -2125,7 +2125,7 @@ if (ntree-flag NTREE_DO_VERSIONS) { /* this adds copies and links from all unlinked internal sockets to group inputs/outputs. */ nodeGroupExposeAllSockets(ntree); - has_old_groups = 1; + /*has_old_groups = 1;*/ /*UNUSED*/ } } /* now verify all types in material trees, groups are set OK now */ Modified: trunk/blender/source/blender/editors/animation/keyframes_draw.c === --- trunk/blender/source/blender/editors/animation/keyframes_draw.c 2011-05-23 14:56:14 UTC (rev 36837) +++ trunk/blender/source/blender/editors/animation/keyframes_draw.c 2011-05-23 15:23:31 UTC (rev 36838) @@ -372,7 +372,7 @@ blocks-root= (DLRBT_Node *)new_ab; } else { - ActKeyBlock *ab, *abp=NULL, *abn=NULL; + ActKeyBlock *ab, *abn=NULL; /* try to find a keyblock that starts on the previous beztriple, and add a new one if none start there * Note: we can't search from end to try to optimise this as it causes errors there's @@ -382,7 +382,7 @@ // A|--|A __ B|--|B //
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36839] trunk/blender/source/blender/ editors: fix [#27462] Linked Object (camera) can be moved by Lock Camera to View
Revision: 36839 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36839 Author: campbellbarton Date: 2011-05-23 15:46:09 + (Mon, 23 May 2011) Log Message: --- fix [#27462] Linked Object (camera) can be moved by Lock Camera to View Modified Paths: -- trunk/blender/source/blender/editors/include/ED_view3d.h trunk/blender/source/blender/editors/space_view3d/view3d_edit.c Modified: trunk/blender/source/blender/editors/include/ED_view3d.h === --- trunk/blender/source/blender/editors/include/ED_view3d.h2011-05-23 15:23:31 UTC (rev 36838) +++ trunk/blender/source/blender/editors/include/ED_view3d.h2011-05-23 15:46:09 UTC (rev 36839) @@ -284,6 +284,7 @@ unsigned int ED_viewedit_datamask(struct bScreen *screen); /* camera lock functions */ +int ED_view3d_camera_lock_check(struct View3D *v3d, struct RegionView3D *rv3d); /* copy the camera to the view before starting a view transformation */ void ED_view3d_camera_lock_init(struct View3D *v3d, struct RegionView3D *rv3d); /* copy the view to the camera */ Modified: trunk/blender/source/blender/editors/space_view3d/view3d_edit.c === --- trunk/blender/source/blender/editors/space_view3d/view3d_edit.c 2011-05-23 15:23:31 UTC (rev 36838) +++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c 2011-05-23 15:46:09 UTC (rev 36839) @@ -82,16 +82,24 @@ /* ** view3d_edit: view manipulations * */ +int ED_view3d_camera_lock_check(View3D *v3d, RegionView3D *rv3d) +{ + return ((v3d-camera) + (v3d-camera-id.lib == NULL) + (v3d-flag2 V3D_LOCK_CAMERA) + (rv3d-persp==RV3D_CAMOB)); +} + void ED_view3d_camera_lock_init(View3D *v3d, RegionView3D *rv3d) { - if(v3d-camera (v3d-flag2 V3D_LOCK_CAMERA) (rv3d-persp==RV3D_CAMOB)) { + if(ED_view3d_camera_lock_check(v3d, rv3d)) { ED_view3d_from_object(v3d-camera, rv3d-ofs, rv3d-viewquat, rv3d-dist, NULL); } } void ED_view3d_camera_lock_sync(View3D *v3d, RegionView3D *rv3d) { - if(v3d-camera (v3d-flag2 V3D_LOCK_CAMERA) (rv3d-persp==RV3D_CAMOB)) { + if(ED_view3d_camera_lock_check(v3d, rv3d)) { Object *root_parent; if((U.uiflag USER_CAM_LOCK_NO_PARENT)==0 (root_parent= v3d-camera-parent)) { @@ -841,7 +849,7 @@ if(rv3d-persp != RV3D_PERSP) { if (U.uiflag USER_AUTOPERSP) { - if(!((rv3d-persp==RV3D_CAMOB) (vod-v3d-flag2 V3D_LOCK_CAMERA))) { + if(!ED_view3d_camera_lock_check(vod-v3d, vod-rv3d)) { rv3d-persp= RV3D_PERSP; } } @@ -852,7 +860,7 @@ ED_view3d_from_object(vod-v3d-camera, rv3d-ofs, rv3d-viewquat, rv3d-dist, NULL); } - if(!(vod-v3d-flag2 V3D_LOCK_CAMERA)) { + if(!ED_view3d_camera_lock_check(vod-v3d, vod-rv3d)) { rv3d-persp= rv3d-lpersp; } } @@ -953,7 +961,7 @@ static void viewmove_apply(ViewOpsData *vod, int x, int y) { - if((vod-rv3d-persp==RV3D_CAMOB) !(vod-v3d-flag2 V3D_LOCK_CAMERA)) { + if((vod-rv3d-persp==RV3D_CAMOB) !ED_view3d_camera_lock_check(vod-v3d, vod-rv3d)) { const float zoomfac= BKE_screen_view3d_zoom_to_fac((float)vod-rv3d-camzoom) * 2.0f; vod-rv3d-camdx += (vod-oldx - x)/(vod-ar-winx * zoomfac); vod-rv3d-camdy += (vod-oldy - y)/(vod-ar-winy * zoomfac); @@ -1284,7 +1292,7 @@ mx= RNA_property_is_set(op-ptr, mx) ? RNA_int_get(op-ptr, mx) : ar-winx / 2; my= RNA_property_is_set(op-ptr, my) ? RNA_int_get(op-ptr, my) : ar-winy / 2; - use_cam_zoom= (rv3d-persp==RV3D_CAMOB) !((v3d-flag2 V3D_LOCK_CAMERA) rv3d-is_persp); + use_cam_zoom= (rv3d-persp==RV3D_CAMOB) !(rv3d-is_persp ED_view3d_camera_lock_check(v3d, rv3d)); if(delta 0) { /* this min and max is also in viewmove() */ @@ -1625,7 +1633,7 @@ } else { View3D *v3d= CTX_wm_view3d(C); - if ((rv3d-persp == RV3D_CAMOB) (v3d-flag2 V3D_LOCK_CAMERA)) { + if (ED_view3d_camera_lock_check(v3d, rv3d)) { return 1; } } @@ -1664,7 +1672,7 @@ Scene *scene= CTX_data_scene(C); Base *base; float *curs; - const short skip_camera= ((rv3d-persp==RV3D_CAMOB) (v3d-flag2 V3D_LOCK_CAMERA)); + const short skip_camera= ED_view3d_camera_lock_check(v3d, rv3d); int center= RNA_boolean_get(op-ptr, center); @@
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36840] trunk/blender/intern/ghost/intern/ GHOST_WindowCocoa.mm: Fix #26728: crash with load/save on Mac, on files that close open a window
Revision: 36840 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36840 Author: blendix Date: 2011-05-23 15:56:26 + (Mon, 23 May 2011) Log Message: --- Fix #26728: crash with load/save on Mac, on files that close open a window when loading them. Custom cursor shown during load was not freed correctly when closing the old window, which resulted in unpredictable crashes later on. Modified Paths: -- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm Modified: trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm === --- trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm 2011-05-23 15:46:09 UTC (rev 36839) +++ trunk/blender/intern/ghost/intern/GHOST_WindowCocoa.mm 2011-05-23 15:56:26 UTC (rev 36840) @@ -461,9 +461,13 @@ GHOST_WindowCocoa::~GHOST_WindowCocoa() { - if (m_customCursor) delete m_customCursor; +NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; -NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + if (m_customCursor) { + [m_customCursor release]; + m_customCursor = nil; + } + [m_openGLView release]; if (m_window) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36841] branches/soc-2011-avocado/: Creating GSoC 2011 avocado branch.
Revision: 36841 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36841 Author: elubie Date: 2011-05-23 17:20:11 + (Mon, 23 May 2011) Log Message: --- Creating GSoC 2011 avocado branch. This branches off the bmesh branch, so needs to be kept in synch with that branch. This branch also will not be able to merge to the staging branch yet. Added Paths: --- branches/soc-2011-avocado/ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36844] branches/soc-2011-onion/source/ blender: GSOC-2011
Revision: 36844 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36844 Author: psy-fi Date: 2011-05-23 19:58:33 + (Mon, 23 May 2011) Log Message: --- GSOC-2011 texture paint speed enhancements. Correct bug with float texture painting and enable partial drawing to skip converting the whole float texture to char. Modified Paths: -- branches/soc-2011-onion/source/blender/gpu/intern/gpu_draw.c branches/soc-2011-onion/source/blender/imbuf/IMB_imbuf.h branches/soc-2011-onion/source/blender/imbuf/intern/divers.c Modified: branches/soc-2011-onion/source/blender/gpu/intern/gpu_draw.c === --- branches/soc-2011-onion/source/blender/gpu/intern/gpu_draw.c 2011-05-23 17:26:50 UTC (rev 36843) +++ branches/soc-2011-onion/source/blender/gpu/intern/gpu_draw.c 2011-05-23 19:58:33 UTC (rev 36844) @@ -687,9 +687,15 @@ glGetIntegerv(GL_UNPACK_SKIP_PIXELS, skip_pixels); glGetIntegerv(GL_UNPACK_SKIP_ROWS, skip_rows); - if ((ibuf-rect==NULL) ibuf-rect_float) - IMB_rect_from_float(ibuf); - + if (ibuf-rect_float){ + if(ibuf-rect==NULL) { + IMB_rect_from_float(ibuf); + } +else { + IMB_partial_rect_from_float(ibuf, x, y, w, h); +} + } + glBindTexture(GL_TEXTURE_2D, ima-bindcode); glPixelStorei(GL_UNPACK_ROW_LENGTH, ibuf-x); Modified: branches/soc-2011-onion/source/blender/imbuf/IMB_imbuf.h === --- branches/soc-2011-onion/source/blender/imbuf/IMB_imbuf.h2011-05-23 17:26:50 UTC (rev 36843) +++ branches/soc-2011-onion/source/blender/imbuf/IMB_imbuf.h2011-05-23 19:58:33 UTC (rev 36844) @@ -321,6 +321,7 @@ void IMB_de_interlace(struct ImBuf *ibuf); void IMB_interlace(struct ImBuf *ibuf); void IMB_rect_from_float(struct ImBuf *ibuf); +void IMB_partial_rect_from_float(struct ImBuf *ibuf, int x, int y, int w, int h); void IMB_float_from_rect(struct ImBuf *ibuf); void IMB_float_from_rect_simple(struct ImBuf *ibuf); /* no profile conversion */ /* note, check that the conversion exists, only some are supported */ Modified: branches/soc-2011-onion/source/blender/imbuf/intern/divers.c === --- branches/soc-2011-onion/source/blender/imbuf/intern/divers.c 2011-05-23 17:26:50 UTC (rev 36843) +++ branches/soc-2011-onion/source/blender/imbuf/intern/divers.c 2011-05-23 19:58:33 UTC (rev 36844) @@ -197,6 +197,147 @@ ibuf-userflags = ~IB_RECT_INVALID; } + + +/* assume converting from linear float to sRGB byte for part of the texture*/ +void IMB_partial_rect_from_float(struct ImBuf *ibuf, int x, int y, int w, int h) +{ + /* quick method to convert floatbuf to byte */ + float *tof, *init_tof = (float *)ibuf-rect_float; +// int do_dither = ibuf-dither != 0.f; + float dither= ibuf-dither / 255.0f; + float srgb[4]; + int i, j, channels= ibuf-channels; + short profile= ibuf-profile; + unsigned char *to, *init_to = (unsigned char *) ibuf-rect; + + /* + if called -only- from GPU_paint_update_image this test will never fail + but leaving it here for better or worse + */ + if(init_tof==NULL) return; + if(init_to==NULL) { + imb_addrectImBuf(ibuf); + init_to = (unsigned char *) ibuf-rect; + } + if(channels==1) { + for (j = 0; j h; j++){ + to = init_to + (ibuf-x*(y + j) + x)*4; + tof = init_tof + (ibuf-x*(y + j) + x)*4; + for(i = 0; i w; i++, to+=4, tof+=4) { + to[1]= to[2]= to[3]= to[0] = FTOCHAR(tof[0]); + } + } + } + else if (profile == IB_PROFILE_LINEAR_RGB) { + if(channels == 3) { + for (j = 0; j h; j++){ + to = init_to + (ibuf-x*(y + j) + x)*4; + tof = init_tof + (ibuf-x*(y + j) + x)*4; + for(i = 0; i w; i++, to+=4, tof+=4) { + + srgb[0]= linearrgb_to_srgb(tof[0]); + srgb[1]= linearrgb_to_srgb(tof[1]); + srgb[2]= linearrgb_to_srgb(tof[2]); + + to[0] = FTOCHAR(srgb[0]); + to[1] = FTOCHAR(srgb[1]); + to[2] = FTOCHAR(srgb[2]); +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36846] branches/bmesh/blender/source/ blender: =bmesh= fixed weld bug in uv editor
Revision: 36846 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36846 Author: joeedh Date: 2011-05-24 01:34:28 + (Tue, 24 May 2011) Log Message: --- =bmesh= fixed weld bug in uv editor Modified Paths: -- branches/bmesh/blender/source/blender/bmesh/operators/extrudeops.c branches/bmesh/blender/source/blender/editors/uvedit/uvedit_ops.c Modified: branches/bmesh/blender/source/blender/bmesh/operators/extrudeops.c === --- branches/bmesh/blender/source/blender/bmesh/operators/extrudeops.c 2011-05-24 01:03:35 UTC (rev 36845) +++ branches/bmesh/blender/source/blender/bmesh/operators/extrudeops.c 2011-05-24 01:34:28 UTC (rev 36846) @@ -58,13 +58,20 @@ BMO_SetFlag(bm, f, EXT_DEL); - f2 = BM_Make_Ngon(bm, edges[0]-v1, edges[0]-v2, edges, f-len, 0); + f2 = BM_Make_Ngon(bm, lastv, firstv, edges, f-len, 0); + if (!f2) { + BMO_RaiseError(bm, op, BMERR_MESH_ERROR, Extrude failed; could not create face); + BLI_array_free(edges); + return; + } + BMO_SetFlag(bm, f2, EXT_KEEP); BM_Copy_Attributes(bm, bm, f, f2); l2 = BMIter_New(liter2, bm, BM_LOOPS_OF_FACE, f2); BM_ITER(l, liter, bm, BM_LOOPS_OF_FACE, f) { BM_Copy_Attributes(bm, bm, l, l2); + l3 = l-next; l4 = l2-next; @@ -79,8 +86,9 @@ } } + BLI_array_free(edges); + BMO_CallOpf(bm, del geom=%ff context=%d, EXT_DEL, DEL_ONLYFACES); - BMO_Flag_To_Slot(bm, op, faceout, EXT_KEEP, BM_FACE); } Modified: branches/bmesh/blender/source/blender/editors/uvedit/uvedit_ops.c === --- branches/bmesh/blender/source/blender/editors/uvedit/uvedit_ops.c 2011-05-24 01:03:35 UTC (rev 36845) +++ branches/bmesh/blender/source/blender/editors/uvedit/uvedit_ops.c 2011-05-24 01:34:28 UTC (rev 36846) @@ -519,11 +519,12 @@ continue; BM_ITER(l, liter, em-bm, BM_LOOPS_OF_FACE, efa) { - if (uvedit_uv_selected(em, scene, l)) + if (uvedit_uv_selected(em, scene, l)) { luv = CustomData_bmesh_get(em-bm-ldata, l-head.data, CD_MLOOPUV); DO_MINMAX2(luv-uv, min, max); sel = 1; } + } } return sel; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36847] branches/bmesh/blender/source/ blender/modifiers/intern/MOD_mask.c: =bmesh= fixed mask modifier stack bug
Revision: 36847 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36847 Author: joeedh Date: 2011-05-24 01:54:13 + (Tue, 24 May 2011) Log Message: --- =bmesh= fixed mask modifier stack bug Modified Paths: -- branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c === --- branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c 2011-05-24 01:34:28 UTC (rev 36846) +++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c 2011-05-24 01:54:13 UTC (rev 36847) @@ -376,13 +376,16 @@ if (source.v4) source.v4 = GET_INT_FROM_POINTER(BLI_ghash_lookup(vertHash, SET_INT_IN_POINTER(source.v4))); - DM_copy_face_data(dm, result, oldIndex, newIndex, 1); + DM_copy_tessface_data(dm, result, oldIndex, newIndex, 1); *dest = source; test_index_face(dest, result-faceData, newIndex, (orig_v4 ? 4 : 3)); } BLI_ghashIterator_free(hashIter); + /* build polys from tess faces, for now */ + CDDM_tessfaces_to_faces(result); + /* recalculate normals */ CDDM_calc_normals(result); @@ -392,11 +395,8 @@ BLI_ghash_free(faceHash, NULL, NULL); /* return the new mesh */ - dm = CDDM_copy(result, 1); /*builds ngon faces from tess (mface) faces*/ - result-needsFree = 1; - result-release(result); - return dm; + return result; } ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36848] branches/bmesh/blender: svn merge -r36801:36840 https://svn.blender.org/svnroot/bf-blender/trunk/ blender
Revision: 36848 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36848 Author: campbellbarton Date: 2011-05-24 04:35:21 + (Tue, 24 May 2011) Log Message: --- svn merge -r36801:36840 https://svn.blender.org/svnroot/bf-blender/trunk/blender Revision Links: -- http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36801 Modified Paths: -- branches/bmesh/blender/CMakeLists.txt branches/bmesh/blender/build_files/cmake/macros.cmake branches/bmesh/blender/intern/ghost/intern/GHOST_WindowCocoa.mm branches/bmesh/blender/intern/tools/ui_snapshot.py branches/bmesh/blender/release/scripts/startup/bl_ui/properties_object_constraint.py branches/bmesh/blender/release/scripts/startup/bl_ui/properties_particle.py branches/bmesh/blender/release/scripts/startup/bl_ui/space_userpref.py branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py branches/bmesh/blender/source/blender/blenkernel/BKE_text.h branches/bmesh/blender/source/blender/blenkernel/intern/anim.c branches/bmesh/blender/source/blender/blenkernel/intern/depsgraph.c branches/bmesh/blender/source/blender/blenkernel/intern/displist.c branches/bmesh/blender/source/blender/blenkernel/intern/object.c branches/bmesh/blender/source/blender/blenkernel/intern/particle.c branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c branches/bmesh/blender/source/blender/blenkernel/intern/softbody.c branches/bmesh/blender/source/blender/blenkernel/intern/text.c branches/bmesh/blender/source/blender/blenlib/BLI_path_util.h branches/bmesh/blender/source/blender/blenlib/intern/BLI_kdopbvh.c branches/bmesh/blender/source/blender/blenlib/intern/math_base.c branches/bmesh/blender/source/blender/blenlib/intern/pbvh.c branches/bmesh/blender/source/blender/blenlib/intern/rct.c branches/bmesh/blender/source/blender/blenloader/intern/readfile.c branches/bmesh/blender/source/blender/blenloader/intern/writefile.c branches/bmesh/blender/source/blender/editors/animation/keyframes_draw.c branches/bmesh/blender/source/blender/editors/armature/editarmature.c branches/bmesh/blender/source/blender/editors/armature/poseobject.c branches/bmesh/blender/source/blender/editors/curve/editcurve.c branches/bmesh/blender/source/blender/editors/gpencil/drawgpencil.c branches/bmesh/blender/source/blender/editors/gpencil/gpencil_edit.c branches/bmesh/blender/source/blender/editors/gpencil/gpencil_paint.c branches/bmesh/blender/source/blender/editors/include/ED_view3d.h branches/bmesh/blender/source/blender/editors/mesh/bmesh_select.c branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c branches/bmesh/blender/source/blender/editors/mesh/knifetool.c branches/bmesh/blender/source/blender/editors/object/object_relations.c branches/bmesh/blender/source/blender/editors/physics/particle_edit.c branches/bmesh/blender/source/blender/editors/render/render_opengl.c branches/bmesh/blender/source/blender/editors/screen/screen_edit.c branches/bmesh/blender/source/blender/editors/screen/screen_ops.c branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_image.c branches/bmesh/blender/source/blender/editors/sculpt_paint/sculpt.c branches/bmesh/blender/source/blender/editors/space_buttons/buttons_ops.c branches/bmesh/blender/source/blender/editors/space_graph/graph_select.c branches/bmesh/blender/source/blender/editors/space_text/text_ops.c branches/bmesh/blender/source/blender/editors/space_view3d/drawobject.c branches/bmesh/blender/source/blender/editors/space_view3d/view3d_draw.c branches/bmesh/blender/source/blender/editors/space_view3d/view3d_edit.c branches/bmesh/blender/source/blender/editors/space_view3d/view3d_fly.c branches/bmesh/blender/source/blender/editors/space_view3d/view3d_intern.h branches/bmesh/blender/source/blender/editors/space_view3d/view3d_ops.c branches/bmesh/blender/source/blender/editors/space_view3d/view3d_toolbar.c branches/bmesh/blender/source/blender/editors/space_view3d/view3d_view.c branches/bmesh/blender/source/blender/editors/transform/transform.c branches/bmesh/blender/source/blender/editors/transform/transform_conversions.c branches/bmesh/blender/source/blender/editors/transform/transform_manipulator.c branches/bmesh/blender/source/blender/editors/transform/transform_snap.c branches/bmesh/blender/source/blender/gpu/intern/gpu_material.c branches/bmesh/blender/source/blender/imbuf/intern/IMB_anim.h branches/bmesh/blender/source/blender/imbuf/intern/md5.h branches/bmesh/blender/source/blender/imbuf/intern/targa.c branches/bmesh/blender/source/blender/makesdna/DNA_userdef_types.h branches/bmesh/blender/source/blender/makesdna/intern/makesdna.c
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36849] trunk/blender/source/creator/ CMakeLists.txt: fix for cmake/msvc when the path name contains spaces, patch by Kupoman on IRC
Revision: 36849 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36849 Author: campbellbarton Date: 2011-05-24 05:21:51 + (Tue, 24 May 2011) Log Message: --- fix for cmake/msvc when the path name contains spaces, patch by Kupoman on IRC Modified Paths: -- trunk/blender/source/creator/CMakeLists.txt Modified: trunk/blender/source/creator/CMakeLists.txt === --- trunk/blender/source/creator/CMakeLists.txt 2011-05-24 04:35:21 UTC (rev 36848) +++ trunk/blender/source/creator/CMakeLists.txt 2011-05-24 05:21:51 UTC (rev 36849) @@ -459,15 +459,18 @@ ) if(WITH_PYTHON_INSTALL) - #~ # note, as far as python is concerned 'RelWithDebInfo' is not debug since its without debug flags. + # note, as far as python is concerned 'RelWithDebInfo' is not debug since its without debug flags. # create the directory in multiple steps, so it actually gets created when it doesn't exist yet - install(CODE - message(\creating ${TARGETDIR_VER}/python/lib\) - file(MAKE_DIRECTORY ${TARGETDIR_VER}/python/) - file(MAKE_DIRECTORY ${TARGETDIR_VER}/python/lib/) - message(\done creating dir\) - ) + install( + CODE + + message(\creating ${TARGETDIR_VER}/python/lib\) + file(MAKE_DIRECTORY \${TARGETDIR_VER}/python/\) + file(MAKE_DIRECTORY \${TARGETDIR_VER}/python/lib/\) + message(\done creating dir\) + + ) install( CODE ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36850] trunk/blender/source/blender/ editors/space_sequencer/sequencer_select.c: fix for using uninitialized vars in own recent commit.
Revision: 36850 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36850 Author: campbellbarton Date: 2011-05-24 05:22:58 + (Tue, 24 May 2011) Log Message: --- fix for using uninitialized vars in own recent commit. Modified Paths: -- trunk/blender/source/blender/editors/space_sequencer/sequencer_select.c Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_select.c === --- trunk/blender/source/blender/editors/space_sequencer/sequencer_select.c 2011-05-24 05:21:51 UTC (rev 36849) +++ trunk/blender/source/blender/editors/space_sequencer/sequencer_select.c 2011-05-24 05:22:58 UTC (rev 36850) @@ -305,8 +305,6 @@ short linked_handle= RNA_boolean_get(op-ptr, linked_handle); short left_right= RNA_boolean_get(op-ptr, left_right); short linked_time= RNA_boolean_get(op-ptr, linked_time); - - int mval[2]; Sequence *seq,*neighbor, *act_orig; int hand,sel_side; @@ -343,7 +341,7 @@ /* use different logic for this */ float x; deselect_all_seq(scene); - UI_view2d_region_to_view(v2d, mval[0], mval[1], x, NULL); + UI_view2d_region_to_view(v2d, event-mval[0], event-mval[1], x, NULL); SEQP_BEGIN(ed, seq) { if (x CFRA) { ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36851] branches/bmesh/blender/source/ blender/editors/space_view3d/view3d_view.c: fix for omission in last commit .
Revision: 36851 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36851 Author: campbellbarton Date: 2011-05-24 05:58:12 + (Tue, 24 May 2011) Log Message: --- fix for omission in last commit. Modified Paths: -- branches/bmesh/blender/source/blender/editors/space_view3d/view3d_view.c Modified: branches/bmesh/blender/source/blender/editors/space_view3d/view3d_view.c === --- branches/bmesh/blender/source/blender/editors/space_view3d/view3d_view.c 2011-05-24 05:22:58 UTC (rev 36850) +++ branches/bmesh/blender/source/blender/editors/space_view3d/view3d_view.c 2011-05-24 05:58:12 UTC (rev 36851) @@ -1796,7 +1796,7 @@ if(rv3d-persp==RV3D_CAMOB startscene-gm.framing.type == SCE_GAMEFRAMING_BARS startscene-gm.stereoflag != STEREO_DOME) { /* Letterbox */ rctf cam_framef; - view3d_calc_camera_border(startscene, ar, rv3d, CTX_wm_view3d(C), cam_framef, FALSE); + ED_view3d_calc_camera_border(startscene, ar, rv3d, CTX_wm_view3d(C), cam_framef, FALSE); cam_frame.xmin = cam_framef.xmin + ar-winrct.xmin; cam_frame.xmax = cam_framef.xmax + ar-winrct.xmin; cam_frame.ymin = cam_framef.ymin + ar-winrct.ymin; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36852] branches/bmesh/blender/source/ blender/blenlib/intern/scanfill.c: fix for crash if scanfill fails
Revision: 36852 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36852 Author: campbellbarton Date: 2011-05-24 05:59:14 + (Tue, 24 May 2011) Log Message: --- fix for crash if scanfill fails Modified Paths: -- branches/bmesh/blender/source/blender/blenlib/intern/scanfill.c Modified: branches/bmesh/blender/source/blender/blenlib/intern/scanfill.c === --- branches/bmesh/blender/source/blender/blenlib/intern/scanfill.c 2011-05-24 05:58:12 UTC (rev 36851) +++ branches/bmesh/blender/source/blender/blenlib/intern/scanfill.c 2011-05-24 05:59:14 UTC (rev 36852) @@ -159,19 +159,22 @@ } else if(size== -1) { /*BMESH_TODO: keep the first block, gives memory leak on exit with 'newmem' */ - first = lb.first; - BLI_remlink(lb, first); - cur= lb.first; - while(cur) { - MEM_freeN(cur-data); - cur= cur-next; + if((first= lb.first)) { /* can be false if first fill fails */ + BLI_remlink(lb, first); + + cur= lb.first; + while(cur) { + MEM_freeN(cur-data); + cur= cur-next; + } + BLI_freelistN(lb); + + /*reset the block we're keeping*/ + BLI_addtail(lb, first); + memset(first-data, 0, blocksize); } - BLI_freelistN(lb); - - /*reset the block we're keeping*/ - BLI_addtail(lb, first); - memset(first-data, 0, blocksize); + cur= first; offs= 0; ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs