diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-06-21 17:38:58 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-06-21 18:04:30 +0300 |
commit | 714001683888770f9d870ba73edd65f4c2757bda (patch) | |
tree | 432492e2e5f362b6d1e682c4bb27982996161139 /release | |
parent | d2f47017b984a50c2bf9ff355fb1d01865663d39 (diff) |
GPencil: Move New Layer option to menu top
The new layer option must be the first in the menu.
Differential Revision: https://developer.blender.org/D15255
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py index 8e5050be07e..8c43186313f 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -234,6 +234,11 @@ class GPENCIL_MT_move_to_layer(Menu): layout = self.layout gpd = context.gpencil_data if gpd: + layout.operator_context = 'INVOKE_REGION_WIN' + layout.operator("gpencil.move_to_layer", text="New Layer", icon='ADD').layer = -1 + + layout.separator() + gpl_active = context.active_gpencil_layer tot_layers = len(gpd.layers) i = tot_layers - 1 @@ -246,11 +251,6 @@ class GPENCIL_MT_move_to_layer(Menu): layout.operator("gpencil.move_to_layer", text=gpl.info, icon=icon, translate=False).layer = i i -= 1 - layout.separator() - - layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("gpencil.move_to_layer", text="New Layer", icon='ADD').layer = -1 - class GPENCIL_MT_layer_active(Menu): bl_label = "Change Active Layer" @@ -261,6 +261,10 @@ class GPENCIL_MT_layer_active(Menu): gpd = context.gpencil_data if gpd: + layout.operator("gpencil.layer_add", text="New Layer", icon='ADD') + + layout.separator() + gpl_active = context.active_gpencil_layer tot_layers = len(gpd.layers) i = tot_layers - 1 @@ -273,10 +277,6 @@ class GPENCIL_MT_layer_active(Menu): layout.operator("gpencil.layer_active", text=gpl.info, icon=icon).layer = i i -= 1 - layout.separator() - - layout.operator("gpencil.layer_add", text="New Layer", icon='ADD') - class GPENCIL_MT_material_active(Menu): bl_label = "Change Active Material" |