Commit Graph

157 Commits

Author SHA1 Message Date
Rémi Verschelde 79da448d5f
Merge pull request #94582 from citizenll/feat_context_menu_plugin4.x
Add support for custom items to editor right-click context menus
2024-09-03 16:13:47 +02:00
citizenl 6b2348adac Add support for custom items to editor right-click context menus 2024-09-03 20:14:14 +08:00
Hilderin 769424388e Fix crash on reimport scene with animations 2024-08-02 16:50:22 -04:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Aaron Franke 1bcbbe96c4
Organize existing code for editor plugins 2024-04-27 11:59:58 -07:00
风青山 41f6a683b6
Correctly replace scene root when `must_reload` in `EditorData::check_and_update_scene()`
We need to update the scene root in multiple singletons to ensure that
certain flags are correct. This is what `EditorNode::set_edited_scene()`
does.

Usually we use `replace_by` to complete the replacement of the scene
root. Call `EditorNode::set_edited_scene()` when the `replacing_by`
signal is emitted to set the new scene root. This is suitable when
using a single node to replace, which may be problematic if the
replacing node is a tree. Because during the call to `replace_by()`,
the new node and its child nodes will enter tree during `parent->
add_child(p_node)`, and later emits the `replacing_by` signal.

When the parent scene has to be reloaded because the child scene
changes and switches to the parent scene, there is no need to use
`replace_by()` since the scene's diffs are already saved.
2024-04-10 09:49:29 +08:00
ajreckof 609559c074 Fix strange visual bug with camera and external change. 2024-04-07 03:49:43 +02:00
ajreckof ae472865d0 fix node duplication in update after external changes. 2024-04-03 12:19:38 +02:00
ajreckof 69e5e582c8 fix error where update wouldn't reconnect the signal it should have reconnected and led to errors and crash 2024-03-22 01:00:33 +01:00
Muller-Castro 1638c1b28f Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
kobewi 808f4e8cb9 Check if history exists before discarding 2024-02-05 17:42:37 +01:00
A Thousand Ships 97b469c46d
[Editor] Add `EditorPlugin::scene_saved` signal
Matches the `EditorNode` one for parity with the exposed
`resource_saved` signal
2024-01-22 17:51:12 +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
Flavelius d9e3acece2 Make Copy->paste Params skip resource_path
Resource path should not be attempted to be taken over, as that's not intended for copy-paste and fails anyway, but this results in the whole paste operation failing as well
2023-11-25 22:35:51 +01:00
A Thousand Ships 75ee58fd04 [Editor] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-15 20:15:39 +02:00
Rémi Verschelde 91c5273ec5
Merge pull request #75656 from YuriSizov/core-iconic-builtins
Add a script method to get its class icon
2023-08-29 12:41:03 +02:00
Yuri Sizov 2c77f07aaa Add a script method to get its class icon
Co-authored-by: Danil Alexeev <danil@alexeev.xyz>
2023-08-24 13:05:41 +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
kobewi 51f92d1100 Don't grab theme icons for scripts 2023-07-21 02:13:07 +02:00
kobewi 9379177286 Fix node selection not handled correctly at launch 2023-07-03 14:43:15 +02:00
kobewi 0458ac4b81 Improve script icon cache 2023-06-26 14:03:21 +02:00
kobewi 366c9678ca Fix some invalid plugin edit calls 2023-06-11 22:15:54 +02:00
David Snopek 3007163210 Allow GDExtensions to add editor plugins 2023-05-25 09:14:29 -05:00
Hendrik Brucker dc46163b12 Improve editor state persistence 2023-05-11 04:17:03 +02:00
Max Hilbrunner f6bf51ca49
Merge pull request #75864 from KoBeWi/assassin_of_shaders 2023-05-05 14:37: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
SaracenOne f1ba23e8bb Fix cleaning up inspector and history when deleting multiple nodes at once. 2023-04-18 14:06:17 +02:00
kobewi aaf02ec04a Close built-in shaders when closing scene 2023-04-09 22:10:43 +02:00
kobewi 13c8a9890d Improve editor state initialization 2023-04-03 16:27:19 +02:00
Yuri Sizov ee2cc347c6 Add support for icons in GDExtension classes
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-03-31 21:39:02 +02:00
Yuri Sizov 1522762dc9 Make icons of scripted and custom classes fit the editor UI
Also:
- Add an option to limit the icon size in PopupMenu.
This is similar to how this works in Tree and TreeItem.
- Add the same option to TabBar.
- Add a theme constant for Tree, PopupMenu, Button, and
TabBar to apply this limit on the control level.

Co-authored-by: Daylily-Zeleen <daylily-zeleen@foxmail.com>
2023-03-31 21:39:02 +02:00
Yuri Sizov 9fae65404a Streamline class icon resolution in the editor 2023-03-31 21:17:59 +02:00
kobewi c0083e431b Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
kobewi 6444c7d127 Move global script class cache to separate file 2023-01-16 10:16:30 +01:00
kobewi b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +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
rune-scape 176cb9cc83 Fix resource picker regression 2022-12-18 19:59:33 -05:00
rune-scape 847c9bd248 GDScript: Avoid using `get_global_class_native_base` 2022-11-27 03:55:53 -05:00
VolTer 3b4f5f8a04 Remove more instances of 'instance' being used as a verb 2022-11-16 14:01:53 +01:00
kobewi 15831e381b Unify usage of undo_redo in editor 2022-11-02 17:51:58 +01:00
kobewi e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
Rémi Verschelde 2b6e043491 Merge pull request #58617 from KoBeWi/custom_something
Improve handling of custom types
2022-09-07 17:54:17 +02:00
Micky dd26ecdd31 Rename CONNECT_ONESHOT TO CONNECT_ONE_SHOT
For consistency. Every other exposed `one_shot` is spaced out like this.
2022-09-06 19:00:33 +02:00
kobewi a3309215c2 Improve handling of custom types 2022-09-05 23:08:28 +02:00
kobewi 8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
kobewi ece3df3938 Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
Juan Linietsky d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Haoyu Qiu 61bc7d6576 Fix heap-use-after-free when closing a scene with its builtin script open 2022-07-06 10:45:36 +08:00
reduz 45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00