Fix T66501: Eraser very slow with guides
After testing the file, the problem was related to the fill material. As the fill material had the alpha channel set to 1.0, the fill triangulation was calculated, but the fill was disabled. Now, the fill flag is checked in order to avoid fill triangulation update.
This commit is contained in:
parent
6c1419d1f4
commit
741f80864e
Notes:
blender-bot
2023-04-14 09:18:04 +02:00
Referenced by issue #66501, Grease Pencil Eraser performance drops when guides are enabled
|
@ -240,7 +240,7 @@ static void gpencil_recalc_geometry_caches(Object *ob,
|
|||
if (gps->flag & GP_STROKE_RECALC_GEOMETRY) {
|
||||
/* Calculate triangles cache for filling area (must be done only after changes) */
|
||||
if ((gps->tot_triangles == 0) || (gps->triangles == NULL)) {
|
||||
if ((gps->totpoints > 2) &&
|
||||
if ((gps->totpoints > 2) && (gp_style->flag & GP_STYLE_FILL_SHOW) &&
|
||||
((gp_style->fill_rgba[3] > GPENCIL_ALPHA_OPACITY_THRESH) || (gp_style->fill_style > 0) ||
|
||||
(gpl->blend_mode != eGplBlendMode_Regular))) {
|
||||
gpencil_triangulate_stroke_fill(ob, gps);
|
||||
|
|
Loading…
Reference in New Issue