Fix window/door preview alignment regression in ProductDecorator#7659
Open
jaliste wants to merge 2 commits intoIfcOpenShell:v0.8.0from
Open
Fix window/door preview alignment regression in ProductDecorator#7659jaliste wants to merge 2 commits intoIfcOpenShell:v0.8.0from
jaliste wants to merge 2 commits intoIfcOpenShell:v0.8.0from
Conversation
Fixes two issues introduced in e55955b: 1. Extract only rotation from wall matrix when calculating preview orientation, avoiding position offset for walls not at origin 2. Recalculate type object's inverted matrix each frame instead of using cached value, as representation switches can change it Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The get_generic_preview_data method referenced 'context' but the variable was never defined. This was a copy-paste error from the old code where the function received context as a parameter. Use bpy.context instead. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jaliste
referenced
this pull request
Feb 10, 2026
Previously, when the add occurrence modal operator was executed, on every modal loop (i.e. every mouse movement) it would fetch the mesh geometry to be previewed, store the verts / edges / faces in mesh collections, then the decorator would fetch that geometry, the clear the collections, in a loop. I've removed the Blender collections. Instead the same strategy is used as in ItemDecorator i.e. the mesh and verts are fetched once during decorator installation, then on each draw call only a single vertex loop to multiply by the transformation matrix for snapping and mouse position. You can test with the LOD400 model in #7566. On my machine it would cause lag on anything with >500 faces. Now it seems to work without lag on a 26k polygon mesh.
Contributor
|
The regression seems to have existed prior to the optimisation in e55955b. I had noticed it at the time but didn't have the time to address. I think this is something best for @brunoperdigao to check. |
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.
Summary
These are regressions introduced in e55955b ("Fix unusable lag due to dense meshes with product preview").
Test plan
🤖 Generated with Claude Code