Cursors: Krea-Grafiken in voller Auflösung, Blank-Cursor beim Malen, normalisierte Hotspots

- Cursor_Normal/Paint/Pipette: generierte Grafiken jetzt in Vollauflösung (766-829 px, Max Size im Importer steuert Anzeigegröße), Paint-Ring-Inneres freigestellt
- Neuer Cursor_Blank (transparent): wird während eines Strokes auf dem Mesh gesetzt statt Cursor.visible zu togglen (fixt Flicker-Kampf mit dem Orbit-Input)
- CursorController: Hotspots normalisiert (0-1, unabhängig von Import Max Size); Zustandskette Pipette > (Stroke ? Blank : Paint) > Normal; off-mesh während Stroke -> Normal
- MeshPainter: StrokeInProgress-Flag (Maustaste auf Paint-Pfad gehalten)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Fable 5 committed 2026-07-11 21:35:36 +02:00
1 parent 653bc79236
commit 423a2d15ec
10 files changed
+160 -20

No files matched your search

@@ -424,6 +424,8 @@ public partial class MeshPainter : MonoBehaviour
// --- preview overlay ---
/// <summary>True while the brush preview decal is actually drawn this frame (hover hits the paintable surface).</summary>
public bool BrushPreviewVisible { get; private set; }
/// <summary>True while the paint button is held on the paint path (stroke running). The cursor hides entirely.</summary>
public bool StrokeInProgress { get; private set; }
public Shader previewShader; // optional; else Shader.Find("Hidden/MeshPaintPreview")
private Material _previewMat;
private Mesh _previewQuad; // unit quad in the tangent plane (flat decal mode)
@@ -855,14 +857,20 @@ public partial class MeshPainter : MonoBehaviour
ResolveActiveMask();
if (!TryGetMouse(out bool pressed, out Vector2 screenPos))
{
StrokeInProgress = false;
return;
}
// Don't paint through the in-game UI (a HUD click must not also stamp the mesh behind it).
if (pressed && InputUtil.PointerOverUi())
pressed = false;
// Brush preview at the hover point - independent of painting AND of the pipette, so the
// footprint stays visible before pressing, while the pipette holds, and during wheel resize.
// While the button is held on the paint path the hardware cursor is hidden entirely
// (CursorController); the preview decal itself stays visible during the stroke.
StrokeInProgress = pressed && !pipette;
// Brush preview at the hover point.
if (previewMode != BrushPreviewMode.Off && _previewMat && paintCamera)
UpdatePreview(screenPos);