[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54143] trunk/blender/release/scripts/ startup/bl_operators/rigidbody.py: rigidbody: Don't show dialog for " Connect" operator

Sergej Reich sergej.reich at googlemail.com
Mon Jan 28 12:56:02 CET 2013


Revision: 54143
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54143
Author:   sergof
Date:     2013-01-28 11:56:01 +0000 (Mon, 28 Jan 2013)
Log Message:
-----------
rigidbody: Don't show dialog for "Connect" operator

Use redo last panel to change settings now.
This is more in line with how the rest of blender operates.

Also fix tootip

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_operators/rigidbody.py

Modified: trunk/blender/release/scripts/startup/bl_operators/rigidbody.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/rigidbody.py	2013-01-28 11:52:17 UTC (rev 54142)
+++ trunk/blender/release/scripts/startup/bl_operators/rigidbody.py	2013-01-28 11:56:01 UTC (rev 54143)
@@ -190,7 +190,7 @@
 
 
 class ConnectRigidBodies(Operator):
-    '''Create rigid body constraint between two selected rigid bodies'''
+    '''Create rigid body constraints between selected and active rigid bodies'''
     bl_idname = "rigidbody.connect"
     bl_label = "Connect Rigid Bodies"
     bl_options = {'REGISTER', 'UNDO'}
@@ -237,9 +237,10 @@
             con.type = self.con_type
             con.object1 = obj_act
             con.object2 = obj
+        # restore selection
+        bpy.ops.object.select_all(action='DESELECT')
+        for obj in objs:
+            obj.select = True;
+        bpy.context.scene.objects.active = obj_act
 
         return {'FINISHED'}
-
-    def invoke(self, context, event):
-        wm = context.window_manager
-        return wm.invoke_props_dialog(self)




More information about the Bf-blender-cvs mailing list