[Bf-blender-cvs] [6283b5b817b] master: UI: move transform settings from pivot to options panel

Campbell Barton noreply at git.blender.org
Wed Sep 11 16:57:47 CEST 2019


Commit: 6283b5b817b9b7d5a17f7cddb21b522db1f09a1a
Author: Campbell Barton
Date:   Thu Sep 12 00:50:37 2019 +1000
Branches: master
https://developer.blender.org/rB6283b5b817b9b7d5a17f7cddb21b522db1f09a1a

UI: move transform settings from pivot to options panel

These weren't related to pivot, so add in a new options panel.

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

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

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 291de44c8ce..e98a3684ddc 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -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'
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 3ff7bd83b1f..f0712e0ae86 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -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,



More information about the Bf-blender-cvs mailing list