Besides the regular option to export GDScript as binary tokens, this
also includes a compression option on top of it. The binary format
needs to encode some information which generally makes it bigger than
the source text. This option reduces that difference by using Zstandard
compression on the buffer.
This adds back a function available in 3.x: exporting the GDScript
files in a binary form by converting the tokens recognized by the
tokenizer into a data format.
It is enabled by default on export but can be manually disabled. The
format helps with loading times since, the tokens are easily
reconstructed, and with hiding the source code, since recovering it
would require a specialized tool. Code comments are not stored in this
format.
The `--test` command can also include a `--use-binary-tokens` flag
which will run the GDScript tests with the binary format instead of the
regular source code by converting them in-memory before the test runs.
Now that GDScript type hints improve performance since Godot 4.0
and the community is increasingly getting used to typed GDScript,
it makes sense to add type hints by default.
Official demos will also be moving to type hints at some point
in the future, further increasing the relevance of enabling type
hints out of the box.
The editor setting makes it possible to tweak V-Sync status
independently of the project setting.
Use cases:
- Decrease input lag and increase editor responsiveness when editing
a project that has V-Sync enabled.
- Avoid tearing when editing a project that has V-Sync disabled.
Each time an AABB is rotated, it gets bigger. That means opposite rotations don't cancel out.
The previous implementation repeatedly rotates children AABBs as it climbs up the tree. This often resulted in selection boxes looking bigger than their contents.
This implementation calculates and applies a single final transformation to each AABB before it is merged with the others. After merging, there are no additional rotations, so AABBs remain accurate.
Co-Authored-By: Robert Yevdokimov <105675984+ryevdokimov@users.noreply.github.com>
This PR also adds default font styles for RichTextLabels
in the editor, and improves the introduction dialog
when you don't have any local projects available.
The offline mode is implemented in the asset library
plugin, alongside some code improvements.
Not everything is yet implemented, either for Godot or personal
limitations (I don't have all hardware in the world). A brief list of
the most important issues follows:
- Single-window only: the `DisplayServer` API doesn't expose enough
information for properly creating XDG shell windows.
- Very dumb rendering loop: this is very complicated, just know that
the low consumption mode is forced to 2000 Hz and some clever hacks are
in place to overcome a specific Wayland limitation. This will be
improved to the extent possible both downstream and upstream.
- Features to implement yet: IME, touch input, native file dialog,
drawing tablet (commented out due to a refactor), screen recording.
- Mouse passthrough can't be implement through a poly API, we need a
rect-based one.
- The cursor doesn't yet support fractional scaling.
- Auto scale is rounded up when using fractional scaling as we don't
have a per-window scale query API (basically we need
`DisplayServer::window_get_scale`).
- Building with `x11=no wayland=yes opengl=yes openxr=yes` fails.
This also adds a new project property and editor setting for selecting the
default DisplayServer to start, to allow this backend to start first in
exported projects (X11 is still the default for now). The editor setting
always overrides the project setting.
Special thanks to Drew Devault, toger5, Sebastian Krzyszkowiak, Leandro
Benedet Garcia, Subhransu, Yury Zhuravlev and Mara Huldra.
This reverts commit c7f68a27ec.
We still think GDScript files need UIDs to allow safe refactoring,
but we're still debating what form those should take exactly.
So far there seems to be agreement that it shouldn't be done via an
annotation as implemented here, so we're reverting this one for now,
to revisit the feature in a future PR.
The engine internally limits the number of functions reported back (to
16 by default). To this point, it's been sort the profiling info in
*ascending* order of time spent, then trimming the list. This meant
we may only see the best (fastest) functions, instead of the worst
that you probably want when profiling.
Now the servers_debugger sort more closely matches the local_debugger
one, which worked fine.
This is more explicit as for why this functionality isn't available
depending on editor settings and current platform.
This also exposes a `EditorInterface.is_multi_window_enabled()` method
so that editor plugins can easily query whether the editor is able and
expected to create multiple windows.
This also makes errors related to asset image loading
verbose-only, because, frankly, users can't do much about
those errors. Spamming them with error messages
about some assets on the frontend being broken
is pointless.
Behavior is now consistent across 2D and 3D editors.
- By default, drag-and-dropping adds the scene as a child of the selected
node. Hold Alt when releasing the mouse to add the scene as a child
of the root node, or Shift to add the scene as a sibling of the selected
node.
- To choose a different node type in the 2D editor when drag-and-dropping
a texture resource, hold Alt + Shift (instead of just Alt).
- If multiple nodes are selected, only the first one is taken into account.
This was previously the behavior in 2D, but not in 3D (an error dialog
appeared instead). This makes the UI more forgiving.
This adds a new enum `KeyLocation` and associated property
`InputEventKey.location`, which indicates the left/right location of key
events which may come from one of two physical keys, eg. Shift, Ctrl.
It also adds simulation of missing Shift KEYUP events for Windows.
When multiple Shifts are held down at the same time, Windows natively
only sends a KEYUP for the last one to be released.
Adds two new GDExtension interface methods:
- `editor_help_load_xml_from_utf8_chars`
- `editor_help_load_xml_from_utf8_chars_and_len`
Both of these methods parse the XML passed into an extra documentation
container which, when needed, is merged into the main doc container.
Co-Authored-By: Rémi Verschelde <rverschelde@gmail.com>
- Extract individual components to their own files.
- Improve order of declarations and definitions within those files.
- ProjectDialog is only extracted as there are upcoming
PRs touching on it.
Also fix cases where node name was not visually updated because name was not changed
Co-Authored-By: Nông Văn Tình <53887662+nongvantinh@users.noreply.github.com>
This change adds a new editor setting related to theming
which controls base and additional spacing used in the
generated editor theme. These values can also be changed
manually by the user to customize their experience.
Limited effort was applied to make sure both Compact and
Spacious presets work and look fine, but further tuning
and adjustments are totally expected. Some controls will
require layout changes or additional fixes to their constants.
This change introduces a new theme configuration struct to be
passed to the aforementioned routines to better control reuse
of styles and definitions in the generator.
Everything not passed and not explicitly shared is scoped so it
is not automatically accessible throughout the routine. This
should ensure that the decision to share styles is a conscious one.
In the future we will try to reduce the number of unique definitions
and share most of it. This PR is a stepping stone on this path.
This also puts the effort into separating redefinitions of
default theme items vs custom types introduced only by the editor.
In a few cases where editor-specific definitions need to reference
default definitions we simply fetch them from the theme. It's not
ideal and hides the dependency a bit, but hopefully these cases
will be abstracted properly in due time.
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.
Since this uses `OS.shell_open()`, this allows the use of any standard URL
including `file://` paths, `mailto:`, custom protocols set up by the user, etc.
This intends to be the correct way to handle non-child windows becoming covered by the current window when becoming focused.
Enabling this property on select windows, they will become transient to the currently focused one when becoming visible.
This deprecates the "unparent_when_invisible" function introduced by #76025.
When the label's `autowrap_mode` is `AUTOWRAP_WORD_SMART` and the initial `text`
is set at the same time, it may have a higher height.
Set an appropriate minimum size for labels in windows that display incorrectly
so that these controls display properly.
The icons of custom resources created with `class_name` and annotated with `@icon` or GDExtensionen resources that have an icon specified in the .gdextension file are not appearing in the `EditorResourcePicker`. The problem is that the `EditorResourcePicker` retrieves the editor theme icon for the resource type and defaults to the `Object` icon if the type wasn't found. This will apply both to `class_name` and GDExtension resources.
This solution addresses the issue by replacing the usage of `Control::get_editor_theme_icon` with `EditorNode::get_class_icon` to ensure the correct icon is retrieved for the resource. Additionally, this fix removes the `custom_resources` lookup above that call, as these resources, added through `EditorPlugin::add_custom_type`, were not being included in the allowed types within `_add_allowed_type` in the `EditorResoucePicker`. Currently, these particular custom resources are never displayed in the picker. The related issue is logged here: #75245.
Fixes#86072.
* Adds an icon to all the input-adjacent add/remove buttons
* Adds a separator next to the action map "add" button
* Changes the Shader Globals editor to be consistent with the others
* Adds a clear button to the shader global name input
Scrolling focuses towards mouse like in canvas editor.
Center view on opening.
Adjust scroll area to include polygons larger than texture.
Change zoom slider to EditorZoomWidget.
Prevents losing nodes owned by the edited scene when
toggling editable_children off on an instanced scene,
and makes the toggle compatible with undo-redo.