Fix extrude/solidify default step and inset UV computation#3545
Open
nklbdev wants to merge 1 commit into
Open
Conversation
✅ Deploy Preview for blockbench-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
b84b13a to
bb1c2fc
Compare
bb1c2fc to
0b5449d
Compare
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.
1. Extrude, Solidify, and Spline Extrude — default step from grid settings
The initial extrude distance was hardcoded to
1, ignoring the user's grid snap settings. Now it usesgetSpatialInterval(), so the default matches the configured Grid Resolution (or Shift/Ctrl resolution when held).extend = 1extend = getSpatialInterval()extend = 1extend = getSpatialInterval()extend = 1extend = getSpatialInterval()The amend sliders also start at the spatial interval instead of
1.2. Inset — correct UV for the central face
The central face UVs were computed by simply copying old UVs to new vertex positions, ignoring the displacement caused by the inset. This is now fixed by calling
face.localToUV(new_position)before modifying the face — so the reference triangle UVs are still intact and barycentric interpolation produces correct results.Additionally, the
UVEditor.setAutoSize()call at the end of the operation was removed.setAutoSizerecomputes UVs from scratch based on 3D geometry, overwriting the correctly interpolated UVs with clamped values. It is a user-facing tool ("Auto UV" button) and does not belong as an automatic post-processing step in mesh edit operations.