virtualx-engine/editor
Ryan Roden-Corrent 58e8e5f219
Implement blender-style 3D transform tools.
See godotengine/godot-proposals#1215.

This adds shortcuts for blender-inspired transforms, where you can press
the key and immediately be transforming an object without holding the
mouse. Clicking commits the transformation, ESC aborts it.

This is inspired by Blender's G(rab)/R(otate)/S(cale) shortcuts, but I
decided not to add default bindings as `S` is already bound to the
regular scale tool, and it might be confusing to only bind some of them.

While actively using a transform tool, you can press X/Y/Z to lock the
transform to an axis or (shift)+X/Y/Z to constrain the transform to a
plane. These keys are only processed if you have a transform tool
(translate/rotate/scale) active _and_ the mouse button is held.

Pressing XX/YY/ZZ will lock the transform to a local (rather than
global) axis.

This is achieved by temporarily toggling the local transform button. I
did this (vs handling it in the transform functions) for 3 reasons:

- Transform logic for translate/rotate (but not scale) appears to be
  tightly coupled to the gizmo
- This ensures the gizmo changes to indicate we're transforming
  locally/globally
- Toggling the button state in the UI also gives the user feedback about
  the nature of the transform.

The original state of the button is reset when the transform completes.

Pressing the `spatial_editor/cancel_transform` shortcut key during a
transform operation will cancel the transform and reset the objects back
to their original transforms.

This functionality was already accessible by pressing RMB during a
transform, however:

- ESC is more familiar to blender users, and a more common "cancel" key
  in general.
- Given you must hold LMB during a transform, pressing RMB as well is
  clumsy if not impossible (on a laptop trackpad).
