-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 a button to clear curve points in the Path2D editor #81325
Add a button to clear curve points in the Path2D editor #81325
Conversation
It's a bit more of a "danger" action and also the only one that does what you need in one click instead of needing to interact with the 2D editor. Maybe it should be in the Options dropdown instead? |
I'm trying to close all the possibilities of undo_redo first (the hard part of the pr) to discuss this. I believe that the button is so different from the others and the user can still use ctrl+z. |
I think moving to to Options menu is better for 2 reasons:
|
You need to resolve the conflicts |
This comment was marked as outdated.
This comment was marked as outdated.
Just finished. It's ready for review. |
The implementation looks alright, but not sure about the auto mode change. It might be annoying when editing multiple paths and you want to use another tool. Also the clear operation doesn't need confirmation, because you can undo it. |
I agree with the auto mode change part. In fact, when editing multiple curves you may want to stick with the same mode. I'm going to remove it at least from the part when you select the Path2D node in the editor. As a user, I can say that leaving this button exposed in the editor is very important. This may prevent someone from intuitively selecting all the curve points on the screen and pressing delete. Action that would attempt to delete the node from the tree. |
The second part of this comment was not addressed: #81325 (comment) |
As I said before, leaving this button exposed is important because without it the user will not know how to clear the points. The confirmation dialog is necessary as the button will be exposed to users; furthermore, it resembles the node deletion action. |
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.
The implementation looks ok.
Feature has no proposal.
This comment was marked as off-topic.
This comment was marked as off-topic.
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.
Seems useful to me.
Thanks! |
Hmm should this be happening?? issue.mp4Godot 4.3 dev 5 |
That's #89781 |
get_points
function inscene\resources\curve.h
.clear_curve_points
andrestore_curve_points
to handle the undo_redo system in the editor\plugins\path_2d_editor_plugin.h.MODE_EDIT
when entering the Path2D node, if a curve has already been created.MODE_CREATE
if the curve is valid, but empty.