[Bf-blender-cvs] [12dd08ef524] master: UI: Fix aligned popovers not always turning inactive

Red Mser noreply at git.blender.org
Thu Aug 20 16:35:25 CEST 2020


Commit: 12dd08ef5244686f349ea4f319642f3533c8d8ba
Author: Red Mser
Date:   Thu Aug 20 10:34:55 2020 -0400
Branches: master
https://developer.blender.org/rB12dd08ef5244686f349ea4f319642f3533c8d8ba

UI: Fix aligned popovers not always turning inactive

Popovers which are aligned with properties should turn themself
(and the panel they open) inactive when the corresponding property
toggle is turned off. A notable exception is the snap settings
popover, as snapping can still be used when the toggle is off.

Differential Revision: https://developer.blender.org/D8584

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index c251b4bfcac..deac4e4c507 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -5942,7 +5942,7 @@ class VIEW3D_PT_gizmo_display(Panel):
         layout.separator()
 
         col = layout.column()
-        col.active = view.show_gizmo_context
+        col.active = view.show_gizmo and view.show_gizmo_context
         col.label(text="Object Gizmos")
         col.prop(scene.transform_orientation_slots[1], "type", text="")
         col.prop(view, "show_gizmo_object_translate", text="Move")
@@ -5953,6 +5953,7 @@ class VIEW3D_PT_gizmo_display(Panel):
 
         # Match order of object type visibility
         col = layout.column()
+        col.active = view.show_gizmo
         col.label(text="Empty")
         col.prop(view, "show_gizmo_empty_image", text="Image")
         col.prop(view, "show_gizmo_empty_force_field", text="Force Field")
@@ -6111,8 +6112,12 @@ class VIEW3D_PT_overlay_motion_tracking(Panel):
     bl_label = "Motion Tracking"
 
     def draw_header(self, context):
+        layout = self.layout
         view = context.space_data
-        self.layout.prop(view, "show_reconstruction", text=self.bl_label)
+        overlay = view.overlay
+        display_all = overlay.show_overlays
+        layout.active = display_all
+        layout.prop(view, "show_reconstruction", text=self.bl_label)
 
     def draw(self, context):
         layout = self.layout
@@ -6134,6 +6139,7 @@ class VIEW3D_PT_overlay_motion_tracking(Panel):
             sub.prop(view, "show_bundle_names", text="Marker Names")
 
             col = layout.column()
+            col.active = display_all
             col.label(text="Tracks:")
             row = col.row(align=True)
             row.prop(view, "tracks_display_type", text="")
@@ -6569,6 +6575,8 @@ class VIEW3D_PT_proportional_edit(Panel):
         layout = self.layout
         tool_settings = context.tool_settings
         col = layout.column()
+        col.active = (tool_settings.use_proportional_edit_objects if context.mode == 'OBJECT'
+            else tool_settings.use_proportional_edit)
 
         if context.mode != 'OBJECT':
             col.prop(tool_settings, "use_proportional_connected")



More information about the Bf-blender-cvs mailing list