feat: scene traps, material legends, and scene editor window

Add trap overlays with session state, material legend editor/panel, and a dedicated scene editor window wired through IPC and project persistence.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-24 16:29:43 +08:00
parent d3b1c4660d
commit 02d73ddf81
39 changed files with 2563 additions and 36 deletions
+18
View File
@@ -1564,6 +1564,16 @@ export function EditorApp() {
});
});
}}
onLegendChange={async (materialId, legend) => {
try {
await actions.setMaterialLegend(materialId, legend);
} catch (e) {
setAppNotice({
title: t('common.error'),
message: e instanceof Error ? e.message : String(e),
});
}
}}
/>
<MaterialEditModal
open={materialEdit !== null}
@@ -2599,6 +2609,14 @@ function SceneInspector({
/>
<span className={styles.spanSm}>{t('scene.darkenScene')}</span>
</label>
<div className={styles.spacer6} />
<Button
onClick={() => {
void getDndApi().invoke(ipcChannels.windows.openSceneEditor, {});
}}
>
Редактор сцены
</Button>
</>
) : null}
<div className={styles.spacer6} />