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:
Diffstat (limited to 'source/blender/editors/armature/pose_group.c')
-rw-r--r--source/blender/editors/armature/pose_group.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c
index 376c1bc0838..50d9d300d15 100644
--- a/source/blender/editors/armature/pose_group.c
+++ b/source/blender/editors/armature/pose_group.c
@@ -62,12 +62,12 @@ static int pose_group_add_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = ED_pose_object_from_context(C);
- /* only continue if there's an object */
- if (ob == NULL)
+ /* only continue if there's an object and pose */
+ if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
/* for now, just call the API function for this */
- BKE_pose_add_group(ob);
+ BKE_pose_add_group(ob->pose, NULL);
/* notifiers for updates */
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
@@ -95,12 +95,12 @@ static int pose_group_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = ED_pose_object_from_context(C);
- /* only continue if there's an object */
- if (ob == NULL)
+ /* only continue if there's an object and pose */
+ if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
/* for now, just call the API function for this */
- BKE_pose_remove_group(ob);
+ BKE_pose_remove_group_index(ob->pose, ob->pose->active_group);
/* notifiers for updates */
WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
@@ -189,7 +189,7 @@ static int pose_group_assign_exec(bContext *C, wmOperator *op)
*/
pose->active_group = RNA_int_get(op->ptr, "type");
if (pose->active_group == 0)
- BKE_pose_add_group(ob);
+ BKE_pose_add_group(ob->pose, NULL);
/* add selected bones to group then */
CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)