Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add app config for absolute texture paths #2489

Open
wants to merge 3 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions js/interface/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,13 +565,14 @@ const Settings = {
spaces_4: tl('settings.json_indentation.spaces_4'),
spaces_2: tl('settings.json_indentation.spaces_2'),
}});
new Setting('final_newline', {category: 'export', value: false});
new Setting('minifiedout', {category: 'export', value: false});
new Setting('embed_textures', {category: 'export', value: true});
new Setting('minify_bbmodel', {category: 'export', value: true});
new Setting('export_empty_groups', {category: 'export', value: true});
new Setting('export_groups', {category: 'export', value: true});
new Setting('java_export_pivots', {category: 'export', value: true});
new Setting('final_newline', {category: 'export', value: false});
new Setting('minifiedout', {category: 'export', value: false});
new Setting('embed_textures', {category: 'export', value: true});
new Setting('absolute_texture_paths', {category: 'export', value: true});
new Setting('minify_bbmodel', {category: 'export', value: true});
new Setting('export_empty_groups', {category: 'export', value: true});
new Setting('export_groups', {category: 'export', value: true});
new Setting('java_export_pivots', {category: 'export', value: true});
new Setting('optifine_save_default_texture',{category: 'export', value: true});
new Setting('obj_face_export_mode', {category: 'export', value: 'both', type: 'select', options: {
both: tl('settings.obj_face_export_mode.both'),
Expand Down
4 changes: 3 additions & 1 deletion js/io/formats/bbmodel.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ var codec = new Codec('project', {
t.source = tex.getDataURL()
t.internal = true;
}
if (options.absolute_paths == false) delete t.path;
if (options.absolute_paths != true && (!Settings.get('absolute_texture_paths') || options.absolute_paths == false)) {
delete t.path;
}
model.textures.push(t);
})
for (let texture_group of TextureGroup.all) {
Expand Down
2 changes: 2 additions & 0 deletions lang/cz.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Hide handles of bézier keyframes that are not currently selected",
"settings.embed_textures": "Embed Textures",
"settings.embed_textures.desc": "Embed texture file content in .bbmodel files",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Cluster",
"dialog.copied_to_clipboard": "Copied to clipboard",
"data.reference_image": "Reference Image",
Expand Down
2 changes: 2 additions & 0 deletions lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Verstecke die Beziergriffe von Keyframes, die nicht ausgewählt sind",
"settings.embed_textures": "Texturen einbetten",
"settings.embed_textures.desc": "Bette den Inhalt von Texturen in die .bbmodel-Datei ein",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Zusammenhängend",
"dialog.copied_to_clipboard": "In Zwischenablage kopiert",
"data.reference_image": "Referenzbild",
Expand Down
2 changes: 2 additions & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1079,6 +1079,8 @@
"settings.minify_bbmodel.desc": "Write .bbmodel files minified into one line",
"settings.embed_textures": "Embed Textures",
"settings.embed_textures.desc": "Embed texture file content in .bbmodel files",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"settings.export_empty_groups": "Export Empty Groups",
"settings.export_empty_groups.desc": "Include groups without content in exported files",
"settings.export_groups": "Export Groups in Java block/item models",
Expand Down
2 changes: 2 additions & 0 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Hide handles of bézier keyframes that are not currently selected",
"settings.embed_textures": "Embed Textures",
"settings.embed_textures.desc": "Embed texture file content in .bbmodel files",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Cluster",
"dialog.copied_to_clipboard": "Copied to clipboard",
"data.reference_image": "Reference Image",
Expand Down
2 changes: 2 additions & 0 deletions lang/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Masque les poignées de Bézier des images clés qui ne sont pas actuellement sélectionnées",
"settings.embed_textures": "Intégrer les textures",
"settings.embed_textures.desc": "Intégrer le contenu des fichiers de texture dans les fichiers .bbmodel",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Cluster",
"dialog.copied_to_clipboard": "Copié dans le presse-papiers",
"data.reference_image": "Image de référence",
Expand Down
2 changes: 2 additions & 0 deletions lang/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Hide handles of bézier keyframes that are not currently selected",
"settings.embed_textures": "Embed Textures",
"settings.embed_textures.desc": "Embed texture file content in .bbmodel files",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Cluster",
"dialog.copied_to_clipboard": "Copied to clipboard",
"data.reference_image": "Reference Image",
Expand Down
2 changes: 2 additions & 0 deletions lang/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "選択されていないベジェハンドルを非表示にします",
"settings.embed_textures": "テクスチャの埋め込み",
"settings.embed_textures.desc": "テクスチャファイルを .bbmodel ファイルに埋め込みます",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "クラスター",
"dialog.copied_to_clipboard": "クリップボードにコピーしました",
"data.reference_image": "参考画像",
Expand Down
2 changes: 2 additions & 0 deletions lang/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "현재 선택되지 않은 베지어 키프레임의 핸들 숨기기",
"settings.embed_textures": "텍스쳐 임베드",
"settings.embed_textures.desc": "텍스쳐 파일 콘텐츠를 .bbmodel 파일에 임베드",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "클러스터",
"dialog.copied_to_clipboard": "클립보드에 복사됨",
"data.reference_image": "참조용 이미지",
Expand Down
2 changes: 2 additions & 0 deletions lang/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Handvatten van bézier-hoofdframes verbergen die momenteel niet zijn geselecteerd",
"settings.embed_textures": "Sluit Texturen In",
"settings.embed_textures.desc": "Inhoud van textuurbestanden insluiten in .bbmodel-bestanden",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Kluster",
"dialog.copied_to_clipboard": "Kopieer naar klembord",
"data.reference_image": "Referentiebeeld",
Expand Down
2 changes: 2 additions & 0 deletions lang/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Hide handles of bézier keyframes that are not currently selected",
"settings.embed_textures": "Embed Textures",
"settings.embed_textures.desc": "Embed texture file content in .bbmodel files",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Cluster",
"dialog.copied_to_clipboard": "Copied to clipboard",
"data.reference_image": "Reference Image",
Expand Down
2 changes: 2 additions & 0 deletions lang/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Hide handles of bézier keyframes that are not currently selected",
"settings.embed_textures": "Embed Textures",
"settings.embed_textures.desc": "Embed texture file content in .bbmodel files",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Cluster",
"dialog.copied_to_clipboard": "Copied to clipboard",
"data.reference_image": "Reference Image",
Expand Down
2 changes: 2 additions & 0 deletions lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Скрыть маркеры ключевых кадров Безье, которые в данный момент не выбраны",
"settings.embed_textures": "Встроить текстуры",
"settings.embed_textures.desc": "Встроить содержимое файла текстуры в файлы .bbmodel",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Кластер",
"dialog.copied_to_clipboard": "Скопировано в буфер обмена",
"data.reference_image": "Эталонное изображение",
Expand Down
2 changes: 2 additions & 0 deletions lang/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Hide handles of bézier keyframes that are not currently selected",
"settings.embed_textures": "Embed Textures",
"settings.embed_textures.desc": "Embed texture file content in .bbmodel files",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Cluster",
"dialog.copied_to_clipboard": "Copied to clipboard",
"data.reference_image": "Reference Image",
Expand Down
2 changes: 2 additions & 0 deletions lang/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Приховати дескриптори кадрів Безьє, які наразі не вибрано",
"settings.embed_textures": "Вбудувати текстури",
"settings.embed_textures.desc": "Вбудувати вміст файлів текстур у файли .bbmodel",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Кластер",
"dialog.copied_to_clipboard": "Скопійовано до буфера обміну",
"data.reference_image": "Еталонне зображення",
Expand Down
2 changes: 2 additions & 0 deletions lang/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Ẩn tay cầm của các khung hình chính Bézier hiện không được chọn",
"settings.embed_textures": "Nhúng kết cấu",
"settings.embed_textures.desc": "Nhúng nội dung tệp kết cấu vào tệp .bbmodel",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Cụm",
"dialog.copied_to_clipboard": "Đã sao chép vào bảng tạm",
"data.reference_image": "Ảnh tham chiếu",
Expand Down
2 changes: 2 additions & 0 deletions lang/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "隐藏未选中的贝塞尔手柄",
"settings.embed_textures": "嵌入纹理",
"settings.embed_textures.desc": "嵌入纹理到 .bbmodel 工程文件",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Cluster",
"dialog.copied_to_clipboard": "复制到剪贴板",
"data.reference_image": "参考图像",
Expand Down
2 changes: 2 additions & 0 deletions lang/zh_tw.json
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,8 @@
"settings.only_selected_bezier_handles.desc": "Hide handles of bézier keyframes that are not currently selected",
"settings.embed_textures": "Embed Textures",
"settings.embed_textures.desc": "Embed texture file content in .bbmodel files",
"settings.absolute_texture_paths": "Absolute Texture Paths",
"settings.absolute_texture_paths.desc": "Include absolute texture paths in .bbmodel files",
"action.selection_mode.cluster": "Cluster",
"dialog.copied_to_clipboard": "Copied to clipboard",
"data.reference_image": "Reference Image",
Expand Down