diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-05-30 23:20:15 +0300 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2017-11-21 20:58:21 +0200 |
commit | 0cf9597758f3af3afc951d0bf02dee1aeb9a6daf (patch) | |
tree | 2a5fe6f1ba36a79ccc0091d0235ec48e4d92012e /editor/plugins/animation_tree_editor_plugin.cpp | |
parent | 7bbde636e802f85c4ed9ee95b9ef19abc1aa249d (diff) |
Allow for getting/setting indexed properties of objects using get/set_indexed
Performance is around the same as using pure set() through GDScript.
Diffstat (limited to 'editor/plugins/animation_tree_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/animation_tree_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp index 22d23e1c72..8fe6538653 100644 --- a/editor/plugins/animation_tree_editor_plugin.cpp +++ b/editor/plugins/animation_tree_editor_plugin.cpp @@ -1196,14 +1196,14 @@ void AnimationTreeEditor::_edit_filters() { if (base) { NodePath np = E->get(); - if (np.get_property() != StringName()) { + if (np.get_subname_count() == 1) { Node *n = base->get_node(np); Skeleton *s = Object::cast_to<Skeleton>(n); if (s) { String skelbase = E->get().substr(0, E->get().find(":")); - int bidx = s->find_bone(np.get_property()); + int bidx = s->find_bone(np.get_subname(0)); if (bidx != -1) { int bparent = s->get_bone_parent(bidx); @@ -1213,7 +1213,7 @@ void AnimationTreeEditor::_edit_filters() { String bpn = skelbase + ":" + s->get_bone_name(bparent); if (pm.has(bpn)) { parent = pm[bpn]; - descr = np.get_property(); + descr = np.get_subname(0); } } else { |