summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-01-10 09:36:45 +0100
committerGitHub <noreply@github.com>2020-01-10 09:36:45 +0100
commit4bad292f20a8592a0cc902949f023bb7d9b3cfb3 (patch)
treede0761a4c1f6f3892dc2a87eff0d8a57af1a1e97
parent4b83bbd463200785db56644a26a18513389a92ad (diff)
parent3bcedd02b2eb2cfb78327249cafa195b55cdc499 (diff)
Merge pull request #34969 from volzhs/anim-bezier
Fix inserting bezier curve in Animation editor
-rw-r--r--editor/animation_track_editor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index cd19ceb868..f6d5312fc7 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -3790,8 +3790,9 @@ void AnimationTrackEditor::insert_value_key(const String &p_property, const Vari
value = p_value; //all good
} else {
String tpath = animation->track_get_path(i);
- if (NodePath(tpath.get_basename()) == np) {
- String subindex = tpath.get_extension();
+ int index = tpath.find_last(":");
+ if (NodePath(tpath.substr(0, index + 1)) == np) {
+ String subindex = tpath.substr(index + 1, tpath.length() - index);
value = p_value.get(subindex);
} else {
continue;