Merge branch 'master' into blender2.8
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 7 Jun 2018 16:45:45 +0000 (18:45 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 7 Jun 2018 16:45:45 +0000 (18:45 +0200)
Conflicts:
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_undo.c

1  2 
source/blender/blenkernel/intern/paint.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_undo.c

@@@ -974,7 -944,7 +974,7 @@@ static void vertex_paint_init_session(D
  
        if (ob->sculpt == NULL) {
                ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session");
-               BKE_sculpt_update_mesh_elements(depsgraph, scene, scene->toolsettings->sculpt, ob, 0, false);
 -              BKE_sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, false, false);
++              BKE_sculpt_update_mesh_elements(depsgraph, scene, scene->toolsettings->sculpt, ob, false, false);
        }
  }
  
@@@ -5628,8 -5616,7 +5628,8 @@@ static void sculpt_init_session(Depsgra
        BKE_sculpt_toolsettings_data_ensure(scene);
  
        ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session");
 -      BKE_sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, false, false);
 +      ob->sculpt->mode_type = OB_MODE_SCULPT;
-       BKE_sculpt_update_mesh_elements(depsgraph, scene, scene->toolsettings->sculpt, ob, 0, false);
++      BKE_sculpt_update_mesh_elements(depsgraph, scene, scene->toolsettings->sculpt, ob, false, false);
  }
  
  static int ed_object_sculptmode_flush_recalc_flag(Scene *scene, Object *ob, MultiresModifierData *mmd)
@@@ -158,7 -156,7 +158,7 @@@ static bool sculpt_undo_restore_coords(
                        if (kb) {
                                ob->shapenr = BLI_findindex(&key->block, kb) + 1;
  
-                               BKE_sculpt_update_mesh_elements(depsgraph, scene, sd, ob, 0, false);
 -                              BKE_sculpt_update_mesh_elements(scene, sd, ob, false, false);
++                              BKE_sculpt_update_mesh_elements(depsgraph, scene, sd, ob, false, false);
                                WM_event_add_notifier(C, NC_OBJECT | ND_DATA, ob);
                        }
                        else {
@@@ -493,12 -490,10 +493,12 @@@ static void sculpt_undo_restore_list(bC
                }
        }
  
 -      BKE_sculpt_update_mesh_elements(scene, sd, ob, false, need_mask);
 +      DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
 +
-       BKE_sculpt_update_mesh_elements(depsgraph, scene, sd, ob, 0, need_mask);
++      BKE_sculpt_update_mesh_elements(depsgraph, scene, sd, ob, false, need_mask);
  
        /* call _after_ sculpt_update_mesh_elements() which may update 'ob->derivedFinal' */
 -      dm = mesh_get_derived_final(scene, ob, 0);
 +      dm = mesh_get_derived_final(depsgraph, scene, ob, 0);
  
        if (lb->first && sculpt_undo_bmesh_restore(C, lb->first, ob, ss))
                return;