Hi Nate.
I came across a very strange problem. If we play a specific animation then we play another animation the skeleton will be broken. After some investigation I know this happens when the first animation change the vertices of some mesh attachments like rotating the mesh(not the bone) and the second one did not change them the attachments will keep the same as the last frame in the first animation. Even after we call the clearTracks and setToSetupPose functions bewteen these two animations this problem still happens.
I know it happens because the setToSetupPose function didn't clear the ffd info applied by the previous animation. So I changed the spSlot_setToSetupPose functions(spine-c runtime) to the following codes. This can fix my problem. But I don't know whether It's the best way to solve my problem. Will it caused some other problems? So I need your help.
void spSlot_setToSetupPose (spSlot* self) {
spAttachment* attachment = 0;
self->r = self->data->r;
self->g = self->data->g;
self->b = self->data->b;
self->a = self->data->a;
if (self->data->attachmentName) {
int i;
for (i = 0; i < self->bone->skeleton->data->slotsCount; ++i) {
if (self->data == self->bone->skeleton->data->slots[i]) {
attachment = spSkeleton_getAttachmentForSlotIndex(self->bone->skeleton, i, self->data->attachmentName);
break;
}
}
}
self->attachmentVerticesCount = 0; //clear the ffd info applied by the previous animation
spSlot_setAttachment(self, attachment);
}

