Commit graph

179 commits

Author SHA1 Message Date
Rémi Verschelde
d3c9726835
Merge pull request #50046 from Calinou/editor-camera-preview-allow-view-menu
Allow using the 3D editor's View menu while previewing a camera
2021-07-05 14:14:53 +02:00
reduz
6c55d2aad2 Fix Render Info
* Fixed and redone the process to obtain render information from a viewport
* Some stats, such as material changes are too difficult to guess on Vulkan, were removed.
* Separated visible and shadow stats, which causes confusion.
* Texture, buffer and general video memory can be queried now.
* Fixed the performance metrics too.
2021-07-03 10:15:04 -03:00
Rémi Verschelde
ad8a2b3d52
Merge pull request #50040 from reduz/fix-renderingserver-bindings
Clean up RenderingServer and its bindings
2021-07-01 15:17:33 +02:00
reduz
37776b2867 Clean up RenderingServer and its bindings
* Rewrote bindings for RenderingServer.
* They are now all up to date.
* Several unused methods and deprecated features were cleaned up.
2021-07-01 09:07:36 -03:00
Hugo Locurcio
fab3d136e0
Allow using the 3D editor's View menu while previewing a camera
This is already allowed when using cinematic preview, but not
when previewing a Camera3D the usual way.

Many operations from the View menu still work while previewing
a camera, such as switching between debug draw modes and toggling
information panes.
2021-07-01 12:43:53 +02:00
Hugo Locurcio
b7bb84bf46
Add keyboard shortcuts for grouping and locking nodes, change grid toggle
- Locking nodes can now be done by pressing Ctrl + L, and unlocking with
  Ctrl + Shift + L.
- Grouping nodes is now done by pressing Ctrl + G, and ungrouping with
  Ctrl + Shift + G (similar to Inkscape).
- Toggling the grid is now done by pressing the `#` key
  (also similar to Inkscape). This change was needed as Ctrl + G
  now groups selected nodes.

Different shortcuts are used for the lock/unlock and group/ungroup
actions, so that the shortcuts are idempotent.
2021-06-30 23:09:26 +02:00
reduz
75688772b3 Fix editor suffixes and degrees conversion
* Functions to convert to/from degrees are all gone. Conversion is done by the editor.
* Use PROPERTY_HINT_ANGLE instead of PROPERTY_HINT_RANGE to edit radian angles in degrees.
* Added possibility to add suffixes to range properties, use "min,max[,step][,suffix:<something>]" example "0,100,1,suffix:m"
* In general, can add suffixes for EditorSpinSlider
Not covered by this PR, will have to be addressed by future ones:

