Cleanup: remove redundant function

This commit is contained in:
Campbell Barton
2024-11-28 10:20:59 +11:00
parent 7f26812523
commit 979ad4cc9c

View File

@@ -293,21 +293,6 @@ EditBone *add_points_bone(Object *obedit, float head[3], float tail[3])
return ebo;
}
static EditBone *get_named_editbone(ListBase *edbo, const char *name)
{
if (!edbo || !name) {
return nullptr;
}
LISTBASE_FOREACH (EditBone *, eBone, edbo) {
if (STREQ(name, eBone->name)) {
return eBone;
}
}
return nullptr;
}
static void pre_edit_bone_duplicate(ListBase *editbones)
{
/* clear temp */
@@ -429,8 +414,9 @@ static void update_duplicate_subtarget(EditBone *dup_bone,
/* TODO: support updating sub-targets for multi-object edit mode.
* This requires all objects bones to be duplicated before this runs. */
oldtarget = (ob == target_ob) ? get_named_editbone(target_armature->edbo, ct->subtarget) :
nullptr;
oldtarget = (ob == target_ob) ?
ED_armature_ebone_find_name(target_armature->edbo, ct->subtarget) :
nullptr;
if (oldtarget && oldtarget->temp.ebone) {
newtarget = oldtarget->temp.ebone;
STRNCPY(ct->subtarget, newtarget->name);