diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_pose.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index c29537378dd..412aad20a41 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -381,13 +381,7 @@ static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, in bPose *pose = (ob) ? ob->pose : NULL; *min = 0; - - if (pose) { - *max = BLI_countlist(&pose->agroups) - 1; - *max = MAX2(0, *max); - } - else - *max = 0; + *max = pose ? max_ii(0, BLI_countlist(&pose->agroups) - 1) : 0; } static PointerRNA rna_Pose_active_bone_group_get(PointerRNA *ptr) @@ -419,8 +413,7 @@ static void rna_Pose_active_bone_group_index_range(PointerRNA *ptr, int *min, in bPose *pose = (bPose *)ptr->data; *min = 0; - *max = BLI_countlist(&pose->agroups) - 1; - *max = MAX2(0, *max); + *max = max_ii(0, BLI_countlist(&pose->agroups) - 1); } #if 0 |