mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Merge branch '3.8' into 3.9-beta
This commit is contained in:
commit
0090ac4347
@ -114,6 +114,7 @@ function Skeleton:updateCache ()
|
|||||||
|
|
||||||
local bones = self.bones
|
local bones = self.bones
|
||||||
for _, bone in ipairs(bones) do
|
for _, bone in ipairs(bones) do
|
||||||
|
print("reset " .. bone.data.name)
|
||||||
bone.sorted = bone.data.skinRequired
|
bone.sorted = bone.data.skinRequired
|
||||||
bone.active = not bone.sorted
|
bone.active = not bone.sorted
|
||||||
end
|
end
|
||||||
@ -123,6 +124,7 @@ function Skeleton:updateCache ()
|
|||||||
for i, boneData in ipairs(skinBones) do
|
for i, boneData in ipairs(skinBones) do
|
||||||
local bone = bones[boneData.index]
|
local bone = bones[boneData.index]
|
||||||
while bone do
|
while bone do
|
||||||
|
print("skin bone reset " .. bone.data.name)
|
||||||
bone.sorted = false
|
bone.sorted = false
|
||||||
bone.active = true
|
bone.active = true
|
||||||
bone = bone.parent
|
bone = bone.parent
|
||||||
@ -186,7 +188,7 @@ function Skeleton:updateCache ()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Skeleton:sortIkConstraint (constraint)
|
function Skeleton:sortIkConstraint (constraint)
|
||||||
constraint.active = constraint.target.active and ((not constraint.data.skinRequired) or (self.skin and utils.arrayContains(self.skin.constraints, constraint)))
|
constraint.active = constraint.target.active and ((not constraint.data.skinRequired) or (self.skin and utils.arrayContains(self.skin.constraints, constraint.data)))
|
||||||
if not constraint.active then return end
|
if not constraint.active then return end
|
||||||
|
|
||||||
local target = constraint.target
|
local target = constraint.target
|
||||||
@ -215,7 +217,7 @@ function Skeleton:sortIkConstraint (constraint)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Skeleton:sortPathConstraint(constraint)
|
function Skeleton:sortPathConstraint(constraint)
|
||||||
constraint.active = constraint.target.bone.active and ((not constraint.data.skinRequired) or (self.skin and utils.arrayContains(self.skin.constraints, constraint)))
|
constraint.active = constraint.target.bone.active and ((not constraint.data.skinRequired) or (self.skin and utils.arrayContains(self.skin.constraints, constraint.data)))
|
||||||
if not constraint.active then return end
|
if not constraint.active then return end
|
||||||
|
|
||||||
local slot = constraint.target
|
local slot = constraint.target
|
||||||
@ -249,7 +251,7 @@ function Skeleton:sortPathConstraint(constraint)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Skeleton:sortTransformConstraint(constraint)
|
function Skeleton:sortTransformConstraint(constraint)
|
||||||
constraint.active = constraint.target.active and ((not constraint.data.skinRequired) or (self.skin and utils.arrayContains(self.skin.constraints, constraint)))
|
constraint.active = constraint.target.active and ((not constraint.data.skinRequired) or (self.skin and utils.arrayContains(self.skin.constraints, constraint.data)))
|
||||||
if not constraint.active then return end
|
if not constraint.active then return end
|
||||||
|
|
||||||
self:sortBone(constraint.target)
|
self:sortBone(constraint.target)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user