Commit graph

682 commits

Author SHA1 Message Date
Hugo Locurcio fc5e60f4cc
Use 75% editor scale on small displays automatically
This also makes borders always display in the editor theme,
even if the editor scale is below 100%. Otherwise, "focus" outlines
would vanish when using an editor scale below 100%,
which harms usability.
2020-11-17 11:17:41 +01:00
willnationsdev 8a02f221b4
Add script class categories to EditorInspector.
(cherry picked from commit 644de52ca9)
2020-11-11 15:12:00 +01:00
Fabio Alessandrelli 7a0710f91a
EditorNode now copies all drag and dropped files.
The editor used to only copy drag-dropped files in the File System pane
if the given file was a valid resource, or had a specific file format
(ttf, otf).
With this PR, all drag and dropped files are copied instead, no matter
their extension.

(cherry picked from commit 410b324740)
2020-10-19 16:10:00 +02:00
Hugo Locurcio e4e4140c6f
Improve editor tooltips related to debugging
Some option names have also been made longer as we can afford using
more space to display them.

(cherry picked from commit a46802f07c)
2020-09-24 14:43:09 +02:00
Aaron Franke 76a8458753
Make the Import dock depend on the FileSystem dock
(cherry picked from commit de6f8f9d21)
2020-09-24 14:43:05 +02:00
Yuri Sizov 44ff9cdea5 Fix errors saving a 2D scene preview when the 2D editor was never opened
(cherry picked from commit e2b85b74a2)
2020-07-28 00:56:20 +02:00
Tomasz Chabora 2bcb9d2a04 Fix run project when current scene was never saved
(cherry picked from commit 9c84e34fd4)
2020-07-24 10:31:57 +02:00
Stijn Hinlopen b7b8f8645f Open scene selected from Quick Open dialog.
(cherry picked from commit 1ce3a77a42)
2020-07-24 10:31:56 +02:00
rileylyman 582b4318f8 implement generic filename disambiguation
A static function is added to EditorNode which allows for filename
disambiguation given a list of filenames and the corresponding list of
absolute paths for those files. This function is then used to
disambiguate scene and script tabs in the editor.

(cherry picked from commit 4285211f40)
2020-07-24 10:31:56 +02:00
coldragon a0f0aa1741 Fix crash on editor without a feature profile
(cherry picked from commit f2a01b0c6b)
2020-07-10 11:01:31 +02:00
Yuri Sizov bd90f236d3 Improve scene preview generation for empty scenes and disabled features
(cherry picked from commit 6c8a9b7690)
2020-07-08 09:01:57 +02:00
bruvzg e9ab41b71d
[macOS, 3.2] Implement seamless display scaling. 2020-07-07 22:54:33 +03:00
Yuri Sizov 2b4773f0cf Expose methods to play scene from plugin code
(cherry picked from commit 49f6dc5004)
2020-07-06 19:00:56 +02:00
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