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

index 52c096b712ed2222be4e27618c8861f881874366,7bbb4467f6fd451ba2ac24dfdc8487f3ed208200..dab207d73501507352bccf1230bb39eca4505b12
@@@ -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);
        }
  }
  
index 985857d3f7a2c606b7c2b8f1945229b0284c8311,40d11e0197b436a13f48fb5c30dbdc36ba4b93d7..ad8ed59ff5c5e803d87122870efee5a04bccad4b
@@@ -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)
index bc51606f3e5e340f95998b35d511be459d918465,bf5ddeb71ff04fbcd6a5a4833eaec8bfea96cb29..01b879a4c34519136a64e311cb4b7356968052ac
@@@ -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;