Commit graph

114 commits

Author SHA1 Message Date
Aaron Franke 0b6a410890 Change the default editor camera rotation to position it in +X +Y +Z
(cherry picked from commit 6c2df6792b)
2020-06-10 15:30:52 +02:00
JFonS 9828c6bc86 Keep mouse inside 3D viewport rotation widget
Hide and keep the mouse in place when the user oribts the scene via the 3D
rotation widget.

(cherry picked from commit 051f02a3a0)
2020-05-11 11:01:13 +02:00
Hugo Locurcio 93555d9ccc Add editor freelook navigation scheme settings
Depending on what one is trying to achieve, a different freelook mode
may be more desirable.

This closes #34034.

(cherry picked from commit 8a48fb3517)
2020-04-27 10:12:55 +02:00
jfons add8d1b9df Update Joint gizmos automatically
(cherry picked from commit 3e77b6d49d)
2020-04-23 11:07:32 +02:00
simpuid a10a21f407 Fixes transform gizmo position when node has default transform
Changes made:
* Added dirty bit for SpatialEditorSelectedItem's last_xform
* SpatialEditorViewport checks that dirt bit too before skipping the selection

(cherry picked from commit 19825436d4)
2020-03-25 11:38:53 +01:00
volzhs 644d49b156 Update snap setting only with OK
restore previous values with cancel

(cherry picked from commit 667a981d4d)
2020-03-25 11:30:48 +01:00
jfons 5b4251695a Add rotation widget to 3D viewport 2020-03-09 09:40:10 +01:00
Hugo Locurcio 2b9f34b867
Add a crosshair to the 3D viewport
The crosshair makes freelook navigation a bit easier, while making it
clearer that it's possible to select nodes by clicking while in
freelook mode.

The crosshair is only displayed while in freelook mode.
It uses an icon designed to be visible on any background.
2020-01-13 22:30:34 +01:00
Rémi Verschelde c0ece451e3
Merge pull request #34720 from Calinou/light-gizmo-color-by-light
Tint 3D light gizmos using the light's color
2020-01-02 13:59:10 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Hugo Locurcio ac18665c88
Tint 3D light gizmos using the light's color
This makes navigation more convenient in the 3D viewport, especially
when using the unshaded display mode.
2020-01-01 00:54:25 +01:00
Haoyu Qiu 078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Erik 8b0546d93b Implement game camera override
Implemented uniform API in Viewport class to override 2D and/or
3D camera.

Added buttons in 2D and 3D editor viewport toolbars that override
the running game camera transform with the editor viewport camera
transform. Implemented via remote debugger protocol and camera
override API.

Removed LiveEditFuncs function pointers from ScriptDebugger class.
Since the debugger got access to the SceneTree instance (if one
exists), there is no need to store the function pointers. The live
edit functions in SceneTree are used directly instead. Also removed
the static version of live edit functions in SceneTree for the same
reason. This reduced the SceneTree -> Debugger coupling too since
the function pointers don't need to be set from SceneTree anymore.

Moved script_debugger_remote.h/cpp from 'core/' to 'scene/debugger/'.
This is because the remote debugger is now using SceneTree directly
and 'core/' classes should not depend on 'scene/' classes.
2019-10-23 02:51:32 +01:00
jfons c1de7cb22e Fix calculate_spatial_bounds for selection display
Fixes `SpatialEditorPlugin::_calculate_spatial_bounds` so the displayed
selection doesn't break with transformed scenes.
2019-10-04 15:47:15 +02:00
Rémi Verschelde 076dc9803a
Merge pull request #32119 from Calinou/unify-axis-colors
Use the same axis colors consistently in the 2D and 3D editors
2019-09-25 13:03:47 +02:00
Juan Linietsky d81ddaf33e Added skin support and simplified APIs to override bone position. 2019-09-18 19:46:32 -03:00
Hugo Locurcio c2bcc3f700
Use the same axis colors consistently in the 2D and 3D editors 2019-09-13 14:08:41 +02:00
IAmActuallyCthulhu 82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
Hugo Locurcio d57680cf34
Improve the gizmo axis colors and increase the manipulator opacity
The new colors should make it easier to see the manipulator gizmo.
Highlighted gizmos are now fully opaque (instead of being white),
keeping the color information while a gizmo is highlighted.

This also adds a setting hint for the manipulator gizmo opacity
editor setting.

Axis colors were taken from Blender 2.80.

