Skip to content
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

Add custom data types for angles and factors/percentages #2433

Open
Keavon opened this issue Mar 14, 2025 · 0 comments
Open

Add custom data types for angles and factors/percentages #2433

Keavon opened this issue Mar 14, 2025 · 0 comments

Comments

@Keavon
Copy link
Member

Keavon commented Mar 14, 2025

Instead of using f64 for all types of numbers, there are some with special significance.

  • Angles can be represented by degrees or radians. Our data type should encode one unambiguous value, enforcing any nodes that want to construct or read an angle to do so with an explicit choice of degrees or radians. This should replace the Transform node's rotation and X-skew/Y-skew angles, avoiding the confusion that the inputs given in the node graph aren't the user-friendly degrees set in the Properties panel. (See #2431)
  • Percentages can be represented out of 100 (percent) or 1 (factor). This distinctly represents not a quantity but a portion out of a whole, so it needs its own type. This avoids the confusion and mess caused by our current inconsistent usage of percentages and factors in various places, with uncertainty about whether those values are out of 1 or 100 when fed by the node graph. We can ensure number input widgets in range mode display the factor or percent on a per-case basis for whichever is designed to be the more logical approach, or do what Blender does and offer an app preference to display all such quantities as out of 1.00 or out of 100%.
@github-project-automation github-project-automation bot moved this to Short-Term in Task Board Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Short-Term
Development

No branches or pull requests

1 participant