Commit: 87799657fe894f2f521eefb1b7873a6db136d65f
Author: Antony Riakiotakis
Date:   Fri Jul 25 18:54:17 2014 +0200
Branches: pie-menus
https://developer.blender.org/rB87799657fe894f2f521eefb1b7873a6db136d65f

Transform manipulator sticky pie menu (ctrl-space)

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

M       release/scripts/startup/bl_ui/space_view3d.py
M       source/blender/editors/space_view3d/view3d_ops.c
M       source/blender/makesrna/intern/rna_space.c

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

diff --git a/release/scripts/startup/bl_ui/space_view3d.py 
b/release/scripts/startup/bl_ui/space_view3d.py
index 4122b58..5bb4277 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1438,6 +1438,16 @@ class VIEW3D_PIE_shade(Menu):
             else:
                 pie.operator("OBJECT_OT_shade_smooth")
                 pie.operator("OBJECT_OT_shade_flat")
+
+class VIEW3D_PIE_manipulator(Menu):
+    bl_label = "Manipulator"
+
+    def draw(self, context):
+        layout = self.layout
+
+        pie = layout.menu_pie()
+        pie.prop(context.space_data, "transform_manipulators", expand=True)
+        pie.prop(context.space_data, "show_manipulator")
         
 
 # ********** Brush menu **********
diff --git a/source/blender/editors/space_view3d/view3d_ops.c 
b/source/blender/editors/space_view3d/view3d_ops.c
index c75adf6..664d1d3 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -145,6 +145,14 @@ void ED_operatormacros_screen(void)
                RNA_string_set(ptr, "value_1", "SOLID");
                RNA_string_set(ptr, "value_2", "WIREFRAME");
        }
+
+       ptr = WM_operator_pie_macro("VIEW3D_PIE_manipulator_macro", 
"Manipulator",
+                                   "Manipulator Options for the viewport",
+                                   OPTYPE_UNDO | OPTYPE_REGISTER, 
"WM_OT_context_toggle", "VIEW3D_PIE_manipulator");
+
+       if (ptr) {
+               RNA_string_set(ptr, "data_path", "space_data.show_manipulator");
+       }
 }
 
 
@@ -511,8 +519,7 @@ void view3d_keymap(wmKeyConfig *keyconf)
        kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", COMMAKEY, 
KM_PRESS, KM_ALT, 0); /* new in 2.5 */
        RNA_string_set(kmi->ptr, "data_path", 
"space_data.use_pivot_point_align");
 
-       kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle", SPACEKEY, 
KM_PRESS, KM_CTRL, 0); /* new in 2.5 */
-       RNA_string_set(kmi->ptr, "data_path", "space_data.show_manipulator");
+       kmi = WM_keymap_add_item(keymap, "VIEW3D_PIE_manipulator_macro", 
SPACEKEY, KM_PRESS, KM_CTRL, 0); /* new in 2.5 */
 
        kmi = WM_keymap_add_item(keymap, "WM_OT_context_set_enum", PERIODKEY, 
KM_PRESS, 0, 0);
        RNA_string_set(kmi->ptr, "data_path", "space_data.pivot_point");
diff --git a/source/blender/makesrna/intern/rna_space.c 
b/source/blender/makesrna/intern/rna_space.c
index f5216eb..f60c0c6 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1820,11 +1820,11 @@ static void rna_def_space_view3d(BlenderRNA *brna)
        PropertyRNA *prop;
 
        static EnumPropertyItem manipulators_items[] = {
-               {V3D_MANIP_TRANSLATE, "TRANSLATE", ICON_MAN_TRANS, "Manipulator 
Translate",
+               {V3D_MANIP_TRANSLATE, "TRANSLATE", ICON_MAN_TRANS, "Translate",
                                      "Use the manipulator for movement 
transformations"},
-               {V3D_MANIP_ROTATE, "ROTATE", ICON_MAN_ROT, "Manipulator Rotate",
+               {V3D_MANIP_ROTATE, "ROTATE", ICON_MAN_ROT, "Rotate",
                                   "Use the manipulator for rotation 
transformations"},
-               {V3D_MANIP_SCALE, "SCALE", ICON_MAN_SCALE, "Manipulator Scale",
+               {V3D_MANIP_SCALE, "SCALE", ICON_MAN_SCALE, "Scale",
                                  "Use the manipulator for scale 
transformations"},
                {0, NULL, 0, NULL, NULL}
        };

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to