[Bf-blender-cvs] [3c1797a0ee0] temp-lineart-contained: LineArt: Remove text from mask switches
YimingWu
noreply at git.blender.org
Fri Jul 9 02:34:46 CEST 2021
Commit: 3c1797a0ee082f128a1f57924d14435f18ff5d29
Author: YimingWu
Date: Thu Jul 8 21:56:03 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rB3c1797a0ee082f128a1f57924d14435f18ff5d29
LineArt: Remove text from mask switches
===================================================================
M release/scripts/startup/bl_ui/properties_collection.py
M release/scripts/startup/bl_ui/properties_material.py
M source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_collection.py b/release/scripts/startup/bl_ui/properties_collection.py
index 3aa922bf467..3f7c0735eec 100644
--- a/release/scripts/startup/bl_ui/properties_collection.py
+++ b/release/scripts/startup/bl_ui/properties_collection.py
@@ -92,7 +92,7 @@ class COLLECTION_PT_lineart_collection(CollectionButtonsPanel, Panel):
col.active = collection.lineart_use_intersection_mask
row = col.row(align=True, heading="Masks")
for i in range(8):
- row.prop(collection, "lineart_intersection_mask", index=i, text=str(i), toggle=True)
+ row.prop(collection, "lineart_intersection_mask", index=i, text=" ", toggle=True)
if i == 3:
row = col.row(align=True)
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index b84e1fb9b3a..1c7f3639f0a 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -297,7 +297,7 @@ class MATERIAL_PT_lineart(MaterialButtonsPanel, Panel):
col.active = lineart.use_material_mask
row = col.row(align=True, heading="Masks")
for i in range(8):
- row.prop(lineart, "use_material_mask_bits", text=str(i), index=i, toggle=True)
+ row.prop(lineart, "use_material_mask_bits", text=" ", index=i, toggle=True)
if i == 3:
row = col.row(align=True)
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 17db2e14d29..e4c256e407b 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -511,19 +511,18 @@ static void material_mask_panel_draw(const bContext *UNUSED(C), Panel *panel)
uiLayoutSetEnabled(layout, RNA_boolean_get(ptr, "use_material_mask"));
- uiLayout *row = uiLayoutRow(layout, true);
- uiLayoutSetPropDecorate(row, false);
- uiLayout *sub = uiLayoutRowWithHeading(row, true, IFACE_("Masks"));
- char text[2] = "0";
+ uiLayout *col = uiLayoutColumn(layout, true);
+ uiLayout *sub = uiLayoutRowWithHeading(col, true, IFACE_("Masks"));
PropertyRNA *prop = RNA_struct_find_property(ptr, "use_material_mask_bits");
- for (int i = 0; i < 8; i++, text[0]++) {
- uiItemFullR(sub, ptr, prop, i, 0, UI_ITEM_R_TOGGLE, text, ICON_NONE);
+ for (int i = 0; i < 8; i++) {
+ uiItemFullR(sub, ptr, prop, i, 0, UI_ITEM_R_TOGGLE, " ", ICON_NONE);
+ if (i == 3) {
+ sub = uiLayoutRow(col, true);
+ }
}
- uiItemL(row, "", ICON_BLANK1); /* Space for decorator. */
- uiLayout *col = uiLayoutColumn(layout, true);
- uiItemR(col, ptr, "use_material_mask_match", 0, IFACE_("Exact Match"), ICON_NONE);
+ uiItemR(layout, ptr, "use_material_mask_match", 0, IFACE_("Exact Match"), ICON_NONE);
}
static void intersection_panel_draw_header(const bContext *UNUSED(C), Panel *panel)
@@ -554,19 +553,18 @@ static void intersection_panel_draw(const bContext *UNUSED(C), Panel *panel)
uiLayoutSetActive(layout, use_isec && use_isec_filter);
- uiLayout *row = uiLayoutRow(layout, true);
- uiLayoutSetPropDecorate(row, false);
- uiLayout *sub = uiLayoutRowWithHeading(row, true, IFACE_("Collection Masks"));
- char text[2] = "0";
+ uiLayout *col = uiLayoutColumn(layout, true);
+ uiLayout *sub = uiLayoutRowWithHeading(col, true, IFACE_("Collection Masks"));
PropertyRNA *prop = RNA_struct_find_property(ptr, "use_intersection_mask");
- for (int i = 0; i < 8; i++, text[0]++) {
- uiItemFullR(sub, ptr, prop, i, 0, UI_ITEM_R_TOGGLE, text, ICON_NONE);
+ for (int i = 0; i < 8; i++) {
+ uiItemFullR(sub, ptr, prop, i, 0, UI_ITEM_R_TOGGLE, " ", ICON_NONE);
+ if (i == 3) {
+ sub = uiLayoutRow(col, true);
+ }
}
- uiItemL(row, "", ICON_BLANK1); /* Space for decorator. */
- uiLayout *col = uiLayoutColumn(layout, true);
- uiItemR(col, ptr, "use_intersection_match", 0, IFACE_("Exact Match"), ICON_NONE);
+ uiItemR(layout, ptr, "use_intersection_match", 0, IFACE_("Exact Match"), ICON_NONE);
}
static void face_mark_panel_draw_header(const bContext *UNUSED(C), Panel *panel)
More information about the Bf-blender-cvs
mailing list