mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-11 17:48:45 +08:00
Fixed loading linked meshes from JSON/binary when the source mesh is in a skin.
This commit is contained in:
parent
55851f7699
commit
3607e32855
@ -189,6 +189,7 @@ public class SkeletonBinary {
|
||||
Skin skin = linkedMesh.skin == null ? skeletonData.getDefaultSkin() : skeletonData.findSkin(linkedMesh.skin);
|
||||
if (skin == null) throw new SerializationException("Skin not found: " + linkedMesh.skin);
|
||||
Attachment parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
|
||||
if (parent == null) throw new SerializationException("Parent mesh not found: " + linkedMesh.parent);
|
||||
if (linkedMesh.mesh instanceof MeshAttachment) {
|
||||
MeshAttachment mesh = (MeshAttachment)linkedMesh.mesh;
|
||||
mesh.setParentMesh((MeshAttachment)parent);
|
||||
|
||||
@ -203,6 +203,7 @@ public class SkeletonJson {
|
||||
Skin skin = linkedMesh.skin == null ? skeletonData.getDefaultSkin() : skeletonData.findSkin(linkedMesh.skin);
|
||||
if (skin == null) throw new SerializationException("Skin not found: " + linkedMesh.skin);
|
||||
Attachment parent = skin.getAttachment(linkedMesh.slotIndex, linkedMesh.parent);
|
||||
if (parent == null) throw new SerializationException("Parent mesh not found: " + linkedMesh.parent);
|
||||
if (linkedMesh.mesh instanceof MeshAttachment) {
|
||||
MeshAttachment mesh = (MeshAttachment)linkedMesh.mesh;
|
||||
mesh.setParentMesh((MeshAttachment)parent);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user