-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed behavior of insert track queue in AnimationTrackEditor
is unstable
#51459
Fixed behavior of insert track queue in AnimationTrackEditor
is unstable
#51459
Conversation
AnimationTrackEditor
's insert track queue doesn't work correctly
AnimationTrackEditor
's insert track queue doesn't work correctlyAnimationTrackEditor
doesn't work correctly
I found a problem with undo in BezierTrack and am working on fixing it. |
5ac8b76
to
60e8900
Compare
The undo problem has been fixed. I assume that this queue was only for BezierTrack, and if we try to use it from outside of AnimationTrackEditor, it works fine in 3.3 and earlier, but not in 4.0. Anyway, I think this is not a good way to implement queue, and it is actually causing problems in the implementation of #45699, so I fixed it. |
60e8900
to
2c48c14
Compare
AnimationTrackEditor
doesn't work correctlyAnimationTrackEditor
is unstable
AnimationTrackEditor
is unstableAnimationTrackEditor
is unstable
48df4a9
to
ac0573f
Compare
I fixed the part that was reviewed. |
ac0573f
to
a89746a
Compare
a89746a
to
50730a1
Compare
@JFonS As I mentioned in #45699, if this implementation is not done, inserting bone animation will not work properly and the implementation of SkeletonGizmo is halted, so if you can, it would be helpful that you review and approve this PR. CC @fire |
I don't know much about the animation track system, so I can't properly review this PR, sorry. |
@fire Here is video demo. This is the behavior in the current master. 2021-08-23.1.32.41-1.movIf I do Thus, for example, I provided one frame of grace for the judging. void AnimationTrackEditor::_query_insert(const InsertData &p_id) {
if (insert_frame != Engine::get_singleton()->get_frames_drawn()) {
//clear insert list for the frame if frame changed
if (insert_confirm->is_visible()) {
return; //do nothing
}
insert_data.clear();
insert_query = false;
}
insert_frame = Engine::get_singleton()->get_frames_drawn() + 1; // <- one frame of grace 2021-08-23.1.35.53-1.movThe result is that two tracks are now inserted at the same time. But, the timing of the popup warning is still wrong. After this PR makes elimination of judging by drawing frame and setting the queue manually, all tracks will be inserted correctly at the same time with the same code except for setting the queue manually. 2021-08-23.1.43.22-1.mov |
50730a1
to
9657a46
Compare
9657a46
to
7a44702
Compare
#45699 has been merged, so I updated it. Currently multiple animation tracks insertion by SkeletonEditor is broken, but it will be fixed when this PR is merged. |
Thanks! |
Fixed #51415.
The queue for insert track in
AnimationTrackEditor
gets the drawing frame of the Engine and determines if the operation was done on the same frame. Why do we implement it this way? This implementation seems to be special compared to other queues.There does not seem to be any code anywhere that uses the insert track queue, but when we actually try to use it, it does not work well in 4.0 (at least it was working well in 3.3) where the renderer has changed significantly.
I made it so that the queue creation and commit is done manually.