Skip to content

Commit cc9a249

Browse files
committed
Editor: Simplified File/Export.
1 parent 9f81b72 commit cc9a249

File tree

2 files changed

+12
-53
lines changed

2 files changed

+12
-53
lines changed

editor/js/Menubar.File.js

+12-17
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,7 @@ function MenubarFile( editor ) {
6666
} );
6767
options.add( option );
6868

69-
//
70-
71-
options.add( new UIHorizontalRule() );
72-
73-
74-
// Export (submenu)
69+
// Export
7570

7671
const fileExportSubmenuTitle = new UIRow().setTextContent( strings.getKey( 'menubar/file/export' ) ).addClass( 'option' ).addClass( 'submenu-title' );
7772
fileExportSubmenuTitle.onMouseOver( function () {
@@ -97,7 +92,7 @@ function MenubarFile( editor ) {
9792

9893
option = new UIRow();
9994
option.setClass( 'option' );
100-
option.setTextContent( strings.getKey( 'menubar/file/export/drc' ) );
95+
option.setTextContent( 'DRC' );
10196
option.onClick( async function () {
10297

10398
const object = editor.selected;
@@ -134,7 +129,7 @@ function MenubarFile( editor ) {
134129

135130
option = new UIRow();
136131
option.setClass( 'option' );
137-
option.setTextContent( strings.getKey( 'menubar/file/export/glb' ) );
132+
option.setTextContent( 'GLB' );
138133
option.onClick( async function () {
139134

140135
const scene = editor.scene;
@@ -165,7 +160,7 @@ function MenubarFile( editor ) {
165160

166161
option = new UIRow();
167162
option.setClass( 'option' );
168-
option.setTextContent( strings.getKey( 'menubar/file/export/gltf' ) );
163+
option.setTextContent( 'GLTF' );
169164
option.onClick( async function () {
170165

171166
const scene = editor.scene;
@@ -197,7 +192,7 @@ function MenubarFile( editor ) {
197192

198193
option = new UIRow();
199194
option.setClass( 'option' );
200-
option.setTextContent( strings.getKey( 'menubar/file/export/obj' ) );
195+
option.setTextContent( 'OBJ' );
201196
option.onClick( async function () {
202197

203198
const object = editor.selected;
@@ -222,7 +217,7 @@ function MenubarFile( editor ) {
222217

223218
option = new UIRow();
224219
option.setClass( 'option' );
225-
option.setTextContent( strings.getKey( 'menubar/file/export/ply' ) );
220+
option.setTextContent( 'PLY' );
226221
option.onClick( async function () {
227222

228223
const { PLYExporter } = await import( 'three/addons/exporters/PLYExporter.js' );
@@ -238,11 +233,11 @@ function MenubarFile( editor ) {
238233
} );
239234
fileExportSubmenu.add( option );
240235

241-
// Export PLY (Binary)
236+
// Export PLY (BINARY)
242237

243238
option = new UIRow();
244239
option.setClass( 'option' );
245-
option.setTextContent( strings.getKey( 'menubar/file/export/ply_binary' ) );
240+
option.setTextContent( 'PLY (BINARY)' );
246241
option.onClick( async function () {
247242

248243
const { PLYExporter } = await import( 'three/addons/exporters/PLYExporter.js' );
@@ -262,7 +257,7 @@ function MenubarFile( editor ) {
262257

263258
option = new UIRow();
264259
option.setClass( 'option' );
265-
option.setTextContent( strings.getKey( 'menubar/file/export/stl' ) );
260+
option.setTextContent( 'STL' );
266261
option.onClick( async function () {
267262

268263
const { STLExporter } = await import( 'three/addons/exporters/STLExporter.js' );
@@ -274,11 +269,11 @@ function MenubarFile( editor ) {
274269
} );
275270
fileExportSubmenu.add( option );
276271

277-
// Export STL (Binary)
272+
// Export STL (BINARY)
278273

279274
option = new UIRow();
280275
option.setClass( 'option' );
281-
option.setTextContent( strings.getKey( 'menubar/file/export/stl_binary' ) );
276+
option.setTextContent( 'STL (BINARY)' );
282277
option.onClick( async function () {
283278

284279
const { STLExporter } = await import( 'three/addons/exporters/STLExporter.js' );
@@ -294,7 +289,7 @@ function MenubarFile( editor ) {
294289

295290
option = new UIRow();
296291
option.setClass( 'option' );
297-
option.setTextContent( strings.getKey( 'menubar/file/export/usdz' ) );
292+
option.setTextContent( 'USDZ' );
298293
option.onClick( async function () {
299294

300295
const { USDZExporter } = await import( 'three/addons/exporters/USDZExporter.js' );

editor/js/Strings.js

-36
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,6 @@ function Strings( config ) {
4141
'menubar/file/new': 'New',
4242
'menubar/file/import': 'Import',
4343
'menubar/file/export': 'Export',
44-
'menubar/file/export/drc': 'Export DRC',
45-
'menubar/file/export/glb': 'Export GLB',
46-
'menubar/file/export/gltf': 'Export GLTF',
47-
'menubar/file/export/obj': 'Export OBJ',
48-
'menubar/file/export/ply': 'Export PLY',
49-
'menubar/file/export/ply_binary': 'Export PLY (Binary)',
50-
'menubar/file/export/stl': 'Export STL',
51-
'menubar/file/export/stl_binary': 'Export STL (Binary)',
52-
'menubar/file/export/usdz': 'Export USDZ',
5344

5445
'menubar/edit': 'Edit',
5546
'menubar/edit/undo': 'Undo (Ctrl+Z)',
@@ -430,15 +421,6 @@ function Strings( config ) {
430421
'menubar/file/new': 'Nouveau',
431422
'menubar/file/import': 'Importer',
432423
'menubar/file/export': 'Exporter',
433-
'menubar/file/export/drc': 'Exporter DRC',
434-
'menubar/file/export/glb': 'Exporter GLB',
435-
'menubar/file/export/gltf': 'Exporter GLTF',
436-
'menubar/file/export/obj': 'Exporter OBJ',
437-
'menubar/file/export/ply': 'Exporer PLY',
438-
'menubar/file/export/ply_binary': 'Exporter PLY (Binaire)',
439-
'menubar/file/export/stl': 'Exporter STL',
440-
'menubar/file/export/stl_binary': 'Exporter STL (Binaire)',
441-
'menubar/file/export/usdz': 'Exporter USDZ',
442424

443425
'menubar/edit': 'Edition',
444426
'menubar/edit/undo': 'Annuler (Ctrl+Z)',
@@ -819,15 +801,6 @@ function Strings( config ) {
819801
'menubar/file/new': '新建',
820802
'menubar/file/import': '导入',
821803
'menubar/file/export': '导出',
822-
'menubar/file/export/drc': '导出DRC',
823-
'menubar/file/export/glb': '导出GLB',
824-
'menubar/file/export/gltf': '导出GLTF',
825-
'menubar/file/export/obj': '导出OBJ',
826-
'menubar/file/export/ply': '导出PLY',
827-
'menubar/file/export/ply_binary': '导出PLY(二进制)',
828-
'menubar/file/export/stl': '导出STL',
829-
'menubar/file/export/stl_binary': '导出STL(二进制)',
830-
'menubar/file/export/usdz': '导出USDZ',
831804

832805
'menubar/edit': '编辑',
833806
'menubar/edit/undo': '撤销 (Ctrl+Z)',
@@ -1208,15 +1181,6 @@ function Strings( config ) {
12081181
'menubar/file/new': '新規',
12091182
'menubar/file/import': 'インポート',
12101183
'menubar/file/export': 'エクスポート',
1211-
'menubar/file/export/drc': 'エクスポート DRC',
1212-
'menubar/file/export/glb': 'エクスポート GLB',
1213-
'menubar/file/export/gltf': 'エクスポート GLTF',
1214-
'menubar/file/export/obj': 'エクスポート OBJ',
1215-
'menubar/file/export/ply': 'エクスポート PLY',
1216-
'menubar/file/export/ply_binary': 'エクスポート PLY(バイナリ)',
1217-
'menubar/file/export/stl': 'エクスポート STL',
1218-
'menubar/file/export/stl_binary': 'エクスポート STL(バイナリ)',
1219-
'menubar/file/export/usdz': 'エクスポート USDZ',
12201184

12211185
'menubar/edit': '編集',
12221186
'menubar/edit/undo': '元に戻す(Ctrl+Z)',

0 commit comments

Comments
 (0)