mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-04 18:42:40 +08:00
Marionette: fix animation blend 2d algorithm type is not setup correctly (#15377)
This commit is contained in:
committed by
GitHub
parent
7e804c70b1
commit
fa936a9580
@@ -305,6 +305,8 @@ export class StateMachine extends EditorExtendable {
|
||||
state.stateMachine.__callOnAfterDeserializeRecursive();
|
||||
} else if (state instanceof ProceduralPoseState) {
|
||||
state.__callOnAfterDeserializeRecursive();
|
||||
} else if (state instanceof MotionState) {
|
||||
state.__callOnAfterDeserializeRecursive();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,6 +96,14 @@ export class AnimationBlend2D extends AnimationBlend {
|
||||
this._tryReconstructPolarSpaceInterpolator();
|
||||
}
|
||||
|
||||
/**
|
||||
* // TODO: HACK
|
||||
* @internal
|
||||
*/
|
||||
__callOnAfterDeserializeRecursive () {
|
||||
this._tryReconstructPolarSpaceInterpolator();
|
||||
}
|
||||
|
||||
public clone () {
|
||||
const that = new AnimationBlend2D();
|
||||
this.copyTo(that);
|
||||
|
||||
@@ -74,6 +74,12 @@ export abstract class Motion extends EditorExtendable {
|
||||
): MotionEval | null;
|
||||
|
||||
abstract clone(): Motion;
|
||||
|
||||
/**
|
||||
* // TODO: HACK
|
||||
* @internal
|
||||
*/
|
||||
__callOnAfterDeserializeRecursive () { }
|
||||
}
|
||||
|
||||
export interface MotionPort {
|
||||
|
||||
@@ -62,6 +62,14 @@ export class MotionState extends InteractiveState {
|
||||
@editable
|
||||
public transitionOutEventBinding = new AnimationGraphEventBinding();
|
||||
|
||||
/**
|
||||
* // TODO: HACK
|
||||
* @internal
|
||||
*/
|
||||
__callOnAfterDeserializeRecursive () {
|
||||
this.motion?.__callOnAfterDeserializeRecursive();
|
||||
}
|
||||
|
||||
public copyTo (that: MotionState) {
|
||||
super.copyTo(that);
|
||||
that.motion = this.motion?.clone() ?? null;
|
||||
|
||||
Reference in New Issue
Block a user