[Feature Request] - Bringing back part of the context menu for sprite import

Started by Knoodn, Wed 01/02/2023 21:14:17

Previous topic - Next topic

Knoodn

Hello fellow developers,

hopefully this is the right place for this.

Since version 3.5 of AGS the "replace sprite using last sprite..." option is missing from the sprite import context menu.
Would it be possible to bring this back?
I'm working on a game from an older version of AGS that doesn't have a source file for each sprite. It's quite annoying to have to go to the specific file every time you want to replace a sprite.

It was there up to version 3.4. See picture:


If it is possible, I think it should also be renamed to "Replace sprite using previous file...".

And thanks to everyone who works on AGS. You are doing a great job.

morganw

I think it was probably removed because there would be a potential mismatch between the tile settings, animation frames (potentially a single file has multiple images in it), and whether the previous selection included multiple files (technically there is not a previous file there is a previous set of files).

Assuming you aren't using the tiling, in AGS 3.5 you can export all sprites that have a missing source file and set the sprite to reference the newly exported file. In that way you can replacements for the original source images. The export dialog box is a little cryptic, you have to right-click the Filename and Directory fields to get the list of tokens you can use for exporting, but I think it should work to bulk replace the source fields.

If you aren't interested in the source file then you can re-use a previous sprite by keeping it in the clipboard.

Just to check though, are you looking to set the same single source file for multiple sprites? Or are you looking to replace a sprite by having the "import sprite" window open with the previous selection of files and do something from there?

Knoodn

Thanks for the clarification.

Yes, what I want is to replace an already imported sprite by opening the "import sprite" window which shows me the file the last sprite was imported from. I dont't use the tiling.

When I have revised a series of sprites (without a linked source file) and use the option "Replace sprite from file..." for each sprite, I have to scroll through the files list again and again to open the same file.
But I'm fine with that if the option was removed for a good reason.


QuoteJust to check though, are you looking to set the same single source file for multiple sprites?
But that would also be interesting. Is it possible?

morganw

Quote from: Knoodn on Thu 02/02/2023 00:10:50When I have revised a series of sprites (without a linked source file) and use the option "Replace sprite from file..." for each sprite, I have to scroll through the files list again and again to open the same file.
I'm not quite sure that I follow this part. When you have revised a series of sprites doesn't that mean you have made changes to a series of files. Why would re-using the same file be useful in this context? Do you mean that you just want the selection to default to the previously used source directory?

Quote from: Knoodn on Thu 02/02/2023 00:10:50
QuoteJust to check though, are you looking to set the same single source file for multiple sprites?
But that would also be interesting. Is it possible?
It is just a reference to a file and I don't think there is any type of validation, so you could do that if you wanted to. You can also edit them in bulk by modifying the XML file that stores the references, as long as you are careful to not change anything else.

Knoodn

Quote from: morganw on Thu 02/02/2023 11:24:13
Quote from: Knoodn on Thu 02/02/2023 00:10:50When I have revised a series of sprites (without a linked source file) and use the option "Replace sprite from file..." for each sprite, I have to scroll through the files list again and again to open the same file.
I'm not quite sure that I follow this part. When you have revised a series of sprites doesn't that mean you have made changes to a series of files. Why would re-using the same file be useful in this context? Do you mean that you just want the selection to default to the previously used source directory?
I probably expressed myself in a misleading way. The term "tiled" was misunderstood by me.
What I mean is one graphic file with several frames of an animation. I want to replace the already existing sprites in AGS with the frames from this file. Since the project was started with an earlier version of AGS, there is not a source file for all sprites. So I use "Replace sprite from file..." and open the specific file with the several animation frames.
What I don't mean is an extra file for every sprite.

morganw

Thanks for clarifying, I see what you mean.

It might be possible to add it back, based on using the first (or last) image of the previously used set of files. I've opened an issue here: https://github.com/adventuregamestudio/ags/issues/1911


morganw

It should now reappear in the next build of AGS 3.6 as "Replace sprite using previous files...".

Knoodn

That sounds great, thanks. I will test it when the next build comes out.

Crimson Wizard

If you're interested to try out, there's a temp build with this, and few other fixes, available for download here:
https://cirrus-ci.com/task/5039184096788480

(if you scroll down to "Artifacts", there will be download links of installer and zip archive).


SMF spam blocked by CleanTalk