From 2ec0322c276334c1496adbc5845d185a73181271 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 15 Apr 2026 07:55:08 +0200 Subject: [PATCH] Refactor material handling and face labels in App.tsx --- src/app/App.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/App.tsx b/src/app/App.tsx index 600f14d1..1f3a16c0 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -10225,7 +10225,7 @@ export function App({ store, initialStatusMessage }: AppProps) { if (selectedFace.materialId === materialId) { setStatusMessage( - `${BOX_FACE_LABELS[selectedFaceId]} already uses that material.` + `${getBrushFaceLabel(selectedBrush, selectedFaceId)} already uses that material.` ); return; } @@ -10239,7 +10239,7 @@ export function App({ store, initialStatusMessage }: AppProps) { }) ); setStatusMessage( - `Applied ${editorState.document.materials[materialId]?.name ?? materialId} to ${BOX_FACE_LABELS[selectedFaceId]}.` + `Applied ${editorState.document.materials[materialId]?.name ?? materialId} to ${getBrushFaceLabel(selectedBrush, selectedFaceId)}.` ); } catch (error) { setStatusMessage(getErrorMessage(error)); @@ -10284,7 +10284,7 @@ export function App({ store, initialStatusMessage }: AppProps) { if (selectedFace.materialId === null) { setStatusMessage( - `${BOX_FACE_LABELS[selectedFaceId]} already uses the fallback face material.` + `${getBrushFaceLabel(selectedBrush, selectedFaceId)} already uses the fallback face material.` ); return; } @@ -10297,7 +10297,7 @@ export function App({ store, initialStatusMessage }: AppProps) { }) ); setStatusMessage( - `Cleared the authored material on ${BOX_FACE_LABELS[selectedFaceId]}.` + `Cleared the authored material on ${getBrushFaceLabel(selectedBrush, selectedFaceId)}.` ); }; @@ -10311,7 +10311,7 @@ export function App({ store, initialStatusMessage }: AppProps) { whiteboxSelectionMode === "object" && materialInspectorScope === "brush" ) { - const allFacesAlreadyMatch = BOX_FACE_IDS.every((faceId) => + const allFacesAlreadyMatch = selectedBrushFaceIds.every((faceId) => areFaceUvStatesEqual(selectedBrush.faces[faceId].uv, uvState) );