* Ability to switch radians/degrees in the inspector for angle properties (if actually wanted).
* Animations previously made will most likely break, need to add a way to make old ones compatible.
* Only added a "px" suffix to 2D position and a "m" one to 3D position, someone needs to go through the rest of the engine and add all remaining suffixes.
* Likely also need to track down usage of EditorSpinSlider outside properties to add suffixes to it too.
2021-06-30 12:38:25 -03:00
Rémi Verschelde
8fb7a9f023
Merge pull request #49719 from LightningAA/rename-node-is-ancestor-of
Rename `is_a_parent_of()` to `is_ancestor_of()`
2021-06-29 12:07:25 +02:00
Hugo Locurcio
2cc053c64b
Use Ctrl + G to toggle the 3D editor grid visibility by default
The 2D editor grid toggle shortcut has been changed to use
`KEY_MASK_CMD` for consistency. This means it will now use Cmd
on macOS instead of Ctrl.
2021-06-24 20:01:47 +02:00
Lightning_A
899e5f8685 Rename is_a_parent_of() to is_ancestor_of() 2021-06-21 08:39:28 -06:00
Aaron Franke
0ce49800ac
Use mouse and joypad enums instead of plain integers
Also MIDIMessage
2021-06-20 11:54:24 -04:00
Lightning_A
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Aaron Franke
6565191660
Allow setting the preview sun angle with numbers 2021-06-17 23:28:02 -04:00
reduz
ab2456b740 Rename VisibilityNotifierXD to VisibleOnScreenNotifierXD
* Renames for 2D and 3D
* Class name was confusing, given both 2D and 3D have a "visible" property that is unrelated to actual on-screen visibility.
* New name makes it clear that this is about visibility on screen.
2021-06-16 22:01:39 -03:00
Rémi Verschelde
272a16d8ce
Merge pull request #49667 from Riteo/remove-grid-map-lock-view
Remove GridMap's "Lock View" option and a related method.
2021-06-17 01:03:17 +02:00
Riteo Siuga
7cb3476a1c
Remove GridMap's "Lock View" option and a related method.
Apparently this feature utilized a completely commented out 7+ years old
method, effectively doing nothing. Since it was designed with a completely
different editor design in mind it is pretty much incompatible and as such
it's best to remove it for now.
2021-06-16 04:14:37 +02:00
Rémi Verschelde
acdcd37ad2
Merge pull request #49003 from Calinou/editor-freelook-fix-redrawing-when-not-moving
Fix editor constantly redrawing when freelook is active with still camera
2021-06-15 16:27:08 +02:00
Rémi Verschelde
9f8d892e4e
Merge pull request #49310 from foxydevloper/add-drag-threshold-select-mode
Prevent accidental drags by adding drag distance threshold
2021-06-15 15:34:28 +02:00
Rémi Verschelde
6d98f84abb
Merge pull request #48746 from KoBeWi/bane_of_all_virtual_compatibility
Consistently prefix bound virtual methods with _
2021-06-12 23:00:40 +02:00
Hugo Locurcio
d1c5dd5b68
Fix game camera override tooltips being swapped
Previously, the wrong tooltip was shown.

This also tweaks the tooltips' texts to be clearer and remove
references to "game" (since Godot is used for more than just games).
2021-06-12 19:39:34 +02:00
kobewi
7ff135b015 Consistently prefix bound virtual methods with _ 2021-06-12 00:55:52 +02:00
reduz
32625145c8 Rename GI Classes
* GIProbe is now VoxelGI
* BakedLightmap is now LightmapGI

As godot adds more ways to provide GI (as an example, SDFGI in 4.0), the different techniques (which have different pros/cons) need to be properly named to avoid confusion.
2021-06-05 09:28:56 -03:00
fox
00a4ee5cf3 Add threshold to dragging nodes with select to prevent accidental drags 2021-06-04 11:39:46 -04:00
Marcel Admiraal
a6e44bd16c Rename Node3D's property translation to position 2021-06-04 09:54:52 +01:00
Aaron Franke
de3f6699a5
Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
Hugo Locurcio
21807f8d88
Fix editor constantly redrawing when freelook is active with still camera
The editor only needs to redraw when the camera is moving.

This helps preserver battery life on laptops when using freelook,
especially with the toggle mode (Shift + F).
2021-05-23 19:50:53 +02:00
jfons
e70e33ddcf Fix swapped front/rear directions in viewport rotation control. 2021-05-20 16:28:38 +02:00
Lightning_A
97fecd1b69 Rename "Control" key to "Ctrl" and add "_pressed" suffix to all InputEventWithModifiers properties/methods 2021-05-07 14:00:50 -06:00
Hugo Locurcio
60b70c77e0
Improve the editor theme
The editor theme now makes use of rounded corners and less borders
to follow modern visual trends.

The default theme's colors were also tweaked to make the blue hue
more subtle (similar to the Arc theme, which was removed as a
consequence). The Alien theme was replaced by a Breeze Dark theme,
which should blend in well with the KDE theme.
2021-04-27 22:38:26 +02:00
jfons
4d9d99bb82 Implement occlusion culling
Added an occlusion culling system with support for static occluder meshes.
It can be enabled via `Project Settings > Rendering > Occlusion Culling > Use Occlusion Culling`.

