Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-13 13:23:07 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-13 13:45:02 +0300
commit65b03129041f42dabe1cdfd5154fc6efa6e1e758 (patch)
treecef91a2e1528912b23f16f2dc1c5e41aab0d0315 /release/scripts
parentcd60843aef84b1801c9e0ff5c8d63926a20435cd (diff)
3D View: move gizmo draw options out of overlays
Gizmo's now have their own popover in preparation for making transform gizmos accessible without having to use tools See: T63518
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py55
1 files changed, 30 insertions, 25 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 950dcc71c41..36fc0a38fcb 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -132,6 +132,17 @@ class VIEW3D_HT_header(Header):
# Mode & Transform Settings
scene = context.scene
+ # Gizmo popover.
+ row = layout.row(align=True)
+ # FIXME: place-holder icon.
+ row.prop(view, "show_gizmo", text="", toggle=True, icon='EMPTY_DATA')
+ sub = row.row(align=True)
+ sub.active = view.show_gizmo
+ sub.popover(
+ panel="VIEW3D_PT_gizmo_display",
+ text="",
+ )
+
# Orientation
if object_mode in {'OBJECT', 'EDIT', 'EDIT_GPENCIL'} or has_pose_mode:
orient_slot = scene.transform_orientation_slots[0]
@@ -4756,42 +4767,36 @@ class VIEW3D_PT_shading_options_ssao(Panel):
col.prop(scene.display, "matcap_ssao_attenuation")
-class VIEW3D_PT_overlay(Panel):
+class VIEW3D_PT_gizmo_display(Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'HEADER'
- bl_label = "Overlays"
- bl_ui_units_x = 13
-
- def draw(self, context):
- layout = self.layout
- layout.label(text="Viewport Overlays")
-
-
-class VIEW3D_PT_overlay_gizmo(Panel):
- bl_space_type = 'VIEW_3D'
- bl_region_type = 'HEADER'
- bl_parent_id = 'VIEW3D_PT_overlay'
bl_label = "Gizmo"
- def draw_header(self, context):
- view = context.space_data
- self.layout.prop(view, "show_gizmo", text="")
-
def draw(self, context):
layout = self.layout
view = context.space_data
overlay = view.overlay
- display_all = overlay.show_overlays
col = layout.column()
- col.active = display_all
+ col.label(text="Viewport Gizmos")
- row = col.row(align=True)
- row.active = view.show_gizmo
- row.prop(view, "show_gizmo_navigate", text="Navigate", toggle=True)
- row.prop(view, "show_gizmo_context", text="Active Object", toggle=True)
- row.prop(view, "show_gizmo_tool", text="Active Tools", toggle=True)
+ col.active = view.show_gizmo
+ colsub = col.column()
+ colsub.prop(view, "show_gizmo_navigate", text="Navigate")
+ colsub.prop(view, "show_gizmo_context", text="Active Object")
+ colsub.prop(view, "show_gizmo_tool", text="Active Tools")
+
+
+class VIEW3D_PT_overlay(Panel):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'HEADER'
+ bl_label = "Overlays"
+ bl_ui_units_x = 13
+
+ def draw(self, context):
+ layout = self.layout
+ layout.label(text="Viewport Overlays")
class VIEW3D_PT_overlay_guides(Panel):
@@ -6045,8 +6050,8 @@ classes = (
VIEW3D_PT_shading_options,
VIEW3D_PT_shading_options_shadow,
VIEW3D_PT_shading_options_ssao,
+ VIEW3D_PT_gizmo_display,
VIEW3D_PT_overlay,
- VIEW3D_PT_overlay_gizmo,
VIEW3D_PT_overlay_guides,
VIEW3D_PT_overlay_object,
VIEW3D_PT_overlay_geometry,