Commit transforms done with editor gizmo on tool mode switch. #86930
Conversation
|
When making several additions from suggestions please use the batch feature, it's next to the commit one 🙂 |
Thanks 😅 |
0b273b6 to
e683970
Compare
|
Changes made and tested. Thanks for your help AThousandShips. Edit: Nevermind I missed one... |
e683970 to
0748cbc
Compare
|
Ok, I think it's good. Let me know if I missed anything. |
caa0f64 to
47561b4
Compare
47561b4 to
9ad681d
Compare
Calinou
left a comment
There was a problem hiding this comment.
Tested locally (rebased on top of master 4d1f26e), it works as expected. Code looks good to me.
Note that Blender's behavior is to cancel the manipulation instead of commit it here, so it differs, but I personally prefer the new behavior here. It enables you to translate then rotate something in a single operation, something that is not possible in Blender.
9ad681d to
92c0425
Compare
92c0425 to
bd4be8a
Compare
bd4be8a to
aab78e5
Compare
|
The code could be simpler if you just called |
aab78e5 to
9187a8f
Compare
Totally possible, not sure what I was looking at when I originally wrote this PR a couple years back lol |
| } | ||
|
|
||
| void CanvasItemEditor::_button_tool_select(int p_index) { | ||
| _commit_drag(); |
There was a problem hiding this comment.
You could check if drag_type isn't DRAG_NONE. While calling the method unnecessarily has no adverse effects, it's better to avoid it.
9187a8f to
9b0b9ef
Compare
|
Thanks! |
Supplementary but not dependent on: #86805 and #86804
This affects 2D and 3D.
Currently you can switch gizmo tool modes while an edit is in progress, the tool will switch, but the previous tools action will continue, which is a bit strange.
2024-09-03.12-44-45.mp4
This PR will prevent this, by committing the transform in the editor when switching tool modes which seems like the more expected and less confusing result.
2024-09-03.12-52-22.mp4