Skip to content

Default UV scale for new brushes; cylinders keep their surfaces' UVs (#270) - #310

Merged
LogicalError merged 1 commit into
mainfrom
feature-270-default-uv-scale
Nov 10, 2026
Merged

LogicalError merged 1 commit into
mainfrom
feature-270-default-uv-scale

Conversation

@LogicalError

Copy link
Copy Markdown
Member

Fixes #270.

Changes

  • Default UV Scale in Chisel's Preferences (a user setting, ChiselEditorSettings.DefaultUVScale, 1 by default). Every surface of a new brush starts with that UV scale, keeping its translation and rotation.
    • ChiselDefaultUVScale.GiveTo is called wherever a new generator gets the active material: the create menu and the placement tools.
    • It sets the scale rather than multiplying it, so the placement tools giving it again while a brush is drawn doesn't compound it.
  • Cylinder UVs: a cylinder wrote its layout (caps centered, the sides one after another round it) into its surfaces' UVs on every change, which reset any UVs set on them, including the default scale.
    • It now puts the layout on when the brush is built, on top of each surface's own UVs, as the sphere does with its map. A scaled side has its offset scaled too, so the texture still runs on from side to side.
    • A surface mapped in world space keeps its own UVs.
    • A cylinder saved before held the layout in its surfaces: on load its surfaces' UVs are set back to a new surface's, so it looks the same and isn't laid out twice.

Tests

  • ChiselDefaultUVScaleTests: a new brush gets the scale on every surface, giving it again doesn't compound, and a scale of 1 leaves the surfaces as they are.
  • ChiselCylinderUVTests: the generated mesh and the brush built in the editor are laid out as before, a surface's own UVs are kept when the cylinder changes, a scaled side keeps the sides in line, and a cylinder saved before looks the same.

@LogicalError
LogicalError merged commit 7d042d9 into main Nov 10, 2026
6 checks passed
@LogicalError
LogicalError deleted the feature-270-default-uv-scale branch November 10, 2026 16:31
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.

Default UV scale for new brushes

1 participant