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() 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 }