mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 09:46:02 +08:00
Only update the region if the attachment has a region.
This commit is contained in:
parent
d798334a5e
commit
35347bf6a3
@ -327,7 +327,7 @@ public class SkeletonJson extends SkeletonLoader {
|
|||||||
if (parent == null) throw new SerializationException("Parent mesh not found: " + linkedMesh.parent);
|
if (parent == null) throw new SerializationException("Parent mesh not found: " + linkedMesh.parent);
|
||||||
linkedMesh.mesh.setTimelineAttachment(linkedMesh.inheritTimelines ? (VertexAttachment)parent : linkedMesh.mesh);
|
linkedMesh.mesh.setTimelineAttachment(linkedMesh.inheritTimelines ? (VertexAttachment)parent : linkedMesh.mesh);
|
||||||
linkedMesh.mesh.setParentMesh((MeshAttachment)parent);
|
linkedMesh.mesh.setParentMesh((MeshAttachment)parent);
|
||||||
if (linkedMesh.mesh.getSequence() == null) linkedMesh.mesh.updateRegion();
|
if (linkedMesh.mesh.getRegion() != null) linkedMesh.mesh.updateRegion();
|
||||||
}
|
}
|
||||||
linkedMeshes.clear();
|
linkedMeshes.clear();
|
||||||
|
|
||||||
@ -386,7 +386,7 @@ public class SkeletonJson extends SkeletonLoader {
|
|||||||
String color = map.getString("color", null);
|
String color = map.getString("color", null);
|
||||||
if (color != null) Color.valueOf(color, region.getColor());
|
if (color != null) Color.valueOf(color, region.getColor());
|
||||||
|
|
||||||
if (region.getSequence() == null) region.updateRegion();
|
if (region.getRegion() != null) region.updateRegion();
|
||||||
return region;
|
return region;
|
||||||
}
|
}
|
||||||
case boundingbox: {
|
case boundingbox: {
|
||||||
@ -424,7 +424,7 @@ public class SkeletonJson extends SkeletonLoader {
|
|||||||
readVertices(map, mesh, uvs.length);
|
readVertices(map, mesh, uvs.length);
|
||||||
mesh.setTriangles(map.require("triangles").asShortArray());
|
mesh.setTriangles(map.require("triangles").asShortArray());
|
||||||
mesh.setRegionUVs(uvs);
|
mesh.setRegionUVs(uvs);
|
||||||
if (mesh.getSequence() == null) mesh.updateRegion();
|
if (mesh.getRegion() != null) mesh.updateRegion();
|
||||||
|
|
||||||
if (map.has("hull")) mesh.setHullLength(map.require("hull").asInt() << 1);
|
if (map.has("hull")) mesh.setHullLength(map.require("hull").asInt() << 1);
|
||||||
if (map.has("edges")) mesh.setEdges(map.require("edges").asShortArray());
|
if (map.has("edges")) mesh.setEdges(map.require("edges").asShortArray());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user