Skip to content

Remove material when glass component is removed - #126

Merged
nixonyh merged 1 commit into
mainfrom
nixon/glass-material-cleanup
Aug 3, 2026
Merged

Remove material when glass component is removed#126
nixonyh merged 1 commit into
mainfrom
nixon/glass-material-cleanup

Conversation

@nixonyh

@nixonyh nixonyh commented Aug 3, 2026

Copy link
Copy Markdown
Member

No description provided.

@nixonyh
nixonyh requested review from Jaghov and Sheerwin02 August 3, 2026 11:11
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 470e3378-0b92-4aa1-815e-2344455e36fb

📥 Commits

Reviewing files that changed from the base of the PR and between 4e6e4c9 and 15a9d9e.

📒 Files selected for processing (2)
  • editor/motiongfx_editor_ui/src/glass.rs
  • editor/motiongfx_editor_ui/src/glass/preset.rs

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes
    • Glass visual effects now detach cleanly when glass settings are removed.
    • Prevents leftover glass materials from remaining applied after a glass element is cleared.
    • Improves consistency when adding, updating, or removing glass effects.

Walkthrough

The glass UI now removes MaterialNode<GlassMaterial> when Glass is removed. The plugin registers this removal observer. The existing insertion observer continues to attach and clone the selected material.

Changes

Glass material lifecycle

Layer / File(s) Summary
Glass material attach and detach observers
editor/motiongfx_editor_ui/src/glass.rs, editor/motiongfx_editor_ui/src/glass/preset.rs
The plugin registers preset::detach_glass. The removal observer clears MaterialNode<GlassMaterial>. The insertion observer uses the trigger entity while retaining material selection and field cloning.
Estimated code review effort: 1 (Trivial) ~5 minutes

Suggested reviewers: jaghov, sheerwin02

Poem

The rabbit watches glass attach,
Then clears the node with a careful scratch.
On insert, fields clone bright,
On removal, they leave sight.
Lifecycle paths now match.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided, so its relevance to the changeset cannot be assessed. Add a brief description that explains the removal observer and material cleanup behavior.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing the material when the Glass component is removed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@nixonyh
nixonyh enabled auto-merge (squash) August 3, 2026 13:52
@nixonyh
nixonyh merged commit 7218dcb into main Aug 3, 2026
8 checks passed
@nixonyh
nixonyh deleted the nixon/glass-material-cleanup branch August 3, 2026 13:56
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