Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
UV Editor: the No UVs yet hint wraps inside the view (cut off at 240 % in a small window) and is translated
islandmedca1b63307085
diff --git a/changes/fix-uv-empty-hint.md b/changes/fix-uv-empty-hint.mdnew file mode 100644index 00000000..94c46501--- /dev/null+++ b/changes/fix-uv-empty-hint.md@@ -0,0 +1,6 @@+---+fixed: **UV Editor**: the "No UVs yet: pick a method and Unwrap" hint was cut off on both sides in a narrow view or at+ a big UI scale (240 %); it now wraps inside the view, and it is translated.+---+Reviewer notes: PanelUvEditor.cpp, the empty-state hint: AddText with a wrap width (the view less 48 px scaled), the+box sized to the wrapped text; tr() on both messages (es + zh-TW added). tests/ui/uv_editor_hint.sfui (shots at 100 / 240).diff --git a/src/app/I18nSpanish.cpp b/src/app/I18nSpanish.cppindex b0b7913f..a205486c 100644--- a/src/app/I18nSpanish.cpp+++ b/src/app/I18nSpanish.cpp@@ -139,6 +139,8 @@ constexpr Entry kSpanish[] = {{"close", "cerrar"},// --- Ctrl-help box ---+ {"No UVs yet: pick a method and Unwrap (or mark seams first)", "Aún no hay UV: elige un método y Desenvolver (o marca costuras primero)"},+ {"No mesh", "Sin malla"},{"No description yet.", "Aún sin descripción."},{"Not available right now.", "No disponible ahora mismo."},{"Learn more: %s", "Más información: %s"},diff --git a/src/app/I18nTraditionalChinese.cpp b/src/app/I18nTraditionalChinese.cppindex d84fcc38..afebeb8d 100644--- a/src/app/I18nTraditionalChinese.cpp+++ b/src/app/I18nTraditionalChinese.cpp@@ -128,6 +128,8 @@ constexpr Entry kTraditionalChinese[] = {{"edit in console", "在主控台中編輯"},{"close", "關閉"},// --- Ctrl-help box ---+ {"No UVs yet: pick a method and Unwrap (or mark seams first)", "尚無 UV:選擇一種方法並展開(或先標記接縫)"},+ {"No mesh", "沒有網格"},{"No description yet.", "目前沒有說明。"},{"Not available right now.", "目前無法使用。"},{"Learn more: %s", "深入瞭解:%s"},diff --git a/src/app/PanelUvEditor.cpp b/src/app/PanelUvEditor.cppindex 79fc8973..b6faff46 100644--- a/src/app/PanelUvEditor.cpp+++ b/src/app/PanelUvEditor.cpp@@ -1229,12 +1229,14 @@ void App::drawUvEditor() {IM_COL32(240, 136, 46, 220), 0, 0, 1.0f * scale);}if (!s.hasUvs) {- const char* msg = m.triangleCount() ? "No UVs yet: pick a method and Unwrap (or mark seams first)" : "No mesh";- const ImVec2 ts = ImGui::CalcTextSize(msg);- const ImVec2 at(viewMin.x + (viewSize.x - ts.x) * 0.5f, viewMin.y + viewSize.y * 0.5f - ts.y);+ const char* msg = tr(m.triangleCount() ? "No UVs yet: pick a method and Unwrap (or mark seams first)" : "No mesh");+ // Wrapped to the view (a narrow view, a big UI scale or a longer translation), centred in it.+ const float wrap = std::max(viewSize.x - 48 * scale, 32 * scale);+ const ImVec2 ts = ImGui::CalcTextSize(msg, nullptr, false, wrap);+ const ImVec2 at(viewMin.x + (viewSize.x - ts.x) * 0.5f, viewMin.y + (viewSize.y - ts.y) * 0.5f);dl->AddRectFilled(ImVec2(at.x - 12 * scale, at.y - 8 * scale), ImVec2(at.x + ts.x + 12 * scale, at.y + ts.y + 8 * scale),IM_COL32(24, 24, 27, 235), 6 * scale);- dl->AddText(at, IM_COL32(215, 215, 220, 255), msg);+ dl->AddText(ImGui::GetFont(), ImGui::GetFontSize(), at, IM_COL32(215, 215, 220, 255), msg, nullptr, wrap);}if (s.job) {const float f = s.job->progress->load();diff --git a/tests/ui/uv_editor_hint.sfui b/tests/ui/uv_editor_hint.sfuinew file mode 100644index 00000000..d17b6a29--- /dev/null+++ b/tests/ui/uv_editor_hint.sfui@@ -0,0 +1,15 @@+# The UV Editor's "No UVs yet" hint wraps inside the view at any UI scale (it was cut off on both sides at 240 % in a+# small window, 11-05).+run new_sphere subdivisions=3+ui_scale 100+key alt+u+expect_value uv_editor_open == 1+expect_value uv_islands == 0+shot hint_100+key alt+u+ui_scale 240+key alt+u+expect_value uv_islands == 0+shot hint_240+key alt+u+ui_scale 100