From 283bc0363df2f8a75ccef18e3b574fd3a4f046eb Mon Sep 17 00:00:00 2001 From: Daniel Belmes Date: Sat, 3 Aug 2024 12:18:32 -0700 Subject: [PATCH 1/2] revert save remove --- packages/editor/src/components/toolbar/Toolbar.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/editor/src/components/toolbar/Toolbar.tsx b/packages/editor/src/components/toolbar/Toolbar.tsx index 86c1d76362..6e447a9597 100644 --- a/packages/editor/src/components/toolbar/Toolbar.tsx +++ b/packages/editor/src/components/toolbar/Toolbar.tsx @@ -42,6 +42,7 @@ import { MdOutlineKeyboardArrowDown } from 'react-icons/md' import { RxHamburgerMenu } from 'react-icons/rx' import { inputFileWithAddToScene } from '../../functions/assetFunctions' import { onNewScene } from '../../functions/sceneFunctions' +import { cmdOrCtrlString } from '../../functions/utils' import { EditorState } from '../../services/EditorServices' import CreateSceneDialog from '../dialogs/CreateScenePanelDialog' import ImportSettingsPanel from '../dialogs/ImportSettingsPanelDialog' @@ -134,11 +135,11 @@ const generateToolbarMenu = () => { name: t('editor:menubar.newScene'), action: onClickNewScene }, - // { - // name: t('editor:menubar.saveScene'), - // hotkey: `${cmdOrCtrlString}+s`, - // action: () => PopoverState.showPopupover() - // }, + { + name: t('editor:menubar.saveScene'), + hotkey: `${cmdOrCtrlString}+s`, + action: () => PopoverState.showPopupover() + }, { name: t('editor:menubar.saveAs'), action: () => PopoverState.showPopupover() From f7a21ce3a10847062d50205ffc1fb039810b9c6d Mon Sep 17 00:00:00 2001 From: Daniel Belmes Date: Sat, 3 Aug 2024 12:51:30 -0700 Subject: [PATCH 2/2] remove editorState update --- packages/editor/src/functions/sceneFunctions.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/packages/editor/src/functions/sceneFunctions.tsx b/packages/editor/src/functions/sceneFunctions.tsx index 1b87cba032..cd3ea8ec0c 100644 --- a/packages/editor/src/functions/sceneFunctions.tsx +++ b/packages/editor/src/functions/sceneFunctions.tsx @@ -131,13 +131,6 @@ export const saveSceneGLTF = async ( const result = await Engine.instance.api .service(staticResourcePath) .patch(sceneAssetID, { key: assetURL, project: projectName }) - - getMutableState(EditorState).merge({ - sceneName, - scenePath: assetURL, - projectName, - sceneAssetID: result.id - }) } return }