diff options
author | Jacques Lucke <jacques@blender.org> | 2020-09-09 16:43:09 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2020-09-09 16:43:27 +0300 |
commit | ddf4f2896878e3fd4a0f79d712a5e7b900b0cf7e (patch) | |
tree | 34d7b7b95eac92c2ab9bc596b1dd113fd2334381 /source/blender/blenkernel/intern/armature_update.c | |
parent | 842f52d418aaccae45c8e400eb0a8bddef0dbb51 (diff) |
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/blenkernel/intern/armature_update.c')
-rw-r--r-- | source/blender/blenkernel/intern/armature_update.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c index 97c717572bc..de00372c3ec 100644 --- a/source/blender/blenkernel/intern/armature_update.c +++ b/source/blender/blenkernel/intern/armature_update.c @@ -125,7 +125,6 @@ static void splineik_init_tree_from_pchan(Scene *UNUSED(scene), /* perform binding step if required */ if ((ikData->flag & CONSTRAINT_SPLINEIK_BOUND) == 0) { float segmentLen = (1.0f / (float)segcount); - int i; /* setup new empty array for the points list */ if (ikData->points) { @@ -140,7 +139,7 @@ static void splineik_init_tree_from_pchan(Scene *UNUSED(scene), /* perform binding of the joints to parametric positions along the curve based * proportion of the total length that each bone occupies */ - for (i = 0; i < segcount; i++) { + for (int i = 0; i < segcount; i++) { /* 'head' joints, traveling towards the root of the chain * - 2 methods; the one chosen depends on whether we've got usable lengths */ @@ -549,11 +548,9 @@ static void splineik_execute_tree( /* for each pose-tree, execute it if it is spline, otherwise just free it */ while ((tree = pchan_root->siktree.first) != NULL) { - int i; - /* Firstly, calculate the bone matrix the standard way, * since this is needed for roll control. */ - for (i = tree->chainlen - 1; i >= 0; i--) { + for (int i = tree->chainlen - 1; i >= 0; i--) { BKE_pose_where_is_bone(depsgraph, scene, ob, tree->chain[i], ctime, 1); } @@ -565,7 +562,7 @@ static void splineik_execute_tree( * - the chain is traversed in the opposite order to storage order (i.e. parent to children) * so that dependencies are correct */ - for (i = tree->chainlen - 1; i >= 0; i--) { + for (int i = tree->chainlen - 1; i >= 0; i--) { bPoseChannel *pchan = tree->chain[i]; splineik_evaluate_bone(tree, ob, pchan, i, &state); } |