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-05-16 12:43:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-16 12:46:07 +0300
commitf51521148fef326bd72477481618645306ea0821 (patch)
treeb5eada5ad4907a65ee91c6bcf38506c95d9572ca
parent59b7f3a16463f2286a8349028f15e7e7a3be06dc (diff)
UI: use HIDE_HEADER for active tool in properties editor
Unfortunately this isn't yet compatible with category tabs, define a duplicate panel only for the properties editor.
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 35b37475f17..aa13f9b3961 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4726,6 +4726,27 @@ class VIEW3D_PT_active_tool(Panel, ToolActivePanelHelper):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_category = "Tool"
+ # See comment below.
+ # bl_options = {'HIDE_HEADER'}
+
+ # Don't show in properties editor.
+ @classmethod
+ def poll(cls, context):
+ return context.area.type == 'VIEW_3D'
+
+
+# FIXME(campbell): remove this second panel once 'HIDE_HEADER' works with category tabs,
+# Currently pinning allows ordering headerless panels below panels with headers.
+class VIEW3D_PT_active_tool_duplicate(Panel, ToolActivePanelHelper):
+ bl_space_type = 'VIEW_3D'
+ bl_region_type = 'UI'
+ bl_category = "Tool"
+ bl_options = {'HIDE_HEADER'}
+
+ # Only show in properties editor.
+ @classmethod
+ def poll(cls, context):
+ return context.area.type != 'VIEW_3D'
class VIEW3D_PT_view3d_properties(Panel):
@@ -6550,6 +6571,7 @@ classes = (
VIEW3D_MT_orientations_pie,
VIEW3D_MT_proportional_editing_falloff_pie,
VIEW3D_PT_active_tool,
+ VIEW3D_PT_active_tool_duplicate,
VIEW3D_PT_view3d_properties,
VIEW3D_PT_view3d_lock,
VIEW3D_PT_view3d_cursor,