Commit Graph

369 Commits

Author SHA1 Message Date
kobewi
413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Rémi Verschelde
a9a1d0a162
Merge pull request #91619 from AThousandShips/find_improve
Replace `find` with `contains/has` where applicable
2024-05-08 14:35:44 +02:00
A Thousand Ships
b4c6cc7d82
[Core] Add case-insensitive String::containsn 2024-05-08 12:48:01 +02:00
A Thousand Ships
a0dbdcc3ab
Replace find with contains/has where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
Rémi Verschelde
ba6f840970
Merge pull request #89248 from KoBeWi/store_no_store
Don't store values when loading them
2024-05-07 16:49:26 +02:00
A Thousand Ships
955d5affa8
Reduce and prevent unnecessary random-access to List
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
K. S. Ernest (iFire) Lee
f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
Rémi Verschelde
d680b9b9da
DAP: Fix typo in parsing of PackedVector3Array 2024-05-02 18:11:38 +02:00
Aaron Franke
1bcbbe96c4
Organize existing code for editor plugins 2024-04-27 11:59:58 -07:00
Mikael Hermansson
a057158d75 Revert pack trimming introduced by #82084 2024-04-10 12:00:04 +02:00
Michael Alexsander
ed1fa9bedf
Fix debugger tree error on editor start 2024-03-29 13:44:49 -03:00
Haoyu Qiu
f298aaa956 Fix unexpected auto-translation of more editor components 2024-03-28 10:50:57 +08:00
Rémi Verschelde
bec4de9237
Merge pull request #86143 from YeldhamDev/ttr_here,_rtr_there
Stop using `RTR()` inside the "editor" folder
2024-03-26 13:44:47 +01:00
Haoyu Qiu
8cd1ebbd6d Fix unexpected auto translation of Tree content 2024-03-18 09:31:00 +08:00
Rémi Verschelde
633024617b
Merge pull request #89475 from rsubtil/feature-add_message_type_to_dap
Add output type to DAP `output` events
2024-03-14 22:35:25 +01:00
Ricardo Subtil
b6d1204186 Add output type to DAP output events 2024-03-14 14:34:14 +00:00
kobewi
4e88fb87b6 Don't store values when loading them 2024-03-07 15:01:12 +01:00
David Nikdel
5e6adb4a2d Merge uid_cache.bin and global_script_class_cache.cfg after mounting PCKs
fixes godotengine#82061
fixes godotengine#61556

Also, distinguish between main pack and DLC packs.
It's desirable to downloaded content to be as small as possible. This change avoids bloating non-main pack files with new versions of resources that are all read on startup and never used again. They have no effect if loaded after startup.
- project.godot/project.binary file
- extension_list.cfg
- app icon and boot_splash
- .ico and .icns files (these can still be opted in for DLC by listing them explicitly in the include filter)
2024-03-06 12:14:21 -05:00
Ricardo Subtil
c07991ef36 Add missing variablesReference field to DAP evaluate request 2024-03-03 11:22:01 +00:00
Rémi Verschelde
1e950dea5a
Merge pull request #86398 from reach-satori/prof-visibility-fix
Fix internal profiling button being visible when disabled in settings
2024-03-01 14:56:02 +01:00
Michael Alexsander
c7fb8579fe
Stop using RTR() inside the "editor" folder 2024-02-27 16:03:28 -03:00
Muller-Castro
1638c1b28f Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
kit
eb6ca91ba6 Extract BottomPanel from EditorNode 2024-02-20 15:09:07 -05:00
kobewi
a031911c82 Use check_changed_settings_in_group() everywhere 2024-02-19 21:34:45 +01:00
Rémi Verschelde
294137c931
Merge pull request #87661 from baptr/profiler_sort
Fix editor profiler script function sort order
2024-02-19 00:07:47 +01:00
Per Melin
27dc9fa4c0 Fix frame number underflow in visual profiler
Unsigned subtraction underflow caused the frame counter to be locked at
2^64 in the visual profiler until debugger/profiler_frame_history_size
number of frames had passed.
2024-02-15 14:33:47 +01:00
A Thousand Ships
684752e75b
Replace error checks against size with is_empty 2024-02-09 12:50:15 +01:00
baptr
90a5f23e79 Fix editor profiler script function sort order
The engine internally limits the number of functions reported back (to
16 by default). To this point, it's been sort the profiling info in
*ascending* order of time spent, then trimming the list. This meant
we may only see the best (fastest) functions, instead of the worst
that you probably want when profiling.

