Add per-drawing render overrides (status_render module)#8171
Open
theoryshaw wants to merge 2 commits into
Open
Add per-drawing render overrides (status_render module)#8171theoryshaw wants to merge 2 commits into
theoryshaw wants to merge 2 commits into
Conversation
Adds a new "Render Overrides" panel under the active drawing that applies render effects to IFC elements selected by a filter. Each drawing holds a list of rules; each rule has its own filter (reusing the shared Search filter system) plus exposure, gamma, and transparency. Effects use the mechanism that can actually show them: - Exposure/gamma: compositor nodes masked per rule via Cryptomatte, built just before a render and torn down after. Cryptomatte (not the Object Index pass) is used because EEVEE Next always renders Object Index as 0 (Blender #121690); it works in both EEVEE and Cycles. - Transparency: a temporary Transparent-BSDF material applied to the matched objects so the geometry behind shows through. Because it is a real material it also shows live in the Rendered viewport (WYSIWYG), and is restored after the render / on toggle off / before save. The single enable toggle drives both render and live viewport preview. Switching the active drawing (msgbus on scene.camera) re-syncs the preview and auto-enables a drawing that already has rules. Editing a rule's filter query (including clearing it) updates the preview immediately. Rules are persisted to the IFC model at EPset_Drawing.RenderOverrides (JSON, declared in the pset template as IfcText), so they travel with the drawing: written on add/remove and on save, read back on file load and IFC import (via data.refresh / refresh_ui_data, since load_post fires before the import creates the cameras). The override only runs where the compositor does (F12 and Default-render drawing underlays); the panel disables the toggle when the applied CurrentShadingStyle is not a Default render type. Files: - bim/module/status_render/: new module (operator, prop, ui, data, NOTES) - bim/__init__.py: register the module - bim/data/pset/EPset_Drawing.ifc: add RenderOverrides property template - tool/search.py: status_render filter resolver, on_filter_query_edited dispatch, graceful empty-query handling - bim/module/search/operator.py: notify on_filter_query_edited after edits Generated with the assistance of an AI coding tool.
…ection Wrap the underlay/linework/annotation toggles, Draw Linked Projects (and its nested "Linked Projects to Draw" panel), and the drawing config (target view, linework/fill/cut modes, material layers, width/height/depth, scale, DPI) in a single collapsible layout.panel, collapsed by default, to declutter the BIM_PT_camera panel. Generated with the assistance of an AI coding tool.
bf4b398 to
f9ac17e
Compare
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a new "Render Overrides" panel under the active drawing that applies render effects to IFC elements selected by a filter. Each drawing holds a list of rules; each rule has its own filter (reusing the shared Search filter system) plus exposure, gamma, and transparency.
Effects use the mechanism that can actually show them:
The single enable toggle drives both render and live viewport preview. Switching the active drawing (msgbus on scene.camera) re-syncs the preview and auto-enables a drawing that already has rules. Editing a rule's filter query (including clearing it) updates the preview immediately.
Rules are persisted to the IFC model at EPset_Drawing.RenderOverrides (JSON, declared in the pset template as IfcText), so they travel with the drawing: written on add/remove and on save, read back on file load and IFC import (via data.refresh / refresh_ui_data, since load_post fires before the import creates the cameras).
The override only runs where the compositor does (F12 and Default-render drawing underlays); the panel disables the toggle when the applied CurrentShadingStyle is not a Default render type.
Files:
Generated with the assistance of an AI coding tool.