From 4fd66d7c0c569958e4db8486e63f5f2a5e64f2cc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 17 Nov 2013 04:30:36 +1100 Subject: 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 --- source/blender/editors/armature/armature_naming.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source/blender/editors/armature/armature_naming.c') 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); -- cgit v1.2.3