Add sorted list of foliage prototypes

This commit is contained in:
2026-05-02 04:01:48 +02:00
parent 2884ecc1e5
commit fec11884b1

View File

@@ -2540,6 +2540,16 @@ export function App({ store, draftStorage = null, initialStatusMessage }: AppPro
() => getFoliageLayerList(editorState.document.foliageLayers), () => getFoliageLayerList(editorState.document.foliageLayers),
[editorState.document.foliageLayers] [editorState.document.foliageLayers]
); );
const customFoliagePrototypeList = useMemo(
() =>
Object.values(editorState.document.foliagePrototypes).sort(
(left, right) =>
left.category.localeCompare(right.category) ||
left.label.localeCompare(right.label) ||
left.id.localeCompare(right.id)
),
[editorState.document.foliagePrototypes]
);
const pathList = getScenePaths(editorState.document.paths); const pathList = getScenePaths(editorState.document.paths);
const layoutMode = editorState.viewportLayoutMode; const layoutMode = editorState.viewportLayoutMode;
const activePanelId = editorState.activeViewportPanelId; const activePanelId = editorState.activeViewportPanelId;