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

[Editor] Add support for displaying unsigned integers in the inspector #89529

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AThousandShips
Copy link
Member

@AThousandShips AThousandShips commented Mar 15, 2024

Added these hints to shader uniforms, which is what inspired this improvement

Also made improvements to handling of vector inspector

Still in progress with some details to work out, but basically ready, works well with the specific use case, limited at the moment but useful for the specific use of handling shaders, where editing unsigned values is very difficult from the editor

Considering it a feature, but it technically covers a broken or missing editor feature, I think it speaks for itself in this format, but can open a proposal if desired, but I don't think there's anything more to discuss except implementation details

It's of very limited use for int but for PackedInt32Array and Vector2/3/4i it's very potent

See for background:


Added these hints to shader uniforms, which is what inspired this
improvement

Also made improvements to handling of vector inspector
@@ -2764,7 +2764,7 @@
<constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint">
Hints that an [int] or [float] property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_less"[/code] to allow manual input going respectively above the max or below the min values.
[b]Example:[/b] [code]"-360,360,1,or_greater,or_less"[/code].
Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians_as_degrees"[/code] for editing radian angles in degrees (the range values are also in degrees), [code]"degrees"[/code] to hint at an angle and [code]"hide_slider"[/code] to hide the slider.
Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians_as_degrees"[/code] for editing radian angles in degrees (the range values are also in degrees), [code]"degrees"[/code] to hint at an angle and [code]"hide_slider"[/code] to hide the slider, and [code]"display_unsigned"[/code] to allow signed integers to be displayed as unsigned (this is especially useful with [PackedInt32Array]).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians_as_degrees"[/code] for editing radian angles in degrees (the range values are also in degrees), [code]"degrees"[/code] to hint at an angle and [code]"hide_slider"[/code] to hide the slider, and [code]"display_unsigned"[/code] to allow signed integers to be displayed as unsigned (this is especially useful with [PackedInt32Array]).
Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians_as_degrees"[/code] for editing radian angles in degrees (the range values are also in degrees), [code]"degrees"[/code] to hint at an angle, [code]"hide_slider"[/code] to hide the slider, and [code]"display_unsigned"[/code] to allow signed integers to be displayed as unsigned (this is especially useful with [PackedInt32Array]).

"and" appears twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Editor interpreting unsigned uvec shader uniform parameters as signed
2 participants