Skip to content

Commit

Permalink
refactor: Update setCurrentScene function in ProjectSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
jer-nc committed Jul 29, 2024
1 parent f5f62fd commit cf49e46
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/features/render/project-settings/ProjectSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const ProjectSettings = ({ form }: ProjectSettingsProps) => {
blenderExecPath: blenderExecPath || "",
selectedPaths,
setAllScenes,
// setCurrentScene,
setCurrentScene,
setErrorBlenderData
})

Expand Down
12 changes: 6 additions & 6 deletions src/features/render/project-settings/helpers/getBlenderData.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { resolveResource } from "@tauri-apps/api/path";
import { getDataBlenderScene } from "@/cli-functions/blender/getDataBlenderScene";
import { modifyAllScenes } from "./modifyAllScenes";
// import { getCurrentSceneFromAllScenes } from "./getCurrentSceneFromAllScenes";
import { Scene } from "../ProjectSettings.types";
import { getCurrentSceneFromAllScenes } from "./getCurrentSceneFromAllScenes";
import { Scene } from "../ProjectSettings.types";

interface BlenderData {
setIsDataLoading: (value: boolean) => void;
setAllScenes: (scenes: Scene[]) => void;
blenderExecPath: string;
selectedPaths: { filePath: string };
// setCurrentScene: (scene: Scene[]) => void;
setCurrentScene: (scene: Scene[]) => void;
setErrorBlenderData: (value: string) => void;
}

export const getBlenderData = async (
{ setIsDataLoading, setAllScenes, blenderExecPath, selectedPaths, setErrorBlenderData }: BlenderData
{ setIsDataLoading, setAllScenes, blenderExecPath, setCurrentScene, selectedPaths, setErrorBlenderData }: BlenderData
) => {
try {
setIsDataLoading(true);
Expand All @@ -33,8 +33,8 @@ export const getBlenderData = async (
// console.log('modifiedData', modifiedData);

setAllScenes(modifiedData);
// const scene = await getCurrentSceneFromAllScenes(modifiedData, setCurrentScene);
// console.log('scene', scene);
const scene = await getCurrentSceneFromAllScenes(modifiedData, setCurrentScene);
console.log('scene', scene);
return modifiedData;
} catch (error) {
console.error('Error in getBlenderData:', error);
Expand Down

0 comments on commit cf49e46

Please sign in to comment.