ceceppa / anima

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

just don't work, even the demo project #41

Closed alexribeirodesa closed 1 week ago

alexribeirodesa commented 7 months ago

first of all, I recently migrated from Unity to Godot, so it could be something I'm doing wrong, but absolutely nothing works, not even importing it into my project or using the demo project.

this is the error when I try to import in my project: res://addons/anima/core/anima_node.gd:538 - Parse Error: Identifier "ANIMA" not declared in the current scope. modules/gdscript/gdscript.cpp:2788 - Failed to load script "res://addons/anima/core/anima_node.gd" with error "Parse error". (User)

this is the error when I try to run the demo project, and the godot build I'm using: image

thanks :)

quimnuss commented 6 months ago

Did you activate the plugin in settings?

alexribeirodesa commented 5 months ago

Did you activate the plugin in settings?

yep :(

quimnuss commented 5 months ago

So I tried the plugin the rellevant error is the one on the screenshot not the one you pasted.

Apparently anima violates type enforcing of inheritance, since the parent does not specify the returned type but the children does.

A workaround is to just drop the typing (aka -> AnimaDeclarationForProperty)

func anima_from(value):
    super.anima_from(value)

    return self
quimnuss commented 5 months ago

The documentation isn't working and what I could find is outdated. But looking at the code, the following works, as an example:

extends Label

func _ready():
    var anima = Anima.New(self).anima_fade_in(10)

    anima.play()

I had to rename the function Node() to New() because it clashes with the Node type, here: https://github.com/ceceppa/anima/blob/main/addons/anima/core/anima.gd#L32

ceceppa commented 5 months ago

Sorry for getting back to you late. I just set up the auto-update thing for the docs and add-ons whenever the repo gets a push. Right now, I'm poking around to see if any links in the docs are busted, so it might take a little while to get it all smooth and working.

By the way, what version of the plugin and Godot are you on? If you're using Godot 4, please try and download the addon from here: https://github.com/ceceppa/anima-godot-4/

quimnuss commented 5 months ago

I don't know about alex, but me I used the AssetLibrary to add the anima addon. Anima for godot 4, version 0.5, whose view files points to the repo you posted.

quimnuss commented 5 months ago

Yeah maybe the Node() I changed to workaround the type clash issue was actually from anima-godot-4 not anima. https://github.com/ceceppa/anima-godot-4/blob/main/addons/anima/core/anima.gd#L32

ceceppa commented 1 week ago

This has now been fixed. Everything should work fine with Godot 4.2 and Godot 4.3.

Please reopen if its not the case