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:
authorCampbell Barton <ideasman42@gmail.com>2013-11-16 21:20:31 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-11-16 22:23:05 +0400
commite62cdbb474c4a09b55f046b199d3036534fd259c (patch)
tree048453798186c135337322e2cf109d09e0605ae5 /source/blender/editors/armature
parent891a037e9b4725b79117f6f2bc469b4b3a2eeeef (diff)
code cleanup: rename flip_side_name to BKE_deform_flip_side_name
Diffstat (limited to 'source/blender/editors/armature')
-rw-r--r--source/blender/editors/armature/armature_naming.c6
-rw-r--r--source/blender/editors/armature/armature_skinning.c7
-rw-r--r--source/blender/editors/armature/armature_utils.c6
-rw-r--r--source/blender/editors/armature/pose_edit.c6
-rw-r--r--source/blender/editors/armature/pose_select.c8
-rw-r--r--source/blender/editors/armature/pose_transform.c2
6 files changed, 17 insertions, 18 deletions
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index 2228cb8386e..10e97240898 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -289,7 +289,6 @@ static int armature_flip_names_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob = CTX_data_edit_object(C);
bArmature *arm;
- char newname[MAXBONENAME];
/* paranoia checks */
if (ELEM(NULL, ob, ob->pose))
@@ -299,8 +298,9 @@ static int armature_flip_names_exec(bContext *C, wmOperator *UNUSED(op))
/* loop through selected bones, auto-naming them */
CTX_DATA_BEGIN(C, EditBone *, ebone, selected_editable_bones)
{
- flip_side_name(newname, ebone->name, TRUE); // 1 = do strip off number extensions
- ED_armature_bone_rename(arm, ebone->name, newname);
+ char name_flip[MAXBONENAME];
+ BKE_deform_flip_side_name(name_flip, ebone->name, true);
+ ED_armature_bone_rename(arm, ebone->name, name_flip);
}
CTX_DATA_END;
diff --git a/source/blender/editors/armature/armature_skinning.c b/source/blender/editors/armature/armature_skinning.c
index 0301db4b4cf..5f15d15d478 100644
--- a/source/blender/editors/armature/armature_skinning.c
+++ b/source/blender/editors/armature/armature_skinning.c
@@ -346,11 +346,10 @@ static void add_verts_to_dgroups(ReportList *reports, Scene *scene, Object *ob,
/* find flipped group */
if (dgroup && mirror) {
- char name[MAXBONENAME];
+ char name_flip[MAXBONENAME];
- // 0 = don't strip off number extensions
- flip_side_name(name, dgroup->name, FALSE);
- dgroupflip[j] = defgroup_find_name(ob, name);
+ BKE_deform_flip_side_name(name_flip, dgroup->name, false);
+ dgroupflip[j] = defgroup_find_name(ob, name_flip);
}
}
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c
index f2f51dc1bd5..7efeeebcf1d 100644
--- a/source/blender/editors/armature/armature_utils.c
+++ b/source/blender/editors/armature/armature_utils.c
@@ -182,16 +182,16 @@ void ED_armature_ebone_to_mat4(EditBone *ebone, float mat[4][4])
EditBone *ED_armature_bone_get_mirrored(ListBase *edbo, EditBone *ebo)
{
EditBone *eboflip = NULL;
- char name[MAXBONENAME];
+ char name_flip[MAXBONENAME];
if (ebo == NULL)
return NULL;
- flip_side_name(name, ebo->name, FALSE);
+ BKE_deform_flip_side_name(name_flip, ebo->name, false);
for (eboflip = edbo->first; eboflip; eboflip = eboflip->next) {
if (ebo != eboflip) {
- if (!strcmp(name, eboflip->name))
+ if (!strcmp(name_flip, eboflip->name))
break;
}
}
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index 31ff1e161e8..d1c096e6cf5 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -577,9 +577,9 @@ static int pose_flip_names_exec(bContext *C, wmOperator *UNUSED(op))
/* loop through selected bones, auto-naming them */
CTX_DATA_BEGIN (C, bPoseChannel *, pchan, selected_pose_bones)
{
- char newname[MAXBONENAME];
- flip_side_name(newname, pchan->name, TRUE);
- ED_armature_bone_rename(arm, pchan->name, newname);
+ char name_flip[MAXBONENAME];
+ BKE_deform_flip_side_name(name_flip, pchan->name, true);
+ ED_armature_bone_rename(arm, pchan->name, name_flip);
}
CTX_DATA_END;
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index a53d8050c5d..687b1f3f9bc 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -848,10 +848,10 @@ static int pose_bone_flip_active_exec(bContext *C, wmOperator *UNUSED(op))
if (arm->act_bone) {
bPoseChannel *pchanf;
- char name[MAXBONENAME];
- flip_side_name(name, arm->act_bone->name, TRUE);
+ char name_flip[MAXBONENAME];
+ BKE_deform_flip_side_name(name_flip, arm->act_bone->name, true);
- pchanf = BKE_pose_channel_find_name(ob->pose, name);
+ pchanf = BKE_pose_channel_find_name(ob->pose, name_flip);
if (pchanf && pchanf->bone != arm->act_bone) {
arm->act_bone->flag &= ~BONE_SELECTED;
pchanf->bone->flag |= BONE_SELECTED;
@@ -860,7 +860,7 @@ static int pose_bone_flip_active_exec(bContext *C, wmOperator *UNUSED(op))
/* in weightpaint we select the associated vertex group too */
if (ob_act->mode & OB_MODE_WEIGHT_PAINT) {
- ED_vgroup_select_by_name(ob_act, name);
+ ED_vgroup_select_by_name(ob_act, name_flip);
DAG_id_tag_update(&ob_act->id, OB_RECALC_DATA);
}
diff --git a/source/blender/editors/armature/pose_transform.c b/source/blender/editors/armature/pose_transform.c
index 79ca70a6189..4e66c329088 100644
--- a/source/blender/editors/armature/pose_transform.c
+++ b/source/blender/editors/armature/pose_transform.c
@@ -302,7 +302,7 @@ static bPoseChannel *pose_bone_do_paste(Object *ob, bPoseChannel *chan, short se
/* get the name - if flipping, we must flip this first */
if (flip)
- flip_side_name(name, chan->name, 0); /* 0 = don't strip off number extensions */
+ BKE_deform_flip_side_name(name, chan->name, false);
else
BLI_strncpy(name, chan->name, sizeof(name));