[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48901] branches/soc-2012-bratwurst/ release/scripts/startup/bl_ui/space_view3d.py: The buttons should set the manipulator mode, not do the transform.

Jorge Rodriguez bs.vino at gmail.com
Sat Jul 14 01:42:41 CEST 2012


Revision: 48901
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48901
Author:   vino
Date:     2012-07-13 23:42:40 +0000 (Fri, 13 Jul 2012)
Log Message:
-----------
The buttons should set the manipulator mode, not do the transform. Use prop instead of operator so there can be multiple modes enables at once.

Modified Paths:
--------------
    branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d.py

Modified: branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d.py	2012-07-13 23:23:06 UTC (rev 48900)
+++ branches/soc-2012-bratwurst/release/scripts/startup/bl_ui/space_view3d.py	2012-07-13 23:42:40 UTC (rev 48901)
@@ -2710,6 +2710,8 @@
     bl_options = {'HIDE_HEADER'}
 
     def draw(self, context):
+        view = context.space_data
+
         if bpy.context.user_preferences.edit.floating_controls == 'BOTTOM' or bpy.context.user_preferences.edit.floating_controls == 'TOP':
             layout = self.layout
             if bpy.context.user_preferences.edit.floating_controls == 'BOTTOM':
@@ -2719,9 +2721,10 @@
             row.alignment = 'CENTER'
             row.scale_x = 1.5
             row.scale_y = 1.5
-            row.operator("transform.translate", text="", icon='MAN_TRANS')
-            row.operator("transform.rotate", text="", icon='MAN_ROT')
-            row.operator("transform.resize", text="", icon='MAN_SCALE')
+            row.prop(view, "use_manipulator_translate", text="", icon='MAN_TRANS')
+            row.prop(view, "use_manipulator_rotate", text="", icon='MAN_ROT')
+            row.prop(view, "use_manipulator_scale", text="", icon='MAN_SCALE')
+
         elif bpy.context.user_preferences.edit.floating_controls == 'LEFT' or bpy.context.user_preferences.edit.floating_controls == 'RIGHT':
             layout = self.layout
 
@@ -2733,9 +2736,9 @@
             column.alignment = 'CENTER'
             column.scale_x = 1.5
             column.scale_y = 1.5
-            column.operator("transform.translate", text="", icon='MAN_TRANS')
-            column.operator("transform.rotate", text="", icon='MAN_ROT')
-            column.operator("transform.resize", text="", icon='MAN_SCALE')
+            column.prop(view, "use_manipulator_translate", text="", icon='MAN_TRANS')
+            column.prop(view, "use_manipulator_rotate", text="", icon='MAN_ROT')
+            column.prop(view, "use_manipulator_scale", text="", icon='MAN_SCALE')
 
 
 




More information about the Bf-blender-cvs mailing list