From 2896abf83d2ed4e61e39d909803fff9011820999 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 27 Apr 2026 00:17:33 +0200 Subject: [PATCH] Apply rendering properties only to the created selection shell --- src/viewport-three/viewport-host.ts | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/viewport-three/viewport-host.ts b/src/viewport-three/viewport-host.ts index 0e750c4c..20c4a054 100644 --- a/src/viewport-three/viewport-host.ts +++ b/src/viewport-three/viewport-host.ts @@ -6184,21 +6184,15 @@ export class ViewportHost { return; } - syncModelInstanceSelectionShell( + const selectionShell = syncModelInstanceSelectionShell( renderGroup, this.projectAssets[modelInstance.assetId], isModelInstanceSelected(this.currentSelection, modelInstanceId) ); - applyRendererRenderCategoryFromMaterial(renderGroup); - applyAdvancedRenderingRenderableShadowFlags( - renderGroup, - this.currentWorld !== null && - (this.currentSimulationScene?.world ?? this.currentWorld) - .advancedRendering.enabled && - (this.currentSimulationScene?.world ?? this.currentWorld) - .advancedRendering.shadows.enabled && - this.displayMode === "normal" - ); + + if (selectionShell !== null) { + applyRendererRenderCategoryFromMaterial(selectionShell); + } } private createEntityRenderObjects(