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

Port transformation window to 2D #37828

Closed
wants to merge 1,719 commits into from
Closed

Conversation

MarcusElg
Copy link
Contributor

@MarcusElg MarcusElg commented Apr 12, 2020

Proposal: godotengine/godot-proposals#1690

The transformation window is very useful if you quickly want to move something 10 units away for example so I've started the work of porting it to 2D. Spending all day on this and trying many different ways I finally got it working.

image

EDIT: Undo support has now been added so it would be great if someone could review this because I'm sure the code can be inproved!

@MarcusElg
Copy link
Contributor Author

Updated to add undo support :D

@realkotob
Copy link
Contributor

The changes look good to me 👍

@MarcusElg
Copy link
Contributor Author

MarcusElg commented May 1, 2020

@KoBeWi who would be the right person to review such a pr?

@KoBeWi KoBeWi requested a review from groud May 1, 2020 11:55
@groud
Copy link
Member

groud commented May 1, 2020

Hmm, I am not sure about how useful is the feature in the current state.

Considering that what it does is simply modifying the properties themselves and provides no "common transform" for all selected objects. What you have here is simply equivalent to do adding an amount to the property in the inspector. For example, you can select your object rotation's property and append "+10" at the end of the property to increase the rotation of 10 degrees. So there is not need for such a panel for single objects.

The only thing it brings is the possibility to do that over several objects, which, IMHO, should be something handled better by the inspector. Something like a variable name when you select several node so that you can do operations with the value. (Adding 10 to the rotation of each node should be possible then)

An other solution might be to make the panel able to use a single transform to apply to all nodes. Like rotating all selected nodes around a given pivot. But this is quite difficult to implement, as I did not manage to do it for the basic rotation tool.

Anyway, this is definitely not my preferred way of allowing multiple nodes transform, but until we implement a way to apply an operation on a property of several nodes, I guess this could be added.
I would rather discuss that in a PR meeting first though.

@MarcusElg
Copy link
Contributor Author

MarcusElg commented May 1, 2020

Hmm, I am not sure about how useful is the feature in the current state.
Considering that what it does is simply modifying the properties themselves and provides no "common transform" for all selected objects. What you have here is simply equivalent to do adding an amount to the property in the inspector. For example, you can select your object rotation's property and append "+10" at the end of the property to increase the rotation of 10 degrees. So there is not need for such a panel for single objects.
The only thing it brings is the possibility to do that over several objects, which, IMHO, should be something handled better by the inspector. Something like a variable name when you select several node so that you can do operations with the value. (Adding 10 to the rotation of each node should be possible then)
An other solution might be to make the panel able to use a single transform to apply to all nodes. Like rotating all selected nodes around a given pivot. But this is quite difficult to implement, as I did not manage to do it for the basic rotation tool.
Anyway, this is definitely not my preferred way of allowing multiple nodes transform, but until we implement a way to apply an operation on a property of several nodes, I guess this could be added.
I would rather discuss that in a PR meeting first though.

@groud
Sure it may not be the best way (idk) but I feel like such a system should be consistent between 3D and 2D and as this feature has long been accepted for 3D so it should work in 2D. Don't you want consistency as well when it comes to similar systems?

@groud
Copy link
Member

groud commented May 1, 2020

Sure it may not be the best way (idk) but I feel like such a system should be consistent between 3D and 2D and as this feature has long been accepted for 3D so it should work in 2D. Don't you want consistency as well when it comes to similar systems?

Feature parity it is not needed for consistency if one of the two parts does not need it.
The transform panel is useful in 3D because transforms can be much more difficult to handle. As in 3D rotations might be done in different orders, there is no simple way to transform object as you wish simply by modifying their properties. In 2D, this is significantly easier, so the need for a dedicated panel is more limited.

The toolbar being already crowded (specifically when you have editor plugins activated, like for tilemaps or control nodes), we have to be conservative about what we add in this toolbar.

@MarcusElg
Copy link
Contributor Author

Sure it may not be the best way (idk) but I feel like such a system should be consistent between 3D and 2D and as this feature has long been accepted for 3D so it should work in 2D. Don't you want consistency as well when it comes to similar systems?

Feature parity it is not needed for consistency if one of the two parts does not need it.
The transform panel is useful in 3D because transforms can be much more difficult to handle. As in 3D rotations might be done in different orders, there is no simple way to transform object as you wish simply by modifying their properties. In 2D, this is significantly easier, so the need for a dedicated panel is more limited.
The toolbar being already crowded (specifically when you have editor plugins activated, like for tilemaps or control nodes), we have to be conservative about what we add in this toolbar.

Ok bring it up on the pr meeting and let me know!

@MarcusElg
Copy link
Contributor Author

@groud shouldn't you add the for pr meeting tag so people know?

@MarcusElg
Copy link
Contributor Author

@aaronfranke have you still not had that meeting?

@groud
Copy link
Member

groud commented Oct 14, 2020

Ah sorry, that's not really my fault but we kind of reorganized our workflow to focus on proposals now. I'll ask on IRC right now, but in any case I'll add it to the next proposal review meeting.

@fire
Copy link
Member

fire commented Oct 14, 2020

Is it possible to rebase this on master? I don't have enough effort to rebase it correctly. Busy :(

@aaronfranke
Copy link
Member

@MCrafterzz The last PR review meeting was 6 months ago in April, you'll need to ask @akien-mga when there will be more. Anyway, as @fire said, you should rebase this onto master for easier testing and to make sure it still works.

Calinou and others added 8 commits October 19, 2020 07:51
Use popup_dialog() instead of popup_centered() to show edit dialog/

With popup_centered it is not possible to change the displayed
signal name. When this is not set the previous shown name is show
for the current dialog.

This is no problem when creating a new conenction as popop_dialog
is used there and this would update the title.

Fixes godotengine#42074
Allows to override printing via C++, not only via script.
Calinou and others added 15 commits October 19, 2020 07:51
This closes godotengine#42820.

Co-authored-by: Clay John <claynjohn@gmail.com>
Adds unit tests for command_queue_mt.h/cpp
In this revision, some unit tests will fail due to issue godotengine#42107.
This patch fixes two related issues. One is the race condition in issue godotengine#42107..
The other is a crash which happens when the reader is lapped near the end of the buffer.
Removed make_binders and the old style generated binders.
Instead of breaking the whole trace when encountering the sky/camera far clip, continue tracing and check if "hits" are sky/far clip or not. Prevents some objects not being reflected due to gaps.
@MarcusElg
Copy link
Contributor Author

MarcusElg commented Oct 19, 2020

Failed rebase again. Apparently Git forks rebase button doesn't work correctly :C

EDIT: Multiple things in the code no longer work so I'll create a proposal that can be discussed and create a new pr if it get enought support so that I acually follow the intended workflow this time :P. Here is the link: godotengine/godot-proposals#1690

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.