diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h index 33ee5887127..7fdbe522c79 100644 --- a/source/blender/makesdna/DNA_modifier_types.h +++ b/source/blender/makesdna/DNA_modifier_types.h @@ -2542,11 +2542,10 @@ typedef enum GreasePencilModifierColorMode { } GreasePencilModifierColorMode; typedef enum GreasePencilOpacityModifierFlag { - MOD_GREASE_PENCIL_OPACITY_OPEN_INFLUENCE_PANEL = (1 << 0), /* Use vertex group as opacity factors instead of influence. */ - MOD_GREASE_PENCIL_OPACITY_USE_WEIGHT_AS_FACTOR = (1 << 1), + MOD_GREASE_PENCIL_OPACITY_USE_WEIGHT_AS_FACTOR = (1 << 0), /* Set the opacity for every point in a stroke, otherwise multiply existing opacity. */ - MOD_GREASE_PENCIL_OPACITY_USE_UNIFORM_OPACITY = (1 << 2), + MOD_GREASE_PENCIL_OPACITY_USE_UNIFORM_OPACITY = (1 << 1), } GreasePencilOpacityModifierFlag; typedef struct GreasePencilSubdivModifierData { diff --git a/source/blender/makesrna/intern/rna_modifier.cc b/source/blender/makesrna/intern/rna_modifier.cc index bfb5d8a5bad..90b952a55b7 100644 --- a/source/blender/makesrna/intern/rna_modifier.cc +++ b/source/blender/makesrna/intern/rna_modifier.cc @@ -7695,13 +7695,6 @@ static void rna_def_modifier_grease_pencil_opacity(BlenderRNA *brna) srna, "rna_GreasePencilOpacityModifier_vertex_group_name_set"); rna_def_modifier_grease_pencil_custom_curve(srna); - prop = RNA_def_property(srna, "open_influence_panel", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna( - prop, nullptr, "flag", MOD_GREASE_PENCIL_OPACITY_OPEN_INFLUENCE_PANEL); - RNA_def_property_ui_text(prop, "Open Influence Panel", "Open the influence panel"); - RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE); - RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, nullptr); - RNA_define_lib_overridable(true); prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE); diff --git a/source/blender/modifiers/intern/MOD_grease_pencil_opacity.cc b/source/blender/modifiers/intern/MOD_grease_pencil_opacity.cc index 3df437da665..03029fa439d 100644 --- a/source/blender/modifiers/intern/MOD_grease_pencil_opacity.cc +++ b/source/blender/modifiers/intern/MOD_grease_pencil_opacity.cc @@ -17,6 +17,7 @@ #include "BKE_geometry_set.hh" #include "BKE_grease_pencil.hh" #include "BKE_modifier.hh" +#include "BKE_screen.hh" #include "BLO_read_write.hh" @@ -262,8 +263,12 @@ static void panel_draw(const bContext *C, Panel *panel) } } + LayoutPanelState *influence_panel_state = BKE_panel_layout_panel_state_ensure( + panel, "influence", true); + PointerRNA influence_state_ptr = RNA_pointer_create( + nullptr, &RNA_LayoutPanelState, influence_panel_state); if (uiLayout *influence_panel = uiLayoutPanel( - C, layout, "Influence", ptr, "open_influence_panel")) + C, layout, "Influence", &influence_state_ptr, "is_open")) { modifier::greasepencil::draw_layer_filter_settings(C, influence_panel, ptr); modifier::greasepencil::draw_material_filter_settings(C, influence_panel, ptr);