[Bf-blender-cvs] [7aaab357bdf] temp-lineart-contained: LineArt modifier UI tweaks.
Sebastian Parborg
noreply at git.blender.org
Tue Mar 16 14:48:34 CET 2021
Commit: 7aaab357bdf76851847b1ead69d6dd5585ff2d3f
Author: Sebastian Parborg
Date: Tue Mar 16 14:48:05 2021 +0100
Branches: temp-lineart-contained
https://developer.blender.org/rB7aaab357bdf76851847b1ead69d6dd5585ff2d3f
LineArt modifier UI tweaks.
===================================================================
M source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
M source/blender/makesrna/intern/rna_gpencil_modifier.c
===================================================================
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 6f893fda3bb..7fed771dabe 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -265,21 +265,25 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
/* Source is Scene. */
}
- uiLayout *col = uiLayoutColumn(layout, true);
-
- uiItemR(col, ptr, "use_contour", 0, NULL, ICON_NONE);
-
- const bool use_crease = RNA_boolean_get(ptr, "use_crease");
-
- uiItemR(col, ptr, "use_crease", 0, "Crease", ICON_NONE);
- if (use_crease) {
- uiItemR(col, ptr, "crease_threshold", UI_ITEM_R_SLIDER, "Threshold", ICON_NONE);
- }
+ uiLayout *col = uiLayoutColumnWithHeading(layout, true, IFACE_("Edge Types"));
+ uiItemR(col, ptr, "use_contour", 0, "Contour", ICON_NONE);
uiItemR(col, ptr, "use_material", 0, "Material", ICON_NONE);
uiItemR(col, ptr, "use_edge_mark", 0, "Edge Marks", ICON_NONE);
uiItemR(col, ptr, "use_intersection", 0, "Intersection", ICON_NONE);
+ uiLayout *row = uiLayoutRow(col, true);
+ /* Don't automatically add the "animate property" button. */
+ uiLayoutSetPropDecorate(row, false);
+
+ const bool use_crease = RNA_boolean_get(ptr, "use_crease");
+ uiLayout *sub = uiLayoutRow(row, true);
+ uiItemR(sub, ptr, "use_crease", 0, "Crease", ICON_NONE);
+ sub = uiLayoutRow(sub, true);
+ uiLayoutSetEnabled(sub, use_crease);
+ uiItemR(sub, ptr, "crease_threshold", UI_ITEM_R_SLIDER, "", ICON_NONE);
+ uiItemDecoratorR(row, ptr, "crease_threshold", 0);
+
uiItemPointerR(layout, ptr, "target_layer", &obj_data_ptr, "layers", NULL, ICON_GREASEPENCIL);
uiItemPointerR(
layout, ptr, "target_material", &obj_data_ptr, "materials", NULL, ICON_SHADING_TEXTURE);
@@ -301,11 +305,9 @@ static void style_panel_draw(const bContext *UNUSED(C), Panel *panel)
uiLayoutSetPropSep(layout, true);
uiLayoutSetEnabled(layout, !is_baked);
- uiLayout *col = uiLayoutColumn(layout, true);
-
- uiItemR(col, ptr, "thickness", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "thickness", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
- uiItemR(col, ptr, "opacity", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "opacity", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
}
static void occlusion_panel_draw(const bContext *UNUSED(C), Panel *panel)
@@ -365,7 +367,7 @@ static void chaining_panel_draw(const bContext *UNUSED(C), Panel *panel)
uiLayoutSetPropSep(layout, true);
uiLayoutSetEnabled(layout, !is_baked);
- uiLayout *col = uiLayoutColumn(layout, true);
+ uiLayout *col = uiLayoutColumnWithHeading(layout, true, IFACE_("Chain"));
uiItemR(col, ptr, "fuzzy_intersections", 0, NULL, ICON_NONE);
uiItemR(col, ptr, "fuzzy_everything", 0, NULL, ICON_NONE);
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 7b15918225c..b84fcf4cf7c 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -2327,23 +2327,22 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
srna = RNA_def_struct(brna, "LineartGpencilModifier", "GpencilModifier");
RNA_def_struct_ui_text(
- srna, "Line Art Modifier", "Genreate Line Art strokes from selected source");
+ srna, "Line Art Modifier", "Generate Line Art strokes from selected source");
RNA_def_struct_sdna(srna, "LineartGpencilModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_EDGESPLIT);
prop = RNA_def_property(srna, "fuzzy_intersections", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_INTERSECTION_AS_CONTOUR);
- RNA_def_property_ui_text(
- prop,
- "Intersection As Contour",
- "Treat intersection lines as contour so those lines can be chained together");
+ RNA_def_property_ui_text(prop,
+ "Intersection With Contour",
+ "Treat intersection and contour lines as if they were the same type so "
+ "they can be chained together");
RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "fuzzy_everything", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "calculation_flags", LRT_EVERYTHING_AS_CONTOUR);
- RNA_def_property_ui_text(prop,
- "All Lines As Contour",
- "Treat all lines as contour so those lines can be chained together");
+ RNA_def_property_ui_text(
+ prop, "All Lines", "Treat all lines as the same line type so they can be chained together");
RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "allow_duplication", PROP_BOOLEAN, PROP_NONE);
More information about the Bf-blender-cvs
mailing list