-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
AnimatedSprite{2D,3D}
improvements
#65609
Conversation
15e0996
to
2e2e52a
Compare
7195968
to
2efc523
Compare
This comment was marked as resolved.
This comment was marked as resolved.
For the But since |
With this feature it will be much faster to set up the animation. Frame duration/delay is also available in other similar animation editors (for example, in Construct). |
I would like this but I am mostly concerned about implementation. The PR introduced many things at once and it's hard to grasp a focus on how the individual frame duration is accomplished. Ideally, it should be completely optional and preferably not noticeable until the user decides to make use of it. Because, as useful as frame duration may be, it's somewhat situational and I would not encourage beginning users to experiment, and see way too many overwhelming numbers. |
The changes done in this PR are nice, but I wonder if it would be better to merge SpriteFrames and AnimatedTexture since their feature sets are so similar. |
An
Perhaps we could add |
|
2ab118e
to
71bd52e
Compare
4a5f61f
to
7bfe50f
Compare
Regardless of the naming for props, I think this is in a mergeable state for now, and as I mentioned in #69621, it would be better to merge this as long as we don't know where AnimationTexture is going to go in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved in the previous animation meeting. Breaks compat, should probably be mergeable, reduz' feedback doesn't seem like a blocker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions and corrections for the documentation, as requested.
7bfe50f
to
af6c4be
Compare
Note: The docs of other |
af6c4be
to
63003d2
Compare
* Add support for individual frame duration to `SpriteFrames`. * Various minor improvements.
63003d2
to
0d25d8e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs are good now.
Thanks! |
@TokageItLab @YuriSizov Thanks for your reviews! |
Latest documentation is not good, https://docs.godotengine.org/en/latest/classes/class_spriteframes.html still has a method of get_frame() but should be get_frame_texture(). This was merged for beta11. |
As far as I know, the docs on the website is updated with some delay. |
Doesn't break compatibility (see godotengine/godot-proposals#2214 (comment)): godot/scene/resources/sprite_frames.cpp Lines 204 to 212 in 5034478
|
I would say that presence of compatibility code doesn't mean it doesn't break it. In this case it's tricky a bit, because The point is that such compatibility code is temporary and optional. |
The
If we consider the code inside |
Please mention the unit of duration for the parameter in add_frame. get_frame_duration gives relative duration. Is the duration in add_frame also relative duration? Is it in seconds? |
SpriteFrames
.Closes godotengine/godot-proposals#2214.
#65188 recently added similar changes to
AnimatedTexture
.You can specify the duration of individual frames (default 1.0 s).
This PR introduces backward incompatible changes to the public API
and the.SpriteFrames
serialization format