extension-spine
extension-spine copied to clipboard
Hide default animation error on model creation
@SalavatR Thank you for the contribution. Is this PR connected to an open issue? If not, could you please provide a description of the PR and what it solves (more than what it says in the title)
@SalavatR Thank you for the contribution. Is this PR connected to an open issue? If not, could you please provide a description of the PR and what it solves (more than what it says in the title)
We have many spine models and run animations from code, extension spams to log ERROR:SPINEEXT: No animation '' found
, on scene loading, i think it's not useful
We have many spine models and run animations from code, extension spams to log
ERROR:SPINEEXT: No animation '' found
, on scene loading, i think it's not useful
And this is because no animation was assigned to the spine scene in the editor?
We have many spine models and run animations from code, extension spams to log
ERROR:SPINEEXT: No animation '' found
, on scene loading, i think it's not usefulAnd this is because no animation was assigned to the spine scene in the editor?
Yes)
Hmm, ok, yeah, I mean if no animation has been set then I think it maybe makes sense to not try to play any animation and also not log a warning.
Hmm, ok, yeah, I mean if no animation has been set then I think it maybe makes sense to not try to play any animation and also not log a warning.
like this? https://github.com/defold/extension-spine/blob/main/defold-spine/src/comp_spine_model.cpp#L588
if(animation_id != dmHashString64(""))
{
PlayAnimation(component, animation_id, dmGameObject::PLAYBACK_LOOP_FORWARD, 0.0f, 0.0f, 1.0f, 0); // TODO: Is the default playmode specified anywhere?
}
https://github.com/defold/extension-spine/issues/104#issue-1389256094 here is issue :)
like this?
Well, I mean, now that I think of it there really should be no error/warning logged if the spine scene is created and the animation is empty. But I think using an empty hash later on should log a warning as that is likely indicative of an error.
I'd like to get some input from @JCash and/or @AGulev before we proceed.
I do agree to removing the warning when starting the game (the build process should warn about it). For the ingame setting of an empty string, I think it's still an error (what is the actual use case?)