Commit Graph

188 Commits

Author SHA1 Message Date
kobewi a6de7a8a3f Allow contextual plugins to persist temporarily 2023-10-06 15:58:50 +02:00
Rémi Verschelde 0655a7d7d3
Merge pull request #80517 from YuriSizov/tsa-randomly-picked-you-for-mandatory-inspection-i-think-not
Avoid unnecessary inspector updates when loading or switching scenes
2023-08-28 12:05:06 +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 fca3ab5564 Deprecate project_settings_changed signal 2023-08-10 15:07:25 +02:00
Fredia Huya-Kouadio d17811c814 Re-architect how Android plugins are packaged and handled at export time
The previous packaging format for Godot Android plugins consisted of the plugin's `gdap` config file accompanied by binaries defined in the `gdap` file.
This format is now deprecated (starting with Godot 4.2), and instead Godot Android plugins are now packaged as `EditorExportPlugin` plugins.

The `EditorExportPlugin` class has been updated with the following methods to provide the necessary set of functionality:
- `_supports_platform`: returns true if the plugin supports the given platform
- `_get_android_dependencies`: retrieve the set of android dependencies (e.g: `org.godot.example:my-plugin:0.0.0`) provided by the plugin
- `_get_android_dependencies_maven_repos`: retrieve the urls of the maven repos for the provided android dependencies
- `_get_android_libraries`: retrieve the local paths of the android libraries (AAR files) provided by the plugin
- `_get_android_manifest_activity_element_contents`: update the contents of the `<activity>` element in the generated Android manifest
- `_get_android_manifest_application_element_contents`: update the contents of the `<application>` element in the generated Android manifest
- `_get_android_manifest_element_contents`: update the contents of the `<manifest>` element in the generated Android manifest
2023-07-18 19:14:53 +02:00
kobewi b883f32188 Check for unsaved changes when closing a scene 2023-07-18 14:27:56 +02:00
kobewi 6dc5dc3479 Add `_get_unsaved_status()` method to EditorPlugin 2023-07-18 14:18:36 +02:00
Hendrik Brucker 7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
heppocogne f7f4e53763 Add relative path support for `EditorPlugin::add_autoload_singleton` 2023-06-12 21:27:46 +09:00
Hendrik Brucker dc46163b12 Improve editor state persistence 2023-05-11 04:17:03 +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
Yuri Sizov 49d7041d34 Decouple EditorInterface from EditorPlugin
- Simplify some includes in the process.
- Also exposes EditorInterface.movie_maker_enabled as a property.
2023-04-17 21:59:09 +02: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
bruvzg 921f3b7589
Automatically reparent editor message dialogs to avoid error spam. 2023-02-21 12:32:11 +02:00
Marc Gilleron d2b4e30058
Change `_can_handle` and `_edit` virtual methods to take `Object*` 2023-02-17 14:10:38 +01:00
kobewi 82f06542a5 Fix potential crash in EditorPlugin.edit() 2023-01-22 15:54:42 +01:00
Rémi Verschelde 4ca6a9809d
Merge pull request #44596 from KoBeWi/🧹🧹🧹
Cleanup unused engine code v2
2023-01-19 19:32:51 +01:00
Rémi Verschelde d3665effd5
Merge pull request #71443 from TechnoPorg/fix-resource-conversion-plugins
Make EditorResourceConversionPlugin usable.
2023-01-19 13:23:37 +01:00
kobewi c0083e431b Cleanup unused engine code v2 2023-01-19 13:02:18 +01:00
kobewi b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
TechnoPorg 2904d19069 Make EditorResourceConversionPlugin usable.
Previously, EditorResourceConversionPlugin nominally existed in scripting, but there was no way for a user to actually register one.
This PR adds methods to EditorPlugin for registering/unregistering EditorResourceConversionPlugins.
Additionally, it documents EditorResourceConversionPlugin with descriptions and a basic example.
2023-01-14 18:48:11 -07: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
trollodel c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
cespeute 4b00c2ec57 Add EditorInterface.get_selected_paths()
Exposes the selected paths in the editor filesystem dock.
Implements this proposal : https://github.com/godotengine/godot-proposals/issues/2424

