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 <campbell@blender.org>2022-03-16 03:58:22 +0300
committerCampbell Barton <campbell@blender.org>2022-03-16 03:58:22 +0300
commitbe7855591e3b47e5e72c09555946f75975a8c028 (patch)
treeeb11ff27360e2285cddfe24609bc293b103e9ac0 /source/blender/ikplugin/intern/itasc_plugin.cpp
parent379bd6d50ce37e07cbc4fb1e1c47c814f6a7530e (diff)
Cleanup: rename cnt to count
Follow naming from T85728.
Diffstat (limited to 'source/blender/ikplugin/intern/itasc_plugin.cpp')
-rw-r--r--source/blender/ikplugin/intern/itasc_plugin.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp
index 470dfb01bdd..b9f7dd98073 100644
--- a/source/blender/ikplugin/intern/itasc_plugin.cpp
+++ b/source/blender/ikplugin/intern/itasc_plugin.cpp
@@ -1512,17 +1512,17 @@ static IK_Scene *convert_tree(
iktarget->bldepsgraph = depsgraph;
condata = (bKinematicConstraint *)iktarget->blenderConstraint->data;
pchan = tree->pchan[iktarget->channel];
- unsigned int controltype, bonecnt;
- double bonelen;
+ unsigned int controltype, bone_count;
+ double bone_length;
float mat[4][4];
/* add the end effector
* estimate the average bone length, used to clamp feedback error */
- for (bonecnt = 0, bonelen = 0.0f, a = iktarget->channel; a >= 0;
- a = tree->parent[a], bonecnt++) {
- bonelen += ikscene->blScale * tree->pchan[a]->bone->length;
+ for (bone_count = 0, bone_length = 0.0f, a = iktarget->channel; a >= 0;
+ a = tree->parent[a], bone_count++) {
+ bone_length += ikscene->blScale * tree->pchan[a]->bone->length;
}
- bonelen /= bonecnt;
+ bone_length /= bone_count;
/* store the rest pose of the end effector to compute enforce target */
copy_m4_m4(mat, pchan->bone->arm_mat);
@@ -1567,7 +1567,7 @@ static IK_Scene *convert_tree(
}
}
if (controltype) {
- iktarget->constraint = new iTaSC::CopyPose(controltype, controltype, bonelen);
+ iktarget->constraint = new iTaSC::CopyPose(controltype, controltype, bone_length);
/* set the gain */
if (controltype & iTaSC::CopyPose::CTL_POSITION) {
iktarget->constraint->setControlParameter(
@@ -1599,7 +1599,7 @@ static IK_Scene *convert_tree(
}
break;
case CONSTRAINT_IK_DISTANCE:
- iktarget->constraint = new iTaSC::Distance(bonelen);
+ iktarget->constraint = new iTaSC::Distance(bone_length);
iktarget->constraint->setControlParameter(
iTaSC::Distance::ID_DISTANCE, iTaSC::ACT_VALUE, condata->dist);
iktarget->constraint->registerCallback(distance_callback, iktarget);