Commit Graph

156 Commits

Author SHA1 Message Date
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
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
Rémi Verschelde ec00283f91
ResourceImporter: Restore default append logic for new importers
This was changed in #56943 to allow adding new importers from plugins that
take precedence over built-in ones, but this should be opt-in, not the default
behavior.

Fixes #57730.
2022-02-07 09:47:16 +01:00
Rémi Verschelde 7072b359b4
Improve some method bindings to use specific `Object` subtypes
This was made possible by changes to `VariantCaster` which now make
it possible to pass any `Object`-derived type as pointer.
2022-01-28 15:07:22 +01:00
trollodel aa1102fc53 Store panels and docks singletons in their own classes 2022-01-20 20:13:26 +01:00
Haoyu Qiu 8fc73539e9 Allow showing both left and right side panels 2022-01-08 20:31:22 +08:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Nathan Franke 49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Raul Santos 9535831866 Expose `ScriptEditor::edit` to scripting
Exposes a method in `EditorInterface` to open scripts on a specified
line and column. This method handles if the internal or the external
editor should be used.
2021-12-08 15:25:05 +01:00
reduz b3bf90b3ce Add scene Post-Import Plugin support.
* New plugin system to control the whole import workflow
* Can add options and run code at every import step (general, per node, mesh, animation, material etc.)

This constitutes a first version of these plugins. The ability to interact with the import preview dialog will likely be added later on.
2021-10-15 09:12:04 -03:00
Silc Renew f2e9867e9f Implemented SkeletonEditorGizmo
Co-authored-by: Lyuma <xn.lyuma@gmail.com>
2021-10-07 01:07:46 +09:00
Hugo Locurcio 570cdc128f
Rename Node's `filename` property to `scene_file_path` for clarity 2021-09-30 16:50:25 +02:00
Anilforextra 90908cd67d Add Get Center Method for Rect2/Rect2i and AABB. 2021-09-21 21:14:17 +05:45
kobewi baf2f374f4 Sort palette commands by last use 2021-08-31 02:07:52 +02:00
reduz 3682978aee Replace BIND_VMETHOD by new GDVIRTUAL syntax
* New syntax is type safe.
* New syntax allows for type safe virtuals in native extensions.
* New syntax permits extremely fast calling.

Note: Everything was replaced where possible except for `_gui_input` `_input` and `_unhandled_input`.
These will require API rework on a separate PR as they work different than the rest of the functions.

Added a new method flag METHOD_FLAG_OBJECT_CORE, used internally. Allows to not dump the core virtuals like `_notification` to the json API, since each language will implement those as it is best fits.
2021-08-22 08:23:58 -03:00
Bhuvan Vemula a0205e4f34 command palette improvements 2021-08-15 11:40:44 +05:30
Bhuvan Vemula a0a019a998 Added EditorCommandPalette 2021-08-09 17:41:50 +05:30
reduz 6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
Haoyu Qiu 1a9e3edd30 Validate parameters when adding plugins 2021-06-13 17:25:39 +08:00
kobewi 3911e71a52 Fix some virtual methods 2021-06-13 02:02:39 +02:00
kobewi 7ff135b015 Consistently prefix bound virtual methods with _ 2021-06-12 00:55:52 +02:00
Aaron Franke de3f6699a5
Rename Transform to Transform3D in core 2021-06-03 07:30:01 -04:00
reduz 0d2e02945b Implement shader caching
* Shader compilation is now cached. Subsequent loads take less than a millisecond.
* Improved game, editor and project manager startup time.
* Editor uses .godot/shader_cache to store shaders.
* Game uses user://shader_cache
* Project manager uses $config_dir/shader_cache
* Options to tweak shader caching in project settings.
* Editor path configuration moved from EditorSettings to new class, EditorPaths, so it can be available early on (before shaders are compiled).
* Reworked ShaderCompilerRD to ensure deterministic shader code creation (else shader may change and cache will be invalidated).
* Added shader compression with SMOLV: https://github.com/aras-p/smol-v
2021-05-31 10:13:09 +02:00
Gilles Roudière b46672db72 Provide a way to hook into Inspectors UndoRedo. 2021-05-04 09:55:22 +02:00
kobewi 72014a7a2e Expose edit_node() for editor plugins 2021-04-12 00:13:08 +02:00
Yuri Sizov ea31af68ba Expose editor scale to the plugin API 2021-04-05 18:44:01 +03: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 b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Rémi Verschelde 76d4fab3f3
Merge pull request #44524 from madmiraal/rename-editor-viewport
Rename EditorInterface get_editor_viewport to get_editor_main_control
2020-12-28 14:54:50 +01:00
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Marcel Admiraal e1128431de Rename EditorInterface get_editor_viewport to get_editor_main_control 2020-12-19 14:17:42 +00:00
kobewi 889f5e44ef Make tool menu plugins use Callables for callback 2020-12-16 20:23:51 +01:00
Tomasz Chabora cbfbb4538b Register methods for drawing 3D editor overlays 2020-11-10 11:35:34 +01:00
reduz ee06a70ea6 Refactor MethodBind to use variadic templates
Removed make_binders and the old style generated binders.
2020-10-18 12:28:44 +02:00