From 7c44182c4a957bda032c49d15513682b6bbe705e Mon Sep 17 00:00:00 2001 From: Matias Mendiola Date: Thu, 29 Aug 2019 20:11:44 +0200 Subject: GPencil: Minor Menu tweaks - Added 'Hide Inactive Layers' operator and reordered 'Show/Hide' menu items - Move 'New Layer' to bottom in 'Move to Layer' operator for consistency. - Removed extra end points in some menu items (...) Reviewers: antoniov, billreynish Tags: #bf_blender, #grease_pencil Differential Revision: https://developer.blender.org/D5626 --- source/blender/editors/gpencil/gpencil_utils.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'source/blender/editors/gpencil/gpencil_utils.c') diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 2a0f16a4bbf..25b4036b8b1 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -401,17 +401,7 @@ const EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf(bContext *C, /* Create new layer */ /* TODO: have some way of specifying that we don't want this? */ - { - /* "New Layer" entry */ - item_tmp.identifier = "__CREATE__"; - item_tmp.name = "New Layer"; - item_tmp.value = -1; - item_tmp.icon = ICON_ADD; - RNA_enum_item_add(&item, &totitem, &item_tmp); - /* separator */ - RNA_enum_item_add_separator(&item, &totitem); - } const int tot = BLI_listbase_count(&gpd->layers); /* Existing layers */ for (gpl = gpd->layers.last, i = 0; gpl; gpl = gpl->prev, i++) { @@ -428,6 +418,17 @@ const EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf(bContext *C, RNA_enum_item_add(&item, &totitem, &item_tmp); } + { + /* separator */ + RNA_enum_item_add_separator(&item, &totitem); + + /* "New Layer" entry */ + item_tmp.identifier = "__CREATE__"; + item_tmp.name = "New Layer"; + item_tmp.value = -1; + item_tmp.icon = ICON_ADD; + RNA_enum_item_add(&item, &totitem, &item_tmp); + } RNA_enum_item_end(&item, &totitem); *r_free = true; -- cgit v1.2.3