UI: move transform settings from pivot to options panel
authorCampbell Barton <ideasman42@gmail.com>
Wed, 11 Sep 2019 14:50:37 +0000 (00:50 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 11 Sep 2019 14:52:46 +0000 (00:52 +1000)
These weren't related to pivot, so add in a new options panel.

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

index 291de44c8cebc6c125efd2ab12d8e75f3ca25ae2..e98a3684ddc956b0dbeb0b9cf2895d3ef9268569 100644 (file)
@@ -6000,14 +6000,6 @@ class VIEW3D_PT_pivot_point(Panel):
         col.label(text="Pivot Point")
         col.prop(tool_settings, "transform_pivot_point", expand=True)
 
-        if (obj is None) or (mode in {'OBJECT', 'POSE', 'WEIGHT_PAINT'}):
-            col.separator()
-
-            col.label(text="Affect Only")
-            col.prop(tool_settings, "use_transform_data_origin", text="Origins")
-            col.prop(tool_settings, "use_transform_pivot_point_align", text="Locations")
-            col.prop(tool_settings, "use_transform_skip_children", text="Parents (Skip Children)")
-
 
 class VIEW3D_PT_snapping(Panel):
     bl_space_type = 'VIEW_3D'
index 3ff7bd83b1ff3a2f538a0bfbc8afc8348c2a6db0..f0712e0ae86642a0c02e461927c197f5d23ddd91 100644 (file)
@@ -122,6 +122,39 @@ def is_not_gpencil_edit_mode(context):
     return not is_gpmode
 
 
+# ********** default tools for object mode ****************
+
+
+class VIEW3D_PT_tools_object_options(View3DPanel, Panel):
+    bl_category = "Tool"
+    bl_context = ".objectmode"  # dot on purpose (access from topbar)
+    bl_label = "Options"
+
+    def draw(self, context):
+        # layout = self.layout
+        pass
+
+
+class VIEW3D_PT_tools_object_options_transform(View3DPanel, Panel):
+    bl_category = "Tool"
+    bl_context = ".objectmode"  # dot on purpose (access from topbar)
+    bl_label = "Transform"
+    bl_parent_id = "VIEW3D_PT_tools_object_options"
+
+    def draw(self, context):
+        layout = self.layout
+
+        layout.use_property_split = True
+        layout.use_property_decorate = False
+
+        tool_settings = context.tool_settings
+
+        layout.label(text="Affect Only")
+        layout.prop(tool_settings, "use_transform_data_origin", text="Origins")
+        layout.prop(tool_settings, "use_transform_pivot_point_align", text="Locations")
+        layout.prop(tool_settings, "use_transform_skip_children", text="Parents (Skip Children)")
+
+
 # ********** default tools for editmode_mesh ****************
 
 
@@ -262,12 +295,17 @@ class VIEW3D_PT_tools_posemode_options(View3DPanel, Panel):
         pose = context.active_object.pose
         layout = self.layout
 
+        tool_settings = context.tool_settings
+
         layout.prop(pose, "use_auto_ik")
         layout.prop(pose, "use_mirror_x")
         col = layout.column()
         col.active = pose.use_mirror_x
         col.prop(pose, "use_mirror_relative")
 
+        layout.label(text="Affect Only")
+        layout.prop(tool_settings, "use_transform_pivot_point_align", text="Locations")
+
 # ********** default tools for paint modes ****************
 
 
@@ -2180,6 +2218,8 @@ class VIEW3D_PT_gpencil_brush_presets(PresetPanel, Panel):
 classes = (
     VIEW3D_MT_brush_context_menu,
     VIEW3D_MT_brush_context_menu_paint_modes,
+    VIEW3D_PT_tools_object_options,
+    VIEW3D_PT_tools_object_options_transform,
     VIEW3D_PT_tools_meshedit_options,
     VIEW3D_PT_tools_meshedit_options_automerge,
     VIEW3D_PT_tools_curveedit_options_stroke,