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

Added alternate key binding setting and updated documentation #509

Merged

Conversation

jesus-g20
Copy link
Contributor

@jesus-g20 jesus-g20 commented Oct 4, 2024

This pull request adds a new editor setting (config/alternate_key_binding) to toggle between ALT+LMB and RMB for terrain editing operations. Documentation has also been updated to reflect this new option.


Admin edit
Fixes #441

jesus Outdated Show resolved Hide resolved
@TokisanGames TokisanGames added this to the Beta 0.9.x milestone Oct 6, 2024
@TokisanGames
Copy link
Owner

TokisanGames commented Oct 6, 2024

I've made my change, renaming lift_flatten to modifier_alt. This means ALT is pressed.

You can now rebase your PR git pull --rebase upstream main and continue fixing your implementation, then force push into this branch.

Don't duplicate the operation function calls. All you need to do is swap the functionality of ALT and RMB. If in alternate keybind mode then when MOUSE_BUTTON_RIGHT is checked instead check ALT, and vice versa.

Some references are embedded in conditionals. It might be best to check alternate mode at the beginning of such a function, then check the appropriate button and set a boolean. Then all other conditionals in that function can just check the boolean.

Also it's not ideal to check something with a string in a function that's called continuously like mouse motion input. editor_settings.get_setting("config/alternate_key_binding"). Instead call this in editor._edit() and set a variable so during mouse motion only a boolean is checked.

We'll release when all of the items in the 0.9.3 column on the roadmap are completed.

@TokisanGames TokisanGames added enhancement New feature or request usability UI interface labels Oct 6, 2024
@TokisanGames TokisanGames self-assigned this Oct 21, 2024
@TokisanGames
Copy link
Owner

TokisanGames commented Oct 21, 2024

I'm taking over this PR so we can get it implemented. I've reviewed the 3D navigation scheme key bindings and compared with Terrain3D operations:

Godot

Operation Binding
Orbit MMB
Cam Rotate RMB
Pan SHIFT+MMB
Zoom Wheel

Maya

Operation Binding
Orbit ALT+LMB
Cam Rotate RMB
Pan MMB (documented but doesn't work in 4.2)
Pan(fast) SHIFT+MMB
Zoom ALT+RMB, Wheel

Modo

Operation Binding
Orbit ALT+LMB
Cam Rotate RMB
Pan ALT+SHIFT+LMB
Zoom ALT+CTRL+LMB

Terrain3D

Operation Binding
Apply LMB
Inverse CTRL+LMB
Smooth SHIFT+LMB
Alt ALT+LMB

Alt is used for lifting floors, flattening peaks, and inversing the slope filter.

What I've concluded is that MMB and RMB are occupied for most keymappings. So rather than change our Alt mode to block a different Godot feature, it's best to move it to an unoccupied spot. I'm allowing specifying what we use for an Alt modifier key with: Alt, Space, Meta, Capslock.

@TokisanGames TokisanGames force-pushed the feature-alternate-keybinding branch from 473d400 to da85f62 Compare October 21, 2024 15:51
@TokisanGames TokisanGames force-pushed the feature-alternate-keybinding branch from da85f62 to 79e2e79 Compare October 21, 2024 16:08
@TokisanGames TokisanGames merged commit a03227c into TokisanGames:main Oct 21, 2024
12 checks passed
@TokisanGames
Copy link
Owner

Thanks for the start on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request usability UI interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add option to toggle key bindings for Maya
2 participants