diff options
Diffstat (limited to 'source/blender/editors/armature/pose_transform.c')
-rw-r--r-- | source/blender/editors/armature/pose_transform.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c index fe79894a351..31c89ca9f43 100644 --- a/source/blender/editors/armature/pose_transform.c +++ b/source/blender/editors/armature/pose_transform.c @@ -207,12 +207,12 @@ typedef struct ApplyArmature_ParentState { } ApplyArmature_ParentState; /* Recursive walk for Apply To Selected mode; pstate NULL unless child of an applied bone. */ -static void applyarmature_process_selected_rec(bArmature *arm, - bPose *pose, - bPose *pose_eval, - Bone *bone, - ListBase *selected, - ApplyArmature_ParentState *pstate) +static void applyarmature_process_selected_recursive(bArmature *arm, + bPose *pose, + bPose *pose_eval, + Bone *bone, + ListBase *selected, + ApplyArmature_ParentState *pstate) { bPoseChannel *pchan = BKE_pose_channel_find_name(pose, bone->name); const bPoseChannel *pchan_eval = BKE_pose_channel_find_name(pose_eval, bone->name); @@ -333,8 +333,8 @@ static void applyarmature_process_selected_rec(bArmature *arm, pstate = &new_pstate; } - for (Bone *child = bone->childbase.first; child; child = child->next) { - applyarmature_process_selected_rec(arm, pose, pose_eval, child, selected, pstate); + LISTBASE_FOREACH (Bone *, child, &bone->childbase) { + applyarmature_process_selected_recursive(arm, pose, pose_eval, child, selected, pstate); } } @@ -389,8 +389,9 @@ static int apply_armature_pose2bones_exec(bContext *C, wmOperator *op) if (use_selected) { /* The selected only mode requires a recursive walk to handle parent-child relations. */ - for (Bone *bone = arm->bonebase.first; bone; bone = bone->next) { - applyarmature_process_selected_rec(arm, pose, ob_eval->pose, bone, &selected_bones, NULL); + LISTBASE_FOREACH (Bone *, bone, &arm->bonebase) { + applyarmature_process_selected_recursive( + arm, pose, ob_eval->pose, bone, &selected_bones, NULL); } BLI_freelistN(&selected_bones); |