Cleanup: typo, and 0 -> false for booleans.
authorBastien Montagne <montagne29@wanadoo.fr>
Thu, 7 Jun 2018 16:35:37 +0000 (18:35 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Thu, 7 Jun 2018 16:36:16 +0000 (18:36 +0200)
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 144ec02..4ba9cbf 100644 (file)
@@ -948,12 +948,12 @@ void BKE_sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob,
 
        /* 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 a496c4c..7bbb446 100644 (file)
@@ -944,7 +944,7 @@ static void vertex_paint_init_session(Scene *scene, Object *ob)
 
        if (ob->sculpt == NULL) {
                ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session");
-               BKE_sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, 0, false);
+               BKE_sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, false, false);
        }
 }
 
index ca4ad39..40d11e0 100644 (file)
@@ -5616,7 +5616,7 @@ static void sculpt_init_session(Scene *scene, Object *ob)
        BKE_sculpt_toolsettings_data_ensure(scene);
 
        ob->sculpt = MEM_callocN(sizeof(SculptSession), "sculpt session");
-       BKE_sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, 0, false);
+       BKE_sculpt_update_mesh_elements(scene, scene->toolsettings->sculpt, ob, false, false);
 }
 
 static int ed_object_sculptmode_flush_recalc_flag(Scene *scene, Object *ob, MultiresModifierData *mmd)
index cd03c3e..bf5ddeb 100644 (file)
@@ -156,7 +156,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(scene, sd, ob, 0, false);
+                               BKE_sculpt_update_mesh_elements(scene, sd, ob, false, false);
                                WM_event_add_notifier(C, NC_OBJECT | ND_DATA, ob);
                        }
                        else {
@@ -490,7 +490,7 @@ static void sculpt_undo_restore_list(bContext *C, ListBase *lb)
                }
        }
 
-       BKE_sculpt_update_mesh_elements(scene, sd, ob, 0, need_mask);
+       BKE_sculpt_update_mesh_elements(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);