Now the servers_debugger sort more closely matches the local_debugger
one, which worked fine.
2024-01-27 17:12:27 -08:00
Rémi Verschelde
33f3511241
Merge pull request #87293 from YuriSizov/editor-theme-a-rehashed-follow-up
Improve editor theme generation after the refactor
2024-01-18 16:34:50 +01:00
Yuri Sizov
c027aecc2e Merge pull request #86676 from rune-scape/sparse-script-reload
GDScript: Hot-reload changed scripts only
2024-01-17 18:52:54 +01:00
Yuri Sizov
45eedba1fa Improve editor theme generation after the refactor 2024-01-17 15:16:53 +01:00
Yuri Sizov
95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
kobewi
0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
Rémi Verschelde
4baa634937
Merge pull request #84895 from rsubtil/fix_dap_race_condition
Prevent race condition on initial breakpoints from DAP
2024-01-09 15:30:44 +01:00
Rémi Verschelde
6c390b620d
Merge pull request #84445 from Rubonnek/add-const-references-clang-tidy
Add const references detected by clang-tidy
2024-01-04 14:25:33 +01:00
rune-scape
cde478bda6 Hot-reload only changed scripts 2024-01-02 17:56:52 -08:00
Mateus Reis
105723b725 Fix internal profiling button being visible when disabled 2023-12-21 18:25:33 +02:00
msreis
f1cc14d525 Fix missing time for some script functions in profiler
Fixes the issue by adding a mechanism by which the functions that were
previously disappearing can be profiled too. This is optional with
an editor setting, since collecting more information naturally slows the engine
further while profiling.

Fixes #23715, #40251, #29049
2023-12-19 19:42:21 +01:00
Wilson E. Alvarez
a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
Ricardo Subtil
485342408b Prevent race condition on initial breakpoints from DAP 2023-11-14 15:56:03 +00:00
Rémi Verschelde
c2d410a19e
Merge pull request #82868 from SaracenOne/multi_session_debugger_fixes
Fix debugger behaviour with multi-session debugging
2023-10-16 10:38:58 +02:00
Saracen
3700ce7318 Fix right-click menu position for the debugger breakpoint tree. 2023-10-06 19:47:19 +01:00
Saracen
3defc17646 Fix debugger behaviour with multi-session debugging:
Fixes script editor debug menu on sessions other than 1
Fixes breakpoint toggle from menu in sessions other than 1
Removes execution display when switching to non-breaked sessions
2023-10-06 19:20:37 +01:00
Yuri Sizov
4bd569be95 Replace flat buttons with flat-styled buttons with a visible pressed state 2023-09-19 22:36:29 +02:00
A Thousand Ships
75ee58fd04 [Editor] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-15 20:15:39 +02:00
Yuri Sizov
8ecc0c4f47 Fix accessing editor theme items throughout the UI
This also exposes `EditorInterface::get_editor_theme`.
2023-09-15 14:51:01 +02:00
Yuri Sizov
d8ff69d53c Extract ScriptInstance to simplify includes
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.

This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
2023-09-06 22:54:38 +02:00
kobewi
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
Yuri Sizov
2445414aa0 Avoid unnecessary inspector updates when loading or switching scenes
This should result in some noticeable performance improvements,
aside from fixing bugs due to conflicts in logic.
This also simplifies some related code identified while debugging.
2023-08-12 13:32:59 +02:00
Chia-Hsiang Cheng
8da66412f6 Avoid retrieving the object ID of a Nil variable 2023-08-04 22:38:43 +08:00
Rémi Verschelde
8b6c867c81
Merge pull request #79280 from raulsntos/dotnet/better-push-error
C#: Improve `GD.PushError` and `GD.PushWarning`
2023-08-03 14:46:44 +02:00
Juan Linietsky
5e512b705e Support threads in the script debugger
* This implementation adds threads on the side of the client (script debugger).
* Some functions of the debugger are optimized.
* The profile is also now thread safe using atomics.
* The editor can switch between multiple threads when debugging.

This PR adds threaded support for the script language debugger. Every thread has its own thread local data and it will connect to the debugger using multiple thread IDs.
This means that, now, the editor can receive multiple threads entering debug mode at the same time.
2023-07-26 12:06:45 +02:00
Hendrik Brucker
7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
Raul Santos
13ab2b6f4f
C#: Improve GD.PushError and GD.PushWarning
- Use the name, file path and line number of the caller that invokes
`GD.PushError` and `GD.PushWarning` instead of the location in the C++
`runtime_interop.cpp` file.
- Improvements to getting the C# stack trace.
  - Use C# type keywords for built-in types in method declarations.
  - Remove extra space before each parameter in method declarations.
  - Skip one more frame to avoid `NativeInterop.NativeFuncs`.
  - Skip methods annotated with the `[StackTraceHidden]` attribute.
