From 47995c6f6027f9897dce6c882514c03a40dfbf66 Mon Sep 17 00:00:00 2001 From: Josh Field Date: Fri, 31 May 2024 08:10:51 +1000 Subject: [PATCH] fix entity node editor crashing (#10290) --- .../editor/panels/Properties/container/index.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/components/editor/panels/Properties/container/index.tsx b/packages/ui/src/components/editor/panels/Properties/container/index.tsx index 1fdec5cc4f..e8726f08ee 100644 --- a/packages/ui/src/components/editor/panels/Properties/container/index.tsx +++ b/packages/ui/src/components/editor/panels/Properties/container/index.tsx @@ -125,6 +125,13 @@ const EntityEditor = (props: { entityUUID: EntityUUID; multiEdit: boolean }) => ) } +const NodeEditor = (props: { entityUUID: EntityUUID; multiEdit: boolean }) => { + const entity = UUIDComponent.useEntityByUUID(props.entityUUID) + const node = GLTFNodeState.useMutableNode(entity) + if (!node) return null + return +} + /** * PropertiesPanelContainer used to render editor view to customize property of selected element. */ @@ -141,7 +148,7 @@ export const PropertiesPanelContainer = () => { {materialUUID ? ( ) : uuid ? ( - + ) : (
{t('editor:properties.noNodeSelected')}