@Nate - thank you for taking the time. I know actually understand what I am clicking on. Fascinating. I see I was doing it very wrong before. Now, I have 2 skins
one of them using a mesh, and another using a linked mesh.
For anyone following in my footsteps, ...
I can only hit Edit Mesh on the original, and any change I make to the original effects the children meshes. This gives central control to a single mesh.
Any FFD I do in an animation against the mesh OR linked mesh, then both the original and the linked mesh get the keyframes in the animation.
If I change the weight of vertices in the mesh OR linked mesh against bound bones, then both the original and linked mesh get the weight change.
Killer feature. Thanks for making such an amazing product and the continual improvement. It's been featured in our last 3 games and this work is for #4.
@Nate - I think have found an oddity / bug with linked meshes. When I duplicate a Skin that already has linked meshes in it, I get a crash in the Cocos 2DX runtime.
I make skin "Gray Person" - setup the base meshes (works great)
I duplicate "Gray Person" Skin to create "Space man 1" Skin and get a bunch of mesh copies. I use the linked mesh technique you have enumerated above to create linked meshes in the skin "Space man 1" and replace their path with the space-man versions (works great)
I duplicate "Space man 1" to create "Space man 2" skin. After this duplication, the linked meshes from "Space man 1" are still around, they are not turned into new attachments. In the JSON, they look good. However, as soon as I have duplicated out to "Space man 2" the spine crashes on load in CC2DX
I can provide a bunch more data and even the Spine if that would help, but I thought I'd start with a report and a stack trace.
In this case, on line 865 the slotIndex is a big negative and the mesh is a bad pointer. We are using v2.3 of the runtime for CC2DX v2.x. Let me know how else I can help troubleshoot, or if this is expected behavior.
spSkeletonJson_readSkeletonData(spSkeletonJson * self, const char * json) Line 865 + 0x9 bytes C++
spSkeletonJson_readSkeletonDataFile(spSkeletonJson * self, const char * path) Line 436 + 0xd bytes C++
...
.
@Nate - Ok, I actually found the reason for this, seems like a bug in the Cocos2dX version 2 runtime.
in static void _spSkeletonJson_addLinkedMesh (... ), something about the way the array is expanded and copied when the linkedMeshCount reaches 8, causes a crash. I eventually pinned down in the Editor that it isn't copying a skin, it is adding any linked mesh.
The 8th linked mesh added causes Spine runtime to crash. I changed the code on line 127 to read:
if (internal->linkedMeshCapacity < 16) internal->linkedMeshCapacity = 16;
and it works until the 16th linked mesh now.
I am working with the competent C engineer on my team to figure this out and hopefully we can post a patch to your team.
Thanks!