- Improvements to `ScriptEditorDebugger` when source is in project.
  - Avoid overriding error metadata when the source is inside the
project file.
  - Use the source function in the title when the source is inside
the project file.

Users that use these methods would expect the reported location printed
by these methods to correspond to a location in their project source files.
Specifically, they'd expect to see the file path and line number at which
they call these methods, and not the location of the C++ code (which is
always the same). Now, these methods are a lot more useful since users
can know which line in their source code printed the error/warning.
2023-07-11 11:19:11 +02:00
Rémi Verschelde
080d471e98
Merge pull request #75200 from Calinou/debugger-editor-settings-add-property-hints
Add property hints for debugger/profiler editor settings
2023-06-19 21:39:10 +02:00
Fabio Alessandrelli
7b170d12cf
Merge pull request #75836 from rsubtil/bugfix-dap_windows_path
Fix DAP path mismatch on Windows
2023-06-19 16:38:19 +02:00
Rémi Verschelde
2d6b880987
i18n: Sync translations with Weblate (now tracking 4.1 strings) 2023-06-12 14:57:08 +02:00
samar-01
d9e64d7001 Changed error tree initialization to allow reselection 2023-06-10 22:47:16 -04:00
VolTer
6f1adb72db Fix profilers' GUI trees 2023-06-03 11:47:59 +02:00
Aaron Franke
74361b3d50
Rename the Debugger's stack debug section to Stack Trace 2023-05-11 21:22:24 -05:00
Hendrik Brucker
dc46163b12 Improve editor state persistence 2023-05-11 04:17:03 +02:00
Rémi Verschelde
b3bb92ae5e
CI: Use gh-cli for changed files, and workaround codespell skip list bug
For PRs, this should give a more accurate list, as the previous method would
diff to the tip of the `master` branch, which could include new commits (and
thus changed files) not present in the PR branch.

codespell's `--skip` option doesn't work at all with folders when used
together with an explicit list of paths to work with, so let's not use it.
2023-05-08 15:36:17 +02:00
Juan Linietsky
273a6eeb66 Redo how the remote filesystem works
Instead of reading files over the network, the new version uses a local file cache and only updates files when it changes.

The original remote filesystem was created 14 years ago, when ethernet was faster than hard drives or even flash. Also, mobile devices have a very small amount of storage.
Nowadays, this is no longer the case so the approach is changed to using a persistent cache in the target device.

Co-authored-by: m4gr3d
2023-05-08 11:57:54 +02:00
Yuri Sizov
8a74d8438f Extract editor run toolbar into its own component
- Simplify and update its logic.
- Simplify EditorScript.
- Improve EditorNode and other relevant includes.
- Fix scene-based path in the movie writer when
reloading a scene.
2023-04-19 17:12:28 +02:00
Danil Alexeev
36bedd341a
Fix misuses of error macros 2023-04-18 10:20:48 +03:00
Rémi Verschelde
c5d9470c7c
Merge pull request #75765 from YuriSizov/editor-node-optimize-includes
Improve includes of `EditorNode` (and everything else)
2023-04-11 19:40:24 +02:00
Ricardo Subtil
4be4eeea3a Poll LSP/DAP clients for connection status updates 2023-04-09 12:36:01 +01:00
Ricardo Subtil
b8ae1c218c Fix DAP path mismatch on Windows 2023-04-08 19:59:01 +01:00
Yuri Sizov
4154039832 Improve includes of EditorNode (and everything else)
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.
2023-04-07 18:59:49 +02:00
Yuri Sizov
9b500ab53c Fix premature theme item access in editor tools 2023-04-03 18:01:11 +02:00
kobewi
f289e74966 Refresh filesystem when saving remote branch 2023-03-24 19:38:08 +01:00
Hugo Locurcio
f575ca09ae
Add property hints for debugger/profiler editor settings
This also adds descriptions for those settings.
2023-03-22 01:07:31 +01:00
Yuri Sizov
239eb31c90 Make sure Script Debugger is updated with the editor theme 2023-03-10 18:16:00 +01:00
Haoyu Qiu
84aee17901 Improvements and fixes based on Weblate comments
* Description of `ui_text_submit` action should be "Submit Text" instead of "Text Submitted".
* Spell out "Animation" instead of using "Anim.".
* Treat "Max" as regular word instead of writing "Max.".
* Use generic "Set %s" for action name instead of a dedicated "Set target_position".
* Add translator comment for:
    * "Inclusive" and "Self" in the profiler.
    * Places where it needs the context about being an editor progress label.
    * "Duplicated Animation Name" since it's refering to the new name of a duplicated animation.
    * Disambiguation of "View Plane Transform", "Paste Selects" and "Display Normal".
