94 ot->
name =
"Add Bone Group";
128 ot->
name =
"Remove Bone Group";
129 ot->
idname =
"POSE_OT_group_remove";
166 if (group > 0 && group <= num_groups) {
180 if (strstr(op->
idname,
"assign")) {
244 ot->
name =
"Add Selected to Bone Group";
245 ot->
idname =
"POSE_OT_group_assign";
246 ot->
description =
"Add selected bones to the chosen bone group";
272 if (pchan->agrp_index) {
273 pchan->agrp_index = 0;
293 ot->
name =
"Remove Selected from Bone Groups";
294 ot->
idname =
"POSE_OT_group_unassign";
295 ot->
description =
"Remove selected bones from all bone groups";
329 int grpIndexB = grpIndexA + dir;
334 if (pchan->agrp_index == grpIndexB) {
335 pchan->agrp_index = grpIndexA;
337 else if (pchan->agrp_index == grpIndexA) {
338 pchan->agrp_index = grpIndexB;
352 {-1,
"UP", 0,
"Up",
""},
353 {1,
"DOWN", 0,
"Down",
""},
358 ot->
name =
"Move Bone Group";
360 ot->
description =
"Change position of active Bone Group in list of Bone Groups";
374 "Direction to move the active Bone Group towards");
411 for (agrp = pose->
agroups.
first, i = 0; agrp; agrp = agrp->next, i++) {
413 agrp_array[i].agrp = agrp;
414 agrp_array[i].index = i + 1;
422 for (i = 0; i < agrp_count; i++) {
428 for (i = 0; i < agrp_count; i++) {
429 if (pchan->agrp_index == agrp_array[i].index) {
430 pchan->agrp_index = i + 1;
449 ot->
name =
"Sort Bone Groups";
451 ot->
description =
"Sort Bone Groups by their names in ascending order";
505 ot->
name =
"Select Bones of Bone Group";
506 ot->
idname =
"POSE_OT_group_select";
540 ot->
name =
"Deselect Bone Group";
541 ot->
idname =
"POSE_OT_group_deselect";
Blender kernel action and pose functionality.
struct bActionGroup * BKE_pose_add_group(struct bPose *pose, const char *name)
void BKE_pose_remove_group_index(struct bPose *pose, const int index)
#define FOREACH_PCHAN_SELECTED_IN_OBJECT_END
#define FOREACH_PCHAN_VISIBLE_IN_OBJECT_BEGIN(_ob, _pchan)
#define FOREACH_PCHAN_SELECTED_IN_OBJECT_BEGIN(_ob, _pchan)
#define FOREACH_PCHAN_VISIBLE_IN_OBJECT_END
void CTX_wm_operator_poll_msg_set(struct bContext *C, const char *msg)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void void void bool BLI_listbase_link_move(ListBase *listbase, void *vlink, int step) ATTR_NONNULL()
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void DEG_id_tag_update(struct ID *id, int flag)
@ ID_RECALC_COPY_ON_WRITE
#define ID_IS_OVERRIDE_LIBRARY(_id)
Object is a sort of wrapper for general info.
void ED_outliner_select_sync_from_pose_bone_tag(struct bContext *C)
bool ED_operator_posemode_context(struct bContext *C)
Read Guarded memory(de)allocation.
void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
struct uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void uiItemS(uiLayout *layout)
void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup)
uiPopupMenu * UI_popup_menu_begin(struct bContext *C, const char *title, int icon) ATTR_NONNULL()
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
Object * ED_pose_object_from_context(bContext *C)
void POSE_OT_group_unassign(wmOperatorType *ot)
void POSE_OT_group_select(wmOperatorType *ot)
static int pose_group_deselect_exec(bContext *C, wmOperator *UNUSED(op))
static int pose_groups_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
static int pose_group_assign_exec(bContext *C, wmOperator *op)
struct tSortActionGroup tSortActionGroup
void POSE_OT_group_deselect(wmOperatorType *ot)
static int pose_group_unassign_exec(bContext *C, wmOperator *UNUSED(op))
void POSE_OT_group_assign(wmOperatorType *ot)
static bool pose_group_poll(bContext *C)
static int group_sort_exec(bContext *C, wmOperator *UNUSED(op))
static int pose_group_remove_exec(bContext *C, wmOperator *UNUSED(op))
static int compare_agroup(const void *sgrp_a_ptr, const void *sgrp_b_ptr)
static void pose_group_select(Object *ob, bool select)
void POSE_OT_group_remove(wmOperatorType *ot)
void POSE_OT_group_move(wmOperatorType *ot)
static int pose_group_select_exec(bContext *C, wmOperator *UNUSED(op))
void POSE_OT_group_add(wmOperatorType *ot)
static int pose_group_add_exec(bContext *C, wmOperator *UNUSED(op))
static int group_move_exec(bContext *C, wmOperator *op)
void POSE_OT_group_sort(wmOperatorType *ot)
bool RNA_property_is_set(PointerRNA *ptr, PropertyRNA *prop)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
int RNA_int_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
struct Object * proxy_group
struct bActionGroup * next
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct wmOperatorType * type
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)