Nodes: make spacings unitless in String to Curves node #106660

Merged
Erik Abrahamsson merged 1 commits from pioverfour/blender:dp_gn_str_2_curve_unitless into main 2023-04-24 18:31:32 +02:00
Member

The String to Curves node allows selecting various metrics for the
characters. Size is the absolute height between two lines, and is
correctly marked as a distance. Character, Word and Line Spacing, on
the other hand, do not represent any distance, but are proportional to
the base size.

To make sure of this issue, try the following:

  • using Metric as the unit system, create a String to Curves node,
    input a multi-line string into it and plug it into the output. Its
    size is 1m, as well as all its spacings.
  • Now set its size to 2m. The spacings are still 1m, yet they have all
    doubled, in proportion to the basic size.
  • Now set the unit system to Imperial and the length unit to Miles.
    Reset the size to 1 mi. The spacings are still at 1m = 0.000621 mi,
    which doesn't correspond to any measurement.
  • Reset the Line Spacing to 1 mi and the second line of text is now
    many miles away.
  • In fact a crash now occurs when trying to Frame Selected (numpad .).

This PR simply removes the properties' PROP_DISTANCE subtype.


An example of an issue when changing units from the default meters to feet:

image

The String to Curves node allows selecting various metrics for the characters. Size is the absolute height between two lines, and is correctly marked as a distance. Character, Word and Line Spacing, on the other hand, do not represent any distance, but are proportional to the base size. To make sure of this issue, try the following: - using Metric as the unit system, create a String to Curves node, input a multi-line string into it and plug it into the output. Its size is 1m, as well as all its spacings. - Now set its size to 2m. The spacings are still 1m, yet they have all doubled, in proportion to the basic size. - Now set the unit system to Imperial and the length unit to Miles. Reset the size to 1 mi. The spacings are still at 1m = 0.000621 mi, which doesn't correspond to any measurement. - Reset the Line Spacing to 1 mi and the second line of text is now many miles away. - In fact a crash now occurs when trying to Frame Selected (numpad .). This PR simply removes the properties' `PROP_DISTANCE` subtype. ----- An example of an issue when changing units from the default meters to feet: ![image](/attachments/426e8348-e853-43e8-8add-a59573da467a)
276 KiB
Damien Picard added the
Interest
Geometry Nodes
Module
Nodes & Physics
labels 2023-04-07 13:44:37 +02:00
Damien Picard added 1 commit 2023-04-07 13:44:42 +02:00
6b8cf31e93 Nodes: make spacings unitless in String to Curves node
The String to Curves node allows selecting various metrics for the
characters. Size is the absolute height between two lines, and is
correctly marked as a distance. Character, Word and Line Spacing, on
the other hand, do not represent any distance, but are proportional to
the base size.

To make sure of this issue, try the following:
- using Metric as the unit system, create a String to Curves node,
  input a multi-line string into it and plug it into the output. Its
  size is 1m, as well as all its spacings.
- Now set its size to 2m. The spacings are still 1m, yet they have all
  doubled, in proportion to the basic size.
- Now set the unit system to Imperial and the length unit to Miles.
  Reset the size to 1 mi. The spacings are still at 1m = 0.000621 mi,
  which doesn't correspond to any measurement.
- Reset the Line Spacing to 1 mi and the second line of text is now
  many miles away.
- In fact a crash now occurs when trying to Frame Selected (numpad .).

This PR simply removes the properties' `PROP_DISTANCE` subtype.
Damien Picard requested review from Erik Abrahamsson 2023-04-23 21:37:04 +02:00
Erik Abrahamsson approved these changes 2023-04-23 23:33:43 +02:00
Erik Abrahamsson left a comment
Member

Looks good, it definitely makes more sense to have them unitless.

Looks good, it definitely makes more sense to have them unitless.
Author
Member

Looks good, it definitely makes more sense to have them unitless.

Cool, thanks! Can you commit this or should I ask another developer?

> Looks good, it definitely makes more sense to have them unitless. Cool, thanks! Can you commit this or should I ask another developer?
Iliya Katushenock added
Interest
User Interface
and removed
Module
Nodes & Physics
labels 2023-04-24 18:12:25 +02:00
Iliya Katushenock added this to the Nodes & Physics project 2023-04-24 18:12:28 +02:00
Erik Abrahamsson merged commit 4f08eeae9c into main 2023-04-24 18:31:32 +02:00
Damien Picard deleted branch dp_gn_str_2_curve_unitless 2023-04-24 18:32:42 +02:00
Howard Trickey referenced this issue from a commit 2023-05-29 02:51:44 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#106660
No description provided.