rigidbody: Use ARROWS empty draw type when creating constraints
authorSergej Reich <sergej.reich@googlemail.com>
Tue, 5 Feb 2013 21:51:20 +0000 (21:51 +0000)
committerSergej Reich <sergej.reich@googlemail.com>
Tue, 5 Feb 2013 21:51:20 +0000 (21:51 +0000)
Since we don't have constraint visualization yet, it's useful to see
where the individual axes point.

release/scripts/startup/bl_operators/rigidbody.py

index 94465fa..1613491 100644 (file)
@@ -234,7 +234,9 @@ class ConnectRigidBodies(Operator):
                 loc = (obj_act.location + obj.location) / 2.0
             bpy.ops.object.add(type='EMPTY', view_align=False, enter_editmode=False, location=loc)
             bpy.ops.rigidbody.constraint_add()
-            con = context.active_object.rigid_body_constraint
+            con_obj = context.active_object
+            con_obj.empty_draw_type = 'ARROWS'
+            con = con_obj.rigid_body_constraint
             con.type = self.con_type
             con.object1 = obj_act
             con.object2 = obj