Skip to content
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

Add a Duplicate button and context menu to the SpriteFrames editor #3942

Open
RefinedSoftwareLLC opened this issue Feb 9, 2022 · 3 comments · May be fixed by godotengine/godot#80380 or godotengine/godot#93624

Comments

@RefinedSoftwareLLC
Copy link

RefinedSoftwareLLC commented Feb 9, 2022

Describe the project you are working on

Game Jam

Describe the problem or limitation you are having in your project

Creating Animations for an AnimatedSprite node is missing the duplicate feature that the rest of the UI has.

Create an AnimatedSprite node and edit its "SpriteFrames".
image
Above the animations are buttons for [New Animation] and [Remove Animation] but it is missing a [Duplicate Animation]
Right clicking an animation, doesn't bring up a context menu.
The context menu should at least list [Duplicate Animation] and [Remove Animation].

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Some animations are really complicated, which is why there is a dedicated tool to edit them. To have a new animation with just 1 change, you currently have to restart from scratch for each animation which can take a long time for a single animation, let alone if you have to do this 20 times.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Edit the "SpriteFrames" of an AnimatedSprite and try to open the right click context menu on an Animation. There should be a Duplicate option.
image

If this enhancement will not be used often, can it be worked around with a few lines of script?

Some animations are really complicated, which is why there is a dedicated tool to edit them. To have a new animation with just 1 change, you currently have to restart from scratch for each animation which can take a long time for a single animation, let alone if you have to do this 20 times.

Is there a reason why this should be core and not an add-on in the asset library?

In the Scene Tab, you can right click a node to get a context menu with a Duplicate option.
In the FileSystem Tab, you can right click a file to get a context menu with a Duplicate... option.
In the Animations Tab for AnimatedSprite, you can NOT right click an animation to get a context menu with a Duplicate option.

@RefinedSoftwareLLC
Copy link
Author

godotengine/godot#57823

@Calinou Calinou changed the title SpriteFrame Animations UI doesn't have duplicate nor context menu Add a Duplicate button to the SpriteFrames editor Feb 9, 2022
@Calinou Calinou changed the title Add a Duplicate button to the SpriteFrames editor Add a Duplicate button and context menu to the SpriteFrames editor Feb 9, 2022
@Mickeon
Copy link

Mickeon commented Feb 9, 2022

Some animations are really complicated, which is why there is a dedicated tool to edit them. To have a new animation with just 1 change, you currently have to restart from scratch for each animation which can take a long time for a single animation, let alone if you have to do this 20 times.

Fortunately, because .tres files are inherently text resources, it's possible to mitigate this issue by saving the SpriteFrames on disk, opening the resource as text and copy-pasting the desired animation. It may look like something this:

SpriteFrames copy pasting example

@RefinedSoftwareLLC
Copy link
Author

RefinedSoftwareLLC commented Feb 9, 2022

Thanks for posting a workaround! It is hard to know what can be changed like this and what can't. Like renaming a file makes changes in multiple .tres files, if you only did the change in 1 file it would break your project. I am glad to know this can be edited this way safely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants