From be7855591e3b47e5e72c09555946f75975a8c028 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 16 Mar 2022 11:58:22 +1100 Subject: Cleanup: rename cnt to count Follow naming from T85728. --- source/blender/ikplugin/intern/itasc_plugin.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/ikplugin/intern') 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); -- cgit v1.2.3