diff options
author | Antonioya <blendergit@gmail.com> | 2018-11-09 01:29:14 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-11-09 21:25:38 +0300 |
commit | 983a928e1d481dd91c36f597e2c39daba6d0f8ad (patch) | |
tree | 3bd0f463cc124b45b73bb0352d48c4c1750ed46e /source/blender/editors/gpencil/gpencil_utils.c | |
parent | a4bfccc439792be10df92541595f8f3ef0ca7fe7 (diff) |
GP: Reorder Move to Layer to TopDown
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_utils.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 8a2bd54b002..ccff027f65d 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -399,12 +399,12 @@ const EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf( /* separator */ RNA_enum_item_add_separator(&item, &totitem); } - + const int tot = BLI_listbase_count(&gpd->layers); /* Existing layers */ - for (gpl = gpd->layers.first, i = 0; gpl; gpl = gpl->next, i++) { + for (gpl = gpd->layers.last, i = 0; gpl; gpl = gpl->prev, i++) { item_tmp.identifier = gpl->info; item_tmp.name = gpl->info; - item_tmp.value = i; + item_tmp.value = tot - i - 1; if (gpl->flag & GP_LAYER_ACTIVE) item_tmp.icon = ICON_GREASEPENCIL; |