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

Add separate button for painting in the grid map editor #97664

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ItsVeryWindy
Copy link

@ItsVeryWindy ItsVeryWindy commented Sep 30, 2024

This changes the Node3DEditor to make the list of tools extensible, so that editors that inherit from it can add additional "modes" that can work alongside the existing tools (select/move/rotate etc.) without one taking priority over the other.

This adds a separate button for painting. This button can either be selected manually or will automatically be selected when something is selected from the palette. Only when the button is selected can things be placed and the associated shortcuts will work.

This is designed to solve issues like the following, as you can either paint, or fiddle with the gizmo or move the camera, but won't them to conflict as the gizmo won't be visible when painting, and when using the gizmo there isn't a chance of accidently painting instead.
#74520
#19860
#17499

If a selection is active, currently clicking with something from the selected from the palette will allow you to paint whilst the selection is active, clicking without something selected causes you to be booted out of the grid map. The selection will now be removed if intending to paint, or if clicking occurs without something selected it will just remove the selection without being booted out of the grid map.

@ItsVeryWindy ItsVeryWindy requested review from a team as code owners September 30, 2024 22:45
@fire fire changed the title add separate button for painting in the grid map editor Add separate button for painting in the grid map editor Sep 30, 2024
@Chaosus Chaosus added this to the 4.4 milestone Oct 4, 2024
@ItsVeryWindy ItsVeryWindy requested a review from a team as a code owner October 19, 2024 09:29
@kitbdev
Copy link
Contributor

kitbdev commented Oct 19, 2024

It seems that one also adds a paint mode button, so I'm not sure how much overlap there is.

@ItsVeryWindy
Copy link
Author

I did actually look at that one, at the moment I believe the only overlap is that we both add paint buttons, and probably the thing will selections becomes redundant. There are some differences as to how we handle when escape is pressed, and this is intended to preserve the usage of the gizmos, rather than other methods I've seen which either remove them completely or disable their functionality.

@Nodragem
Copy link
Contributor

I did actually look at that one, at the moment I believe the only overlap is that we both add paint buttons, and probably the thing will selections becomes redundant. There are some differences as to how we handle when escape is pressed, and this is intended to preserve the usage of the gizmos, rather than other methods I've seen which either remove them completely or disable their functionality.

Nice to see someone else working on the Gridmap! 🚀

As part of moving the Gridmap to the bottom panel, I added a button group to toggle between transform, selection, paint, erase, and pick mode. In transform mode, the 3D editor's transform gizmo is visible and the inputs are passed to the 3D editor. In other modes, the transform gizmo is hidden and the input aren't passed to the 3D editor. We can toggle the transform mode with T. For some reasons, the videos I have made aren't working, but I can try to upload them again.

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.

4 participants