GPv3: Broken color modifier UI
Opacity modifier properties/ui was resued for color modifier Pull Request: https://projects.blender.org/blender/blender/pulls/117376
This commit is contained in:
committed by
Pratik Borhade
parent
6b8c64fc69
commit
a68b0957ed
@@ -222,25 +222,9 @@ static void panel_draw(const bContext *C, Panel *panel)
|
||||
|
||||
uiItemR(layout, ptr, "color_mode", UI_ITEM_NONE, nullptr, ICON_NONE);
|
||||
|
||||
if (color_mode == MOD_GREASE_PENCIL_COLOR_HARDNESS) {
|
||||
uiItemR(layout, ptr, "hardness_factor", UI_ITEM_NONE, nullptr, ICON_NONE);
|
||||
}
|
||||
else {
|
||||
const bool use_uniform_opacity = RNA_boolean_get(ptr, "use_uniform_opacity");
|
||||
const bool use_weight_as_factor = RNA_boolean_get(ptr, "use_weight_as_factor");
|
||||
|
||||
uiItemR(layout, ptr, "use_uniform_opacity", UI_ITEM_NONE, nullptr, ICON_NONE);
|
||||
const char *text = (use_uniform_opacity) ? IFACE_("Opacity") : IFACE_("Opacity Factor");
|
||||
|
||||
uiLayout *row = uiLayoutRow(layout, true);
|
||||
uiLayoutSetActive(row, !use_weight_as_factor || use_uniform_opacity);
|
||||
uiItemR(row, ptr, "color_factor", UI_ITEM_NONE, text, ICON_NONE);
|
||||
if (!use_uniform_opacity) {
|
||||
uiLayout *sub = uiLayoutRow(row, true);
|
||||
uiLayoutSetActive(sub, true);
|
||||
uiItemR(row, ptr, "use_weight_as_factor", UI_ITEM_NONE, "", ICON_MOD_VERTEX_WEIGHT);
|
||||
}
|
||||
}
|
||||
uiItemR(layout, ptr, "hue", UI_ITEM_R_SLIDER, nullptr, ICON_NONE);
|
||||
uiItemR(layout, ptr, "saturation", UI_ITEM_R_SLIDER, nullptr, ICON_NONE);
|
||||
uiItemR(layout, ptr, "value", UI_ITEM_R_SLIDER, nullptr, ICON_NONE);
|
||||
|
||||
LayoutPanelState *influence_panel_state = BKE_panel_layout_panel_state_ensure(
|
||||
panel, "influence", true);
|
||||
|
||||
Reference in New Issue
Block a user