Beispiel #1
0
/* Remove the indexed bone-group (expects 'virtual' index (+1 one, used by active_group etc.)) */
void BKE_pose_remove_group_index(bPose *pose, const int index)
{
	bActionGroup *grp = NULL;
	
	/* get group to remove */
	grp = BLI_findlink(&pose->agroups, index - 1);
	if (grp) {
		BKE_pose_remove_group(pose, grp, index);
	}
}
Beispiel #2
0
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)
		return OPERATOR_CANCELLED;
	
	/* for now, just call the API function for this */
	BKE_pose_remove_group(ob);
	
	/* notifiers for updates */
	WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
	
	return OPERATOR_FINISHED;
}