Skip to content

glTF .import files include slice information for 256 slices, if any animation options are set #68936

Open
@jtnicholl

Description

@jtnicholl

Godot version

v4.0.beta.custom_build [98da707]

System information

Fedora 36

Issue description

If any options are changed for animation imports, such as changing the loop mode or saving to file, without setting up slicing, Godot adds empty slice data to .import files. It lists empty slice information for 256 slices, generating seven lines for each. This results in .import files that are megabytes in size and needlessly difficult to version control.

Steps to reproduce

  1. Add a glTF file with animations to a project
  2. In the advanced scene importer, change the loop mode of one of the animations or set it to save to file (without enabling slicing)
  3. The .import file now contains
"slice_1/end_frame": 0,
"slice_1/loop_mode": 0,
"slice_1/name": "",
"slice_1/save_to_file/enabled": false,
"slice_1/save_to_file/keep_custom_tracks": false,
"slice_1/save_to_file/path": "",
"slice_1/start_frame": 0,
. . .

repeated 256 times. On an animation library with a decent number of animations, this makes the file several megabytes.

Minimal reproduction project

AnimationSlices.zip
The .import file in this project is 57.6 kilobytes, before enabling looping on its animation it was only 659 bytes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Bugs

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions