Animation system for godot-mapper plugin

This frame-by-frame animation system aims to improve map prefab creation.
While more powerful animation tools exist, often a simpler solution can be more handy.
The ability to work with the single and flexible asset format is great for prototyping ideas.
Maps inside characters directory are scanned for layer names like RUN->3.5, IDLE->0.
The build system will then construct the animation table that switches visibility of the layers.
info_animation entity stores additional animation parameters as RUN | { "loop_mode": 1 }.
loop_modecan be 0 (none), 1 (loop), 2 (ping pong). 1 is default.frame_durationmultiplies layer number (frame number) by the duration.fadeis an array of fade percentages like [0.5, 0.75, 0.9] for previous frames.fade_loopset to True will enable a smoother transition for looping animations.fade_beforeset to False will disable after-images of previous frames.fade_afterset to True will enable after-images for future frames.fade_modeinterpolation can be 0 (none), 1 (linear), 2 (cubic).
info_animation also supports the following properties.
autoplayanimation name will be used as the default animation.fade_visibility_enddistance after which after-images will be hidden.visibility_enddistance in units. 0 is default, meaning disabled.cast_shadowcan be 0 (disabled), 1 (on), 2 (double sided).
Layers named like OPEN->0 | CLOSE->9 | ... will be reused in multiple animations.
Animation layers can contain specially constructed point and brush entities.
For example, certain frames might need hit boxes or moving lights.
One-shot audio, particles and activatable scripts are supported.
All other layers will be parsed as the global STORAGE node.
Characters must use override shader materials with fade property from 0 to 1.
Additionally, the materials can implement fade_index property <0 (before), >0 (after).
Furthemore, the materials need to have depth_prepass_alpha render mode.
Depth prepass is disabled in Mobile renderer, so there is a workaround.
Override materials can provide fade_material metadata with a simpler transparency.
If the override material provides such metadata, then it itself should not use fade property.
The animation system will then use different materials for the character and the after-images.
Swappable weapons/items from the
STORAGEnode will not generate after-images.
Modular parts require an invisible placeholder geometry to be present in the animation layers.
Wrap such geometry into a special brush entity and construct a scripted node in place.
The scripts can then instantiate the similarly shaped children parts at runtime.