godot
godot copied to clipboard
[Core] Make ImageFormatLoader extensible.
Make ImageFormatLoader RefCounted, expose it to extensions.
There is an AVIF implementation (WIP) here: https://github.com/Faless/gd-avif/releases/tag/v0.0.1-godot-pr

Proposals to support esoteric image format: godotengine/godot-proposals#2461 godotengine/godot-proposals#3726
Draft status:
- Is
loader.add_format_loaderokay? - Should we add
class_namescripts like done inResourceFormatLoader? - Should we add
ResourceFormatLoader.add_custom_image_format_loader(String script_path);/ResourceFormatLoader.add_custom_image_format_loader_class(StringName p_class);(class_names and extensions?)
I have MaterialX module that requires a StandardMaterial3D loader, but that's related but offtopic.
I guess this needs the FileAccess bindings for this to work properly
Blocked by #65271
Blocked by #65271
Rebased on it, updated the PR and the avif module (not tagged yet).
Should be good for review, let me know if you prefer it to be exposed as a separate ImageLoaderExtension class (CC @reduz ).
Thanks!