When making items visible from the visual server, the collision check is deferred to prevent two identical collision checks when set_pairable is called shortly after.
It turns out that for some items (especially meshes), set_pairable is never called. This PR detects this occurrence and forces a collision check at the end of the routine.
`OS.get_screen_scale` will now return the `window.devicePixelRatio`
value, `OS.get_screen_dpi` uses CSS media queries to find approximate
DPI value for the current display.
`OS.get_screen_size` also return the actual screen size (not the CSS
pixel size).
According to the docs at
https://docs.godotengine.org/en/stable/tutorials/plugins/editor/import_plugins.html#the-editorimportplugin-class
> The get_visible_name() method is responsible for returning the name of
> the type it imports and it will be shown to the user in the Import dock.
> You should choose this name as a continuation to "Import as", e.g.
> "Import as Silly Material"
I've verified Godot's behavior reflects this, so the code examples
should reflect this.
Also document propagating save error in EditorImportPlugin.
It seems that the suggested code ignores any error from
`ResourceSaver.save`, but I think we should return it.
(cherry picked from commit 9676650f2f)
The input to smoothstep is not actually a weight, and the decscription
of smoothstep was pretty hard to understand and easy to misinterpret.
Clarified what it means to be approximately equal.
nearest_po2 does not do what the descriptions says it does. For one,
it returns the same power if the input is a power of 2. Second, it
returns 0 if the input is negative or 0, while the smallest possible
integral power of 2 actually is 1 (2^0 = 1). Due to the implementation
and how it is used in a lot of places, it does not seem wise to change
such a core function however, and I decided it is better to alter the
description of the built-in.
Added a few examples/clarifications/edge-cases.
(cherry picked from commit 7f9bfee0ac)
Setting each point's position was missing for 3D. Now enabling collision
render debug will display contact points for 3D physics, the same way it
does for 2D physics.
Note: Multimesh rendering seems not to work in this scenario on master,
but it's working fine on 3.2.
(cherry picked from commit e5e9be8355)
Issues addressed:
a) Axis mappings were including virtual mouse axes on NVIDIA Shield TV.
The virtual mouse axes have the same axis numbers as the normal analog stick numbers. This was completely breaking joypad support on NVIDIA Shield TV.
b) Joypads were being tracked in a List with the index in the list being treated as the Godot device id.
If a device were to be removed, any device later in the list would be shifted, potentially causing future events with the shifted joypads to have incorrect IDs according to the Godot engine.
c) Unnecessary events were being sent to the Godot engine.
A check was added (per Joystick) that will prevent sending events for all axes when only a single axis value changed.
A similar check was added for "HATs".
See #45712
Reordering an item from after a copybackbuffer to before would result in the wrong thing being rendered into the backbuffer.
This PR puts in a check to prevent reordering over such a boundary.
This adds `custom_modules_recursive` which allows to detect and collect
all nested C++ modules which may reside in any directory specified by
`custom_modules` option.
The detection logic is made to be more strict because `SCSub` may be
used for organizing hierarchical builds within a module itself, so the
existence of `register_types.h` and `config.py` is checked as well
(these are all required for a C++ module to be compiled by Godot).
For performance reasons, built-in modules are not checked recursively,
and there's no benefit of doing so in the first place.
It's now possible to specify a directory path pointing to a *single*
module, as it may contain nested modules which are detected recursively.
(cherry picked from commit a3c2c1e18a)