65 return dupli && dupli !=
data->bone;
112 for (curcon = conlist->
first; curcon; curcon = curcon->
next) {
117 for (ct = targets.
first; ct; ct = ct->
next) {
138 const char *oldnamep,
139 const char *newnamep)
195 if (arm == ob->
data) {
301 if ((gpl->parent !=
NULL) && (gpl->parent->data == arm)) {
302 if (
STREQ(gpl->parsubstr, oldname)) {
309 switch (gp_md->type) {
357 for (sl =
area->spacedata.first; sl; sl = sl->
next) {
388 const bool do_strip_numbers)
398 char *
name = link->data;
418 for (bfn = bones_names_conflicts.
first; bfn; bfn = bfn->
next) {
437 uint objects_len = 0;
440 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
441 Object *ob = objects[ob_index];
493 ot->
idname =
"ARMATURE_OT_flip_names";
494 ot->
description =
"Flips (and corrects) the axis suffixes of the names of selected bones";
507 "Try to remove right-most dot-number from flipped names.\n"
508 "Warning: May result in incoherent naming in some cases");
523 bool changed_multi =
false;
525 uint objects_len = 0;
528 for (
uint ob_index = 0; ob_index < objects_len; ob_index++) {
529 Object *ob = objects[ob_index];
531 bool changed =
false;
554 BLI_strncpy(newname, ebone->name,
sizeof(newname));
566 changed_multi =
true;
581 {0,
"XAXIS", 0,
"X-Axis",
"Left/Right"},
582 {1,
"YAXIS", 0,
"Y-Axis",
"Front/Back"},
583 {2,
"ZAXIS", 0,
"Z-Axis",
"Top/Bottom"},
588 ot->
name =
"Auto-Name by Axis";
589 ot->
idname =
"ARMATURE_OT_autoside_names";
591 "Automatically renames the selected bones according to which side of the target axis they "
Blender kernel action and pose functionality.
struct bPoseChannel * BKE_pose_channel_find_name(const struct bPose *pose, const char *name)
bool BKE_pose_channels_is_valid(const struct bPose *pose)
void BKE_animdata_fix_paths_rename_all(struct ID *ref_id, const char *prefix, const char *oldName, const char *newName)
void BKE_action_fix_paths_rename(struct ID *owner_id, struct bAction *act, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths)
struct Bone * BKE_armature_find_bone_name(struct bArmature *arm, const char *name)
bool bone_autoside_name(char name[64], int strip_number, short axis, float head, float tail)
void BKE_constraint_targets_flush(struct bConstraint *con, struct ListBase *targets, bool no_copy)
int BKE_constraint_targets_get(struct bConstraint *con, struct ListBase *r_targets)
struct Object * CTX_data_edit_object(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
#define BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, v3d, r_len)
bool BKE_modifiers_uses_armature(struct Object *ob, struct bArmature *arm)
bool BLI_ghash_haskey(const GHash *gh, const void *key) ATTR_WARN_UNUSED_RESULT
bool BLI_ghash_remove(GHash *gh, const void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp)
void BLI_ghash_insert(GHash *gh, void *key, void *val)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
#define LISTBASE_FOREACH(type, var, list)
struct LinkData * BLI_genericNodeN(void *data)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
bool BLI_uniquename_cb(UniquenameCheckCallback unique_check, void *arg, const char *defname, char delim, char *name, size_t name_len)
size_t BLI_string_flip_side_name(char *r_name, const char *from_name, bool strip_number, size_t name_len)
#define STREQLEN(a, b, n)
void DEG_id_tag_update(struct ID *id, int flag)
@ ID_RECALC_COPY_ON_WRITE
@ eGpencilModifierType_Hook
@ eGpencilModifierType_Armature
Object is a sort of wrapper for general info.
#define EBONE_VISIBLE(arm, ebone)
#define EBONE_EDITABLE(ebone)
bool ED_operator_editarmature(struct bContext *C)
Read Guarded memory(de)allocation.
static int armature_autoside_names_exec(bContext *C, wmOperator *op)
static bool editbone_unique_check(void *arg, const char *name)
void ED_armature_bone_rename(Main *bmain, bArmature *arm, const char *oldnamep, const char *newnamep)
static bool bone_unique_check(void *arg, const char *name)
static void ed_armature_bone_unique_name(bArmature *arm, char *name)
static int armature_flip_names_exec(bContext *C, wmOperator *op)
void ARMATURE_OT_flip_names(wmOperatorType *ot)
void ARMATURE_OT_autoside_names(wmOperatorType *ot)
struct BoneFlipNameData BoneFlipNameData
void ED_armature_ebone_unique_name(ListBase *ebones, char *name, EditBone *bone)
static void constraint_bone_name_fix(Object *ob, ListBase *conlist, const char *oldname, const char *newname)
void ED_armature_bones_flip_names(Main *bmain, bArmature *arm, ListBase *bones_names, const bool do_strip_numbers)
EditBone * ED_armature_ebone_find_name(const ListBase *edbo, const char *name)
EditBone * ED_armature_ebone_get_mirrored(const ListBase *edbo, EditBone *ebo)
void(* MEM_freeN)(void *vmemh)
static void area(int d1, int d2, int e1, int e2, float weights[2])
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
struct BoneFlipNameData * next
char name_flip[MAXBONENAME]
struct BoneFlipNameData * prev
struct Object * focus_object
struct CameraDOFSettings dof
struct ModifierData * next
ListBase greasepencil_modifiers
struct Object * object_dst
struct Object * object_src
struct Object * ob_center
struct bConstraintTarget * next
struct bConstraint * next
struct bPoseChannel * 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
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))