mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-19 00:06:42 +08:00
[all] AnimationState, fixed an attachment timeline from changing the mix blend for other timelines.
closes #1461
This commit is contained in:
parent
88ece3181e
commit
2fa85fc1c6
@ -246,13 +246,13 @@ package spine.animation {
|
||||
var timelineBlend: MixBlend;
|
||||
var alpha : Number = 0;
|
||||
switch (timelineMode[i] & (NOT_LAST - 1)) {
|
||||
case SUBSEQUENT:
|
||||
case SUBSEQUENT:
|
||||
timelineBlend = blend;
|
||||
if (!attachments && timeline is AttachmentTimeline) {
|
||||
if ((timelineMode[i] & NOT_LAST) == NOT_LAST) continue;
|
||||
blend = MixBlend.setup;
|
||||
timelineBlend = MixBlend.setup;
|
||||
}
|
||||
if (!drawOrder && timeline is DrawOrderTimeline) continue;
|
||||
timelineBlend = blend;
|
||||
alpha = alphaMix;
|
||||
break;
|
||||
case FIRST:
|
||||
|
||||
@ -468,12 +468,12 @@ float _spAnimationState_applyMixingFrom (spAnimationState* self, spTrackEntry* t
|
||||
|
||||
switch (timelineMode->items[i] & (NOT_LAST - 1)) {
|
||||
case SUBSEQUENT:
|
||||
timelineBlend = blend;
|
||||
if (!attachments && timeline->type == SP_TIMELINE_ATTACHMENT) {
|
||||
if ((timelineMode->items[i] & NOT_LAST) == NOT_LAST) continue;
|
||||
blend = SP_MIX_BLEND_SETUP;
|
||||
timelineBlend = SP_MIX_BLEND_SETUP;
|
||||
}
|
||||
if (!drawOrder && timeline->type == SP_TIMELINE_DRAWORDER) continue;
|
||||
timelineBlend = blend;
|
||||
alpha = alphaMix;
|
||||
break;
|
||||
case FIRST:
|
||||
|
||||
@ -815,12 +815,12 @@ float AnimationState::applyMixingFrom(TrackEntry *to, Skeleton &skeleton, MixBle
|
||||
float alpha;
|
||||
switch (timelineMode[i] & (NotLast - 1)) {
|
||||
case Subsequent:
|
||||
timelineBlend = blend;
|
||||
if (!attachments && (timeline->getRTTI().isExactly(AttachmentTimeline::rtti))) {
|
||||
if ((timelineMode[i] & NotLast) == NotLast) continue;
|
||||
blend = MixBlend_Setup;
|
||||
timelineBlend = MixBlend_Setup;
|
||||
}
|
||||
if (!drawOrder && (timeline->getRTTI().isExactly(DrawOrderTimeline::rtti))) continue;
|
||||
timelineBlend = blend;
|
||||
alpha = alphaMix;
|
||||
break;
|
||||
case First:
|
||||
|
||||
@ -299,12 +299,12 @@ namespace Spine {
|
||||
float alpha;
|
||||
switch (timelineMode[i] & AnimationState.NotLast - 1) {
|
||||
case AnimationState.Subsequent:
|
||||
timelineBlend = blend;
|
||||
if (!attachments && timeline is AttachmentTimeline) {
|
||||
if ((timelineMode[i] & AnimationState.NotLast) == AnimationState.NotLast) continue;
|
||||
blend = MixBlend.Setup;
|
||||
timelineBlend = MixBlend.Setup;
|
||||
}
|
||||
if (!drawOrder && timeline is DrawOrderTimeline) continue;
|
||||
timelineBlend = blend;
|
||||
alpha = alphaMix;
|
||||
break;
|
||||
case AnimationState.First:
|
||||
|
||||
@ -291,12 +291,12 @@ public class AnimationState {
|
||||
float alpha;
|
||||
switch (timelineMode[i] & NOT_LAST - 1) {
|
||||
case SUBSEQUENT:
|
||||
timelineBlend = blend;
|
||||
if (!attachments && timeline instanceof AttachmentTimeline) {
|
||||
if ((timelineMode[i] & NOT_LAST) == NOT_LAST) continue;
|
||||
blend = MixBlend.setup;
|
||||
timelineBlend = MixBlend.setup;
|
||||
}
|
||||
if (!drawOrder && timeline instanceof DrawOrderTimeline) continue;
|
||||
timelineBlend = blend;
|
||||
alpha = alphaMix;
|
||||
break;
|
||||
case FIRST:
|
||||
|
||||
@ -424,15 +424,15 @@ function AnimationState:applyMixingFrom (to, skeleton, blend)
|
||||
local timelineBlend = MixBlend.setup
|
||||
local alpha = 0
|
||||
if clearBit(timelineMode[i], NOT_LAST) == SUBSEQUENT then
|
||||
timelineBlend = blend
|
||||
if not attachments and timeline.type == Animation.TimelineType.attachment then
|
||||
if testBit(timelineMode[i], NOT_LAST) then
|
||||
skipSubsequent = true
|
||||
else
|
||||
blend = MixBlend.setup
|
||||
timelineBlend = MixBlend.setup
|
||||
end
|
||||
end
|
||||
if not drawOrder and timeline.type == Animation.TimelineType.drawOrder then skipSubsequent = true end
|
||||
timelineBlend = blend
|
||||
alpha = alphaMix
|
||||
elseif clearBit(timelineMode[i], NOT_LAST) == FIRST then
|
||||
timelineBlend = MixBlend.setup
|
||||
|
||||
@ -235,12 +235,12 @@ module spine {
|
||||
let alpha = 0;
|
||||
switch (timelineMode[i] & (AnimationState.NOT_LAST - 1)) {
|
||||
case AnimationState.SUBSEQUENT:
|
||||
timelineBlend = blend;
|
||||
if (!attachments && timeline instanceof AttachmentTimeline) {
|
||||
if ((timelineMode[i] & AnimationState.NOT_LAST) == AnimationState.NOT_LAST) continue;
|
||||
blend = MixBlend.setup;
|
||||
timelineBlend = MixBlend.setup;
|
||||
}
|
||||
if (!drawOrder && timeline instanceof DrawOrderTimeline) continue;
|
||||
timelineBlend = blend;
|
||||
alpha = alphaMix;
|
||||
break;
|
||||
case AnimationState.FIRST:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user