From 0cf9597758f3af3afc951d0bf02dee1aeb9a6daf Mon Sep 17 00:00:00 2001 From: Bojidar Marinov Date: Tue, 30 May 2017 23:20:15 +0300 Subject: Allow for getting/setting indexed properties of objects using get/set_indexed Performance is around the same as using pure set() through GDScript. --- modules/gdnative/gdnative/node_path.cpp | 4 ++-- modules/gdnative/gdnative_api.json | 2 +- modules/gdnative/include/gdnative/node_path.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/gdnative/gdnative/node_path.cpp b/modules/gdnative/gdnative/node_path.cpp index 50fade5b94..0124efe4ba 100644 --- a/modules/gdnative/gdnative/node_path.cpp +++ b/modules/gdnative/gdnative/node_path.cpp @@ -93,10 +93,10 @@ godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_self, co return dest; } -godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_self) { +godot_string GDAPI godot_node_path_get_concatenated_subnames(const godot_node_path *p_self) { godot_string dest; const NodePath *self = (const NodePath *)p_self; - memnew_placement(&dest, String(self->get_property())); + memnew_placement(&dest, String(self->get_concatenated_subnames())); return dest; } diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json index 770fb429c7..6555bc83b7 100644 --- a/modules/gdnative/gdnative_api.json +++ b/modules/gdnative/gdnative_api.json @@ -2898,7 +2898,7 @@ ] }, { - "name": "godot_node_path_get_property", + "name": "godot_node_path_get_concatenated_subnames", "return_type": "godot_string", "arguments": [ ["const godot_node_path *", "p_self"] diff --git a/modules/gdnative/include/gdnative/node_path.h b/modules/gdnative/include/gdnative/node_path.h index 42446175d8..b5a59fd325 100644 --- a/modules/gdnative/include/gdnative/node_path.h +++ b/modules/gdnative/include/gdnative/node_path.h @@ -73,7 +73,7 @@ godot_int GDAPI godot_node_path_get_subname_count(const godot_node_path *p_self) godot_string GDAPI godot_node_path_get_subname(const godot_node_path *p_self, const godot_int p_idx); -godot_string GDAPI godot_node_path_get_property(const godot_node_path *p_self); +godot_string GDAPI godot_node_path_get_concatenated_subnames(const godot_node_path *p_self); godot_bool GDAPI godot_node_path_is_empty(const godot_node_path *p_self); -- cgit v1.2.3