Also renamed the old `get_selected_path` to `get_selected_directory` to
better match the already existing get_current_path function.
2022-11-14 22:46:27 +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
trollodel ba9e619b51 Use forward-declarations in EditorPlugin where possible 2022-11-11 20:25:51 +01:00
kobewi 15831e381b Unify usage of undo_redo in editor 2022-11-02 17:51:58 +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
kobewi d06a8320e5 Simplify GDVIRTUAL_CALL calls 2022-10-19 00:05:48 +02:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Micky ae5771e1b1 Rename remaining "Spatial" in Plugins to "Node3D"
For EditorNode3DGizmo:
- `get_spatial_node` -> `get_node_3d`
- `set_spatial_node` -> `set_node_3d`

For EditorPlugin:
- `add_spatial_gizmo_plugin` -> `add_node_3d_gizmo_plugin`
- `remove_spatial_gizmo_plugin` -> `remove_node_3d_gizmo_plugin`

Also renames some internal methods for consistency (`forward_3d_draw_over_viewport` & `forward_3d_force_draw_over_viewport` ...). Basically, Spatial has been completely eradicated.
2022-10-04 16:27:29 +02:00
Rémi Verschelde b52305351d
Merge pull request #64465 from TokageItLab/bind-after-gui-input
Bind `AfterGUIInput` to GDScript and update document
2022-09-10 20:01:48 +02:00
Silc Renew 3c7a5fd8ac bind AfterGUIInput 2022-09-08 20:02:48 +09:00
Yuri Sizov 1459507ed2 Rename EditorInterface.get_editor_main_control to get_editor_main_screen 2022-09-07 03:01:58 +03:00
kobewi 7adc8376ed Change Array arguments to TypedArray 2022-09-01 13:13:19 +02:00
Micky e31bb5ffeb Rename `CanvasItem.update()` to `queue_redraw()`
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.

Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.

Just a few comments have also been changed to say "redraw".

In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29 14:59:47 +02:00
kobewi 8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
Rémi Verschelde b8a64313f0
Merge pull request #59564 from KoBeWi/FINALLY,_ULTIMATE_UNDO_REDO 2022-08-22 22:37:33 +02:00
kobewi ece3df3938 Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
Aaron Franke 92f5a0a1db
Add a method for restarting the editor to EditorInterface 2022-08-18 18:51:38 -05:00
Micky 55dff09e93 Rename EditorPlugin.`*_PROPERTY_EDITOR_*` to `*_INSPECTOR_*`
The name "Inspector" has been adopted for years and is thus more familiar.
2022-08-13 12:59:03 +02:00
Aaron Franke e53ae13178
Split up editor export code into multiple files 2022-07-26 08:28:19 -05:00
kobewi d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
Hugo Locurcio ca7e92ed39
Request attention on the editor window when done recording a movie
Recording a movie can take a long time, so the user may not be
paying attention to the editor while leaving a movie rendering
in the background.

This also allows editor plugins to access the state of Movie Maker mode
within the editor (and set it).
2022-06-26 02:26:38 +02:00
Rémi Verschelde d22850234c
Merge pull request #59393 from techiepriyansh/move-gltf-export-under-scene-menu 2022-04-27 11:51:49 +02:00
reduz 66009318e0 Import scenes as AnimationLibrary
Added the ability to import scenes as AnimationLibrary

* Completes implementation of https://github.com/godotengine/godot-proposals/issues/4296
* Helps if you want to export animations to a separate file (say a GLTF) to avoid re-importing/exporting them every time the model changes.
* Helps if you simply want to have animations using a dummy model, which can be shared across multiple models.

Creates a secondary scene importer used only for animations.

**NOTE**: A new flag for scene importer: EditorSceneFormatImporter.IMPORT_DISCARD_MESHES_AND_MATERIALS has been added, to hint importers that they should skip meshes and animations (and hence make importing faster). It is not implemented in any importer yet, this should be done in a separate PR.
2022-04-13 15:06:56 +02:00
Priyansh Rathi 0ea7780e33
move gltf export under scene menu 2022-04-12 19:42:41 +05:30
jmb462 dcd2a92af3 Port existing _notification code to use switch statements (part 1/3) 2022-02-16 11:38:24 +01:00
Rémi Verschelde 11572c6e30
Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
Hendrik Brucker b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00