-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Several Gradient improvements (more interpolation modes, gradient reverse button, ...) #53321
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'd rename the "constant" mode to "nearest" to be consistent with the texture filtering mode's name. Other than that, this seems like a pretty good change to me 🙂 |
bruvzg
reviewed
Oct 4, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Geometror
force-pushed
the
gradient-improvements
branch
from
October 9, 2021 18:47
fc4250b
to
173a507
Compare
Fixed and rebased. |
bruvzg
approved these changes
Oct 10, 2021
YuriSizov
reviewed
Oct 10, 2021
Geometror
force-pushed
the
gradient-improvements
branch
2 times, most recently
from
October 12, 2021 14:21
bfc7d58
to
8fe0b10
Compare
Chaosus
reviewed
Nov 8, 2021
Geometror
force-pushed
the
gradient-improvements
branch
from
November 8, 2021 18:12
8fe0b10
to
ed0337c
Compare
I think it's fine, thanks! |
This was referenced Nov 8, 2021
fire-forge
added a commit
to fire-forge/godot
that referenced
this pull request
May 12, 2022
- Linear, Constant, and Cubic interpolation modes - Partial backport of godotengine#53321
Riordan-DC
pushed a commit
to Riordan-DC/godot
that referenced
this pull request
Jan 24, 2023
- Linear, Constant, and Cubic interpolation modes - Partial backport of godotengine#53321
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR aims to improve the Gradient resource by providing more interpolation modes, a gradient reverse button and restructuring the properties.
Implements godotengine/godot-proposals#1933 and godotengine/godot-proposals#1724
CHANGES:
Add 2 more interpolation modes to the Gradient resource:
Add reverse gradient function and the corresponding button to the inspector plugin
Restructured/cleaned up gradient properties (offsets and colors which are used rarely are now in a collapsed group called "raw data"
Use GradientTexture for the preview of the inspector gradient editor (reduce code and gain flexibility, no visual difference)
Fix gradient inspector plugin not updating when properties are changed
CURRENT MASTER:
THIS PR:
Note:
I know, a custom button is a bit overkill but I ran into a problem when using the normal button because the icon stayed invisible when it was set with
btn->set_icon(get_theme_icon(...))
inEditorInspectorPlugin::parse_begin()
[only if an svg icon is used, which is rendered at startup, so I guess the svg icons weren't rasterized yet] Furthermore, I couldn't find an easy way to update the icon of the button after a theme change which didn't involve lots of passthrough-functions.If someone has an idea how to solve this with a general button let me know, but for now I think its fine (and even more light-weight since there is no TextParagraph instantiated).
As always, feedback is welcome :)