-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Allow duplicating entire animations #80380
Conversation
Please rebase instead of merging into the branch |
b292934
to
6e72d49
Compare
Please use |
You need to add documentation, see the CI |
c990ee3
to
f24a298
Compare
f24a298
to
4b512d1
Compare
Documentation has to be in alphabetical order Please take this opportunity to also squash your commits into one, and rebase onto master to make sure CI doesnt fail |
4b512d1
to
89f679e
Compare
Your commit message should be descriptive, the PR title for example |
89f679e
to
1ee3851
Compare
<param index="0" name="anim_from" type="StringName" /> | ||
<param index="1" name="anim_to" type="StringName" /> | ||
<description> | ||
Duplicate all frames [param anim_from] to the [param anim_to]. |
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.
Duplicate all frames [param anim_from] to the [param anim_to]. | |
Duplicate all frames from [param anim_from] to [param anim_to]. |
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.
I think the current description is misleading. It sounds like the animation has to already exist, while it doesn't need to.
undo_redo->add_do_method(this, "_update_library"); | ||
undo_redo->add_undo_method(this, "_update_library"); |
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.
I think this should run after other methods.
undo_redo->add_do_method(this, "_update_library"); | ||
undo_redo->add_undo_method(this, "_update_library"); | ||
undo_redo->add_do_method(frames.ptr(), "duplicate_animation", edited_anim, name); | ||
undo_redo->add_undo_method(frames.ptr(), "remove_animation", name); |
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.
This is called twice.
|
||
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton(); | ||
undo_redo->create_action(TTR("Duplicate Animation"), UndoRedo::MERGE_DISABLE, EditorNode::get_singleton()->get_edited_scene()); | ||
undo_redo->add_do_method(frames.ptr(), "add_animation", name); |
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.
duplicate_animation()
works even if the new animation does not exist, so this step is redundant.
Was this still being worked on? Recently did some tutorials, and this was a real pain point for myself and even the person giving the tutorial. |
Is this still likely to be added? Would love some way to duplicate animations in a AnimatedSprite |
Looks like abandoned PR, someone would have to take over and finish it. |
AFAIK the OP has stopped contributing or participating entirely |
I will continue to work on this. |
Looks like this should be closed since it was salvaged in #93624 |
Superseded by #93624 |
This is the duplicate animation ability for spriteframes. Sometimes the user want to duplicate entire animations instead of a frame only!
this is a better version of: #67533
With the suggestions of: @KoBeWi , @groud and @volokh0x
demonstration:
PR-duplicate-anim.mp4
thanks guys!!!