GPv3: General panel in offset modifier
Same as legacy gp offset modifier Resolves #118608 Pull Request: https://projects.blender.org/blender/blender/pulls/118647
This commit is contained in:
committed by
Pratik Borhade
parent
b492ac723b
commit
0209928647
@@ -8285,7 +8285,8 @@ static void rna_def_modifier_grease_pencil_offset(BlenderRNA *brna)
|
||||
rna_def_modifier_grease_pencil_vertex_group(
|
||||
srna, "rna_GreasePencilOffsetModifier_vertex_group_name_set");
|
||||
|
||||
rna_def_modifier_panel_open_prop(srna, "open_influence_panel", 0);
|
||||
rna_def_modifier_panel_open_prop(srna, "open_general_panel", 0);
|
||||
rna_def_modifier_panel_open_prop(srna, "open_influence_panel", 1);
|
||||
|
||||
prop = RNA_def_property(srna, "offset_mode", PROP_ENUM, PROP_NONE);
|
||||
RNA_def_property_enum_items(prop, offset_mode_items);
|
||||
|
||||
@@ -386,10 +386,13 @@ static void panel_draw(const bContext *C, Panel *panel)
|
||||
const auto offset_mode = GreasePencilOffsetModifierMode(RNA_enum_get(ptr, "offset_mode"));
|
||||
|
||||
uiLayoutSetPropSep(layout, true);
|
||||
|
||||
uiItemR(layout, ptr, "location", UI_ITEM_NONE, nullptr, ICON_NONE);
|
||||
uiItemR(layout, ptr, "rotation", UI_ITEM_NONE, nullptr, ICON_NONE);
|
||||
uiItemR(layout, ptr, "scale", UI_ITEM_NONE, nullptr, ICON_NONE);
|
||||
if (uiLayout *general_panel = uiLayoutPanelProp(C, layout, ptr, "open_general_panel", "General"))
|
||||
{
|
||||
uiLayoutSetPropSep(general_panel, true);
|
||||
uiItemR(general_panel, ptr, "location", UI_ITEM_NONE, nullptr, ICON_NONE);
|
||||
uiItemR(general_panel, ptr, "rotation", UI_ITEM_NONE, nullptr, ICON_NONE);
|
||||
uiItemR(general_panel, ptr, "scale", UI_ITEM_NONE, nullptr, ICON_NONE);
|
||||
}
|
||||
|
||||
LayoutPanelState *advanced_panel_state = BKE_panel_layout_panel_state_ensure(
|
||||
panel, "advanced", true);
|
||||
|
||||
Reference in New Issue
Block a user