Merge pull request #34969 from volzhs/anim-bezier

Fix inserting bezier curve in Animation editor
This commit is contained in:
Rémi Verschelde 2020-01-10 09:36:45 +01:00 committed by GitHub
commit 4bad292f20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3790,8 +3790,9 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari
value = p_value; //all good value = p_value; //all good
} else { } else {
String tpath = animation->track_get_path(i); String tpath = animation->track_get_path(i);
if (NodePath(tpath.get_basename()) == np) { int index = tpath.find_last(":");
String subindex = tpath.get_extension(); if (NodePath(tpath.substr(0, index + 1)) == np) {
String subindex = tpath.substr(index + 1, tpath.length() - index);
value = p_value.get(subindex); value = p_value.get(subindex);
} else { } else {
continue; continue;