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:
authorJacques Lucke <jacques@blender.org>2020-09-09 19:41:07 +0300
committerJacques Lucke <jacques@blender.org>2020-09-09 19:41:07 +0300
commit63916f5941b443dfc8566682bb75374e5abd553f (patch)
treefb0704701f1d4d9acbddf4a6fbc62c819d8d4c36 /source/blender/editors/armature/pose_group.c
parent0cff2c944f9c2cd3ac873fe826c4399fc2f32159 (diff)
Cleanup: reduce variable scope
Diffstat (limited to 'source/blender/editors/armature/pose_group.c')
-rw-r--r--source/blender/editors/armature/pose_group.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c
index cb7c68178d9..ffa28bf9e36 100644
--- a/source/blender/editors/armature/pose_group.c
+++ b/source/blender/editors/armature/pose_group.c
@@ -381,8 +381,6 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
bPoseChannel *pchan;
tSortActionGroup *agrp_array;
bActionGroup *agrp;
- int agrp_count;
- int i;
if (ELEM(NULL, ob, pose)) {
return OPERATOR_CANCELLED;
@@ -392,8 +390,9 @@ static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
}
/* create temporary array with bone groups and indices */
- agrp_count = BLI_listbase_count(&pose->agroups);
+ int agrp_count = BLI_listbase_count(&pose->agroups);
agrp_array = MEM_mallocN(sizeof(tSortActionGroup) * agrp_count, "sort bone groups");
+ int i;
for (agrp = pose->agroups.first, i = 0; agrp; agrp = agrp->next, i++) {
BLI_assert(i < agrp_count);
agrp_array[i].agrp = agrp;