diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2020-09-10 02:47:02 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2020-09-10 02:50:31 +0300 |
commit | 4e3cb9563852f82d4d06435f143cafe998352497 (patch) | |
tree | b798286ec6064b5e1116dd36fffbbae675ef10b7 /release/scripts/startup/bl_ui | |
parent | 5badf1653173a23607244ebbda72c710860ea795 (diff) |
UI: Add Missing UV Unwrap Operators to UV Editor
This commit also changes the U shortcut to open the unwrap menu instead
of the Unwrap operator. The unwrap operator can now be accessed by
pressing U twice.
Note, these operators use the 3D Viewports selection and not the UV
Editor selection. In the future the operators should unwrap based on the
selection within that editor.
Fixes T80600
Differential Revision: https://developer.blender.org/D8834
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index c63b0768957..a490208fd5e 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -364,6 +364,29 @@ class IMAGE_MT_uvs_split(Menu): layout.operator("uv.select_split", text="Selection") +class IMAGE_MT_uvs_unwrap(Menu): + bl_label = "Unwrap" + + def draw(self, context): + layout = self.layout + + layout.operator("uv.unwrap") + + layout.separator() + + layout.operator_context = 'INVOKE_DEFAULT' + layout.operator("uv.smart_project") + layout.operator("uv.lightmap_pack") + layout.operator("uv.follow_active_quads") + + layout.separator() + + layout.operator_context = 'EXEC_REGION_WIN' + layout.operator("uv.cube_project") + layout.operator("uv.cylinder_project") + layout.operator("uv.sphere_project") + + class IMAGE_MT_uvs(Menu): bl_label = "UV" @@ -388,7 +411,7 @@ class IMAGE_MT_uvs(Menu): layout.separator() layout.prop(uv, "use_live_unwrap") - layout.operator("uv.unwrap") + layout.menu("IMAGE_MT_uvs_unwrap") layout.separator() @@ -1508,6 +1531,7 @@ classes = ( IMAGE_MT_uvs_align, IMAGE_MT_uvs_merge, IMAGE_MT_uvs_split, + IMAGE_MT_uvs_unwrap, IMAGE_MT_uvs_select_mode, IMAGE_MT_uvs_context_menu, IMAGE_MT_mask_context_menu, |