Commit graph

669 commits

Author SHA1 Message Date
Tomasz Chabora
7bd101b5c5 Generate inspector preview for Image resources
(cherry picked from commit eb6a367cb7)
2020-06-29 10:57:00 +02:00
Hugo Locurcio
8cc3d4bda6 Keep the bottom panel visible when enabling the distraction-free mode
- Document the `EditorInterface.distraction_free_mode` property.

This closes https://github.com/godotengine/godot-proposals/issues/951.

(cherry picked from commit e6352d1daa)
2020-06-29 10:46:05 +02:00
Andrii Doroshenko (Xrayez)
63523e56e1 Don't use arbitrary theme editor icons for scripts with the same name
The existing theme editor icon could be unintentionally set for any
global class with matching name (`Group` icon, `Group` class_name etc),
which would only show up in the "Create Dialog" context, but not the
scene tree dock.

This change prevents this behavior, and ensures that the icon can be
actually overidden by explicit icon path in `class_name`, if there's any
custom icon to begin with.

The correct built-in type's icon is fetched for child classes if there
are no custom icons detected throughout base classes as well, so it
isn't left empty for those cases.

(cherry picked from commit c177308f80)
2020-06-26 08:10:24 +02:00
Andrii Doroshenko (Xrayez)
6dee6477dd Optimize class icon loading
`get_global_class_name` for `GDScriptLanguage` is slow because
it forces to parse an entire script each time. This patch ensures
that the icon is actually fetched from the EditorData where they
are loaded beforehand.

This change also makes the behavior consistent with the existing
`get_object_icon` method in EditorNode.

(cherry picked from commit 4a86e2bb76)
2020-06-24 22:52:05 +02:00
Hugo Locurcio
317c9b5fe9 Tweak the invalid preset error message to mention export_presets.cfg
(cherry picked from commit a7b2f3d41a)
2020-06-10 15:30:52 +02:00
Rémi Verschelde
f3fcdfbdd0 PackedScene: Prevent crash when root node has parent attribute
The crash happens further down when setting an invalid owner in
`Node::_set_owner_nocheck` but I couldn't figure out how to fix it.

But here the proper fix is to catch the invalid scene file early on
and fail loading it.

Part of #17372.

(cherry picked from commit c080ec5da2)
2020-06-10 15:30:52 +02:00
Marcus Brummer
6ef0de3f23 Enable text selection in execute output of EditorNode
(cherry picked from commit 85175c67b8)
2020-06-05 12:46:16 +02:00
Hugo Locurcio
9e01a0cd28 Add a getter and property for the editor distraction-free mode
(cherry picked from commit cc1859efed)
2020-06-04 12:16:39 +02:00
Dominik 'dreamsComeTrue' Jasiński
fdf64b1898 Preserving "Sync Scene Changes' and "Sync Script Changes" with Project Settings
Fixes: #38739
(cherry picked from commit 72501ae104)
2020-06-04 12:09:40 +02:00
Eduardo Nunes Pereira
05cd3ff8ba Using command + comma on macOS as default shortcut for editor settings
(cherry picked from commit 75f77f751e)
2020-05-18 16:40:33 +02:00
Hugo Locurcio
0b6bcf90f5 Rename the editor action "Revert Scene" to "Reload Saved Scene"
This option can be used to workaround various issues with stuff
not reloading properly when changes are made.
The option was renamed to clarify the fact that it actually
reloads the scene saved on the filesystem.

(cherry picked from commit 2962819d1c)
2020-05-13 16:09:38 +02:00
Hugo Locurcio
b5d41bb517 Remove Request Docs button in the script editor due to various issues
The Request Docs button is partly responsible for layout overflow
issues on narrow displays, such as #31133.

It also tended to attract spam and low-effort issues that were
difficult to act upon. A "Send Docs Feedback" menu option has been added
to replace it.

(cherry picked from commit 2f6f029a75)
2020-04-16 11:16:08 +02:00
Ivan.Shakhov
d06ae167bf for third-party tools - editor_path is stored in project's editor settings
(cherry picked from commit 2f151068b5)
2020-03-25 11:38:54 +01:00
Haoyu Qiu
d25949dd49 Keeps the filename when marking scene as unsaved
(cherry picked from commit 9ed61a70cc)
2020-03-25 11:30:48 +01:00
Ignacio Etcheverry
110523fecc Expose FileSystemDock to the scripting API and fixed signals
Fixed FileSystemDock's `file_removed` and `folder_removed` signals not being
emitted because the emitted was using the wrong signal name.

(cherry picked from commit fe0b783e70)
2020-03-18 17:57:45 +01:00
Thakee Nathees
15057c9284 Fix EditorFolding crash when switching scenes
(cherry picked from commit 3275e8488b)
2020-03-06 23:51:26 +01:00
Haoyu Qiu
762578e7bc Fixes range hint for default_float_step
(cherry picked from commit dfe9825e00)
2020-02-14 16:32:33 +01:00
PouleyKetchoupp
9c4a6cf745 Fixed Inspector update when a node is renamed
Whenever any node is renamed, EditorNode::_edit_current() is called and it resets plugins used for current edited properties. This change forces the inspector to update even though the same object is edited, to make sure all plugins are restored properly from unfolded properties/resources/etc.

Fixes #32832
2020-01-24 18:12:05 +01:00
Rémi Verschelde
a565c93aeb Export: Properly disable resource preview thread
Fixes #26857.
Fixes #34433.
Fixes #34826.
2020-01-14 11:34:02 +01:00
Rémi Verschelde
017b7de2df EditorNode: Delay addon init to NOTIFICATION_READY
Fixes #25635.
2020-01-13 15:02:11 +01:00
Haoyu Qiu
047d66cc6f Fixes the New Window option in macOS dock menu 2020-01-13 08:58:12 +08:00
Rémi Verschelde
7c29ce4375 Export: Add dedicated --export-pack option to export data pack
The previous behavior relying on the provided extension was problematic
on macOS since .zip is the main extension used for the full project
export (binary + data pack).

