From 08eac0c3675ff4baff4ad3d0aae4d5ab10a8a133 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 9 Jul 2014 10:27:31 +0200 Subject: Add bone_groups.new() and bone_groups.remove() methods to RNA. To do so, matching BKE 'API' was also refactored a bit: * Get Pose data instead of Object, as parameter; * Removed some sanity checks not needed at such a low level (callers are supposed to do that); * You can now remove an arbitrary bone group, not only the active one. Based on patch by pkrime (Paolo Acampora), with own edits. Reviewers: #python, pkrime, aligorith Reviewed By: aligorith Differential Revision: https://developer.blender.org/D522 --- source/blender/blenkernel/BKE_action.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/BKE_action.h') diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index 517c0f7d58b..57ba6fd55ca 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -180,10 +180,12 @@ void framechange_poses_clear_unkeyed(void); /* Bone Groups API --------------------- */ /* Adds a new bone-group */ -void BKE_pose_add_group(struct Object *ob); +struct bActionGroup *BKE_pose_add_group(struct bPose *pose, const char *name); -/* Remove the active bone-group */ -void BKE_pose_remove_group(struct Object *ob); +/* Remove a bone-group */ +void BKE_pose_remove_group(struct bPose *pose, struct bActionGroup *grp, const int index); +/* Remove the matching bone-group from its index */ +void BKE_pose_remove_group_index(struct bPose *pose, const int index); /* Assorted Evaluation ----------------- */ -- cgit v1.2.3