-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Improvements to Gradient2D Editor #70940
Improvements to Gradient2D Editor #70940
Conversation
248ef0e
to
f55cb4a
Compare
f55cb4a
to
555f1ff
Compare
d1072b1
to
42e2d9a
Compare
42e2d9a
to
61b8103
Compare
61b8103
to
e92572d
Compare
This hasn't been receiving much attention, I thought I'd do a follow-up but I might as well just finish the job of polishing it now.
These are pretty expected functionalities from a 2D editor, I don't think I need to justify them |
09d2cf0
to
31db4b9
Compare
I think the editor should update as soon as you press Ctrl. Right now it has no effect until you drag. |
acbcb61
to
e8fbb52
Compare
e8fbb52
to
60c6e8e
Compare
A bit short on time, sorry, but I think I addressed most of the remarks. Just not the static variable one, I'm not familiar with this feature, sorry- |
Example is here: godot/scene/resources/packed_scene.h Line 224 in 14c582b
It's static const , so that it's a constant that's allocated only once for the whole class (without static it's once per instance).You need to initialize it in cpp file. |
146f983
to
14f244d
Compare
I removed the implementation, I actually found it very odd when the grid appeared when you do stuff like Ctrl+Z, so I think it is reasonable to only show when you are dragging. Implement the static const thing too. Also moved drawing to a |
14f244d
to
d5428fd
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Very weird, I have no idea what could possibly be causing this, but I'll try to debug it now. The only thing relating to those functions I remember doing was using the static var and meta suggestions... |
The GradientTexture2D now gets rebuilt every time I press the snap button. I'm 90% sure this has to do with the added editor metadata causing the property tree to be updated, rebuilding this editor plugin, which shouldn't happen. Busy now but I'll fix this soon. (Unless someone fixes the underlying cause - the pointless property tree rebuilding. pls...) |
#76814 |
Ah that's true. Thanks for pointing it out. I just saw that the code for the "READY" notif was running and rebuilding the editor, so I thought this might be the problem. |
d5428fd
to
39b79bb
Compare
But it could at least update when you press Ctrl while dragging (without any movement). That's what I meant. |
Note that this also needs to be done in the Gradient editor PR. That said, I don't consider it a blocker for either PR. |
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.
Tested locally (rebased against latest master
06ccbfe), it works.
Code looks good to me at a glance.
Thanks! |
A few small tweaks to the GradientTexture2D editor.
Improvements to Undo/Redo
All of these Undo/Redo behaviors match how it is done in the CanvasItem editor.