We add a dedicated `--export-pack` command line option to define when
only the data pack should be exported. Its extension will still be
inferred from the path.

Fixes #23073.
2020-01-08 14:57:46 +01:00
Rémi Verschelde
5011afcb6a Export: Improve usability of command line interface
I'm barely scratching the surface of the changes needed to make the
--export command line interface easy to use, but this should already
improve things somewhat.

- Streamline `can_export()` templates check in all platforms, checking
  first for the presence of official templates, then of any defined
  custom template, and reporting on the absence of any.
  Shouldn't change the actual return value much which is still true if
  either release or debug is usable - we might want to change that
  eventually and better validate against the requested target.

- Fix discrepancy between platforms using `custom_package/debug` and
  `custom_template/debug` (resp. `release`).
  All now use `custom_template`, which will break compatibility for
  `export_presets.cfg` with earlier projects (but is easy to fix).

- Use `can_export()` when attempting a command line export and report
  the same errors that would be shown in the editor.

- Improve error reporting after a failed export attempt, handling
  missing template and invalid path more gracefully.

- Cleanup of unused stuff in EditorNode around the export workflow.

- Improve --export documentation in --help a bit.

Fixes #16949 (at least many of the misunderstandings listed there).
Fixes #18470.
2020-01-07 14:25:56 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Rémi Verschelde
86a732b136
Merge pull request #34680 from Calinou/editor-export-nonzero-exit-code-error
Exit the editor export process with a non-zero exit code on error
2019-12-30 18:07:36 +01:00
Rémi Verschelde
388318ad4c
Merge pull request #34614 from qarmin/dont_create_preview_of_empty_scene
Don't create preview of empty scene.
2019-12-30 17:13:07 +01:00
Hugo Locurcio
79494992e4
Exit the editor export process with a non-zero exit code on error
This closes #34672.
2019-12-30 14:34:06 +01:00
Rafał Mikrut
542945f5f0 Don't create preview of empty scene. 2019-12-26 09:15:36 +01:00
Haoyu Qiu
078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Haoyu Qiu
d53c392b34 Centers Dock Position text 2019-12-23 09:37:36 +08:00
Haoyu Qiu
7a9c337dfe Makes more strings in editor translatable
* File type names in file dialogs
* Layout option names
* Visual shader editor UI
2019-12-16 16:41:07 +08:00
Haoyu Qiu
6f178a2061 Fixes infinite loop when switching editor 2019-12-11 13:27:21 +08:00
Rémi Verschelde
2845e6a21a
Merge pull request #34040 from qarmin/unused_variable_more_precise_numbers
Removed unused variables, add some constants numbers
2019-12-10 08:25:31 +01:00
Rafał Mikrut
ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Haoyu Qiu
93f00c0303 Fixes prompt closes the wrong scene when exiting 2019-12-06 21:46:01 +08:00
PouleyKetchoupp
dd552494eb Debug menu in editor doesn't hide on checkbox toggle
Fixes #33850
2019-11-25 16:25:54 +01:00
Rémi Verschelde
41634199c8 EditorNode: Improve tooltip for pause button
Closes #14742.
2019-11-14 11:44:20 +01:00
PouleyKetchoupp
824bc3fed8 Keep focus on the top-most node for multi-selection in scene tree
Makes behavior consistent with selecting/deselecting single nodes and fixes a regression about the focused node being lost when multi-selecting.

Fixes #33332
2019-11-10 09:37:51 +01:00
PouleyKetchoupp
133014c3fb Fixed errors when saving scene with a shrunk viewport
Handle viewport size larger than preview size but very close, when the ratio was 1 the size ended up being 0.

Fixes #33497
2019-11-09 21:16:19 +01:00
Michael Alexsander
36c4fd8935 Make the editor dimming smarter 2019-10-31 16:58:53 -03:00
Rémi Verschelde
35944aebde
Merge pull request #33019 from volzhs/class_icon
Resize custom class icon
2019-10-23 21:48:40 +02:00
volzhs
9131f70d8a Resize custom class icon 2019-10-24 03:55:56 +09:00
Rémi Verschelde
2d6cf9cc56
Merge pull request #33009 from ebert83/fix_editor_save_layout
Fix layout saving error
2019-10-23 15:31:48 +02:00
Thomas Ebert Hansen
d62ab4ab10 Fix layout saving error
As a result of commit b49226e085 FileAccess::open no longer returns ERR_CANT_OPEN if the file cannot be found/opened.
Instead check against ERR_FILE_NOT_FOUND or ERR_FILE_CANT_OPEN.
2019-10-23 15:02:51 +02:00
Fabio Alessandrelli
2ae3631318 Fix EditorNode.get_editor_theme
EditorNode was not correctly setting the class memeber when creating the
theme, using a local variable instead.
Theme is now created before registering exporters (as they might need it).
2019-10-23 10:59:03 +02:00
Mark Riedesel
6a85614d86 expose EditorSpinSlider to GDScript 2019-10-20 11:54:35 -04:00
Michael Alexsander Silva Dias
4689ece741 Minor visual adjustment in drag preview of the scene and file tree editors 2019-09-30 13:36:49 -03:00
Ruslan Mullayanov
4d5298ed7d Fixed unable to open project data folder
Removed `default` case to prevent hiding such errors in the future.

Fixes #31939.
2019-09-26 08:17:07 +02:00
Rémi Verschelde
dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00