Print this error only when trying to instantiate the script. This way we prevent errors being printed for source files which are not meant to be used as scripts.
(cherry picked from commit f8ce412560)
Input source types are not pure bit flags, they are combinations of
flags, so != 0 check was incorrect and resulted in crashes later, when
trying to obtain the device.
(cherry picked from commit 5dffa506dc)
e is referred to as Euler’s number, so technically the MATH_EXP description in VisualScript doc was not incorrect, though could potentially lead to confusion.
e is different from Euler’s constant however, making the existing GDScript exp & VisualScriptMathConstant descriptions nvalid.
(cherry picked from commit b6b8c7b215)
ItemList needs to check against the number of items available when the user moves the selection via "ui_right" action.
(cherry picked from commit cbcb96ae85)
Letting users of `PopupMenu` use them. `OptionButton` was one of those interested and is updated in this commit.
Fixes#18063.
(cherry picked from commit b964a9e678)
They work exactly the same as current checkbox-decorated items, but in order to preserve compatibility, separate methods are used, like `add_radio_check_item()`. The other option would have been to add a new parameter at the end of `add_check_item()` and the like, but that would have forced callers to provide the defaults manually.
`is_item_checkable()`, `is_item_checked()` and `set_item_checked()` are used regardless the item is set to look as check box or radio button.
Keeping check in the name adds an additional clue about these facts.
Closes#13055.
(cherry picked from commit ab3b1d9f3e)
For some glTF files, the order of bones in the skeleton array wasn't matching the joints array in the meshes.
Fixes#17808.
(cherry picked from commit d8765dd103)
fixes#17325.
The bone pose transform was created by setting the rotation and
**then** scaling the transform. This leads to object "deformation"
that's not intended.
(cherry picked from commit 4303fbca5a)
Since create_outline can only make outline for PRIMITIVE_TRIANGLES,
when QuadMesh (which is PRIMITIVE_TRIANGLE_FAN) is used to create
outline, will leave `arrays` empty, and crash when it is being indexed
for "indices" subarray.
This PR shows error when there's only one surface and it is not
TRIANGLES. Also prevent the crash if it has more than one surface
and none of them are TRIANGLES (and any other cases that could leave
`arrays` empty) by checking the size of `arrays` == 8 before indexing
it, since the method seems to expect `arrays` to be of that size.
(cherry picked from commit a492d22952)
It is possible that input comes before the engine is fully initialized.
This fixes the crashes that ocurred when that happens.
(cherry picked from commit 995724b762)
Fixes#16923. I'm not a fan of the special case for scripts in editor_node.cpp, but in any case,
I made it so it wouldn't make the external editor to re-open just because we switched scenes.
(cherry picked from commit f5147befb6)
When `p_points.size() > p_colors.size()`, it crashed with invalid
array access to `p_colors`. Also, when `p_colors` was an empty
`Vector` it crashed due a missing `else` checking the `size`
condition, as the code handling that special case exists.
This PR fixes the missing `else` for `p_colors.size == 0` and,
following the `canvas_item_add_multiline` spirit, it only uses the
first color for the whole polyline if points and colors differ in
size.
Fix#17621.
(cherry picked from commit 8eedb2afe2)