viniciusgerevini / godot-aseprite-wizard

Godot Editor plugin to help import Aseprite animations to AnimationPlayers, AnimatedSprites and SpriteFrames.
MIT License
821 stars 42 forks source link

Implemented Imports Manager #140

Closed viniciusgerevini closed 5 months ago

viniciusgerevini commented 5 months ago

Adding an Imports Manager to make it easier to find and re-import animations imported via Inspector Dock.

This screen can be accessed via Project -> Tools -> Aseprite Wizard -> Imports Manager....

It shows basic information about the file and configuration associated to the node: Screenshot from 2024-03-26 20-23-46

Allows importing all resources from a scene: Screenshot from 2024-03-26 20-23-54

And all scenes in a folder: Screenshot from 2024-03-26 20-24-00

It also allows selecting multiple files at same time: Screenshot from 2024-03-26 20-24-09

When importing more than one resource a confirmation message will show up notifying you of how many resources will be re-imported: Screenshot from 2024-03-26 20-25-25

Bonus features:

Filtering: Screenshot from 2024-03-26 20-24-31

And docking to the bottom dock: Screenshot from 2024-03-26 20-24-55

To do:

Feature request: #134

This PR adds support to Godot 4. I'm still assessing if it's work to port to Godot 3 as well.

sandord commented 4 months ago

This is a great feature!

I'm having some issues with this feature in my project though.

sandord commented 4 months ago

After importing the root folder, I found some errors in the Output tab of the editor:

res://addons/AsepriteWizard/interface/imports_manager/import_helper.gd:77 - Invalid get index 'keep_anim_length' (on base: 'Dictionary').

Also a lot of these:

Node not found: "./Sprite2D" (relative to "/root/@EditorNode@17171/@Panel@13/@VBoxContainer@14/@HSplitContainer@17/@HSplitContainer@25/@HSplitContainer@33/@VBoxContainer@34/@VSplitContainer@36/@VSplitContainer@62/@VBoxContainer@63/@PanelContainer@110/MainScreen/@CanvasItemEditor@9462/@VSplitContainer@9281/@HSplitContainer@9283/@HSplitContainer@9285/@Control@9286/@SubViewportContainer@9287/@SubViewport@9288/WaterSplash").

In this case, the scene root is a AnimatedSprite2D itself.

Another one I see a lot:

Node config missing information., even though the import seems to succeed in that case.

And:

Script inherits from native type 'Node2D', so it can't be assigned to an object of type: 'Node'.

In Object of type 'AcceptDialog': Attempt to connect nonexistent signal 'popup_hide' to callable 'AcceptDialog::queue_free'.

I'm currently trying to fix as many of them as possible since they of course can also be caused by issues in my scenes.

UPDATE

Okay, so I got rid of most errors, I had some invalid source paths and also multiple sprites importing to the same destination files. The ones that are still present are:

sandord commented 4 months ago

I'm occasionally seeing weird things happening, like this for instance:

image

Also, when importing again, the incorrect part of the path changes to something else.

viniciusgerevini commented 3 months ago

Thanks a lot for testing this. I haven´t had time to look into these errors yet and it might be slow in this couple of weeks, but I'll check it out.

I've seen the aseprite generated bad data file error when trying to import from a new scene that has never been saved before, so the output path is not available. I guess the bug might be around that, maybe the path being passed to the import is outdated or just straight up incorrect.

Let me know if you identify any pattern in these issues.