Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2022-09-28 15:32:56 +0300
committerAntonio Vazquez <blendergit@gmail.com>2022-09-28 16:44:20 +0300
commitfe19de5fccac1a26bfe87bc41386791e5ee049f2 (patch)
tree6a746fd233b3bc3785b44960968439cd8a1ed8b7 /source/blender/makesrna/intern/rna_brush.c
parente191cf89b280343d0bb04e76ddac7fd67a034205 (diff)
GPencil: Fill Tool - Check if extensions collide with real strokes
This commit is an improvement in the previous fill tool changes in order to improve how the extended strokes are managed. * Now, the algorithm checks if the extend cross a standard stroke, not only extend strokes. * Option to enable or disable the stroke cross checking because this can be slow in very complex scenes. * Added `D` key to toggle stroke cross option. * Option to use only collide strokes to be used as fill limit. If the option to use only collide strokes is enabled, the open extensions are in different color. * Status text now shows mode and the actual extend factor. This commits also contains a refactor of the loops to use arrays as much as possible. Reviewed By: mendio, pepeland Differential Revision: https://developer.blender.org/D16052
Diffstat (limited to 'source/blender/makesrna/intern/rna_brush.c')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index a50264e64db..aa2d94f9082 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -1930,6 +1930,20 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Extend Lines", "Show help lines for stroke extension");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ prop = RNA_def_property(srna, "use_collide_strokes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_FILL_STROKE_COLLIDE);
+ RNA_def_property_boolean_default(prop, false);
+ RNA_def_property_ui_text(
+ 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);