diff options
author | reduz <reduzio@gmail.com> | 2021-10-20 20:42:22 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2021-10-21 18:27:34 -0300 |
commit | a69541da4cf156ed00de7ed10887a1fc57dcbd14 (patch) | |
tree | f1345855da165570bd81c4aa2c3a71ab63a4ada2 /editor/import/resource_importer_scene.h | |
parent | 9c9ec63e1dbd33cace4a988783f1130b4c3f06ad (diff) | |
download | redot-engine-a69541da4cf156ed00de7ed10887a1fc57dcbd14.tar.gz |
Implement Animation Compression
Roughly based on https://github.com/godotengine/godot-proposals/issues/3375 (used format is slightly different).
* Implement bitwidth based animation compression (see animation.h for format).
* Can compress imported animations up to 10 times.
* Compression format opens the door to streaming.
* Works transparently (happens all inside animation.h)
Diffstat (limited to 'editor/import/resource_importer_scene.h')
-rw-r--r-- | editor/import/resource_importer_scene.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h index e1e7046be5..a192921966 100644 --- a/editor/import/resource_importer_scene.h +++ b/editor/import/resource_importer_scene.h @@ -261,6 +261,7 @@ public: Ref<Animation> _save_animation_to_file(Ref<Animation> anim, bool p_save_to_file, String p_save_to_path, bool p_keep_custom_tracks); void _create_clips(AnimationPlayer *anim, const Array &p_clips, bool p_bake_all); void _optimize_animations(AnimationPlayer *anim, float p_max_lin_error, float p_max_ang_error, float p_max_angle); + void _compress_animations(AnimationPlayer *anim, int p_page_size_kb); Node *pre_import(const String &p_source_file); virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = nullptr, Variant *r_metadata = nullptr) override; |