Pose graph: fix import path and tweak (#15173)

This commit is contained in:
Leslie Leigh (李的序)
2023-05-24 18:42:33 +08:00
committed by GitHub
parent 24541a82de
commit cfd9bddacb
2 changed files with 4 additions and 2 deletions
@@ -28,7 +28,8 @@ export function* getCreatePoseGraphNodeEntries(
): Iterable<PoseGraphCreateNodeEntry> {
type AbstractedConstructor<T = unknown> = abstract new (...args: any[]) => T;
if ((classConstructor as AbstractedConstructor) === PoseNode || (classConstructor as AbstractedConstructor) === PureValueNode) {
if ((classConstructor as AbstractedConstructor) === PoseNode || (classConstructor as AbstractedConstructor) === PureValueNode ||
classConstructor === PoseGraphOutputNode) {
return;
}
const nodeClassMetadata = getPoseGraphNodeEditorMetadata(classConstructor as Constructor<PoseNode | PureValueNode>);
@@ -1,6 +1,7 @@
import { Layer, ProceduralPoseState, StateMachine } from "../../../../cocos/animation/marionette/animation-graph";
import { PoseNodeStateMachine } from '../../../../cocos/animation/marionette/pose-graph/pose-nodes/state-machine';
import { PoseGraph, PoseNode } from "../../../exports/new-gen-anim";
import { PoseGraph } from "../../../../cocos/animation/marionette/pose-graph/pose-graph";
import { PoseNode } from "../../../../cocos/animation/marionette/pose-graph/pose-node";
export function* visitPoseNodeInLayer(layer: Layer): Generator<PoseNode> {
yield* visitPoseNodesInStateMachine(layer.stateMachine);