[Bf-blender-cvs] [602e9e47324] greasepencil-refactor: GPencil: Recalc geometry only for deform sculpt
Antonio Vazquez
noreply at git.blender.org
Mon Feb 3 18:35:10 CET 2020
Commit: 602e9e47324e0eb1a9b58e844a8c933622ac3f19
Author: Antonio Vazquez
Date: Mon Feb 3 18:35:02 2020 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rB602e9e47324e0eb1a9b58e844a8c933622ac3f19
GPencil: Recalc geometry only for deform sculpt
===================================================================
M source/blender/editors/gpencil/gpencil_sculpt_paint.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
index 67fdbd3dfc6..5ed8a182713 100644
--- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c
+++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c
@@ -1569,6 +1569,7 @@ static bool gpsculpt_brush_do_frame(bContext *C,
const float diff_mat[4][4])
{
bool changed = false;
+ bool redo_geom = false;
Object *ob = gso->object;
char tool = gso->brush->gpencil_sculpt_tool;
@@ -1586,6 +1587,7 @@ static bool gpsculpt_brush_do_frame(bContext *C,
case GPSCULPT_TOOL_SMOOTH: /* Smooth strokes */
{
changed |= gpsculpt_brush_do_stroke(gso, gps, diff_mat, gp_brush_smooth_apply);
+ redo_geom |= changed;
break;
}
@@ -1619,30 +1621,35 @@ static bool gpsculpt_brush_do_frame(bContext *C,
changed |= true;
}
}
+ redo_geom |= changed;
break;
}
case GPSCULPT_TOOL_PUSH: /* Push points */
{
changed |= gpsculpt_brush_do_stroke(gso, gps, diff_mat, gp_brush_push_apply);
+ redo_geom |= changed;
break;
}
case GPSCULPT_TOOL_PINCH: /* Pinch points */
{
changed |= gpsculpt_brush_do_stroke(gso, gps, diff_mat, gp_brush_pinch_apply);
+ redo_geom |= changed;
break;
}
case GPSCULPT_TOOL_TWIST: /* Twist points around midpoint */
{
changed |= gpsculpt_brush_do_stroke(gso, gps, diff_mat, gp_brush_twist_apply);
+ redo_geom |= changed;
break;
}
case GPSCULPT_TOOL_RANDOMIZE: /* Apply jitter */
{
changed |= gpsculpt_brush_do_stroke(gso, gps, diff_mat, gp_brush_randomize_apply);
+ redo_geom |= changed;
break;
}
@@ -1652,7 +1659,7 @@ static bool gpsculpt_brush_do_frame(bContext *C,
}
/* Triangulation must be calculated. */
- if (changed) {
+ if (redo_geom) {
bGPDstroke *gps_active = (gps->runtime.gps_orig) ? gps->runtime.gps_orig : gps;
if (gpl->actframe == gpf) {
MaterialGPencilStyle *gp_style = BKE_material_gpencil_settings_get(ob, gps->mat_nr + 1);
More information about the Bf-blender-cvs
mailing list