Backport of this PR: https://github.com/godotengine/godot/pull/63597
This adds these as new Built-Ins to Spatial Shaders
* Object's Position in World Space
* Camera Position in World Space
* Camera Direction in World Space
* Object's Position in View Space
Currently, with stay_in_script_editor_on_node_selected as On, inspector_only is forcibly set, and no editors from the node selected are displayed.
With this change, if the selected Node has a Main Editor, it's still not shown (the intended behaviour of the feature), but the sub-editors are shown, this correctly opens the AnimationPlayerEditor plugin and other sub-plugins.
Fixes and closes#63621.
(cherry picked from commit eaaedb24a3)
This fixes an issue with visual scripts spamming error messages
in the editor when running the project with the remote scene tree
visible.
(cherry picked from commit 829c824755)
Selecting nodes in the Scene dock automatically switches to the relevant 2D
or 3D viewport. This behavior can be annoying while using the Script Editor
and wanting to inspect node properties, so it's now disabled by default when
the Script Editor is active.
This new behavior can be changed back to the previous auto-switching using
the `text_editor/navigation/stay_in_script_editor_on_node_selected` editor
setting.
(cherry picked from commit c4433c3793)
This causes EditorProperty nodes to intercept input events even when the
Editor Properties dialog is not visible. This means that after closing
the dialog, ctrl+shift+c will still copy the last selected property
path.
Fixes#62866.
Add EditorAssetLibrary::is_available which always returns false in the
Web editor and use it in EditorNode for detection.
(cherry picked from commit 0e504e4191)
Instead of reusing the custom_template/ prefix which is actually only
used for the prebuilt APK workflow, we add a new custom_build/ prefix.
This is a slight compat breakage (users will have to redo their config)
but enables us to group the Min SDK and Target SDK options where they make
sense, and avoid reusing the previously hardcoded Target SDK 30 from
Godot 3.4.
Those two options are now strings instead of integers so that we can keep
them empty by default, and show their default value using a placeholder.
So some validation has been added to make sure they are proper ints.
The upper bound on Target SDK was also removed as it's a common use case
to use it to try to target newer released SDKs. But we warn the user that
this wasn't validated by us.
The export info dialog is now exclusive so that when it doesn't auto-close,
i.e. when it errors, you don't close it by mistake by clicking outside.
Fixes#62465.
This expands uppon #60708, using `get_node("%NodeName")` for nodes that
have a unique scene name to avoid having to change the onready
statements when the paths of the nodes change.
(cherry picked from commit 1101f6c660)
according to the discussion in issue #62553,
the FlowContainer icons don't get color-adjusted for Light theme
and it's because the color code is off.
to fix this issue, i recolored them to be the same icon as the Control icon,
an icon that i already know Does get recolored for Light theme.
Having a mix of settings with and without subcategory makes the 'Editor'
section stand out with a weird UX, as instead of simply being a foldable
section like the others, it also holds its own top-level settings and is
therefore selectable.
This wasn't the case in 3.4, and is fixed in 4.0 by refactoring, so for
3.5 we should preserve the 3.4 UX, even if it's not the best.
Backports features and bugfixes from current Godot 4.0 to 3.5 and brings functions and codebase of both version largely in sync to make tutorials more compatible and future backports easier.
Fixed UI bug where it appeared that pushing the up or down incrementing
arrows did not increment the SpinBox value appropriately. Just needed
to increase the size of the box horizontally, to display four decimal
points consistently.
(cherry picked from commit 09658f7e3b)
When populating a MultimeshInstance (node), Godot would set the
new Multimesh's color and custom data format as the current node's
multimesh, which would cause a crash if node's multimesh is null.
Populate Function will now check if node has a multimesh or not, and
set the new multimesh with default (NONE) values if node's multimesh is
null.
Fixes Issue #61553
The new default value (1800) allows storing 30 seconds of profiling
at 60 FPS.
The new maximum value (10000) allows storing about 3 minutes of
profiling at 60 FPS.
The profiler graph will scale accordingly to the chosen setting,
so the default value is kept relatively low to prevent the graph
from looking too squished on narrow displays.
GitHub doesn't allow CORS so we can't download assets from it.
There'd also be more work needed for the Asset Library plugin to be
usable in the Web editor even if that was supported.
(cherry picked from commit 42b48496de)
The call to draw the handles in the OccluderPoly was spamming errors when the hole has no points. This PR prevents trying to draw the gizmo for the hole when there are no points, which prevents the spam.
This is in contrast to the previous signal in use - "pressed", which doesn't get emitted on simple clicks on the OptionButton to open the popup.
Also, fixes the ids using which the metadata was being set on the items on the commit list. The commit list size button items now work as expected
Change the order of checks in _class_desc_select to first try checking current page and GlobalScope before resorting to slicing either side of the first ".". This may change previous search behaviours - previously if both x.y and @GlobalScope.x.y existed, _class_desc_select would select the former; it will now select the latter.
Also tidies up some comments.
- Don't use minimum size for project order/filter controls.
This also allows the filter field to become longer at large
window sizes.
- Hide the loading label instead of changing its opacity.
This causes a reflow during loading, but this is preferable to having
the UI overflow.
- Hide the language dropdown on Android as it doesn't work correctly.
This allows the project manager to be displayed correctly at much
lower window sizes than previously.
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NOEDITOR
References to "idle time" are progressively being replaced by
"process time" throughout the engine to avoid confusion.
This also changes some debug prints to be printed only when verbose
mode is enabled (like in `master`).
Automatically starts the editor debug server at given <IP>:<PORT>.
E.g.:
# Run editor and debug server listening on any interface, port 8080
godot3 -e --path proj/proj_empty --debug-server *:8080
# Run the godot project connecting to that debug server.
godot3 --path proj/proj_empty --remote-debug 127.0.0.1:8080
This replaces the existing "chainlink" instance icon that was
used for external links. That icon is still used for scene instancing.
The icon was designed by redlamp.
Co-authored-by: Taylor Wright <taylor@redlamp.org>
(cherry picked from commit 5626d026d8)
Autoloaded scripts should always inherit from Node. When you run a
project that tries to autoload a script which doesn’t inherit from Node,
then Godot gives an error.
Before this change, the error said “Script does not inherit a Node”.
That error message is a little bit misleading. If a class inherits a
Node, then one of its superclasses has a Node. If a class inherits
_from_ Node, then one of its superclasses is Node. This change corrects
that mistake.
Fixes#59884.
(cherry picked from commit 1cc7e7ec33)
This pull request resolves an issue where images being imported with lossless compression allowed you to select a normal map, but the normal map only applies if you're using VRAM compression. Thereby making it redundant to appear when using lossless compression. This pull request hides the normal map option when lossless compression is selected.
Resolves: #59435
(cherry picked from commit 01ca9d3eec)
The new `edit/loop_mode` import options lets user choose to either:
- Detect loop points from the WAV (default, same behavior as before)
- Set the loop mode and loop points manually like in AudioStreamSample
Fixes#46164.
(cherry picked from commit b389ce5ccd)
These set of changes focus primarily on getting the core logic and overall Godot Editor UI and functionality up and running natively on Android devices.
UI tweaks / cleanup / polish, as well configuration for Android specific functionality / restrictions will be addressed in follow-up PRs iteratively based on feedback.
Co-authored-by: thebestnom <shoval.arad@gmail.com>
- Add support for explicit values in properties using `PROPERTY_HINT_FLAGS`
that works the same way it does for enums.
- Fix enums and flags in VisualScriptEditor (it wasn't considering the
explicit value).
- Use `PROPERTY_HINT_FLAGS` for C# enums with the FlagsAttribute instead
of `PROPERTY_HINT_ENUM`.
Instead of displaying the exact string, now Godot uses the Time
singleton to calculate the date string from the UTC Unix timestamp and
also uses Time's timezone offset conversion to string function
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.
Each class XML's schema conformance is also checked on GitHub Actions.
Since some porjects may be relying on the former behavior, this is opt-in via a new project setting, disabled by default, but enabled for new projects, since it's the new standard behavior (and the only one in 4.0).
The EditorProperty UI elements for project settings are created from
SectionedInspector, which has a prefix added to each property path. Each
EditorProperty needs to be made aware of this path so copy_property_path
copies the full path, and not just the suffix.
Fixes#59020.
(cherry picked from commit d271e2517e)
get_cursor_shape() is used in cases where a Control displays different cursors in different areas.
There is no need to set the default cursor shape on every mouse move event.
Fix minor issue with selection order.
(cherry picked from commit 0d96dbcb2a)
get_cursor_shape() is used in cases where a Control displays different cursors in different areas.
There is no need to set the default cursor shape on every mouse move event.
(cherry picked from commit 24942214d9)
get_cursor_shape() is used in cases where a Control displays different cursors in different areas.
There is no need to set the default cursor shape on every mouse move event.
(cherry picked from commit 4a8a6f892f)