diff options
author | Juanfran Matheu <jfmatheu> | 2022-05-05 01:16:15 +0300 |
---|---|---|
committer | Pablo Vazquez <pablo@blender.org> | 2022-05-05 01:23:25 +0300 |
commit | ed0964c97623a7542dab900ebda900f3953db4bb (patch) | |
tree | 17d6683ff76bc8c67ed3107c9772e7553d9e01d8 /release/scripts/startup/bl_ui/space_image.py | |
parent | 319a772b7f6ee480630e75a199b298b118f65d60 (diff) |
UI: Add Gizmos toggle to SpaceImage
This patch adds the show_gizmo and show_gizmo_navigate properties to the Image and UV editors.
Image Editor:
{F13026317}
UV Editor:
{F13026319}
VIDEO:
{F13026324}
Reviewed By: #user_interface, campbellbarton
Differential Revision: https://developer.blender.org/D14755
Diffstat (limited to 'release/scripts/startup/bl_ui/space_image.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 1dd50c979e2..d61055c9024 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -806,6 +806,13 @@ class IMAGE_HT_header(Header): layout.separator_spacer() + # Gizmo toggle & popover. + row = layout.row(align=True) + row.prop(sima, "show_gizmo", icon='GIZMO', text="") + sub = row.row(align=True) + sub.active = sima.show_gizmo + sub.popover(panel="IMAGE_PT_gizmo_display", text="") + # Overlay toggle & popover row = layout.row(align=True) row.prop(overlay, "show_overlays", icon='OVERLAY', text="") @@ -1453,6 +1460,26 @@ class IMAGE_PT_uv_cursor(Panel): col.prop(sima, "cursor_location", text="Location") +class IMAGE_PT_gizmo_display(Panel): + bl_space_type = 'IMAGE_EDITOR' + bl_region_type = 'HEADER' + bl_label = "Gizmos" + bl_ui_units_x = 8 + + def draw(self, context): + layout = self.layout + + view = context.space_data + + col = layout.column() + col.label(text="Viewport Gizmos") + col.separator() + + col.active = view.show_gizmo + colsub = col.column() + colsub.prop(view, "show_gizmo_navigate", text="Navigate") + + class IMAGE_PT_overlay(Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'HEADER' @@ -1680,6 +1707,7 @@ classes = ( IMAGE_PT_scope_sample, IMAGE_PT_uv_cursor, IMAGE_PT_annotation, + IMAGE_PT_gizmo_display, IMAGE_PT_overlay, IMAGE_PT_overlay_guides, IMAGE_PT_overlay_uv_edit, |