diff options
author | Sergej Reich <sergej.reich@googlemail.com> | 2013-02-24 03:40:51 +0400 |
---|---|---|
committer | Sergej Reich <sergej.reich@googlemail.com> | 2013-02-24 03:40:51 +0400 |
commit | 93c3593d825aafe30aaf051182e50bde4c6084dd (patch) | |
tree | 435a642eb30a537a8b7801289b82c1e6aede84ce /release/scripts/startup | |
parent | c42b51ed9615e4f963153a580246d8df87b0b00d (diff) |
rigidbody: Don't abort connect operator if last selected object is active
Was silly logic error.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_operators/rigidbody.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_operators/rigidbody.py b/release/scripts/startup/bl_operators/rigidbody.py index bfb23c3249b..2a19e222796 100644 --- a/release/scripts/startup/bl_operators/rigidbody.py +++ b/release/scripts/startup/bl_operators/rigidbody.py @@ -227,7 +227,7 @@ class ConnectRigidBodies(Operator): def _add_constraint(self, context, object1, object2): if object1 == object2: - return False + return if self.pivot_type == 'ACTIVE': loc = object1.location @@ -251,8 +251,6 @@ class ConnectRigidBodies(Operator): con.object1 = object1 con.object2 = object2 - return True - def execute(self, context): scene = context.scene objects = context.selected_objects @@ -274,11 +272,13 @@ class ConnectRigidBodies(Operator): objects_tmp.remove(objects_tmp[0]) for i in range(1, len(objs_sorted)): - change = self._add_constraint(context, objs_sorted[i-1], objs_sorted[i]) + self._add_constraint(context, objs_sorted[i-1], objs_sorted[i]) + change = True else: # SELECTED_TO_ACTIVE for obj in objects: - change = self._add_constraint(context, obj_act, obj) + self._add_constraint(context, obj_act, obj) + change = True; if change: # restore selection |