Commit graph

2843 commits

Author SHA1 Message Date
Rémi Verschelde
305b2a15bf
Merge pull request #48239 from akien-mga/goodbye-copymem
Core: Drop custom `copymem`/`zeromem` defines
2021-04-28 11:04:05 +02: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
Rémi Verschelde
95cfce661b
Merge pull request #48050 from JFonS/occlusion_culling 2021-04-27 19:07:12 +02:00
Rémi Verschelde
8247667a3e
Core: Drop custom copymem/zeromem defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
2021-04-27 16:26:27 +02:00
Rémi Verschelde
b95a82d46a
Merge pull request #47826 from Chaosus/vs_fix_default_input_overriding
Prevents default values of VSNodeCustom from overriding by a script
2021-04-27 10:42:51 +02:00
Rémi Verschelde
759b876b8a
Merge pull request #46593 from pycbouh/theme-editor-better-edit-ui
Refactor Edit Theme menu in Theme Editor
2021-04-23 23:12:25 +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
8ba06e3161
Merge pull request #47448 from madmiraal/rename-lineedit-cursor
Rename LineEdit getters and setters to match property names
2021-04-19 10:40:29 +02:00
Yuri Sizov
2524238bb3 Refactor Edit Theme menu in Theme Editor 2021-04-18 17:55:49 +03:00
Yuri Roubinsky
8ae5c6c6ec Fix sky visual shader mode after last rename 2021-04-17 20:59:48 +03:00
Marcel Admiraal
86822b187e Rename LineEdit caret_* properties getters and setters to match property 2021-04-17 12:41:23 +01: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
Rémi Verschelde
c7a4e2196e
Merge pull request #47878 from clayjohn/rename-get_surface_material
Rename get_surface_material to get_surface_override_material
2021-04-15 07:57:15 +02:00
clayjohn
92731d292c Rename get_surface_material to get_surface_override_material 2021-04-14 20:24:03 -07:00
reduz
d3b49c416a Refactor GLSL shader compilation
-Used a more consistent set of keywords for the shader
-Remove all harcoded entry points
-Re-wrote the GLSL shader parser, new system is more flexible. Allows any entry point organization.
-Entry point for sky shaders is now sky().
-Entry point for particle shaders is now process().
2021-04-14 11:37:52 -03:00
Rémi Verschelde
6b39980ea9
Merge pull request #47856 from ray90514/bug#47555
Fix multi-selection doesn't correctly show in the inspector
2021-04-14 13:43:35 +02:00
ray90514
16decbc0ee Fix multi-selection doesn't correctly show in the inspector 2021-04-13 18:09:53 +08:00
Yuri Roubinsky
8d3e46098b Prevents default values of VSNodeCustom from overriding by a script 2021-04-12 14:41:08 +03:00
Rémi Verschelde
4a1f2dcb74
Merge pull request #47531 from fire/update-skeleton-display
Update Skeleton3D inspector Bone Transforms
2021-04-12 00:19:23 +02:00
Haoyu Qiu
c8a40c8005 Fix 3D selection box size for Node3D 2021-04-11 15:15:52 +08:00
Rémi Verschelde
8b6e3d6375
Merge pull request #46340 from gongpha/various-color-picker
Add Various ColorPicker shapes
2021-04-10 13:29:50 +02: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
Kongfa Waroros
6294507acb Add Various ColorPicker shapes 2021-04-06 22:48:03 +07:00
Rémi Verschelde
d83761ba80
Style: Apply clang-tidy's readability-braces-around-statements 2021-04-05 14:09:59 +02:00
Rémi Verschelde
0f0c0e5933
Style: Apply clang-tidy's modernize-use-bool-literals 2021-04-05 13:16:35 +02: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
Rémi Verschelde
789646e201
Merge pull request #47632 from Calinou/asset-search-autofocus
Automatically focus the Search field when displaying asset library
2021-04-05 11:38:48 +02:00
Rémi Verschelde
189aa6340e
Merge pull request #47408 from megalobyte/remove-float-recast
Use double when setting the default step size
2021-04-05 11:37:06 +02:00
Rafał Mikrut
504bc5cc67 Fix crashes in *_input functions 2021-04-05 08:52:21 +02:00
Hugo Locurcio
d89d00ac7e
Automatically focus the Search field when displaying asset library
- Focus the project search box when switching from the Templates tab
  back to the Projects tab in the project manager.
