Skip to content

fix(weather-editor): remove time of day for lighting templates#2133

Merged
davo0411 merged 3 commits into
community-shaders:devfrom
SkrubbySkrubInAShrub:remove-TOD-DALC
Apr 16, 2026
Merged

fix(weather-editor): remove time of day for lighting templates#2133
davo0411 merged 3 commits into
community-shaders:devfrom
SkrubbySkrubInAShrub:remove-TOD-DALC

Conversation

@SkrubbySkrubInAShrub
Copy link
Copy Markdown
Collaborator

@SkrubbySkrubInAShrub SkrubbySkrubInAShrub commented Apr 16, 2026

Lighting templates for interiors do not have time of day. Matches cell lighting format.

Summary by CodeRabbit

  • Improvements
    • Lighting editor layout updated: section headers are now always visible; Specular and Fresnel Power controls appear only when matched by the search filter.
    • Directional color editor replaced: time‑of‑day table removed and replaced with direct per‑axis color controls (X+/X-/Y+/Y-/Z+/Z-) for min/max directional colors.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 81f53959-f6bd-49a1-9ce7-37dab05a252b

📥 Commits

Reviewing files that changed from the base of the PR and between 391948c and 69cdd32.

📒 Files selected for processing (1)
  • src/WeatherEditor/Weather/LightingTemplateWidget.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/WeatherEditor/Weather/LightingTemplateWidget.cpp

📝 Walkthrough

Walkthrough

Replace DALC collapsing headers and TOD table with always-visible section headers and per-axis directional color editors; "Specular" and "Fresnel Power" controls render only when their labels match the search. Change-tracking and ApplyChanges() behavior unchanged. (≈35 words)

Changes

Cohort / File(s) Summary
DALC UI Refactor
src/WeatherEditor/Weather/LightingTemplateWidget.cpp
Replaced two ImGui::CollapsingHeader blocks and the TOD table editor with ImGui::SeparatorText sections. Removed TOD row/table mapping. Added direct per-axis color editors: X+ (Right)directional[0].max, X- (Left)directional[0].min, Y+ (Front)directional[1].max, Y- (Back)directional[1].min, Z+ (Up)directional[2].max, Z- (Down)directional[2].min. "Specular" and "Fresnel Power" are rendered only when MatchesSearch(...) matches their labels. changed and ApplyChanges() flow preserved.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • davo0411
  • doodlum

Poem

🐰 I hopped through code to chase the light,
Sections trimmed, axes brought to sight,
Specular waits for search to sing,
X, Y, Z colors take to wing,
A tiny rabbit hums — UI bright!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: removing time-of-day functionality from the lighting template editor, which aligns with the changeset that replaces the TOD table editor with direct per-axis color editors.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

