From 995bc8d0496516178cbebbc232e335c2877af89b Mon Sep 17 00:00:00 2001 From: Zi Ye Date: Sat, 24 Feb 2024 17:44:26 -0600 Subject: Make Skeleton3D::add_bone return the new bone index right away, instead of requiring an additional call to get_bone_count. --- scene/3d/skeleton_3d.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'scene/3d/skeleton_3d.h') diff --git a/scene/3d/skeleton_3d.h b/scene/3d/skeleton_3d.h index 7d4df1d1f2..458bbfb979 100644 --- a/scene/3d/skeleton_3d.h +++ b/scene/3d/skeleton_3d.h @@ -138,6 +138,12 @@ private: void _update_process_order(); +#ifndef DISABLE_DEPRECATED + void _add_bone_bind_compat_88791(const String &p_name); + + static void _bind_compatibility_methods(); +#endif // DISABLE_DEPRECATED + protected: bool _get(const StringName &p_path, Variant &r_ret) const; bool _set(const StringName &p_path, const Variant &p_value); @@ -153,7 +159,7 @@ public: // skeleton creation api uint64_t get_version() const; - void add_bone(const String &p_name); + int add_bone(const String &p_name); int find_bone(const String &p_name) const; String get_bone_name(int p_bone) const; void set_bone_name(int p_bone, const String &p_name); -- cgit v1.2.3