- Add a context-specific placeholder for the asset library search box.
- Rename "Search" project filter box placeholder to the more
  descriptive "Filter projects". When performing a search on an
  existing selection, "Filter" is more accurate than "Search".
2021-04-05 01:45:39 +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
Rémi Verschelde
a864a703ee
Merge pull request #47624 from Chaosus/vs_fix_context_menu_separator
Fix few bugs in the context menu for Comment node in visual shaders
2021-04-04 18:33:34 +02:00
Yuri Roubinsky
0fecd4ee4d Fix separator duplication in visual shader context menu 2021-04-04 17:55:42 +03:00
Yuri Roubinsky
44af52d62c Prevents TextureUniform in visual shaders from conversion to constant 2021-04-04 17:32:44 +03:00
Rémi Verschelde
cbf5408685
Merge pull request #46273 from Chaosus/vs_comment
Added Comment node to Visual Shaders
2021-04-04 16:04:12 +02:00
Yuri Roubinsky
5af08e5e65 Fix typo in visual shader context menu 2021-04-04 15:31:04 +03:00
Rémi Verschelde
4b6e9f3157
Merge pull request #46991 from madmiraal/rename-invert-reverse
Rename Array.invert() to Array.reverse()
2021-04-01 13:32:22 +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
K. S. Ernest (iFire) Lee
182accc2e0 Update Skeleton3D inspector Bone Transforms 2021-03-31 09:19:01 -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
Marcel Admiraal
fd30c36985 Rename Texture.get_data() to get_image() 2021-03-28 13:00:46 +01:00
Kyle
2b775bd698 Fixes ctrl-click function line centering
When ctrl-clicking in the code editor, the view will now be centered on the function result.

Also replaces a circumstance where goto_line_centered should be used.
2021-03-24 12:29:14 -04:00
Aaron Franke
10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
Marcel Admiraal
755c70b871 Rename Array.invert() to Array.reverse()
Does the same internally for List and Vector<>, which includes all
PackedArray types.
2021-03-21 10:20:08 +00:00
Rémi Verschelde
48ee9cd690
Merge pull request #47123 from Calinou/tweak-3d-editor-grid-default-min-division
Tweak the 3D editor grid default to not go below subdivisions of 1 meter
2021-03-21 01:19:23 +01: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
Tomasz Chabora
f45e4c57f1 Allow to move timeline without moving animation 2021-03-21 00:24:16 +01:00
Rémi Verschelde
9febc206fe
Merge pull request #46740 from KoBeWi/🎵🎵🎵
Fix audio player not resetting after wav finishes
2021-03-20 22:47:19 +01:00
kobewi
daa62ccaa3 Fix audio player not resetting after wav finishes 2021-03-20 20:16:53 +01:00
Rémi Verschelde
6608d99291
Merge pull request #47001 from madmiraal/rename-sprite_2d-region_enabled
Rename Sprite.region_enabled getter and setter methods to match properties
2021-03-20 18:36:17 +01:00
andybarcia
558b08e6d9 Fixes TileMap editor copy bug. 2021-03-19 12:09:28 +01:00
Haoyu Qiu
eac806547f Fix AnimationTree editor crash when renaming node 2021-03-16 00:21:20 +08:00
Dominik 'dreamsComeTrue' Jasiński
a99a671034 Reset ruler tool when switching tools with shortcuts
Fixes: #37056
2021-03-15 00:28:52 +01:00
Marcel Admiraal
3dcdb84660 Rename Sprite.region_enabled getter and setter to match properties
Also renames Sprite2D.region_filter_clip property and its setter to
region_filter_clip_enabled and set_region_filter_clip_enabled.
2021-03-14 17:31:49 +00:00
jmb462
6525d74623 Fix Asset Library URL not updating after been changed in editor settings
The changes made in this commit refresh the URL OptionButton when editor settings are modified.

