Skip to content

Commit 2c475b5

Browse files
committed
fix the inconsistency of using UV Overlay
The UV Overlay is now renamed to UV Show All, as now it's only function is to show the UV from all objects. (it was its only function before, but it was confusing to use, so I made it more clear what it does). The other UV options are shown normally when clicking with the Right Mouse Button in the UVEditor. The settings option regarding the UV Mode is now an Enum, to properly represent what's happening
1 parent 7064e24 commit 2c475b5

20 files changed

+62
-81
lines changed

Diff for: js/interface/settings.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,12 @@ const Settings = {
531531
new Setting('default_cube_size', {category: 'defaults', value: 2, type: 'number', min: 0, max: 32});
532532
new Setting('autouv', {category: 'defaults', value: true});
533533
new Setting('create_rename', {category: 'defaults', value: false});
534-
new Setting('show_only_selected_uv', {category: 'defaults', value: false});
534+
new Setting('display_uv', {category: 'defaults', value: 'none', type: 'select', description: '', options: {
535+
'selected_faces': tl('menu.uv.display_uv.selected_faces'),
536+
'selected_elements': tl('menu.uv.display_uv.selected_elements'),
537+
}, onChange(value) {
538+
Project.display_uv = UVEditor.vue.display_uv = value;
539+
}});
535540
new Setting('default_path', {category: 'defaults', value: false, type: 'click', condition: isApp, icon: 'burst_mode', click: function() { openDefaultTexturePath() }});
536541
new Setting('animation_snap', {category: 'defaults', value: 24, type: 'number'});
537542
new Setting('uniform_keyframe', {category: 'defaults', value: true});

Diff for: js/io/project.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ModelProject {
3030
this.mode = 'edit';
3131
this.tool = '';
3232
this.view_mode = 'textured';
33-
this.display_uv = settings.show_only_selected_uv.value ? 'selected_faces' :'selected_elements';
33+
this.display_uv = settings.display_uv.value;
3434
this.exploded_view = false;
3535
this.mirror_modeling_enabled = false;
3636
this.previews = {};

Diff for: js/texturing/uv.js

+4-11
Original file line numberDiff line numberDiff line change
@@ -1314,16 +1314,15 @@ const UVEditor = {
13141314
'zoom_reset'
13151315
]},
13161316
{name: 'menu.uv.display_uv', id: 'display_uv', icon: 'visibility', condition: () => (!Format.image_editor), children: () => {
1317-
let options = ['selected_faces', 'selected_elements', 'all_elements'];
1317+
let options = ['selected_faces', 'selected_elements'];
13181318
return options.map(option => {return {
13191319
id: option,
13201320
name: `menu.uv.display_uv.${option}`,
13211321
icon: UVEditor.vue.display_uv == option ? 'far.fa-dot-circle' : 'far.fa-circle',
13221322
condition: !(option == 'selected_faces' && UVEditor.isBoxUV() && !Mesh.selected.length),
13231323
click() {
13241324
Project.display_uv = UVEditor.vue.display_uv = option;
1325-
if (option == 'selected_faces') settings.show_only_selected_uv.set(true);
1326-
if (option == 'selected_elements') settings.show_only_selected_uv.set(false);
1325+
settings.display_uv.set(option);
13271326
Settings.saveLocalStorages();
13281327
}
13291328
}})
@@ -2016,20 +2015,14 @@ BARS.defineActions(function() {
20162015
})
20172016
new Toggle('edit_mode_uv_overlay', {
20182017
name: 'action.paint_mode_uv_overlay',
2019-
description: 'action.edit_mode_uv_overlay.desc',
20202018
icon: 'stack',
20212019
category: 'uv',
20222020
condition: {modes: ['edit']},
20232021
onChange(value) {
20242022
if (value) {
20252023
Project.display_uv = UVEditor.vue.display_uv = 'all_elements';
2026-
settings.show_only_selected_uv.set(true);
20272024
} else {
2028-
if (settings.show_only_selected_uv.value) {
2029-
Project.display_uv = UVEditor.vue.display_uv = 'selected_faces';
2030-
} else {
2031-
Project.display_uv = UVEditor.vue.display_uv = 'selected_elements';
2032-
}
2025+
Project.display_uv = UVEditor.vue.display_uv = settings.display_uv.value;
20332026
}
20342027
}
20352028
})
@@ -2138,7 +2131,7 @@ Interface.definePanels(function() {
21382131
uv_resolution: [16, 16],
21392132
elements: [],
21402133
all_elements: [],
2141-
display_uv: 'selected_elements',
2134+
display_uv: settings.display_uv.value,
21422135
selection_outline: '',
21432136

21442137
face_names: {

Diff for: lang/cz.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,7 @@
934934
"settings.preview_checkerboard.desc": "Přepnout šachovnicové pozadí za náhledem",
935935
"settings.uv_checkerboard": "Šachovnice UV Editoru",
936936
"settings.uv_checkerboard.desc": "Přepnout šachovnicové pozadí za UV editorem",
937+
"settings.display_uv.desc": "What to display in the UV Editor",
937938
"category.paint": "Malování",
938939
"action.fill_mode.color_connected": "Připojené Barvy",
939940
"action.draw_shape_type": "Typ Tvaru",
@@ -1352,8 +1353,7 @@
13521353
"message.merged_vertices": "Found and merged %0 vertices in %1 locations",
13531354
"settings.vertex_merge_distance": "Vertex Merge Distance",
13541355
"settings.vertex_merge_distance.desc": "Distance within which vertices are merged using merging by distance",
1355-
"settings.show_only_selected_uv": "Show Only Selected UV",
1356-
"settings.show_only_selected_uv.desc": "Only display the selected UV faces in the UV editor by default",
1356+
"settings.display_uv": "Display UV Mode",
13571357
"action.merge_vertices.merge_all": "Merge All",
13581358
"action.merge_vertices.merge_all_in_center": "Merge All in Center",
13591359
"action.merge_vertices.merge_by_distance": "Merge by Distance",
@@ -1407,7 +1407,7 @@
14071407
"action.new_window.desc": "Opens a new Blockbench window",
14081408
"action.export_collada": "Export Collada Model (dae)",
14091409
"action.export_collada.desc": "Export model and animations as dae file to use it in other 3D applications",
1410-
"action.paint_mode_uv_overlay": "UV Overlay",
1410+
"action.paint_mode_uv_overlay": "UV Show All",
14111411
"action.paint_mode_uv_overlay.desc": "Display the UV map as an overlay in paint mode",
14121412
"action.bake_animation_into_model": "Bake Animation into Model",
14131413
"action.bake_animation_into_model.desc": "Bake the currently displayed animation frame into the model. Only applies rotation and position, scale is ignored.",
@@ -2043,7 +2043,6 @@
20432043
"settings.final_newline": "Final Newline",
20442044
"settings.final_newline.desc": "Insert a newline character at the end of exported files",
20452045
"action.crop_layer_to_selection": "Crop Layer to Selection",
2046-
"action.edit_mode_uv_overlay.desc": "Display the UV map as an overlay in edit mode",
20472046
"action.animation_onion_skin_selective": "Selective Onion Skin",
20482047
"action.animation_onion_skin_selective.desc": "Only display onion skin for the selected part of the model",
20492048
"menu.image": "Image",

Diff for: lang/de.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,7 @@
934934
"settings.preview_checkerboard.desc": "Aktiviert das Schachbrettmuster hinter der 3D-Vorschau",
935935
"settings.uv_checkerboard": "UV-Fenster-Schachbrettmuster",
936936
"settings.uv_checkerboard.desc": "Aktiviert das Schachbrettmuster hinter dem UV-Fenster",
937+
"settings.display_uv.desc": "What to display in the UV Editor",
937938
"category.paint": "Malen",
938939
"action.fill_mode.color_connected": "Verbundene Farben",
939940
"action.draw_shape_type": "Form",
@@ -1352,8 +1353,7 @@
13521353
"message.merged_vertices": "%0 Eckpunkte wurden gefunden und an %1 Stellen vereint",
13531354
"settings.vertex_merge_distance": "Abstand für Vereinen von Eckpunkten",
13541355
"settings.vertex_merge_distance.desc": "Abstand, in dem beieinander liegende Eckpunkte durch die Vereinen-Funktion vereint werden",
1355-
"settings.show_only_selected_uv": "Nur ausgewählte UV-Flächen anzeigen",
1356-
"settings.show_only_selected_uv.desc": "Zeige standardmäßig nur die aktuell ausgewählten UV-Flächen im UV-Editor an",
1356+
"settings.display_uv": "Display UV Mode",
13571357
"action.merge_vertices.merge_all": "Alle vereinen",
13581358
"action.merge_vertices.merge_all_in_center": "Alle in Mittelpunkt vereinen",
13591359
"action.merge_vertices.merge_by_distance": "Beieinander liegende vereinen",
@@ -1407,7 +1407,7 @@
14071407
"action.new_window.desc": "Öffnet ein neues Blockbench-Fenster",
14081408
"action.export_collada": "Collada-Modell (dae) exportieren",
14091409
"action.export_collada.desc": "Exportiert das Modell als dae-Datei zur Weiterverwendung in anderen 3D-Programmen",
1410-
"action.paint_mode_uv_overlay": "UV-Hilfslinien",
1410+
"action.paint_mode_uv_overlay": "UV Show All",
14111411
"action.paint_mode_uv_overlay.desc": "Überlagert die UV-Maps der Elemente im Malen-Modus",
14121412
"action.bake_animation_into_model": "Animationen auf Modell anwenden",
14131413
"action.bake_animation_into_model.desc": "Wendet die aktuell angezeigte Animation auf das Modell an. Nur Position und Drehung werden verwendet, Größe wird ignoriert",
@@ -2043,7 +2043,6 @@
20432043
"settings.final_newline": "Neue Zeile am Ende",
20442044
"settings.final_newline.desc": "Füge einen Zeilenumbruch am Ende von exportierten Dateien an",
20452045
"action.crop_layer_to_selection": "Ebene auf Auswahl zuschneiden",
2046-
"action.edit_mode_uv_overlay.desc": "Überlagert die UV-Maps der Elemente im Bearbeitungsmodus",
20472046
"action.animation_onion_skin_selective": "Zwiebelschalen nur für Auswahl",
20482047
"action.animation_onion_skin_selective.desc": "Zeige die Zwiebelschalenvorschau nur für den ausgewählten Teil des Modells an",
20492048
"menu.image": "Bild",

Diff for: lang/en.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,7 @@
927927
"settings.preview_checkerboard.desc": "Toggle the checkerboard background behind the preview",
928928
"settings.uv_checkerboard": "UV Editor Checkerboard",
929929
"settings.uv_checkerboard.desc": "Toggle the checkerboard background behind the UV editor",
930+
"settings.display_uv.desc": "What to display in the UV Editor",
930931
"settings.timecode_frame_number": "Display Timecodes as Frame Numbers",
931932
"settings.timecode_frame_number.desc": "Display fraction timecodes in the timeline as frame number instead of centisecond",
932933
"settings.only_selected_bezier_handles": "Show Only Selected Bézier Handles",
@@ -989,8 +990,7 @@
989990
"settings.default_cube_size.desc": "Set the default cube size when creating a new cube",
990991
"settings.create_rename": "Rename New Element",
991992
"settings.create_rename.desc": "Focus name field when creating new element or group",
992-
"settings.show_only_selected_uv": "Show Only Selected UV",
993-
"settings.show_only_selected_uv.desc": "Only display the selected UV faces in the UV editor by default",
993+
"settings.display_uv": "Display UV Mode",
994994
"settings.animation_snap": "Animation Snap",
995995
"settings.animation_snap.desc": "Default snap interval for keyframes in the animation timeline in steps per second. This can also be changed per animation. The default value is 24.",
996996
"settings.uniform_keyframe": "Uniform Scale Keyframes",
@@ -1741,10 +1741,9 @@
17411741
"action.uv_cycle.desc": "Cycle through the order of UV vertices without changing the UV positions",
17421742
"action.uv_cycle_invert": "Cycle Invert UV",
17431743
"action.uv_cycle_invert.desc": "Reverse the order of UV vertices without changing the UV positions",
1744-
"action.paint_mode_uv_overlay": "UV Overlay",
1744+
"action.paint_mode_uv_overlay": "UV Show All",
17451745
"action.paint_mode_uv_overlay.desc": "Display the UV map as an overlay in paint mode",
17461746
"action.snap_uv_to_image_bounds": "Snap UV to image bounds",
1747-
"action.edit_mode_uv_overlay.desc": "Display the UV map as an overlay in edit mode",
17481747
"action.remove_blank_faces": "Remove Blank Faces",
17491748
"action.remove_blank_faces.desc": "Deletes all untextured faces of the selection",
17501749
"action.auto_set_cullfaces": "Set Cullfaces Automatically",

Diff for: lang/es.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,7 @@
934934
"settings.preview_checkerboard.desc": "Cambia el fondo de la cuadrícula detrás de la previsualización",
935935
"settings.uv_checkerboard": "Cuadrícula del Editor de UV",
936936
"settings.uv_checkerboard.desc": "Cambia el fondo de la cuadrícula detrás del editor de UV",
937+
"settings.display_uv.desc": "What to display in the UV Editor",
937938
"category.paint": "Pintar",
938939
"action.fill_mode.color_connected": "Colores Conectados",
939940
"action.draw_shape_type": "Tipo de Forma",
@@ -1352,8 +1353,7 @@
13521353
"message.merged_vertices": "Se encontraron y combinaron %0 vértices en %1 ubicaciones",
13531354
"settings.vertex_merge_distance": "Distancia de fusión de vértices",
13541355
"settings.vertex_merge_distance.desc": "Distancia dentro de la cual se fusionan los vértices mediante la fusión por distancia",
1355-
"settings.show_only_selected_uv": "Mostrar solo UV seleccionado",
1356-
"settings.show_only_selected_uv.desc": "Mostrar solo las caras UV seleccionadas en el editor UV de forma predeterminada",
1356+
"settings.display_uv": "Display UV Mode",
13571357
"action.merge_vertices.merge_all": "Unir todo",
13581358
"action.merge_vertices.merge_all_in_center": "Unir todo al centro",
13591359
"action.merge_vertices.merge_by_distance": "Unir distancia",
@@ -1407,7 +1407,7 @@
14071407
"action.new_window.desc": "Abrir una nueva ventana en Blockbench",
14081408
"action.export_collada": "Exportar modelo Collada (dae)",
14091409
"action.export_collada.desc": "Exportar modelo y animaciones como archivo dae para usarlo en otras aplicaciones 3D",
1410-
"action.paint_mode_uv_overlay": "Cubrir UV",
1410+
"action.paint_mode_uv_overlay": "UV Show All",
14111411
"action.paint_mode_uv_overlay.desc": "Muestra el mapa UV como una superposición en el modo de pintura",
14121412
"action.bake_animation_into_model": "Hornear animación en modelo",
14131413
"action.bake_animation_into_model.desc": "Hornea la animación mostrada actualmente al modelo. Solo aplica a la rotación y la posición, se ignora la escala.",
@@ -2043,7 +2043,6 @@
20432043
"settings.final_newline": "Final Newline",
20442044
"settings.final_newline.desc": "Insert a newline character at the end of exported files",
20452045
"action.crop_layer_to_selection": "Crop Layer to Selection",
2046-
"action.edit_mode_uv_overlay.desc": "Display the UV map as an overlay in edit mode",
20472046
"action.animation_onion_skin_selective": "Selective Onion Skin",
20482047
"action.animation_onion_skin_selective.desc": "Only display onion skin for the selected part of the model",
20492048
"menu.image": "Image",

Diff for: lang/fr.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,7 @@
934934
"settings.preview_checkerboard.desc": "Affiche/masque le damier d'arrière-plan de l'aperçu",
935935
"settings.uv_checkerboard": "Damier de l'éditeur UV",
936936
"settings.uv_checkerboard.desc": "Affiche/masque le damier d'arrière-plan de l'éditeur UV",
937+
"settings.display_uv.desc": "What to display in the UV Editor",
937938
"category.paint": "Peinture",
938939
"action.fill_mode.color_connected": "Couleurs connectées",
939940
"action.draw_shape_type": "Type d'ombre",
@@ -1352,8 +1353,7 @@
13521353
"message.merged_vertices": "%0 sommets ont été trouvés et fusionné depuis %1 emplacements",
13531354
"settings.vertex_merge_distance": "Distance de fusion des sommets",
13541355
"settings.vertex_merge_distance.desc": "Distance avant laquelle les sommets sont fusionnés en utilisant la fusion par distance",
1355-
"settings.show_only_selected_uv": "Afficher UV sélectionnés uniquement",
1356-
"settings.show_only_selected_uv.desc": "N'afficher que les faces UV sélectionnées dans l'éditeur UV par défaut",
1356+
"settings.display_uv": "Display UV Mode",
13571357
"action.merge_vertices.merge_all": "Tout fusionner",
13581358
"action.merge_vertices.merge_all_in_center": "Fusionne tout, au centre",
13591359
"action.merge_vertices.merge_by_distance": "Fusion par distnace",
@@ -1407,7 +1407,7 @@
14071407
"action.new_window.desc": "Ouvre une nouvelle fenêtre Blockbench",
14081408
"action.export_collada": "Exporter modèle Collada (dae)",
14091409
"action.export_collada.desc": "Exporte le modèle et les animations dans un fichier dae pour l'utiliser dans d'autres logiciels 3D",
1410-
"action.paint_mode_uv_overlay": "Overlay UV",
1410+
"action.paint_mode_uv_overlay": "UV Show All",
14111411
"action.paint_mode_uv_overlay.desc": "Affiche la carte UV sous forme d'overlay en mode Dessin",
14121412
"action.bake_animation_into_model": "Intégrer l'animation au modèle",
14131413
"action.bake_animation_into_model.desc": "Intègre l'image d'animation actuellement affichée au modèle. Seules la rotation et la position s'appliquent, la mise à l'échelle est ignorée.",
@@ -2043,7 +2043,6 @@
20432043
"settings.final_newline": "Final Newline",
20442044
"settings.final_newline.desc": "Insert a newline character at the end of exported files",
20452045
"action.crop_layer_to_selection": "Crop Layer to Selection",
2046-
"action.edit_mode_uv_overlay.desc": "Display the UV map as an overlay in edit mode",
20472046
"action.animation_onion_skin_selective": "Selective Onion Skin",
20482047
"action.animation_onion_skin_selective.desc": "Only display onion skin for the selected part of the model",
20492048
"menu.image": "Image",

Diff for: lang/it.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,7 @@
934934
"settings.preview_checkerboard.desc": "Alterna lo sfondo a scacchiera dieto l'anteprima",
935935
"settings.uv_checkerboard": "Scacchiera Editore UV",
936936
"settings.uv_checkerboard.desc": "Alterna lo sfondo a scacchiera dietro l'editore UV",
937+
"settings.display_uv.desc": "What to display in the UV Editor",
937938
"category.paint": "Dipingi",
938939
"action.fill_mode.color_connected": "Colori Connessi",
939940
"action.draw_shape_type": "Tipo di forma",
@@ -1352,8 +1353,7 @@
13521353
"message.merged_vertices": "Found and merged %0 vertices in %1 locations",
13531354
"settings.vertex_merge_distance": "Vertex Merge Distance",
13541355
"settings.vertex_merge_distance.desc": "Distance within which vertices are merged using merging by distance",
1355-
"settings.show_only_selected_uv": "Show Only Selected UV",
1356-
"settings.show_only_selected_uv.desc": "Only display the selected UV faces in the UV editor by default",
1356+
"settings.display_uv": "Display UV Mode",
13571357
"action.merge_vertices.merge_all": "Merge All",
13581358
"action.merge_vertices.merge_all_in_center": "Merge All in Center",
13591359
"action.merge_vertices.merge_by_distance": "Merge by Distance",
@@ -1407,7 +1407,7 @@
14071407
"action.new_window.desc": "Opens a new Blockbench window",
14081408
"action.export_collada": "Export Collada Model (dae)",
14091409
"action.export_collada.desc": "Export model and animations as dae file to use it in other 3D applications",
1410-
"action.paint_mode_uv_overlay": "UV Overlay",
1410+
"action.paint_mode_uv_overlay": "UV Show All",
14111411
"action.paint_mode_uv_overlay.desc": "Display the UV map as an overlay in paint mode",
14121412
"action.bake_animation_into_model": "Bake Animation into Model",
14131413
"action.bake_animation_into_model.desc": "Bake the currently displayed animation frame into the model. Only applies rotation and position, scale is ignored.",
@@ -2043,7 +2043,6 @@
20432043
"settings.final_newline": "Final Newline",
20442044
"settings.final_newline.desc": "Insert a newline character at the end of exported files",
20452045
"action.crop_layer_to_selection": "Crop Layer to Selection",
2046-
"action.edit_mode_uv_overlay.desc": "Display the UV map as an overlay in edit mode",
20472046
"action.animation_onion_skin_selective": "Selective Onion Skin",
20482047
"action.animation_onion_skin_selective.desc": "Only display onion skin for the selected part of the model",
20492048
"menu.image": "Image",

Diff for: lang/ja.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,7 @@
934934
"settings.preview_checkerboard.desc": "チェッカーボードの背景を切り替えます",
935935
"settings.uv_checkerboard": "UV エディタ",
936936
"settings.uv_checkerboard.desc": "UV エディタの背景を切り替えます",
937+
"settings.display_uv.desc": "What to display in the UV Editor",
937938
"category.paint": "Paint",
938939
"action.fill_mode.color_connected": "コネクトカラー",
939940
"action.draw_shape_type": "シャープ",
@@ -1352,8 +1353,7 @@
13521353
"message.merged_vertices": "%1 で %0 の頂点が見つかりました",
13531354
"settings.vertex_merge_distance": "バーテクス",
13541355
"settings.vertex_merge_distance.desc": "頂点がマージされる距離を変更します",
1355-
"settings.show_only_selected_uv": "セレクト UV",
1356-
"settings.show_only_selected_uv.desc": "選択した UV フェイスのみを UV エディタに表示します",
1356+
"settings.display_uv": "Display UV Mode",
13571357
"action.merge_vertices.merge_all": "全てマージ",
13581358
"action.merge_vertices.merge_all_in_center": "中央に全てマージ",
13591359
"action.merge_vertices.merge_by_distance": "距離マージ",
@@ -1407,7 +1407,7 @@
14071407
"action.new_window.desc": "新しい Blockbench ウィンドウを開きます",
14081408
"action.export_collada": "Collada Model (dae)",
14091409
"action.export_collada.desc": "モデルとアニメーションを dae ファイルとして書き出します",
1410-
"action.paint_mode_uv_overlay": "UV オーバーレイ",
1410+
"action.paint_mode_uv_overlay": "UV Show All",
14111411
"action.paint_mode_uv_overlay.desc": "ペイントモードで UV マップをオーバーレイとして表示します",
14121412
"action.bake_animation_into_model": "アニメーションをモデルに焼き付ける",
14131413
"action.bake_animation_into_model.desc": "現在表示されているアニメーションフレームをモデルにベイク処理します。回転と位置のみを適用し、スケールは無視されます。",
@@ -2043,7 +2043,6 @@
20432043
"settings.final_newline": "改行を追加",
20442044
"settings.final_newline.desc": "ファイルの末尾に改行を挿入します",
20452045
"action.crop_layer_to_selection": "レイヤーを選択範囲にトリミング",
2046-
"action.edit_mode_uv_overlay.desc": "編集モードで UV マップをオーバーレイとして表示します",
20472046
"action.animation_onion_skin_selective": "トグルレイヤースキン",
20482047
"action.animation_onion_skin_selective.desc": "選択したレイヤースキンのみを表示します",
20492048
"menu.image": "Image",

0 commit comments

Comments
 (0)