Import Folders and Import Folders to sync the canvas size
Import Folders click here to Download
- How it works:
Folder Selection:
- The script first gets a root folder path from the user via a dialog
- It normalizes this path to ensure consistent formatting
Folder Processing:
- Lists all items in the root folder using app.fs.listFiles()
- For each item, checks if it’s a directory with app.fs.isDirectory()
For each subfolder found:
- Creates a new sprite group with spr:newGroup()
- Names the group after the subfolder
- Lists all files in the subfolder
Image Import:
- For each file in subfolders, checks if it’s an image (PNG/JPG/JPEG)
- The actual importing happens in the code after line 43 (which wasn’t shown)
- Typically would use Aseprite’s API to import and add images to the group
Canvas Handling:
- The canvas would be automatically updated as new layers/groups are added
- Each imported image would become a new layer in its respective group
- The script tracks counts of imported images and created groups
HOW TO SELECT A FOLDER:
- Click the three dots button on the right hand side of ‘Select root folder’
- In the file browser that opens:
-
- Navigate to your desired folder
-
- Click the folder to select it (don’t open it)
-
- Right click and Copy as full file path/directory
- Then paste full path on the input next to the ‘Select root folder’