From 3c7f44435330119e7506f23a7711014f1753d6c3 Mon Sep 17 00:00:00 2001 From: PhobicHD Date: Sun, 3 Mar 2024 18:58:27 -0700 Subject: [PATCH] Fix naming --- include/godot_cpp/core/object.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/godot_cpp/core/object.hpp b/include/godot_cpp/core/object.hpp index 3670bd4b..0780364a 100644 --- a/include/godot_cpp/core/object.hpp +++ b/include/godot_cpp/core/object.hpp @@ -51,13 +51,13 @@ #define ADD_GROUP(m_name, m_prefix) godot::ClassDB::add_property_group(get_class_static(), m_name, m_prefix) #define ADD_SUBGROUP(m_name, m_prefix) godot::ClassDB::add_property_subgroup(get_class_static(), m_name, m_prefix) #define ADD_PROPERTY(m_property, m_setter, m_getter) godot::ClassDB::add_property(get_class_static(), m_property, m_setter, m_getter) -#define AUTO_ADD_PROPERTY(p_property, p_method) \ - { \ - auto get = &godot::detail::member_traits::object_type::_get_data_member; \ - auto set = &godot::detail::member_traits::object_type::_set_data_member; \ - ClassDB::bind_method(D_METHOD(&#p_method[1]), get); \ - ClassDB::bind_method(D_METHOD(&#p_method[1]), set); \ - ClassDB::add_property(get_class_static(), p_property, &#p_method[1], &#p_method[1]); \ +#define AUTO_ADD_PROPERTY(p_property, p_method) \ + { \ + auto get = &godot::internal::MemberPointerTraits::object_type::_get_data_member; \ + auto set = &godot::internal::MemberPointerTraits::object_type::_set_data_member; \ + ClassDB::bind_method(D_METHOD(StringName("get") + StringName(&#p_method[1])), get); \ + ClassDB::bind_method(D_METHOD(StringName("set") + StringName(&#p_method[1])), set); \ + ClassDB::add_property(get_class_static(), p_property, StringName("set") + StringName(&#p_method[1]), StringName("get") + StringName(&#p_method[1])); \ } #define ADD_PROPERTYI(m_property, m_setter, m_getter, m_index) godot::ClassDB::add_property(get_class_static(), m_property, m_setter, m_getter, m_index)