No need to restart any more for the changes to appear in the Asset Library.

Fix #46977
2021-03-13 22:55:59 +01:00
Rémi Verschelde
223a06955e
Merge pull request #46978 from jmb462/fix-hardcoded-maya-style-pan-key-modifier
Fix hardcoded Maya style navigation pan key modifier (Fix #46973)
2021-03-13 22:03:40 +01:00
Rémi Verschelde
0444f5ac47
Merge pull request #46946 from Calinou/editor-sprite-frames-zoom-hidpi
Scale zoom values in the SpriteFrames editor for hiDPI displays
2021-03-13 21:49:43 +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
mujpao
030703dd30 Update viewport after Polygon2D deselected 2021-03-12 17:22:46 -08:00
Hugo Locurcio
e5c5b9570f
Scale zoom values in the SpriteFrames editor for hiDPI displays
This closes #46836.
2021-03-12 19:05:45 +01:00
Rémi Verschelde
0bef220f0a
Merge pull request #46759 from qarmin/crashes_others
Fix crashes when manipulating nodes in editor
2021-03-09 17:19:07 +01:00
Rémi Verschelde
14f330c95e
Merge pull request #46771 from socket220/master
pop-up usability enhancement for support-level button
2021-03-08 16:02:09 +01:00
gatalskii
efe05a166e mod: pop-up usability enhancement for support button
Now after choosing support level pop-up doesn't hide after each click
2021-03-07 22:51:40 +03:00
Hugo Locurcio
25c6acb702
Make the pagination buttons wider in the asset library browser
This makes the page number buttons easier to click.
2021-03-07 20:11:58 +01:00
Rafał Mikrut
f81ecb498b Fix crashes when manipulating nodes in editor 2021-03-07 15:14:24 +01:00
Rémi Verschelde
05248535f7
Merge pull request #46641 from KoBeWi/unsaved_forever
Don't save unchanged script upon closing
2021-03-06 21:06:06 +01:00
kobewi
12f5a5a701 Don't save unchanged script upon closing 2021-03-06 20:17:19 +01:00
jmb462
068300c7c9 Adding Raycast3D custom debug shape thickness and color 2021-03-04 11:17:26 +01:00
Rémi Verschelde
ec7053259b
Merge pull request #41437 from KoBeWi/put_it_here
Allow to create a node at specific position
2021-03-01 15:48:53 +01:00
Rémi Verschelde
c2799893f4
Merge pull request #46544 from Chaosus/tilemap_signal_fix
Check before connecting `TileMapEditor::settings_changed`
2021-03-01 11:59:11 +01:00
Yuri Roubinsky
1e7662f972 Check before connecting TileMapEditor::settings_changed 2021-03-01 10:25:33 +03: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
Tomasz Chabora
8df22a03c4 Allow to create a node at specific position 2021-02-26 14:40:28 +01:00
Vedat Günel
929da94e2c Add outline to dragged guide text 2021-02-26 03:12:50 +03: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
reduz
d6a9cff8b7 Add preview Sun and Environment
* Adds both a preview sun and preview environment to the 3D editor.
* They are valid as long as a DirectionalLight3D and WorldEnvironment are not in the scene.
* If any is added to the scene, the respective preview is disabled.
* Changed WorldEnvironment to better handle multiple node versions.
* Added a function in SceneTree to get the first node in a group.
* Fixed button minimum size to also consider font height if no text is there, this broke with the TextSever PR.
2021-02-22 16:56:29 -03:00
hilfazer
442e550114 Prevent selecting hidden nodes in 3D and Canvas Item editors 2021-02-21 11:58:31 +01:00
Yuri Roubinsky
fe3051fcce Added Comment node to Visual Shaders 2021-02-21 12:40:17 +03:00
reduz
083aa9b95e Refactor Process Mode
Implements https://github.com/godotengine/godot-proposals/issues/1835#issuecomment-727186192

* PauseMode is now ProcessMode, containing the following states:
	```
	PROCESS_MODE_INHERIT, // same as parent node
	PROCESS_MODE_NORMAL, // process only if not paused
	PROCESS_MODE_PAUSE_ONLY, // process only if paused
	PROCESS_MODE_ALWAYS, // process always
	PROCESS_MODE_DISABLED, // never process
	```
* NOTIFICATION_PAUSED and NOTIFICATION_UNPAUSED are received effectively when the node is paused and unpaused (not any longer when pause mode is set in SceneTree).
* Renamed some nodes that used ProcessMode/process_mode to specify a callback type to ProcessCallback to avoid clashes.
2021-02-18 20:39:55 -03:00
Rémi Verschelde
310496a89f
Merge pull request #45617 from RandomShaper/modernize_atomics
Modernize atomics (and fix `volatile`)
2021-02-18 19:40:31 +01:00
Pedro J. Estébanez
8e128726f0 Modernize atomics
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile bool` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 17:12:46 +01:00
Eric M
49714b0963 Removed hardcoded shortcuts from /scene and converted to input actions
This removes hardcoded actions from things like LineEdit and TextEdit.

Previously, things like copy, paste, etc were all hardcoded to Ctrl+C, Ctrl+V, etc. They could not be changed. This allows the possibility of them being changed, by making them use the action map. This has the added benefit of greatly simplifying the input handling logic in those controls. The logic which was previously in a huge and hard to follow switch statement has been extracted to individual methods.
2021-02-18 16:22:51 +01:00
reduz
64140eaf42 Reorganize Project Settings
-Advanced Settings toggle also hides advanced properties when disabled
-Simplified Advanced Bar (errors were just plain redundant)
-Reorganized rendering quality settings.
-Reorganized miscelaneous settings for clean up.
2021-02-18 11:23:34 -03:00
Rémi Verschelde
7f63d6e848
Merge pull request #46105 from Calinou/assetlib-retry-button-only-failure
Only display the assetlib Retry button if the download failed
2021-02-17 08:10:27 +01:00
Hugo Locurcio
508011a57f
Only display the assetlib Retry button if the download failed 2021-02-17 02:00:22 +01:00
Aaron Franke
7d9ad2b845
Use Vector3.UP as a default value for look_at's up vector 2021-02-16 18:33:23 -05:00
reduz
288540a690 Fix editor always redrawing
-Only update rendering settings when project settings change
-Fixes the update spinner (and editor rendering) updating all the time.
-Added a "project_settings_changed" signal to EditorNode and EditorPlugin
2021-02-13 14:57:28 -03:00
Rémi Verschelde
5011a22731
Merge pull request #45932 from goostengine/sprite-convert-compressed
Fix sprite editor conversion tools to handle compressed textures
2021-02-12 23:11:51 +01:00
Andrii Doroshenko (Xrayez)
1cd7a16c10 Fix sprite editor conversion tools to handle compressed textures 2021-02-12 21:42:07 +02:00
reduz
f8d03b98e7 Improve resource load cache
-Added a new method in Resource: reset_state , used for reloading the same resource from disk
-Added a new cache mode "replace" in ResourceLoader, which reuses existing loaded sub-resources but resets their data from disk (or replaces them if they chaged type)
-Because the correct sub-resource paths are always loaded now, this fixes bugs with subresource folding or subresource ordering when saving.
2021-02-11 15:44:28 -03:00
reduz
1aa2823fa3 Removed _change_notify
-For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap.
-For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed()
-Changed all objects using the old method to the signal, or just deleted the calls to _change_notify(<property>) since they are unnecesary now.
2021-02-10 19:31:24 -03:00
Rémi Verschelde
d93f75fae5
Merge pull request #45698 from KoBeWi/callables_are_love_callables_are_life
Change sort_custom/bsearch_custom to use Callables
2021-02-05 09:30:19 +01:00
kobewi
fb83d905da Change sort_custom/bsearch_custom to use Callables 2021-02-04 14:37:52 +01:00