diff --git a/scene/animation/animation_blend_space_1d.cpp b/scene/animation/animation_blend_space_1d.cpp index f0db3a3c49..42266d387b 100644 --- a/scene/animation/animation_blend_space_1d.cpp +++ b/scene/animation/animation_blend_space_1d.cpp @@ -321,21 +321,12 @@ bool AnimationNodeBlendSpace1D::_set(const StringName &p_name, const Variant &p_ if (prop.begins_with("blend_point_")) { int idx = prop.get_slicec('_', 2).to_int(); String what = prop.get_slicec('/', 1); + if (idx == blend_points_used && what == "node") { + add_blend_point(p_value, 0, -1, StringName(itos(idx))); + return true; + } if (what == "node") { - Ref node = p_value; -#ifndef DISABLE_DEPRECATED - if (idx == blend_points_used) { - add_blend_point(node, 0, -1, blend_points[idx].name.is_empty() ? StringName(itos(idx)) : blend_points[idx].name); - } else { - set_blend_point_node(idx, node); - } -#else - if (idx == blend_points_used) { - add_blend_point(node, 0, -1, blend_points[idx].name); - } else { - set_blend_point_node(idx, node); - } -#endif // DISABLE_DEPRECATED + set_blend_point_node(idx, p_value); } else if (what == "pos") { set_blend_point_position(idx, p_value); } else if (what == "name") { diff --git a/scene/animation/animation_blend_space_2d.cpp b/scene/animation/animation_blend_space_2d.cpp index 3a6e17e114..aa061c4143 100644 --- a/scene/animation/animation_blend_space_2d.cpp +++ b/scene/animation/animation_blend_space_2d.cpp @@ -393,21 +393,12 @@ bool AnimationNodeBlendSpace2D::_set(const StringName &p_name, const Variant &p_ if (prop.begins_with("blend_point_")) { int idx = prop.get_slicec('_', 2).to_int(); String what = prop.get_slicec('/', 1); + if (idx == blend_points_used && what == "node") { + add_blend_point(p_value, Vector2(), -1, StringName(itos(idx))); + return true; + } if (what == "node") { - Ref node = p_value; -#ifndef DISABLE_DEPRECATED - if (idx == blend_points_used) { - add_blend_point(node, Vector2(), -1, blend_points[idx].name.is_empty() ? StringName(itos(idx)) : blend_points[idx].name); - } else { - set_blend_point_node(idx, node); - } -#else - if (idx == blend_points_used) { - add_blend_point(node, Vector2(), -1, blend_points[idx].name); - } else { - set_blend_point_node(idx, node); - } -#endif // DISABLE_DEPRECATED + set_blend_point_node(idx, p_value); } else if (what == "pos") { set_blend_point_position(idx, p_value); } else if (what == "name") {