#How do you handle importing a file as several resources?

1 messages · Page 1 of 1 (latest)

rose trout
#

I've got an aseprite file that's a little more complex than just a handful of frame-by-frame animations. It's split into multiple parts, with one part itself split into multiple possible states, and I have to composite that all at runtime, so Godot's typical one-to-one file-to-asset import process is definitely not enough.

I made myself a custom EditorImporterPlugin that can handle importing the same file multiple times with different settings so I can extract all the important data into different resources, and it works great, but actually writing it is really bulky and fiddly, and I still need to take the spritesheets and metadata and turn it into actually useful stuff, like individual sprites and animations.

If you happen to know how to do slightly more complex import processes, I could definitely use some advice.

Also, right now I'm exploring the idea of making the resource files manually, and setting them up to target a source file with all the settings it wants to export with. The problem is that I can't seem to find any way to let it gracefully track the source file to repopulate its data when the source changes, so if you know how to that specific thing, I'd be all set.

rose trout
#

Bump

languid hedge
languid hedge
# rose trout I've got an aseprite file that's a little more complex than just a handful of fr...

More specifically this part

var next_pass = StandardMaterial3D.new()
next_pass.albedo_color = color.inverted()
var next_pass_path = "%s.next_pass.%s" % [save_path, _get_save_extension()]

err = ResourceSaver.save(next_pass, next_pass_path)
if err != OK:
    return err
r_gen_files.push_back(next_pass_path)

Although it's not clear how this would work from the UI perspective. Only way is to try it out!