Occluders are defined via the new `Occluder3D` resource and instanced using the new
`OccluderInstance3D` node. The occluders can also be automatically baked from a
scene using the built-in editor plugin.
2021-04-23 21:45:23 +02:00
Rémi Verschelde
2e87857d75
Merge pull request #47629 from Calinou/editor-allow-center-selection-without-selection
Allow Center Selection to work without any selection in 2D/3D editors
2021-04-16 12:47:47 +02:00
Haoyu Qiu
c8a40c8005 Fix 3D selection box size for Node3D 2021-04-11 15:15:52 +08:00
Aaron Franke
b8f66d58b6
Show a message when trying to zoom farther than the limit 2021-04-09 11:21:09 -04:00
Rémi Verschelde
8ca8868ef9
Merge pull request #47733 from Calinou/editor-tweak-frame-time-display
Tweak frame time display in the editor
2021-04-09 15:37:02 +02:00
Hugo Locurcio
88518d28ba
Tweak frame time display in the editor
- Pad decimal values to avoid layout shifts when the frame time
  changes.
- Cap values to 0.01 milliseconds to avoid division by zero
  in the FPS counter.
2021-04-09 14:58:24 +02:00
Haoyu Qiu
879a290ed9 Fixes Node3D rotation in select mode on macOS 2021-04-09 12:31:26 +08:00
Rémi Verschelde
77dc4c3cb6
Merge pull request #47636 from qarmin/input
Fix crashes in *_input functions
2021-04-05 11:54:08 +02:00
Rafał Mikrut
504bc5cc67 Fix crashes in *_input functions 2021-04-05 08:52:21 +02:00
Hugo Locurcio
fc055e1993
Allow Center Selection to work without any selection in 2D/3D editors
When there is no selection, the camera will center around the
world origin.

This helps people get back to the world center if they haven't added
any nodes yet.
2021-04-04 19:58:46 +02:00
megalobyte
d0f3817876 Use double when setting the default step size
Casting it as a float was causing issues with the progress bar
2021-03-31 22:28:08 -07:00
Rémi Verschelde
6b25c94bd6
Merge pull request #47519 from AndreaCatania/AndreaCatania-patch-4
Fixes editor crash on closing
2021-03-31 12:47:25 +02:00
AndreaCatania
79f55fcded Fixes editor crash on closing
Fixes editor crash when the gizmo is destroyed and the `SceneTree` is already freed.
2021-03-31 11:53:32 +02:00
Aaron Franke
10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
Hugo Locurcio
3472c3f6ea
Tweak the 3D editor grid default to not go below subdivisions of 1 meter
Small subdivisions aren't useful that often and make it difficult for
people to get a sense of scale in 3D.
2021-03-21 00:41:12 +01:00
jmb462
31077d875e Fix hardcoded Maya style navigation pan key modifier
ALT key modifier was hardcoded is node_3d_editor_plugin.cpp and didn't take editor settings into account.

Fix #46973
2021-03-13 20:45:14 +01:00
Andy Maloney
14c50fdb94 Fix gizmo names
Commit 5ef62e546f renamed EditorNode3DGizmoPlugin "get_name" to "get_gizmo_name", but it wasn't done everywhere. Because EditorNode3DGizmoPlugin inherits from Resource, it was then using Resource::get_name() which resulted in null names.

Fixes godotengine/godot#46349
2021-02-28 20:52:53 -05:00
Rémi Verschelde
7b685a1558
Merge pull request #46452 from hilfazer/click_mesh_instance_crash_40
Prevent crash when clicking Mesh in MeshInstance when is scene root
2021-02-26 21:00:12 +01:00
hilfazer
1810654369 Prevent crash when clicking Mesh in MeshInstance when is scene root 2021-02-26 19:28:09 +01:00
trollodel
85a776ddcd Allow CollisionObject3D to show collision shape meshes
Add an editor gizmo to CollisionObject3D.
CollisionShape3D no longer shows collision shapes directly.
2021-02-24 18:50:13 +01:00
Michael Alexsander
0bc7049099 Apply minor visual enhancements to the Sun/Env Preview 2021-02-23 11:21:26 -03:00