2022-01-22 20:55:39 -05:00
..
debugger Fix a node reparenting warning in the editor debugger 2022-01-17 15:10:59 +03:00
fileserver Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
icons Improve the SnapGrid editor icon 2022-01-13 23:38:28 +08:00
import Merge pull request #54794 from bruvzg/runtime_bmfont_parser 2022-01-17 13:25:08 +01:00
plugins Implement blender-style 3D transform tools. 2022-01-22 20:55:39 -05:00
translations i18n: Sync editor translations with Weblate 2022-01-12 18:45:36 +01:00
action_map_editor.cpp Merge pull request #56221 from YeldhamDev/inputmap_undo_master 2022-01-13 12:27:17 +01:00
action_map_editor.h Check if action name exists before adding it or renaming an action to it 2022-01-12 15:19:18 +00:00
animation_bezier_editor.cpp Add ViewPanner to more editors 2022-01-14 13:09:39 +01:00
animation_bezier_editor.h Add ViewPanner to more editors 2022-01-14 13:09:39 +01:00
animation_track_editor.cpp Add ViewPanner to more editors 2022-01-14 13:09:39 +01:00
animation_track_editor.h Add ViewPanner to more editors 2022-01-14 13:09:39 +01:00
animation_track_editor_plugins.cpp Use List Initializations for Vectors. 2022-01-12 10:15:12 +05:45
animation_track_editor_plugins.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
array_property_edit.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
array_property_edit.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
audio_stream_preview.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
audio_stream_preview.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
code_editor.cpp Prevent error emitting when clicking on error in code text editor 2022-01-05 08:55:33 +03:00
code_editor.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
connections_dialog.cpp Fix theming update in several editor classes 2022-01-16 14:49:03 +03:00
connections_dialog.h Merge pull request #56492 from akien-mga/remove-author-docstrings 2022-01-12 15:24:17 +01:00
create_dialog.cpp Merge pull request #55509 from V-Sekai/create_node_and_doc_fix 2022-01-17 20:16:06 +01:00
create_dialog.h Merge pull request #55509 from V-Sekai/create_node_and_doc_fix 2022-01-17 20:16:06 +01:00
dependency_editor.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
dependency_editor.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
dictionary_property_edit.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
dictionary_property_edit.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
doc_tools.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
doc_tools.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_about.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_about.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_asset_installer.cpp Remove property hints referencing unsupported svgz extension 2022-01-17 12:40:43 +01:00
editor_asset_installer.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_atlas_packer.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_atlas_packer.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_audio_buses.cpp Fix various typos 2022-01-13 23:20:01 -05:00
editor_audio_buses.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_autoload_settings.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_autoload_settings.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_builders.py Use maximum zlib compression when generating editor translation headers 2021-10-29 19:07:48 +02:00
editor_command_palette.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_command_palette.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_data.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_data.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_dir_dialog.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_dir_dialog.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_export.cpp Remove support for PVRTC texture encoding and decoding 2022-01-14 21:08:22 +01:00
editor_export.h Remove support for PVRTC texture encoding and decoding 2022-01-14 21:08:22 +01:00
editor_feature_profile.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_feature_profile.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_file_dialog.cpp Merge pull request #56706 from KoBeWi/we_need_to_go_higher 2022-01-14 21:19:34 +01:00
editor_file_dialog.h Create function focus_file_text 2022-01-12 01:34:04 +08:00
editor_file_system.cpp Prevent renaming to an unkown extension from FileSystem dock. 2022-01-17 20:03:51 +01:00
editor_file_system.h Prevent renaming to an unkown extension from FileSystem dock. 2022-01-17 20:03:51 +01:00
editor_folding.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_folding.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_fonts.cpp Merge pull request #56376 from pycbouh/theme-tombe-les-theme-properties 2022-01-06 11:33:43 +01:00
editor_fonts.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_help.cpp Generate editor docs on a thread 2022-01-07 15:17:30 +01:00
editor_help.h Generate editor docs on a thread 2022-01-07 15:17:30 +01:00
editor_help_search.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_help_search.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_inspector.cpp [Editor] Fix inspector keying signals argument count. 2022-01-07 15:48:37 +01:00
editor_inspector.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_layouts_dialog.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_layouts_dialog.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_log.cpp Fix theming update in several editor classes 2022-01-16 14:49:03 +03:00
editor_log.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_native_shader_source_visualizer.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_native_shader_source_visualizer.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_node.cpp Merge pull request #56012 from bruvzg/wt🤎4 2022-01-17 13:26:15 +01:00
editor_node.h Merge pull request #56012 from bruvzg/wt🤎4 2022-01-17 13:26:15 +01:00
editor_path.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_path.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_paths.cpp [macOS] Fix self-contained mode, by looking for ._sc_ and writing data to the bundle directory instead of executable directory. 2022-01-13 21:29:22 +02:00
editor_paths.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_plugin.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_plugin.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_plugin_settings.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_plugin_settings.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_properties.cpp [Editor] Fix inspector keying signals argument count. 2022-01-07 15:48:37 +01:00
editor_properties.h [Editor] Fix inspector keying signals argument count. 2022-01-07 15:48:37 +01:00
editor_properties_array_dict.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_properties_array_dict.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_resource_picker.cpp Rename TextureRect.expand to ignore_texture_size 2022-01-07 20:21:17 +01:00
editor_resource_picker.h Merge pull request #56321 from pycbouh/core-use-gdvirtual-everywhere 2022-01-07 16:14:28 +01:00
editor_resource_preview.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_resource_preview.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_run.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_run.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_run_native.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_run_native.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_run_script.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_run_script.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_scale.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_scale.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_sectioned_inspector.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_sectioned_inspector.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_settings.cpp Merge pull request #56012 from bruvzg/wt🤎4 2022-01-17 13:26:15 +01:00
editor_settings.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_spin_slider.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_spin_slider.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_themes.cpp Use ThorVG instead of NanoSVG for importing SVGs 2022-01-14 15:49:39 +01:00
editor_themes.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_toaster.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_toaster.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_translation.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_translation.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_translation_parser.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_translation_parser.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_vcs_interface.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_vcs_interface.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_zoom_widget.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
editor_zoom_widget.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
export_template_manager.cpp Fix decoding UTF-8 filenames on unzipping. 2022-01-05 14:31:20 +02:00
export_template_manager.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
filesystem_dock.cpp Prevent renaming to an unkown extension from FileSystem dock. 2022-01-17 20:03:51 +01:00
filesystem_dock.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
find_in_files.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
find_in_files.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
groups_editor.cpp Fix theming update in several editor classes 2022-01-16 14:49:03 +03:00
groups_editor.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
import_defaults_editor.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
import_defaults_editor.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
import_dock.cpp Fix the importer dock being blank when selecting multiple files. 2022-01-06 18:32:24 +01:00
import_dock.h Merge pull request #56240 from KoBeWi/frankenstein's_PR 2022-01-05 11:00:18 +01:00
inspector_dock.cpp Fix theming changes in the inspector 2022-01-12 16:55:41 +03:00
inspector_dock.h Merge pull request #53313 from KoBeWi/debinded_konnekt 2022-01-04 12:22:46 +01:00
localization_editor.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
localization_editor.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
multi_node_edit.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
multi_node_edit.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
node_dock.cpp Merge pull request #53313 from KoBeWi/debinded_konnekt 2022-01-04 12:22:46 +01:00
node_dock.h Merge pull request #53313 from KoBeWi/debinded_konnekt 2022-01-04 12:22:46 +01:00
plugin_config_dialog.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
plugin_config_dialog.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
pot_generator.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
pot_generator.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
progress_dialog.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
progress_dialog.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
project_export.cpp [macOS export] Improve code signing/notarization options validation. 2022-01-10 13:18:59 +02:00
project_export.h [macOS export] Improve code signing/notarization options validation. 2022-01-10 13:18:59 +02:00
project_manager.cpp Fix decoding UTF-8 filenames on unzipping. 2022-01-05 14:31:20 +02:00
project_manager.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
project_settings_editor.cpp Merge pull request #56832 from Chaosus/fix_theming 2022-01-16 16:02:22 +03:00
project_settings_editor.h Fix theming update in several editor classes 2022-01-16 14:49:03 +03:00
property_editor.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
property_editor.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
property_selector.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
property_selector.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
quick_open.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
quick_open.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
register_exporters.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
rename_dialog.cpp Fix various typos 2022-01-13 23:20:01 -05:00
rename_dialog.h Style: Remove inconsistently used @author docstrings 2022-01-04 20:42:50 +01:00
reparent_dialog.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
reparent_dialog.h Style: Remove inconsistently used @author docstrings 2022-01-04 20:42:50 +01:00
scene_tree_dock.cpp Merge pull request #55809 from cdemirer/fix-reparenting-inherited-nodes 2022-01-18 10:54:59 +01:00
scene_tree_dock.h Merge pull request #53313 from KoBeWi/debinded_konnekt 2022-01-04 12:22:46 +01:00
scene_tree_editor.cpp Fix theming update in several editor classes 2022-01-16 14:49:03 +03:00
scene_tree_editor.h Fix theming update in several editor classes 2022-01-16 14:49:03 +03:00
script_create_dialog.cpp Fix typos with codespell 2022-01-07 00:12:09 +01:00
script_create_dialog.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
SCsub i18n: Sync classref translations with Weblate 2021-11-03 15:06:09 +01:00
settings_config_dialog.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
settings_config_dialog.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
shader_create_dialog.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
shader_create_dialog.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
shader_globals_editor.cpp Optimize include files to improve shader_language.h compilation speed 2022-01-12 14:19:12 +03:00
shader_globals_editor.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
template_builders.py Improve editor template workflow 2022-01-02 21:52:09 +01:00