- Modifié
Skeleton Color not Working
Hi Nate,
in cocos2dx tint is not working. I am trying to color my skeleton but it does not take effects on it self.
Here is the code
spinner= spine::SkeletonAnimation::createWithData(_skeletonDataIcon, false);
spinner->getSkeleton()->r=1.0f;
spinner->getSkeleton()->g=1.0f;
spinner->getSkeleton()->b=0.0f;
spinner->getSkeleton()->a=1.0f;
original color is white and skeleton never turn yellow. Also we don't key color in Spine Animation in editor. We will really appreciate if you can help us out.
Thanks
Hm, that looks like a bug. Which version of the Spine runtime are you using? Which version of cocos2d-x are you using?
Hi,
Spine-c and spine-cocos2dx run time v2.5
cocos2dx 3.15
spine editor 3.5.51
we are using API provided by you guys and not that is shipped with cocos2dx it self.
thanks
Hm, the spine-cocos2dx runtime version 2.5 is not supposed to work with cocos2dx 3.15. Could you update to the latest spine-cocos2dx runtime from the GitHub master branch and test?
spine-cocos2dx runtime version 2.5 is the latest version on the master branch and I am using that one. Can you please test the tint functioning at your end please?
I already have updated code to the latest commit you made on 20th dec 2016.
Thanks
You may looking at the Spine Runtimes license version.
Just to remove confusion. Below are the links I am using for spine runtime, and yes their Spine Runtimes license version is 2.5. If I have to use some other code please paste the links here. Thanks.
spine-runtimes/spine-cocos2dx/src/spine at master
spine-runtimes/spine-c/spine-c at master
That's the correct version. I've confirmed this bug and opened an issue here: [cocos2dx] Tinting skeleton not working · #901
edit: I've fixed the issue (along with color inheritance from parent nodes) in the 3.6-beta branch on GitHub. Thanks for reporting.
if I upgrade to 3.6 beta runtimes, will it work with Spine 3.5.51?
Doing that is not something we officially support. I can say that the AnimationState from 3.6 can be used to replace the one in 3.5 without problems.
Blog: AnimationState: multiple mixing without dipping
Yes you are right, sadly I spent some time to upgrade to 3.6 beta but I am getting errors. So is it possible if you can patch the master branch code for this error? Your efforts in this regard will be much appreciated! thanks.
What errors did you get? 3.5 and 3.6 are largely API compatible. The only change you'll likely be affected by is removing r, g, b, a from skeleton and replacing it with a spColor field called color.
Hello,
All binary (.skel) files were throwing errors. so I changed back to 3.5.
error was related to path constraints. My bad i didn't took the screenshots. I can post some thing in few hours about errors.
The binary format is very sensitive to changes. You'd need to continue using SkeletonBinary from 3.5 and fix up any errors from API differences. A better option is to just export from 3.6 if you are using the 3.6 runtimes.