Skip to content

Commit

Permalink
Fixed AnimationTrackEditor's TransformTrack can't edit
Browse files Browse the repository at this point in the history
  • Loading branch information
TokageItLab committed Jul 28, 2021
1 parent 60eb508 commit 00ac6ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions editor/animation_track_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class AnimationTrackKeyEdit : public Object {
case Animation::TYPE_TRANSFORM3D: {
Dictionary d_old = animation->track_get_key_value(track, key);
Dictionary d_new = d_old.duplicate();
d_new[p_name] = p_value;
d_new[name] = p_value;
setting = true;
undo_redo->create_action(TTR("Anim Change Transform"));
undo_redo->add_do_method(animation.ptr(), "track_set_key_value", track, key, d_new);
Expand Down Expand Up @@ -415,7 +415,7 @@ class AnimationTrackKeyEdit : public Object {
case Animation::TYPE_TRANSFORM3D: {
Dictionary d = animation->track_get_key_value(track, key);
ERR_FAIL_COND_V(!d.has(name), false);
r_ret = d[p_name];
r_ret = d[name];
return true;

} break;
Expand Down Expand Up @@ -784,7 +784,7 @@ class AnimationMultiTrackKeyEdit : public Object {
case Animation::TYPE_TRANSFORM3D: {
Dictionary d_old = animation->track_get_key_value(track, key);
Dictionary d_new = d_old.duplicate();
d_new[p_name] = p_value;
d_new[name] = p_value;

if (!setting) {
setting = true;
Expand Down Expand Up @@ -1015,7 +1015,7 @@ class AnimationMultiTrackKeyEdit : public Object {
case Animation::TYPE_TRANSFORM3D: {
Dictionary d = animation->track_get_key_value(track, key);
ERR_FAIL_COND_V(!d.has(name), false);
r_ret = d[p_name];
r_ret = d[name];
return true;

} break;
Expand Down

0 comments on commit 00ac6ff

Please sign in to comment.