|
@@ -92,7 +92,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 } from "@/components/materials/quisk";
|
|
|
import { custom } from "@/env";
|
|
|
import { actionItems, currentItem } from "@/views/merge";
|
|
@@ -221,17 +221,19 @@ const addModelHandler = createLoadPack(async (attachs: any[]) => {
|
|
|
if (fuseModelsLoaded.value) {
|
|
|
nextTick(() => {
|
|
|
stop();
|
|
|
- resolve();
|
|
|
+ setTimeout(resolve, 500)
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- items.forEach(item => {
|
|
|
- if (getSceneModel(item.data)) {
|
|
|
- item.data.rotation = getSceneModel(item.data)!.getDefaultRotation();
|
|
|
+ addModels.forEach(item => {
|
|
|
+ if (getSceneModel(item)) {
|
|
|
+ item.rotation = getSceneModel(item)!.getDefaultRotation();
|
|
|
+ getSceneModel(item)!.putInFrontOfCam()
|
|
|
}
|
|
|
+
|
|
|
});
|
|
|
await asyncTimeout(100);
|
|
|
await save();
|