No actionable suggestions for changed features.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/WeatherEditor/Weather/LightingTemplateWidget.cpp`:
- Around line 162-180: Specular and Fresnel Power controls are rendered
unconditionally; wrap their draws with the same search gating as the directional
color controls by calling MatchesSearch("Specular") and MatchesSearch("Fresnel
Power") before invoking WeatherUtils::DrawColorEdit("Specular",
settings.dalc.specular) and WeatherUtils::DrawSliderFloat("Fresnel Power",
settings.dalc.fresnelPower") respectively, so they only set changed when the
search matches (keep existing changed assignment logic).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b5573b9d-003f-40b4-8249-76a9b0d9cc0f

📥 Commits

Reviewing files that changed from the base of the PR and between 4b15683 and f21f041.

📒 Files selected for processing (1)
  • src/WeatherEditor/Weather/LightingTemplateWidget.cpp

Comment thread src/WeatherEditor/Weather/LightingTemplateWidget.cpp
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/WeatherEditor/Weather/LightingTemplateWidget.cpp (1)

168-180: Keep the old Directional search term available.

These labels are clearer, but the current MatchesSearch() keys no longer match generic searches like "Directional", and they now diverge from src/WeatherEditor/Weather/WeatherWidget.cpp:799-906. Keeping Directional in the search text would preserve discoverability without giving up the new labels.

♻️ Minimal tweak
-if (MatchesSearch("X+ (Right)") && WeatherUtils::DrawColorEdit("X+ (Right)", settings.dalc.directional[0].max))
+if (MatchesSearch("Directional X+ Right") && WeatherUtils::DrawColorEdit("X+ (Right)", settings.dalc.directional[0].max))
 		changed = true;
-if (MatchesSearch("X- (Left)") && WeatherUtils::DrawColorEdit("X- (Left)", settings.dalc.directional[0].min))
+if (MatchesSearch("Directional X- Left") && WeatherUtils::DrawColorEdit("X- (Left)", settings.dalc.directional[0].min))
 		changed = true;
-if (MatchesSearch("Y+ (Front)") && WeatherUtils::DrawColorEdit("Y+ (Front)", settings.dalc.directional[1].max))
+if (MatchesSearch("Directional Y+ Front") && WeatherUtils::DrawColorEdit("Y+ (Front)", settings.dalc.directional[1].max))
 		changed = true;
-if (MatchesSearch("Y- (Back)") && WeatherUtils::DrawColorEdit("Y- (Back)", settings.dalc.directional[1].min))
+if (MatchesSearch("Directional Y- Back") && WeatherUtils::DrawColorEdit("Y- (Back)", settings.dalc.directional[1].min))
 		changed = true;
-if (MatchesSearch("Z+ (Up)") && WeatherUtils::DrawColorEdit("Z+ (Up)", settings.dalc.directional[2].max))
+if (MatchesSearch("Directional Z+ Up") && WeatherUtils::DrawColorEdit("Z+ (Up)", settings.dalc.directional[2].max))
 		changed = true;
-if (MatchesSearch("Z- (Down)") && WeatherUtils::DrawColorEdit("Z- (Down)", settings.dalc.directional[2].min))
+if (MatchesSearch("Directional Z- Down") && WeatherUtils::DrawColorEdit("Z- (Down)", settings.dalc.directional[2].min))
 		changed = true;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/WeatherEditor/Weather/LightingTemplateWidget.cpp` around lines 168 - 180,
The MatchesSearch calls for the directional color labels no longer match the
generic "Directional" search term, so update each search condition (the
MatchesSearch(...) checks around WeatherUtils::DrawColorEdit for
settings.dalc.directional indices 0..2 min/max) to also allow "Directional" —
e.g., change each condition to check MatchesSearch("Directional") ||
MatchesSearch("X+ (Right)") (and similarly for "X- (Left)", "Y+ (Front)", "Y-
(Back)", "Z+ (Up)", "Z- (Down)"), so generic searches still find these
directional color controls.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/WeatherEditor/Weather/LightingTemplateWidget.cpp`:
- Around line 168-180: The MatchesSearch calls for the directional color labels
no longer match the generic "Directional" search term, so update each search
condition (the MatchesSearch(...) checks around WeatherUtils::DrawColorEdit for
settings.dalc.directional indices 0..2 min/max) to also allow "Directional" —
e.g., change each condition to check MatchesSearch("Directional") ||
MatchesSearch("X+ (Right)") (and similarly for "X- (Left)", "Y+ (Front)", "Y-
(Back)", "Z+ (Up)", "Z- (Down)"), so generic searches still find these
directional color controls.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0ca632f9-d2bf-40ba-9517-d95564b6e3e8

📥 Commits

Reviewing files that changed from the base of the PR and between f21f041 and 391948c.

📒 Files selected for processing (1)
  • src/WeatherEditor/Weather/LightingTemplateWidget.cpp

@github-actions
Copy link
Copy Markdown

✅ A pre-release build is available for this PR:
Download

@davo0411 davo0411 merged commit 0802a42 into community-shaders:dev Apr 16, 2026
17 checks passed
YtzyFvra pushed a commit to YtzyFvra/skyrim-community-shaders that referenced this pull request Apr 19, 2026
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request May 2, 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