diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-09-29 15:58:29 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-09-29 15:58:29 +0300 |
commit | d2e576f34c6d428fb2c2ba855a0e29a2ba132549 (patch) | |
tree | a9fa591840b8554eabfe3f69c09c59412600b85c /source/blender | |
parent | 10f1972ff78bffb5323cebb85125c64efc7b5ca8 (diff) |
GPencil: Remove Fill `use_collide_only` option
After a lot of testing, this option is not required and
now this is managed by stroke_collsion.
If the stroke_collision is enabled, only collide strokes
are used.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 8 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_brush_enums.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 7 |
3 files changed, 4 insertions, 13 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index d1e51bf64d2..3f49ced16da 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -857,12 +857,12 @@ static bool gpencil_stroke_is_drawable(tGPDfill *tgpf, bGPDstroke *gps) const bool is_line_mode = (tgpf->fill_extend_mode == GP_FILL_EMODE_EXTEND); const bool show_help = (tgpf->flag & GP_BRUSH_FILL_SHOW_HELPLINES) != 0; const bool show_extend = (tgpf->flag & GP_BRUSH_FILL_SHOW_EXTENDLINES) != 0; + const bool use_stroke_collide = (tgpf->flag & GP_BRUSH_FILL_STROKE_COLLIDE) != 0; const bool is_extend_stroke = (gps->flag & GP_STROKE_NOFILL) && (gps->flag & GP_STROKE_TAG); const bool is_help_stroke = (gps->flag & GP_STROKE_NOFILL) && (gps->flag & GP_STROKE_HELP); - const bool only_collide_strokes = (tgpf->flag & GP_BRUSH_FILL_COLLIDE_ONLY) != 0; const bool stroke_collide = (gps->flag & GP_STROKE_COLLIDE) != 0; - if (is_line_mode && is_extend_stroke && only_collide_strokes && tgpf->is_render && + if (is_line_mode && is_extend_stroke && tgpf->is_render && use_stroke_collide && !stroke_collide) { return false; } @@ -910,7 +910,7 @@ static void gpencil_draw_basic_stroke(tGPDfill *tgpf, !(gps->flag & GP_STROKE_HELP); const bool is_help = gps->flag & GP_STROKE_HELP; const bool is_line_mode = (tgpf->fill_extend_mode == GP_FILL_EMODE_EXTEND); - const bool only_collide = (tgpf->flag & GP_BRUSH_FILL_COLLIDE_ONLY) != 0; + const bool use_stroke_collide = (tgpf->flag & GP_BRUSH_FILL_STROKE_COLLIDE) != 0; const bool stroke_collide = (gps->flag & GP_STROKE_COLLIDE) != 0; if (!gpencil_stroke_is_drawable(tgpf, gps)) { @@ -931,7 +931,7 @@ static void gpencil_draw_basic_stroke(tGPDfill *tgpf, col[3] = (gps->flag & GP_STROKE_TAG) ? 0.0f : 0.5f; } else if ((is_extend) && (!tgpf->is_render)) { - if (stroke_collide || !only_collide || !is_line_mode) { + if (stroke_collide || !use_stroke_collide || !is_line_mode) { copy_v4_v4(col, extend_col); } else { diff --git a/source/blender/makesdna/DNA_brush_enums.h b/source/blender/makesdna/DNA_brush_enums.h index 9b2dad915ed..570b569a4dd 100644 --- a/source/blender/makesdna/DNA_brush_enums.h +++ b/source/blender/makesdna/DNA_brush_enums.h @@ -91,8 +91,6 @@ typedef enum eGPDbrush_Flag { GP_BRUSH_OUTLINE_STROKE = (1 << 17), /* Collide with stroke. */ GP_BRUSH_FILL_STROKE_COLLIDE = (1 << 18), - /* Extend lines only close if collide. */ - GP_BRUSH_FILL_COLLIDE_ONLY = (1 << 19), } eGPDbrush_Flag; typedef enum eGPDbrush_Flag2 { diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 510fa8a6126..3c9590ddcbe 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -1976,13 +1976,6 @@ static void rna_def_gpencil_options(BlenderRNA *brna) prop, "Strokes Collision", "Check if extend lines collide with strokes"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - prop = RNA_def_property(srna, "use_collide_only", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_FILL_COLLIDE_ONLY); - RNA_def_property_boolean_default(prop, false); - RNA_def_property_ui_text( - prop, "Only Collide Lines", "Use for closing gaps only if the extend strokes collide"); - RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - prop = RNA_def_property(srna, "show_fill", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GP_BRUSH_FILL_HIDE); RNA_def_property_boolean_default(prop, true); |