bill 4 months ago
parent
commit
7d0ff6532e
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/sdk/association/path.ts

+ 5 - 4
src/sdk/association/path.ts

@@ -9,6 +9,8 @@ import { analysisPose, setPose } from ".";
 import { custom, showModeTabStack, showPathsStack, showPathStack, showSearchStack, showViewSettingStack } from "@/env";
 import { Message } from "bill/expose-common";
 import { mergeFuns } from "@/components/drawing/hook";
+import { ams } from "@/store/animation";
+import { fuseModels } from "@/store";
 
 // -----------------导览线关联--------------------
 export type PathNode = Path;
@@ -51,10 +53,9 @@ export const playScenePath = async (
   forceFull = false,
 ) => {
   const node = getPathNode(path)
-  console.log(path, node)
-  if (!node) {
-    console.error('un', path.id)
-    return Message.error('路径所在模型被隐藏活删除,无法播放');
+  // console.error('un', path.points, fuseModels.value)
+  if (!node || path.points.some(point => !fuseModels.value.some(am => am.id === point.modelId))) {
+    return Message.error('路径所在模型被隐藏或删除,无法播放');
   }
 
   // showPathsStack.push(ref(false))