How to select active folder to import png files into script as cels?

Hi,
The previous artists I worked with used GraphicsGale, and we used a complex paperdolling system, in which we had one layer for each equipment set (leather, mail1, mail2, plate1, plate2) for each body part(ie : leather/legs, mail1_torso…) for each animation frame.

I made a tool to output each of these pieces, for each frame as a separate png file, with one folder for each set, and one subfolder for each piece (so : leather/legs/idle_05.png), but I would now import them into Aseprite, and make one cel out of each of these png.

How can I select the active folder location, and list all files here?
is it app.command.openBrowser, then switch to lua.os?

Hi @Galdred, at the moment there is no Dialog control to select a folder only. You could use a Dialog:file for this case and then remove the filename of the selected file to get the folder (using app.fs.filePath() function).

After that, to list all the files of a directory you can use the app.fs.listFiles() function.

1 Like