diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-07-28 15:30:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-28 15:30:29 +0200 |
commit | 9f5436c7996a225da58aa7eddefc28734578315b (patch) | |
tree | 15f987d4b0ab8b3fc8f48e31a0c5a8d45f9006e7 /editor | |
parent | 6256936d773a309ee3c208bb1d4a287b08777ab8 (diff) | |
parent | 8cdfd2e7063e3ab569b07e22ae07615820548b02 (diff) |
Merge pull request #50826 from Calinou/editor-improve-mesh-uv-preview
Improve MeshInstance3D UV preview in the editor
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/mesh_instance_3d_editor_plugin.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp index 9ee1fcb325..9a2b222f21 100644 --- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp +++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp @@ -332,7 +332,7 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) { Vector<Vector2> uv = a[p_layer == 0 ? Mesh::ARRAY_TEX_UV : Mesh::ARRAY_TEX_UV2]; if (uv.size() == 0) { - err_dialog->set_text(TTR("Model has no UV in this layer")); + err_dialog->set_text(vformat(TTR("Mesh has no UV in layer %d."), p_layer + 1)); err_dialog->popup_centered(); return; } @@ -382,9 +382,10 @@ void MeshInstance3DEditor::_debug_uv_draw() { } debug_uv->set_clip_contents(true); - debug_uv->draw_rect(Rect2(Vector2(), debug_uv->get_size()), Color(0.2, 0.2, 0.0)); + debug_uv->draw_rect(Rect2(Vector2(), debug_uv->get_size()), get_theme_color(SNAME("dark_color_3"), SNAME("Editor"))); debug_uv->draw_set_transform(Vector2(), 0, debug_uv->get_size()); - debug_uv->draw_multiline(uv_lines, Color(1.0, 0.8, 0.7)); + // Use a translucent color to allow overlapping triangles to be visible. + debug_uv->draw_multiline(uv_lines, get_theme_color(SNAME("mono_color"), SNAME("Editor")) * Color(1, 1, 1, 0.5), Math::round(EDSCALE)); } void MeshInstance3DEditor::_create_outline_mesh() { |