79 ot->
name =
"Add Bone Group";
113 ot->
name =
"Remove Bone Group";
114 ot->
idname =
"POSE_OT_group_remove";
151 if (group > 0 && group <= num_groups) {
165 if (strstr(op->
idname,
"assign")) {
229 ot->
name =
"Add Selected to Bone Group";
230 ot->
idname =
"POSE_OT_group_assign";
231 ot->
description =
"Add selected bones to the chosen bone group";
257 if (pchan->agrp_index) {
258 pchan->agrp_index = 0;
278 ot->
name =
"Remove Selected from Bone Groups";
279 ot->
idname =
"POSE_OT_group_unassign";
280 ot->
description =
"Remove selected bones from all bone groups";
314 int grpIndexB = grpIndexA + dir;
319 if (pchan->agrp_index == grpIndexB) {
320 pchan->agrp_index = grpIndexA;
322 else if (pchan->agrp_index == grpIndexA) {
323 pchan->agrp_index = grpIndexB;
337 {-1,
"UP", 0,
"Up",
""},
338 {1,
"DOWN", 0,
"Down",
""},
343 ot->
name =
"Move Bone Group";
345 ot->
description =
"Change position of active Bone Group in list of Bone Groups";
359 "Direction to move the active Bone Group towards");
396 for (agrp = pose->
agroups.
first, i = 0; agrp; agrp = agrp->next, i++) {
398 agrp_array[i].agrp = agrp;
399 agrp_array[i].index = i + 1;
407 for (i = 0; i < agrp_count; i++) {
413 for (i = 0; i < agrp_count; i++) {
414 if (pchan->agrp_index == agrp_array[i].index) {
415 pchan->agrp_index = i + 1;
434 ot->
name =
"Sort Bone Groups";
436 ot->
description =
"Sort Bone Groups by their names in ascending order";
490 ot->
name =
"Select Bones of Bone Group";
491 ot->
idname =
"POSE_OT_group_select";
525 ot->
name =
"Deselect Bone Group";
526 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, 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()
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
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 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
void WM_event_add_notifier(const bContext *C, uint type, void *reference)