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:
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index f205559b941..9593a1364e7 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -101,8 +101,9 @@ static void generate_strokes_actual(
lmd->use_multiple_levels ? lmd->level_end : lmd->level_start,
lmd->target_material ? BKE_gpencil_object_material_index_get(ob, lmd->target_material) : 0,
lmd->edge_types,
- lmd->material_mask_flags,
+ lmd->mask_switches,
lmd->material_mask_bits,
+ lmd->intersection_mask,
lmd->thickness,
lmd->opacity,
lmd->source_vertex_group,
@@ -462,6 +463,32 @@ static void material_mask_panel_draw(const bContext *UNUSED(C), Panel *panel)
uiItemR(col, ptr, "use_material_mask_match", 0, IFACE_("Match All Masks"), ICON_NONE);
}
+static void intersection_panel_draw(const bContext *UNUSED(C), Panel *panel)
+{
+ uiLayout *layout = panel->layout;
+ PointerRNA *ptr = gpencil_modifier_panel_get_property_pointers(panel, NULL);
+
+ const bool is_baked = RNA_boolean_get(ptr, "is_baked");
+ uiLayoutSetEnabled(layout, !is_baked);
+
+ uiLayoutSetPropSep(layout, true);
+
+ uiLayoutSetActive(layout, RNA_boolean_get(ptr, "use_intersection"));
+
+ uiLayout *row = uiLayoutRow(layout, true);
+ uiLayoutSetPropDecorate(row, false);
+ uiLayout *sub = uiLayoutRowWithHeading(row, true, IFACE_("Masks"));
+ char text[2] = "0";
+
+ 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);
+ }
+ uiItemL(row, "", ICON_BLANK1); /* Space for decorator. */
+
+ uiLayout *col = uiLayoutColumn(layout, true);
+ uiItemR(col, ptr, "use_intersection_match", 0, IFACE_("Match All Masks"), ICON_NONE);
+}
static void face_mark_panel_draw_header(const bContext *UNUSED(C), Panel *panel)
{
uiLayout *layout = panel->layout;
@@ -627,6 +654,8 @@ static void panelRegister(ARegionType *region_type)
material_mask_panel_draw,
occlusion_panel);
gpencil_modifier_subpanel_register(
+ region_type, "intersection", "Intersection", NULL, intersection_panel_draw, panel_type);
+ gpencil_modifier_subpanel_register(
region_type, "face_mark", "", face_mark_panel_draw_header, face_mark_panel_draw, panel_type);
gpencil_modifier_subpanel_register(
region_type, "chaining", "Chaining", NULL, chaining_panel_draw, panel_type);