1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Improve Mesh UV1/UV2 preview in the editor

- Use an AspectRatioContainer to prevent stretching that occurs depending
  on the dialog size.
- Draw UV bounds and a grid at 1/8th increments.
- Scale lines according to editor scale for better visibility on hiDPI displays.
This commit is contained in:
Hugo Locurcio
2024-11-01 01:02:40 +01:00
parent ef8d981267
commit 416e1a538f
2 changed files with 43 additions and 3 deletions

View File

@@ -36,6 +36,7 @@
#include "scene/gui/option_button.h"
class AcceptDialog;
class AspectRatioContainer;
class ConfirmationDialog;
class MenuButton;
class SpinBox;
@@ -79,6 +80,7 @@ class MeshInstance3DEditor : public Control {
AcceptDialog *err_dialog = nullptr;
AcceptDialog *debug_uv_dialog = nullptr;
AspectRatioContainer *debug_uv_arc = nullptr;
Control *debug_uv = nullptr;
Vector<Vector2> uv_lines;