svn merge -r36672:36725 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorCampbell Barton <ideasman42@gmail.com>
Tue, 17 May 2011 07:03:12 +0000 (07:03 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 17 May 2011 07:03:12 +0000 (07:03 +0000)
26 files changed:
1  2 
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/include/ED_view3d.h
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_modifier.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_image/CMakeLists.txt
source/blender/editors/space_image/SConscript
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_scene.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/creator.c
source/gameengine/Converter/BL_BlenderDataConversion.cpp

Simple merge
index 228eefe9148c9ca3950920d025d43dad5cd1e3a8,d5bf894ac8c42ed7d868b96d3a3463e1bbfceac9..54ed6d48636b3b5f6e3e7b2a16e28473f1adc81f
@@@ -205,17 -204,28 +205,28 @@@ int ED_object_modifier_remove(ReportLis
                ob->dt = OB_TEXTURE;
        }
        else if(md->type == eModifierType_Multires) {
+               int ok= 1;
                Mesh *me= ob->data;
+               ModifierData *tmpmd;
  
-               if(me->edit_btmesh) {
-                       BMEditMesh *em= me->edit_btmesh;
-                       /* CustomData_external_remove is used here only to mark layer as non-external
-                          for further free-ing, so zero element count looks safer than em->totface */
-                       CustomData_external_remove(&em->bm->ldata, &me->id, CD_MDISPS, 0);
-                       BM_free_data_layer(em->bm, &em->bm->ldata, CD_MDISPS);
-               } else {
-                       CustomData_external_remove(&me->ldata, &me->id, CD_MDISPS, me->totloop);
-                       CustomData_free_layer_active(&me->ldata, CD_MDISPS, me->totloop);
+               /* ensure MDISPS CustomData layer is't used by another multires modifiers */
+               for(tmpmd= ob->modifiers.first; tmpmd; tmpmd= tmpmd->next)
+                       if(tmpmd!=md && tmpmd->type == eModifierType_Multires) {
+                               ok= 0;
+                               break;
+                       }
+               if(ok) {
 -                      if(me->edit_mesh) {
 -                              EditMesh *em= me->edit_mesh;
++                      if(me->edit_btmesh) {
++                              BMEditMesh *em= me->edit_btmesh;
+                               /* CustomData_external_remove is used here only to mark layer as non-external
+                                  for further free-ing, so zero element count looks safer than em->totface */
 -                              CustomData_external_remove(&em->fdata, &me->id, CD_MDISPS, 0);
 -                              EM_free_data_layer(em, &em->fdata, CD_MDISPS);
++                              CustomData_external_remove(&em->bm->ldata, &me->id, CD_MDISPS, 0);
++                              BM_free_data_layer(em->bm, &em->bm->ldata, CD_MDISPS);
+                       } else {
 -                              CustomData_external_remove(&me->fdata, &me->id, CD_MDISPS, me->totface);
 -                              CustomData_free_layer_active(&me->fdata, CD_MDISPS, me->totface);
++                              CustomData_external_remove(&me->ldata, &me->id, CD_MDISPS, me->totloop);
++                              CustomData_free_layer_active(&me->ldata, CD_MDISPS, me->totloop);
+                       }
                }
        }
  
Simple merge
index a29a5d50929f5c6c9eaa35f7c065658e474ea486,29ddd2ab1b07d8209ac026a37d29f32ef4491b13..2b2e30d5756ac717bc10e494fd718e60a8c96de7
@@@ -341,44 -338,6 +341,32 @@@ static int print_help(int UNUSED(argc)
  
  double PIL_check_seconds_timer(void);
  
- /* XXX This was here to fix a crash when running python scripts
-  * with -P that used the screen.
-  *
-  * static void main_init_screen( void )
- {
-       setscreen(G.curscreen);
-       
-       if(G.main->scene.first==0) {
-               set_scene( add_scene("1") );
-       }
- }*/
 +void segmentation_handler(int UNUSED(sig))
 +{
 +      char fname[256];
 +
 +      if (!G.main->name[0]) {
 +              BLI_make_file_string("/", fname, btempdir, "crash.blend");
 +      }
 +      else {
 +              sprintf(fname, "%s.crash.blend", G.main->name);
 +      }
 +
 +      BKE_undo_save(fname);
 +
 +      /*induce a real crash*/
 +      signal(SIGSEGV, SIG_DFL);
 +      *(int*)NULL = 0;
 +}
 +
 +static int nocrashhandler(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
 +{
 +      no_handler = 1;
 +
 +      return 0;
 +}
 +
 +
  static int end_arguments(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
  {
        return -1;