diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 33ba4f6fef0..b8a082398ef 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -418,7 +418,7 @@ static int sculpt_stroke_dynamic_topology(const SculptSession *ss, /* Requires mesh restore, which doesn't work with * dynamic-topology */ !(brush->flag & BRUSH_ANCHORED) && - !(brush->flag & BRUSH_RESTORE_MESH) && + !(brush->flag & BRUSH_DRAG_DOT) && (!ELEM6(brush->sculpt_tool, /* These brushes, as currently coded, cannot @@ -762,15 +762,15 @@ static float integrate_overlap(Brush *br) /* Uses symm to selectively flip any axis of a coordinate. */ static void flip_v3_v3(float out[3], const float in[3], const char symm) { - if (symm & SCULPT_SYMM_X) + if (symm & PAINT_SYMM_X) out[0] = -in[0]; else out[0] = in[0]; - if (symm & SCULPT_SYMM_Y) + if (symm & PAINT_SYMM_Y) out[1] = -in[1]; else out[1] = in[1]; - if (symm & SCULPT_SYMM_Z) + if (symm & PAINT_SYMM_Z) out[2] = -in[2]; else out[2] = in[2]; @@ -820,7 +820,7 @@ static float calc_radial_symmetry_feather(Sculpt *sd, StrokeCache *cache, const static float calc_symmetry_feather(Sculpt *sd, StrokeCache *cache) { - if (sd->flags & SCULPT_SYMMETRY_FEATHER) { + if (sd->paint.symmetry_flags & PAINT_SYMMETRY_FEATHER) { float overlap; int symm = cache->symmetry; int i; @@ -3467,7 +3467,7 @@ static void do_symmetrical_brush_actions(Sculpt *sd, Object *ob, Brush *brush = BKE_paint_brush(&sd->paint); SculptSession *ss = ob->sculpt; StrokeCache *cache = ss->cache; - const char symm = sd->flags & 7; + const char symm = sd->paint.symmetry_flags & 7; int i; float feather = calc_symmetry_feather(sd, ss->cache); @@ -4015,7 +4015,7 @@ static void sculpt_update_brush_delta(UnifiedPaintSettings *ups, Object *ob, Bru /* location stays the same for finding vertices in brush radius */ copy_v3_v3(cache->true_location, cache->orig_grab_location); - ups->draw_anchored = 1; + ups->draw_anchored = true; copy_v2_v2(ups->anchored_initial_mouse, cache->initial_mouse); ups->anchored_size = ups->pixel_radius; } @@ -4142,7 +4142,7 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob, #undef PIXEL_INPUT_THRESHHOLD } - ups->draw_anchored = 1; + ups->draw_anchored = true; copy_v2_v2(ups->anchored_initial_mouse, cache->initial_mouse); copy_v3_v3(cache->anchored_location, cache->true_location); ups->anchored_size = ups->pixel_radius; @@ -4314,7 +4314,7 @@ static void sculpt_restore_mesh(Sculpt *sd, Object *ob) if ((brush->flag & BRUSH_ANCHORED) || (brush->sculpt_tool == SCULPT_TOOL_GRAB && BKE_brush_use_size_pressure(ss->cache->vc->scene, brush)) || - (brush->flag & BRUSH_RESTORE_MESH)) + (brush->flag & BRUSH_DRAG_DOT)) { paint_mesh_restore_co(sd, ob); } @@ -4456,7 +4456,6 @@ static void sculpt_brush_exit_tex(Sculpt *sd) static void sculpt_stroke_done(const bContext *C, struct PaintStroke *UNUSED(stroke)) { - UnifiedPaintSettings *ups = &CTX_data_tool_settings(C)->unified_paint_settings; Object *ob = CTX_data_active_object(C); Scene *scene = CTX_data_scene(C); SculptSession *ss = ob->sculpt; @@ -4464,10 +4463,6 @@ static void sculpt_stroke_done(const bContext *C, struct PaintStroke *UNUSED(str sculpt_omp_done(ss); - /* reset values used to draw brush after completing the stroke */ - ups->draw_anchored = 0; - ups->draw_pressure = 0; - /* Finished */ if (ss->cache) { Brush *brush = BKE_paint_brush(&sd->paint); @@ -5068,7 +5063,7 @@ static int sculpt_mode_toggle_exec(bContext *C, wmOperator *op) ts->sculpt = MEM_callocN(sizeof(Sculpt), "sculpt mode data"); /* Turn on X plane mirror symmetry by default */ - ts->sculpt->flags |= SCULPT_SYMM_X; + ts->sculpt->paint.symmetry_flags |= PAINT_SYMM_X; /* Make sure at least dyntopo subdivision is enabled */ ts->sculpt->flags |= SCULPT_DYNTOPO_SUBDIVIDE; |