Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-01-28 16:15:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-28 16:15:50 +0400
commit8445a56b488f45d9ef6aebcf0ef23a8a5203e0b4 (patch)
treebddeb68a08ed494e0234f6ecacd57acb0723d69b /release
parent753890d0e80fc5b3ab16b42478e6226de4c80c36 (diff)
use more conventional names in rigid body script.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/object_align.py10
-rw-r--r--release/scripts/startup/bl_operators/rigidbody.py32
2 files changed, 21 insertions, 21 deletions
diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py
index dd647733850..e843209da3c 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -129,17 +129,17 @@ def align_objects(context,
flag_first = True
- objs = []
+ objects = []
for obj in context.selected_objects:
matrix_world = obj.matrix_world.copy()
bb_world = [matrix_world * Vector(v[:]) for v in obj.bound_box]
- objs.append((obj, bb_world))
+ objects.append((obj, bb_world))
- if not objs:
+ if not objects:
return False
- for obj, bb_world in objs:
+ for obj, bb_world in objects:
if bb_quality and obj.type == 'MESH':
GBB = GlobalBB_HQ(obj)
@@ -201,7 +201,7 @@ def align_objects(context,
# Main Loop
- for obj, bb_world in objs:
+ for obj, bb_world in objects:
matrix_world = obj.matrix_world.copy()
bb_world = [matrix_world * Vector(v[:]) for v in obj.bound_box]
diff --git a/release/scripts/startup/bl_operators/rigidbody.py b/release/scripts/startup/bl_operators/rigidbody.py
index d334e404a5d..dd5b68884d3 100644
--- a/release/scripts/startup/bl_operators/rigidbody.py
+++ b/release/scripts/startup/bl_operators/rigidbody.py
@@ -37,21 +37,21 @@ class CopyRigidbodySettings(Operator):
def execute(self, context):
obj = context.object
- scn = context.scene
+ scene = context.scene
# deselect all but mesh objects
for o in context.selected_objects:
if o.type != 'MESH':
o.select = False
- sel = context.selected_objects
- if sel:
+ objects = context.selected_objects
+ if objects:
# add selected objects to active one groups and recalculate
bpy.ops.group.objects_add_active()
- scn.frame_set(scn.frame_current)
+ scene.frame_set(scene.frame_current)
# copy settings
- for o in sel:
+ for o in objects:
if o.rigid_body is None:
continue
@@ -106,7 +106,7 @@ class BakeToKeyframes(Operator):
def execute(self, context):
bake = []
- objs = []
+ objects = []
scene = context.scene
frame_orig = scene.frame_current
frames = list(range(self.frame_start, self.frame_end + 1, self.step))
@@ -116,23 +116,23 @@ class BakeToKeyframes(Operator):
if not obj.rigid_body or obj.rigid_body.type != 'ACTIVE':
obj.select = False
- objs = context.selected_objects
+ objects = context.selected_objects
- if objs:
+ if objects:
# store transformation data
for f in list(range(self.frame_start, self.frame_end + 1)):
scene.frame_set(f)
if f in frames:
mat = {}
- for i, obj in enumerate(objs):
+ for i, obj in enumerate(objects):
mat[i] = obj.matrix_world.copy()
bake.append(mat)
# apply transformations as keyframes
for i, f in enumerate(frames):
scene.frame_set(f)
- obj_prev = objs[0]
- for j, obj in enumerate(objs):
+ obj_prev = objects[0]
+ for j, obj in enumerate(objects):
mat = bake[i][j]
obj.location = mat.to_translation()
@@ -156,7 +156,7 @@ class BakeToKeyframes(Operator):
bpy.ops.rigidbody.objects_remove()
# clean up keyframes
- for obj in objs:
+ for obj in objects:
action = obj.animation_data.action
for fcu in action.fcurves:
keyframe_points = fcu.keyframe_points
@@ -214,15 +214,15 @@ class ConnectRigidBodies(Operator):
@classmethod
def poll(cls, context):
obj = context.object
- objs = context.selected_objects
- return (obj and obj.rigid_body and (len(objs) > 1))
+ objects = context.selected_objects
+ return (obj and obj.rigid_body and (len(objects) > 1))
def execute(self, context):
- objs = context.selected_objects
+ objects = context.selected_objects
obj_act = context.active_object
- for obj in objs:
+ for obj in objects:
if obj == obj_act:
continue
if self.pivot_type == 'ACTIVE':