Skip to content

Scale the glyph-size slider and auto size to the shape's overall size#2599

Open
akenmorris wants to merge 1 commit into
masterfrom
amorris/2459-glyph-slider-scale
Open

Scale the glyph-size slider and auto size to the shape's overall size#2599
akenmorris wants to merge 1 commit into
masterfrom
amorris/2459-glyph-slider-scale

Conversation

@akenmorris

Copy link
Copy Markdown
Contributor

Resolves #2459

The glyph-size slider mapped its [1, 100] range to a fixed world-unit range of [0.1, 10], and the auto glyph size was clamped to the same fixed [0.1, 10]. So on abnormally small or large shapes both hit those limits well before reaching a usable size.

Scale both to the shape's largest dimension instead: Session exposes get_glyph_size_scale() (the largest X/Y/Z extent), the slider maps to [0.1%, 10%] of it (step = scale / 1000), and the auto size is clamped to the same [0.1%, 10%] range. A shape whose largest dimension is 100 behaves identically to before, with a fallback to that mapping when no shape is loaded. Also round the displayed glyph size to 3 significant figures.

…#2459)

The glyph-size slider mapped its [1, 100] range to a fixed world-unit range of
[0.1, 10], and the auto glyph size was clamped to the same fixed [0.1, 10]. So
on abnormally small or large shapes both hit those limits well before reaching
a usable size.

Scale both to the shape's largest dimension instead: Session exposes
get_glyph_size_scale() (the largest X/Y/Z extent), the slider maps to
[0.1%, 10%] of it (step = scale / 1000), and the auto size is clamped to the
same [0.1%, 10%] range. A shape whose largest dimension is 100 behaves
identically to before, with a fallback to that mapping when no shape is loaded.
Also round the displayed glyph size to 3 significant figures.
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.

Studio: Glyph Slider needs to dynamically adjust to overall shape scale

1 participant