You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Allow for getting/setting indexed properties of objects using get/set_indexed
Performance is around the same as using pure set() through GDScript.
This commit is contained in:
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user