New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pasting entities aren't always snapped to grid #2754
Comments
Probably using the wrong bounds for alignment. Are the gifs switched? |
The gifs were switched when I first posted the issue, changed it right away though. |
The bounds displayed when you mouseover a monster changed too, now it includes the model. |
@kduske There are different ways to approach this but somehow we need to separate "culling bounds" from the "semantic bounds" in Node's API. What I'm thinking is For this particular issue, the paste code is using After using it a bit I'm not sure if there's really a point to drawing the outer box. Or if we do keep it, the text overlay should be describing the inner bounds, anyway. |
Add a new Node::cullingBounds() that includes the model bounds. Fixes #2754
) * 2754: Revert Entity::bounds() to returning the definition bounds. Add a new Node::cullingBounds() that includes the model bounds. Fixes #2754 * 2754: fix initializer order * 2754: fix a few bounds() calls that should be cullingBounds() * 2754: add docs * 2754: ComputeNodeBoundsVisitor: use bbox::builder * 2754: don't add Group to node tree * 2754: cullingBounds->physicalBounds refactor * 2754: Node::bounds->logicalBounds refactor * 2754: more bounds refactoring * 2754: rename *BoundsDidChange functions to *PhysicalBoundsDidChange * 2754: fix comment * 2754: minor naming adjustments / comments
Not sure when this started, but for a few versions now pasting some entities doesn't align them to the grid as it did before.
Here's an example, I copy and paste an monster_enforcer in latest TB, notice how its bounding box is not aligned properly to grid when I paste :
Now if open some older version of TB (2019.4 here, so not that old), if I do the same thing, it snaps as it always has :
System Information
TrenchBroom 2019.5 Build v2019.5-RC5-1-gf002ad8 Release on Windows 7.
Expected Behavior
Like it was before, snap the bounding box of the entity to the current grid setting.
Steps to Reproduce
Create a monster_enforcer (or most other entities), copy it, and paste it, notice how it's no longer aligned to the grid.
The text was updated successfully, but these errors were encountered: