mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-03-19 17:01:55 +08:00
Option to minify bbmodel files
This commit is contained in:
parent
21d5030949
commit
1d8436d696
@ -186,6 +186,7 @@ const Settings = {
|
||||
|
||||
//Export
|
||||
new Setting('minifiedout', {category: 'export', value: false});
|
||||
new Setting('minify_bbmodel', {category: 'export', value: true});
|
||||
new Setting('export_groups', {category: 'export', value: true});
|
||||
new Setting('sketchfab_token', {category: 'export', value: '', type: 'password'});
|
||||
new Setting('credit', {category: 'export', value: 'Made with Blockbench', type: 'text'});
|
||||
|
@ -112,7 +112,11 @@ var codec = new Codec('project', {
|
||||
var compressed = '<lz>'+LZUTF8.compress(json_string, {outputEncoding: 'StorageBinaryString'});
|
||||
return compressed;
|
||||
} else {
|
||||
return JSON.stringify(model);
|
||||
if (Settings.get('minify_bbmodel')) {
|
||||
return JSON.stringify(model);
|
||||
} else {
|
||||
return compileJSON(model);
|
||||
}
|
||||
}
|
||||
},
|
||||
parse(model, path) {
|
||||
|
@ -543,6 +543,8 @@
|
||||
|
||||
"settings.minifiedout": "Minified Export",
|
||||
"settings.minifiedout.desc": "Write JSON file in one line",
|
||||
"settings.minify_bbmodel": "Minified Project Files",
|
||||
"settings.minify_bbmodel.desc": "Write .bbmodel files minified into one line",
|
||||
"settings.export_groups": "Export Groups",
|
||||
"settings.export_groups.desc": "Save groups in block or item model files",
|
||||
"settings.credit": "Credit Comment",
|
||||
|
Loading…
x
Reference in New Issue
Block a user