diff --git a/packages/client-core/src/common/services/FileThumbnailJobState.tsx b/packages/client-core/src/common/services/FileThumbnailJobState.tsx index 96f65cb962..725411f4b0 100644 --- a/packages/client-core/src/common/services/FileThumbnailJobState.tsx +++ b/packages/client-core/src/common/services/FileThumbnailJobState.tsx @@ -66,6 +66,7 @@ import React, { useEffect } from 'react' import { Color, Euler, Material, MathUtils, Matrix4, Mesh, Quaternion, Sphere, SphereGeometry, Vector3 } from 'three' import config from '@etherealengine/common/src/config' +import { ThumbnailLightTagComponent } from '@etherealengine/engine/src/camera/components/ThumbnailLightTagComponent' import { ErrorComponent } from '@etherealengine/engine/src/scene/components/ErrorComponent' import { ShadowComponent } from '@etherealengine/engine/src/scene/components/ShadowComponent' import { useFind } from '@etherealengine/spatial/src/common/functions/FeathersHooks' @@ -365,6 +366,7 @@ const ThumbnailJobReactor = () => { setComponent(lightEntity, NameComponent, 'thumbnail job light for ' + src) setComponent(lightEntity, VisibleComponent) setComponent(lightEntity, DirectionalLightComponent, { intensity: 1, color: new Color(0xffffff) }) + setComponent(lightEntity, ThumbnailLightTagComponent) if (!state.cameraEntity.value) { let canvasContainer = document.getElementById('thumbnail-camera-container') diff --git a/packages/engine/src/camera/components/ThumbnailLightTagComponent.ts b/packages/engine/src/camera/components/ThumbnailLightTagComponent.ts new file mode 100644 index 0000000000..ec85b72cb4 --- /dev/null +++ b/packages/engine/src/camera/components/ThumbnailLightTagComponent.ts @@ -0,0 +1,5 @@ +import { defineComponent } from '@etherealengine/ecs' + +export const ThumbnailLightTagComponent = defineComponent({ + name: 'ThumbnailLightTagComponent' +}) diff --git a/packages/ui/src/components/editor/properties/render/index.tsx b/packages/ui/src/components/editor/properties/render/index.tsx index ed90639229..2d49e31348 100644 --- a/packages/ui/src/components/editor/properties/render/index.tsx +++ b/packages/ui/src/components/editor/properties/render/index.tsx @@ -23,13 +23,14 @@ All portions of the code written by the Ethereal Engine team are Copyright © 20 Ethereal Engine. All Rights Reserved. */ -import { EntityUUID, UUIDComponent, useQuery } from '@etherealengine/ecs' +import { EntityUUID, Not, UUIDComponent, useQuery } from '@etherealengine/ecs' import { ComponentType, getComponent, useComponent } from '@etherealengine/ecs/src/ComponentFunctions' import { EditorComponentType, commitProperty, updateProperty } from '@etherealengine/editor/src/components/properties/Util' +import { ThumbnailLightTagComponent } from '@etherealengine/engine/src/camera/components/ThumbnailLightTagComponent' import { GLTFNodeState, GLTFSnapshotAction } from '@etherealengine/engine/src/gltf/GLTFDocumentState' import { GLTFSnapshotState } from '@etherealengine/engine/src/gltf/GLTFState' import { RenderSettingsComponent } from '@etherealengine/engine/src/scene/components/RenderSettingsComponent' @@ -119,7 +120,7 @@ export const RenderSettingsEditor: EditorComponentType = (props) => { value: '' as EntityUUID } ].concat( - useQuery([DirectionalLightComponent]).map((entity) => { + useQuery([DirectionalLightComponent, Not(ThumbnailLightTagComponent)]).map((entity) => { return { label: getComponent(entity, NameComponent), value: getComponent(entity, UUIDComponent)