GPencil: Move Autofit parameter from topbar to advanced panel

As this is used only in corner cases, it is better keep in advanced panel.

Also renamed to "Limit to Viewport"
This commit is contained in:
Antonio Vazquez 2021-02-11 15:55:33 +01:00
parent 18ac37a39b
commit 4f8bc3e35c
3 changed files with 7 additions and 8 deletions

View File

@ -1223,8 +1223,6 @@ def brush_basic_gpencil_paint_settings(layout, context, brush, *, compact=False)
row.prop(gp_settings, "fill_leak", text="Leak Size")
row = layout.row(align=True)
row.prop(brush, "size", text="Thickness")
row = layout.row(align=True)
row.prop(gp_settings, "use_fill_autofit", text="", icon="SNAP_FACE_CENTER")
else: # brush.gpencil_tool == 'DRAW/TINT':
row = layout.row(align=True)

View File

@ -1463,6 +1463,10 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel):
sub.active = gp_settings.show_fill
sub.prop(gp_settings, "fill_threshold", text="")
col.separator()
row = col.row(align=True)
row.prop(gp_settings, "use_fill_limit")
class VIEW3D_PT_tools_grease_pencil_brush_stroke(Panel, View3DPanel):
bl_context = ".greasepencil_paint"

View File

@ -1849,13 +1849,10 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
prop, "Show Fill", "Show transparent lines to use as boundary for filling");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
prop = RNA_def_property(srna, "use_fill_autofit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GP_BRUSH_FILL_FIT_DISABLE);
prop = RNA_def_property(srna, "use_fill_limit", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_FILL_FIT_DISABLE);
RNA_def_property_boolean_default(prop, true);
RNA_def_property_ui_text(
prop,
"Automatic Fit",
"Fit the shape of the stroke to try to fill areas outside visible viewport");
RNA_def_property_ui_text(prop, "Limit to Viewport", "Fill only visible areas in viewport");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
prop = RNA_def_property(srna, "use_default_eraser", PROP_BOOLEAN, PROP_NONE);