This partially addresses #16154.
2019-08-01 14:30:35 +02:00
malbach 4a218b9862 Add 'Align Rotation with View' to spatial editor 2019-07-23 15:14:03 +02:00
Nikhil Kumar 600c153076 Fixed Make 3D viewport locked nodes unselectable as in 2D viewport #29903 2019-07-16 14:19:20 +05:30
qarmin 01cc7a996b Use reference to constant in functions 2019-07-10 11:54:12 +02:00
Ignacio Etcheverry aa9908e4f6 Script API methods must return Ref<T> instead of Reference*
ptrcall assumes methods that return a Reference type do so with Ref<T>. Returning Reference* from a method exposed to the scripting API completely breaks ptrcalls to this method (it can be quite hard to debug!).
2019-07-05 09:38:28 +02:00
qarmin 4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Rémi Verschelde 5a29be31b3
Merge pull request #27188 from samH-FIT/MacroUpdate
Made use of semicolons after GDCLASS more consistent, added semicolons where I found them missing.
2019-06-19 22:59:49 +02:00
JohnJLight 38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Zach Young 7b1e112f1d Fixed navigation schemes Modo/Maya when used with grid map tile placement 2019-06-19 14:03:08 +02:00
Rémi Verschelde 78eb25a4a8
Merge pull request #27860 from Calinou/improve-3d-snapping
Make 3D snapping finer when holding Shift
2019-04-21 13:12:10 +02:00
JFonS 42043a22e8 Add grouping to 3D editor 2019-04-17 18:24:28 +02:00
Hugo Locurcio 156faf535c
Make 3D snapping finer when holding Shift
This also changes the default rotation and scale snapping increments
to better make use of fine snapping possibilities.
2019-04-09 17:57:19 +02:00
JFonS 2658e5d03d Add priority to gizmos and fix small issues
User defined gizmos will haave higher preference than editor gizmos by
default. Also fixed some inconsistencies in the gizmos menu when using
custom gizmos.
2019-03-12 00:30:50 +01:00
Juan Linietsky bfa9be85d3 Remove copy and use instance material override in gizmos, fixes #23783 2019-02-23 20:20:54 -03:00
Chaosus a51088a7f9 Fix icon color for gizmos menu when theme changed 2019-02-15 20:32:38 +03:00
JFonS e90fb5b0ab Minor fixes and documentation for Spatial Gizmos 2019-01-27 18:40:01 +01:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde ac46862097
Merge pull request #24506 from JFonS/expose_gizmos
Expose the new gizmo plugin system to scripting
2018-12-30 15:42:30 +01:00
JFonS 6b15b4f904 Expose the new gizmo plugin system to scripting 2018-12-21 23:56:39 +01:00
JFonS e5a4fa5281 Change default gizmo visibility and icons 2018-11-18 22:01:09 +01:00
Michael Alexsander Silva Dias 9d69c34990 Make "Perspective" button look like a actual clickable button 2018-10-18 22:36:59 -03:00
Rémi Verschelde dd3f6a04db
Merge pull request #21679 from pgruenbacher/spatial_editor_viewport_get_camera
added get_camera_method to spatial editor plugin viewport
2018-10-02 11:23:14 +02:00
Rémi Verschelde 876456754d
Merge pull request #21421 from YeldhamDev/mult_view_changes
Small improvements to the Spatial Editor's multiple viewport mode
2018-10-02 11:22:49 +02:00
Rémi Verschelde 2b084352b9 Fix warnings on non-static data member initializers (C++11 feature)
We're not formally using C++11 yet so those trigger compilation warnings
(at least with GCC 5):

./main/input_default.h:122:30: warning: non-static data member initializers only available with -std=c++11 or -std=gnu++11
  CursorShape default_shape = CURSOR_ARROW;
                              ^

Note: We may allow those eventually (especially for non-int static const),
but most of current occurrences were inconsistent with all other classes.

See also http://www.stroustrup.com/C++11FAQ.html#member-init
2018-09-27 10:29:48 +02:00
Ibrahn Sahir ce15cf8ebc fix branch on uninit in spatial_editor_plugin
Moved the initialisation of origin_enabled up a bit, to be inited before
it's accessed in _init_grid. A step towards cleaner valgrind output and
removes an opportunity for a random occurance of the origin/grid
z-fighting issue.

Also removed unused variable last_grid_snap to avoid later confusion.
2018-09-20 13:06:13 +01:00
paul gruenbacher 8c14cd5b69 added get_camera_method to spatial editor plugin viewport
amend

added get_camera_method to spatial editor plugin viewport
2018-09-03 14:00:21 -04:00
JFonS 4a412943d4 Fix selection of instanced scenes in 3D 2018-09-02 22:31:03 +02:00
Michael Alexsander Silva Dias 7d13f6ad30 Small improvements to the Spatial Editor's multiple viewport mode 2018-08-25 17:43:27 -03:00
Hugo Locurcio 442029b1c0
Fix the 3D grid flickering when the origin is enabled 2018-08-17 23:22:03 +02:00
Guilherme Felipe ae788125a0 Disable camera interpolation when switching scene tabs
Fix #11764
2018-08-14 19:25:27 -03:00
JFonS ac51da2eb6 Improvements on the gizmo disabling menu and icon selection bugfix 2018-08-11 23:07:00 +02:00
JFonS 59fd18ab1a New gizmo structure and new gizmo disabling menu 2018-08-09 20:58:39 +02:00