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

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 8dad892..2fded4a 100644 (file)
@@ -963,12 +963,12 @@ void BKE_sculpt_update_mesh_elements(
 
        /* if pbvh is deformed, key block is already applied to it */
        if (ss->kb) {
-               bool pbvh_deformd = BKE_pbvh_isDeformed(ss->pbvh);
-               if (!pbvh_deformd || ss->deform_cos == NULL) {
+               bool pbvh_deformed = BKE_pbvh_isDeformed(ss->pbvh);
+               if (!pbvh_deformed || ss->deform_cos == NULL) {
                        float (*vertCos)[3] = BKE_keyblock_convert_to_vertcos(ob, ss->kb);
 
                        if (vertCos) {
-                               if (!pbvh_deformd) {
+                               if (!pbvh_deformed) {
                                        /* apply shape keys coordinates to PBVH */
                                        BKE_pbvh_apply_vertCos(ss->pbvh, vertCos);
                                }
index 52c096b..dab207d 100644 (file)
@@ -974,7 +974,7 @@ static void vertex_paint_init_session(Depsgraph *depsgraph, Scene *scene, Object
 
        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(depsgraph, scene, scene->toolsettings->sculpt, ob, false, false);
        }
 }
 
index 985857d..ad8ed59 100644 (file)
@@ -5629,7 +5629,7 @@ static void sculpt_init_session(Depsgraph *depsgraph, Scene *scene, Object *ob)
 
        ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session");
        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 bc51606..01b879a 100644 (file)
@@ -158,7 +158,7 @@ static bool sculpt_undo_restore_coords(bContext *C, DerivedMesh *dm, SculptUndoN
                        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(depsgraph, scene, sd, ob, false, false);
                                WM_event_add_notifier(C, NC_OBJECT | ND_DATA, ob);
                        }
                        else {
@@ -495,7 +495,7 @@ static void sculpt_undo_restore_list(bContext *C, ListBase *lb)
 
        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(depsgraph, scene, ob, 0);