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-03-27 00:34:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-27 00:34:13 +0400
commit879e4fd9be91b590a9c15fc68bdb9850f6f15bb1 (patch)
treedfb5294520eed1400aa02e7c96b12a2a2eb234c7 /source/blender/blenkernel/intern/rigidbody.c
parent166cdf8b5aaf5f36012f8d62a4882ec838bd5cb3 (diff)
sequencer gaps
- remove unneeded checks (poll checks editor is non-null) - use booleans - rename operator SEQUENCER_OT_gap_remove, _gap_insert also quiet shadow warning in rigidbody.c (shadowing 'loc')
Diffstat (limited to 'source/blender/blenkernel/intern/rigidbody.c')
-rw-r--r--source/blender/blenkernel/intern/rigidbody.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/rigidbody.c b/source/blender/blenkernel/intern/rigidbody.c
index bccc6f9a93b..eaf385fbfcf 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -1001,26 +1001,26 @@ static void rigidbody_update_sim_ob(Scene *scene, RigidBodyWorld *rbw, Object *o
/* get effectors present in the group specified by effector_weights */
effectors = pdInitEffectors(scene, ob, NULL, effector_weights);
if (effectors) {
- float force[3] = {0.0f, 0.0f, 0.0f};
- float loc[3], vel[3];
+ float eff_force[3] = {0.0f, 0.0f, 0.0f};
+ float eff_loc[3], eff_vel[3];
/* create dummy 'point' which represents last known position of object as result of sim */
// XXX: this can create some inaccuracies with sim position, but is probably better than using unsimulated vals?
- RB_body_get_position(rbo->physics_object, loc);
- RB_body_get_linear_velocity(rbo->physics_object, vel);
+ RB_body_get_position(rbo->physics_object, eff_loc);
+ RB_body_get_linear_velocity(rbo->physics_object, eff_vel);
- pd_point_from_loc(scene, loc, vel, 0, &epoint);
+ pd_point_from_loc(scene, eff_loc, eff_vel, 0, &epoint);
/* calculate net force of effectors, and apply to sim object
* - we use 'central force' since apply force requires a "relative position" which we don't have...
*/
- pdDoEffectors(effectors, NULL, effector_weights, &epoint, force, NULL);
+ pdDoEffectors(effectors, NULL, effector_weights, &epoint, eff_force, NULL);
if (G.f & G_DEBUG)
- printf("\tapplying force (%f,%f,%f) to '%s'\n", force[0], force[1], force[2], ob->id.name + 2);
+ printf("\tapplying force (%f,%f,%f) to '%s'\n", eff_force[0], eff_force[1], eff_force[2], ob->id.name + 2);
/* activate object in case it is deactivated */
- if (!is_zero_v3(force))
+ if (!is_zero_v3(eff_force))
RB_body_activate(rbo->physics_object);
- RB_body_apply_central_force(rbo->physics_object, force);
+ RB_body_apply_central_force(rbo->physics_object, eff_force);
}
else if (G.f & G_DEBUG)
printf("\tno forces to apply to '%s'\n", ob->id.name + 2);