* Fix wrong undo action name for renaming an input action.
* Fix missing end quote in a shader error message.
* In class reference:
    * Fix duplicated "if" in the description of `signf()`.
    * Fix mismatched example output in `String.operator %()`.
    * Fix typo in the description of `Decal.texture_emission`.
    * Unify description of `String.match()` and `StringName.match()`.
2023-02-13 15:22:18 +08:00
Pedro J. Estébanez
31a4a0002e Pace debugger draw requests 2023-02-07 12:10:28 +01:00
Paul Joannon
0fb1cef42f
Restore missing info in the error tooltips 2023-01-28 12:34:12 +01:00
Paul Joannon
c93eec4139
Better error display in debugger panel
- Use the right stack frame info as title of the error.
- Use the actual C# exception type as error for exceptions raised from C#.
- Show the right language instead of always **C++ Error**.
2023-01-27 10:01:55 +01:00
kobewi
b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
bruvzg
5406b001ca
Move remote debug buttons to a single menu. 2023-01-14 22:25:35 +02:00
kobewi
dfc4367a47 Add expand modes to TextureRect 2023-01-12 17:06:03 +01:00
Juan Linietsky
2b815df3c1 Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
kobewi
bf74ff94c8 Improve remote tree node tooltips 2023-01-03 17:06:36 +01:00
stmSi
def4087a40 Suggest Filename in Remote Tree File Dialog 2022-12-25 19:34:11 +06:30
stmSi
97e991929f Fix: Profiler and Visual Profiler start/stop state inconsistency 2022-12-23 08:14:53 +06:30
Haoyu Qiu
207e52c161 Fix String::word_wrap() for long words
- Changes `TextServer.string_get_word_breaks()`
  - Returns pairs of boundary start and end offsets
  - Accepts `chars_per_line` to return line breaks
- Removes `String::word_wrap()`

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-12-16 13:18:57 +08:00
kobewi
f764db1bdd Add remote history to EditorUndoRedoManager 2022-12-08 15:06:29 +01:00
trollodel
c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
Fabio Alessandrelli
aa80cfac97 [Editor] Add button to keep the debug server open.
The setting is stored in the project editor metadata, and the server is
automatically started/stopped when the option change (only stopped if no
session is currently active).

The CLI option `--debug-server` now also forces the server to stay open
(without saving the state, unlike the menu option).

This commit also removes the "Keep debugger open" option in the script
editor "debug" menu. That option was really confusing, it used to hide
the bottom panel if and only if the debugger pane was selected, so if
you had your output log open instead (default when pressing play) it
would effectively do nothing. Having an option to save a click in such
a very specific case seems very overkill.
2022-11-25 11:02:55 +01:00
Zae
50704f27ed FIx debugger can't inspect sub objects. 2022-11-25 11:09:18 +08:00
Rémi Verschelde
6d2a7cb46d
Merge pull request #68709 from MewPurPur/instance-begone-part3
Remove more instances of 'instance' being used as a verb
2022-11-16 14:41:42 +01:00
VolTer
3b4f5f8a04 Remove more instances of 'instance' being used as a verb 2022-11-16 14:01:53 +01:00
Markus Sauermann
3b14f0334c Remove redundant Variant-types initializations 2022-11-14 19:35:19 +01:00
Fabio Alessandrelli
67265d14f7 [MP] Move engine and editor profilers to a plugin.
Also refactor the editor plugin out of the ReplicationEditor.
2022-11-14 15:09:00 +01:00
Fabio Alessandrelli
d568b25e36 [Editor] Better expose EditorDebuggerPlugin.
Now splitted into two classes:
- EditorDebuggerPlugin (RefCounted).
- EditorDebuggerSession (abstract).

This allows the EditorPlugin to be in control of the debugger plugin
lifecycle, be notified when sessions are created, and customize each of
them independently.

We should slowly transition the various profilers and captures in
ScriptEditorDebugger to their own plugins, and decouple
ScriptEditorDebugger from it's UI part (making it the "real"
EditorDebuggerSession potentially dropping the wrappers).
2022-11-14 14:55:22 +01:00
Hugo Locurcio
a13cdfe096
Use a bold font for section titles in the editor performance monitor 2022-11-11 19:34:13 +01:00
Rémi Verschelde
778ffce1e3
Merge pull request #62416 from Calinou/movie-maker-request-attention-on-finish
Request attention on the editor window when done recording a movie
2022-10-31 23:03:21 +01:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Micky
809dad907a Add buttons in Remote Scene Tree
A Scene button to any scene instantiated from file. When clicked, it opens the original PackedScene.

A toggle visibility button is also available.
2022-10-20 18:02:41 +02:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00