Skip to content

Numerous fixes and adjustments to Conditional Relight - #1281

Open
Nickelony wants to merge 2 commits into
developfrom
Nickelony/Conditional-Relight-Fix
Open

Nickelony wants to merge 2 commits into
developfrom
Nickelony/Conditional-Relight-Fix

Conversation

@Nickelony

@Nickelony Nickelony commented Aug 23, 2026 •

Copy link
Copy Markdown
Collaborator

Need to test:

  • Generic and palette light colors, including grouped lights across multiple rooms.
  • Color-dialog Cancel restoration.
  • Cross-room moves in and out of Lighting mode, including undo/redo.
  • Point, spot, and sun rotation resets.
  • Transform-dialog position, rotation, scale, OK, and Cancel.
  • Light deletion and undo-delete.
  • Ambient lighting and undo/redo.
  • Preview-quality toggling, default quality, and override quality.
  • Dirty-state behavior, deferred mode-entry relighting, cache refresh, and large-level relight timing.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Centralizes conditional lighting updates, adds invalidation tracking, improves grouped undo behavior, and expands lighting tests.

Changes:

  • Adds deferred/immediate lighting update gateways and cache invalidation.
  • Updates color, transform, move, delete, undo, and quality workflows.
  • Adds comprehensive lighting regression tests.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
RoomGeometry.cs Applies global light-quality overrides.
Room.cs Encapsulates and updates lighting invalidation.
RoomLightingInvalidationTests.cs Tests room invalidation and quality overrides.
Undo.cs Batches grouped-object lighting updates.
Lighting.cs Avoids relighting for dynamic-only settings.
FormTransform.cs Handles transform-time lighting updates.
FormRoomProperties.cs Routes ambient updates through the gateway.
FormReplaceObject.cs Routes replaced-light updates through the gateway.
EditorActions.cs Centralizes object-related lighting updates.
Editor.cs Adds conditional lighting update APIs.
PanelPalette.cs Uses centralized color application.
Command.cs Routes ambient color updates through the gateway.
EditorLightingGatewayTests.cs Tests gateway, undo, movement, quality, and reset behavior.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread TombEditor/EditorActions.cs Outdated
Comment thread TombEditor/Editor.cs
Comment thread TombEditor/Forms/FormTransform.cs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

obj.Color = c.ToFloat3Color() * 2.0f;
_editor.ObjectChange(obj as ObjectInstance, ObjectChangeType.Change);
}, _editor.Configuration.UI_ColorScheme))
c => ApplyObjectColor(obj, c.ToFloat3Color() * 2.0f),
Comment on lines +129 to +132
if (!_undoSaved)
{
_editor.UndoManager.PushObjectTransformed(_instance);
_undoSaved = true;
@Nickelony

Nickelony commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

Both comments Copilot found are pre-existing issues, but worth fixing in the future, the blast radius for those is too large to fix right now.

@Nickelony Nickelony added this to the Version 2.0 milestone Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants