Skip to content

Add optional snap & global/local coordinates controls in the 3D editor toolbar/viewport

Rafał Mikrut requested to merge github/fork/guzzard/master into master

Created by: guzzard

  • button to toggle between global and local coordinates
  • buttons to enable/disable translation, rotation, scaling snap
  • menus to quickly set common snap values
  • remove "Use Snap" in Transform menu, and add check button for snap translation, rotation, scaling
  • added simple validation of snap configuration window values
  • added icons for the new buttons that look different from the tool buttons, to not confuse users
  • added sub-menu in Translate menu to show/hide the toolbar controls + choose which side the controls should be shown (so the user can set according to preference)
  • state for snap buttons/values are saved/restored in the scene
  • state for the transform toolbar control visibility and position (left/right/viewport) is saved in the editor preferences
  • default behavior is that the controls are visible and shown to the left with the other menu controls.

3D viewport transform toolbar controls - controls demo video: https://youtu.be/pTm1JnmgFEU 3D viewport transform toolbar controls - Left/right + show/hide demo video: https://youtu.be/mLHFWdGR840

Related issue: https://github.com/godotengine/godot/issues/4850

Please review and let me know the things that need to be corrected or changed. I'm sure there are things I didn't think about since this is the first time I looked into the source code.

The scale and global/local coordinate icons are open source and without attribution. The grid and rotation icons are made by me and can be used without attribution.

Merge request reports