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:30:36 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-11-16 22:23:05 +0400
commit4fd66d7c0c569958e4db8486e63f5f2a5e64f2cc (patch)
tree1d186ee1046e9ef2ac27a7fe2f4d9811db719465 /source/blender/editors/armature/armature_naming.c
parente62cdbb474c4a09b55f046b199d3036534fd259c (diff)
code cleanup: armature functions
- added BKE_pose_channel_get_mirrored (matching editmode function ED_armature_bone_get_mirrored) - editbone_name_exists -> ED_armature_bone_find_name
Diffstat (limited to 'source/blender/editors/armature/armature_naming.c')
-rw-r--r--source/blender/editors/armature/armature_naming.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index 10e97240898..c574fc6a297 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -67,17 +67,11 @@
/* ************************************************** */
/* EditBone Names */
-/* checks if an EditBone with a matching name already, returning the matching bone if it exists */
-EditBone *editbone_name_exists(ListBase *edbo, const char *name)
-{
- return BLI_findstring(edbo, name, offsetof(EditBone, name));
-}
-
/* note: there's a unique_bone_name() too! */
static bool editbone_unique_check(void *arg, const char *name)
{
struct {ListBase *lb; void *bone; } *data = arg;
- EditBone *dupli = editbone_name_exists(data->lb, name);
+ EditBone *dupli = ED_armature_bone_find_name(data->lb, name);
return dupli && dupli != data->bone;
}
@@ -155,7 +149,7 @@ void ED_armature_bone_rename(bArmature *arm, const char *oldnamep, const char *n
/* now check if we're in editmode, we need to find the unique name */
if (arm->edbo) {
- EditBone *eBone = editbone_name_exists(arm->edbo, oldname);
+ EditBone *eBone = ED_armature_bone_find_name(arm->edbo, oldname);
if (eBone) {
unique_editbone_name(arm->edbo, newname, NULL);