|
|
@@ -93,7 +93,7 @@ import {
|
|
|
} from "@/store";
|
|
|
|
|
|
import { fetchScenesAll, SceneType, uploadMaterialToModel, type Scene } from "@/api";
|
|
|
-import { activeModel, getSceneModel } from "@/sdk";
|
|
|
+import { activeModel, getSceneModel, sceneModelMap } from "@/sdk";
|
|
|
import { selectMaterials, selectMaterials1 } from "@/components/materials/quisk";
|
|
|
import { lang, ui18n } from "@/lang";
|
|
|
import { custom } from "@/env";
|
|
|
@@ -205,7 +205,7 @@ const addModelHandler = createLoadPack(async (attachs: any[]) => {
|
|
|
attach
|
|
|
}
|
|
|
});
|
|
|
- const addPromises = items.map(item => addFuseModel(item.data, item.attach));
|
|
|
+ const addPromises = items.map(item => addFuseModel(item.data, item.attach).then(data => item.data = data));
|
|
|
|
|
|
const addModels = await Promise.all(addPromises);
|
|
|
await new Promise<void>((resolve) => {
|
|
|
@@ -222,6 +222,7 @@ const addModelHandler = createLoadPack(async (attachs: any[]) => {
|
|
|
});
|
|
|
|
|
|
items.forEach(item => {
|
|
|
+ console.error('--->', item, getSceneModel(item.data), sceneModelMap)
|
|
|
if (getSceneModel(item.data)) {
|
|
|
item.data.rotation = getSceneModel(item.data)!.getDefaultRotation();
|
|
|
}
|