ceceppa / anima

Godot: run sequential and parallel animations with less code
https://anima.ceceppa.me/
MIT License
695 stars 22 forks source link

not working for .gde files #29

Open engimaxp opened 2 years ago

engimaxp commented 2 years ago

https://github.com/ceceppa/anima/blob/b61ee6fb6a32824580c0d8f80b386dce259878c1/addons/anima/utils/animations.gd#L22

The first if statement is always true: file.find('.gd.') < 0

The second if statement is also match for both .gd file and .gdc file ,which makes it's quite confusion

and I guess its not working for gde file, I use a low version of anima , and it report cant find any animation

in replacement:

        for file in list:
            if file.ends_with('.gdc'):
                filtered.push_back(file.replace('.gdc', '.gd'))
            elif file.ends_with('.gde'):
                filtered.push_back(file.replace('.gde', '.gd'))
            elif file.ends_with('.gd'):
                filtered.push_back(file)
        _animations_list = filtered

BTW, Anima is a great plugin ! Thanks a lot !