Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-picks for the 3.5 branch (future 3.5.2) - 1st batch #69589

Merged
merged 57 commits into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
52ab4ef
Fix String::word_wrap() for long words
timothyqiu Aug 18, 2022
108e319
Improve %f formatting for inf and nan
MarcusElg Aug 25, 2022
a0f1eac
[Windows, 3.x] Fix WM_CHAR processing code using Unicode char instead…
bruvzg Sep 23, 2022
c7c8cc3
Fix debanding strength being affected by environment adjustments
Calinou Sep 23, 2022
f8eed63
Fix NavigationObstacle not registering to default navigation map
timothyqiu Sep 28, 2022
0fdda75
Fix NavigationObstacle not estimating radius
timothyqiu Sep 29, 2022
1aaaed8
Fix crash executing `MultiMesh.reset_instance_physics_interpolation`
timothyqiu Oct 2, 2022
945991e
Fix avoidance calculation on NO_THREADS build
smix8 Oct 3, 2022
3869ea3
Fix GDScript export hint for Navigation2D layer names
smix8 Oct 4, 2022
560c77b
HTML5: Add missing `OS::get_cursor_shape()` implementation
akien-mga Oct 4, 2022
f5b2f77
Fix null in android keyboard handling.
jasonwinterpixel Oct 5, 2022
d08b312
Document (Omni/Spot)Light ignoring Spatial's scale property
Calinou Oct 8, 2022
5476554
Fix Editor crash when MeshLibrary gets replaced while used in an open…
smix8 Oct 9, 2022
422d7fa
Hide text of RichTextLabel if BBCode is enabled
KoBeWi Oct 11, 2022
05cb898
Update the `clean` task configuration
m4gr3d Oct 19, 2022
485ec0d
Fix get_path() error when calling get_node()
timothyqiu Oct 19, 2022
d7ae42d
Document known issues with CylinderShape
Calinou Oct 19, 2022
15681a6
Fix wrong owner for editor plugin created nodes in instanced scene
timothyqiu Oct 20, 2022
f29f387
Fix error when having BoneAttachment before PhysicalBone
timothyqiu Oct 21, 2022
5684018
Fix spatial gizmo still active when node is deselected
timothyqiu Oct 27, 2022
1f50a0b
fix: emit target_reached signal after updating state
sambriels Oct 31, 2022
ac40d19
Docs Clarify Array.fill behavior when reference type is passed in
kleonc Oct 31, 2022
989e492
Clarify offset parameter behavior in RegEx methods
timothyqiu Nov 1, 2022
3898521
Improve dragging scene into 3D viewport
timothyqiu Nov 1, 2022
0ac86df
[3.x] Fix c# Array.Shuffle incorrect mono bindings
dzil123 Nov 2, 2022
c3210df
[3.x] PCKPacker Fix error spam
dzil123 Nov 16, 2022
d6812ff
[3.x] Fix shader compiler asan out of bounds
dzil123 Nov 16, 2022
bb3cd4a
Backport navigation crash fixes
timothyqiu Nov 22, 2022
52d62f6
Update nanosvg to GIT (2022.11)
DeeJayLSP Nov 29, 2022
3f3597a
Update project window title when a project setting was changed
Maran23 Dec 1, 2022
056e99a
Fix TreeItem.remove_child not updating Tree immediately
timothyqiu Dec 4, 2022
84eed3b
[TextMesh, 3.x] Fix auto-translation and ignore control chars.
bruvzg Dec 4, 2022
e639cb4
Correctly compute inverse_mass when inertia is defined by user
BimDav Nov 14, 2022
d4f402b
fix exporting Android APPLICATION_ATTRIBS (3.X)
Gromph Nov 22, 2022
b07bcf5
[3.x] Add missing argument to AnimationNodeBlendTreeEditor::_delete_n…
asalazar516 Nov 30, 2022
26012ed
Fix the logic used to route `InputEventScreenDrag` events to `Control…
m4gr3d Oct 20, 2022
63c3909
Port `Input.action_press/release()` changes
YeldhamDev Sep 27, 2022
e8a4e76
Fix "!script_data is true" when updating placeholder scripts for GDNa…
and3rson Sep 22, 2022
a9e897d
Move duplicated drawing code from `Sprite3D`/`AnimatedSprite3D` to `S…
kleonc Sep 18, 2022
7d2701c
`SpriteBase3D` Fix drawing AtlasTextures with vertical margins differ…
kleonc Sep 18, 2022
4bf7695
Update AudioStreamGeneratorPlayback.xml
Commander-Firestrike Sep 10, 2022
5089429
Fix DirAccessWindows::make_dir() choking on ".."
nikitalita Sep 26, 2022
50dfb52
Cast dragged file extension name to lowercase, closes #68104
alfredbaudisch Nov 1, 2022
8065ac2
`SpriteFramesEditor` Fix calculating frame index from mouse position
kleonc Oct 30, 2022
c9adfec
Add buffer size check to Image.load_tga_from_buffer(). Fixes #67985
Klowner Oct 30, 2022
394bfa0
Handle closed splines in Collada importer
Klowner Oct 24, 2022
52e25bc
Fix exporting big templates
qarmin Oct 19, 2022
a49a907
Changed normal of CylinderMesh to account for slanted side.
jbcolli2 Oct 12, 2022
76f219a
Debugger: Fix fetching source to link C++ error on GitHub
akien-mga Oct 6, 2022
f0668f5
Fix checking if script is attached to any node belonging to scene
kleonc Sep 21, 2022
4c00e4c
Fix Image::bump_map_to_normal_map incorrectly keeping mipmap flag
dzil123 Nov 1, 2022
8f01733
Fix static object destructors being called on gpu selection with X11
Abdul-AZ Nov 7, 2022
0145259
[macOS] Update activation hack to work on Ventura.
bruvzg Nov 17, 2022
4aa84f1
Updated Recast to 4fef044
grahamboree Nov 26, 2022
4ee12fa
Project Manager: Fix hacky code for project rename
akien-mga Nov 29, 2022
c49ee15
Don't try to import unknown dependency from scan
WindyDarian Oct 19, 2022
b012fed
Fix Skeleton3D falsely assuming all physical bones will be children o…
CheesecakeCG Oct 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3098,6 +3098,7 @@ Ref<Image> Image::rgbe_to_srgb() {
void Image::bumpmap_to_normalmap(float bump_scale) {
ERR_FAIL_COND(!_can_modify(format));
ERR_FAIL_COND_MSG(write_lock.ptr(), "Cannot modify image when it is locked.");
clear_mipmaps();
convert(Image::FORMAT_RF);

PoolVector<uint8_t> result_image; //rgba output
Expand Down
5 changes: 5 additions & 0 deletions core/io/pck_packer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ Error PCKPacker::pck_start(const String &p_file, int p_alignment) {
};

Error PCKPacker::add_file(const String &p_file, const String &p_src) {
ERR_FAIL_COND_V_MSG(!file, ERR_INVALID_PARAMETER, "File must be opened before use.");

FileAccess *f = FileAccess::open(p_src, FileAccess::READ);
if (!f) {
return ERR_FILE_CANT_OPEN;
Expand Down Expand Up @@ -165,6 +167,9 @@ Error PCKPacker::flush(bool p_verbose) {
}

file->close();
memdelete(file);
file = nullptr;

memdelete_arr(buf);

return OK;
Expand Down
2 changes: 1 addition & 1 deletion core/os/dir_access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ Error DirAccess::copy(String p_from, String p_to, int p_chmod_flags) {
const size_t copy_buffer_limit = 65536; // 64 KB

fsrc->seek_end(0);
int size = fsrc->get_position();
uint64_t size = fsrc->get_position();
fsrc->seek(0);
err = OK;
size_t buffer_size = MIN(size * sizeof(uint8_t), copy_buffer_limit);
Expand Down
1 change: 1 addition & 0 deletions core/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,6 +1049,7 @@ ProjectSettings::ProjectSettings() {
// Initialization of engine variables should be done in the setup() method,
// so that the values can be overridden from project.godot or project.binary.

CRASH_COND_MSG(singleton != nullptr, "Instantiating a new ProjectSettings singleton is not supported.");
singleton = this;
last_order = NO_BUILTIN_ORDER_BASE;
last_builtin_order = 0;
Expand Down
79 changes: 56 additions & 23 deletions core/ustring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3426,33 +3426,63 @@ bool String::is_valid_identifier() const {
return true;
}

//kind of poor should be rewritten properly

String String::word_wrap(int p_chars_per_line) const {
int from = 0;
int last_space = 0;
String ret;

int line_start = 0;
int line_end = 0; // End of last word on current line.
int word_start = 0; // -1 if no word encountered. Leading spaces are part of a word.
int word_length = 0;

for (int i = 0; i < length(); i++) {
if (i - from >= p_chars_per_line) {
if (last_space == -1) {
ret += substr(from, i - from + 1) + "\n";
} else {
ret += substr(from, last_space - from) + "\n";
i = last_space; //rewind
}
from = i + 1;
last_space = -1;
} else if (operator[](i) == ' ' || operator[](i) == '\t') {
last_space = i;
} else if (operator[](i) == '\n') {
ret += substr(from, i - from) + "\n";
from = i + 1;
last_space = -1;
const CharType c = operator[](i);

switch (c) {
case '\n': {
// Force newline.
ret += substr(line_start, i - line_start + 1);
line_start = i + 1;
line_end = line_start;
word_start = line_start;
word_length = 0;
} break;

case ' ':
case '\t': {
// A whitespace ends current word.
if (word_length > 0) {
line_end = i - 1;
word_start = -1;
word_length = 0;
}
} break;

default: {
if (word_start == -1) {
word_start = i;
}
word_length += 1;

if (word_length > p_chars_per_line) {
// Word too long: wrap before current character.
ret += substr(line_start, i - line_start) + "\n";
line_start = i;
line_end = i;
word_start = i;
word_length = 1;
} else if (i - line_start + 1 > p_chars_per_line) {
// Line too long: wrap after the last word.
ret += substr(line_start, line_end - line_start + 1) + "\n";
line_start = word_start;
line_end = line_start;
}
} break;
}
}

if (from < length()) {
ret += substr(from, length());
const int remaining = length() - line_start;
if (remaining) {
ret += substr(line_start, remaining);
}

return ret;
Expand Down Expand Up @@ -4339,15 +4369,18 @@ String String::sprintf(const Array &values, bool *error) const {
double value = values[value_index];
bool is_negative = (value < 0);
String str = String::num(ABS(value), min_decimals);
bool not_numeric = isinf(value) || isnan(value);

// Pad decimals out.
str = str.pad_decimals(min_decimals);
if (!not_numeric) {
str = str.pad_decimals(min_decimals);
}

int initial_len = str.length();

// Padding. Leave room for sign later if required.
int pad_chars_count = (is_negative || show_sign) ? min_chars - 1 : min_chars;
String pad_char = pad_with_zeros ? String("0") : String(" ");
String pad_char = (pad_with_zeros && !not_numeric) ? String("0") : String(" "); // Never pad NaN or inf with zeros
if (left_justified) {
str = str.rpad(pad_chars_count, pad_char);
} else {
Expand Down
1 change: 1 addition & 0 deletions doc/classes/Array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@
array.resize(10)
array.fill(0) # Initialize the 10 elements to 0.
[/codeblock]
[b]Note:[/b] If [code]value[/code] is of a reference type ([Object]-derived, [Array], [Dictionary], etc.) then the array is filled with the references to the same object, i.e. no duplicates are created.
</description>
</method>
<method name="find">
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/AudioStreamGeneratorPlayback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<method name="get_frames_available" qualifiers="const">
<return type="int" />
<description>
Returns the number of audio data frames left to play. If this returned number reaches [code]0[/code], the audio will stop playing until frames are added again. Therefore, make sure your script can always generate and push new audio frames fast enough to avoid audio cracking.
Returns the number of frames that can be pushed to the audio sample data buffer without overflowing it. If the result is [code]0[/code], the buffer is full.
</description>
</method>
<method name="get_skips" qualifiers="const">
Expand Down
1 change: 1 addition & 0 deletions doc/classes/CylinderShape.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</brief_description>
<description>
Cylinder shape for collisions.
[b]Note:[/b] When using GodotPhysics instead of the default Bullet physics engine, there are several known bugs with cylinder collision shapes. Using [CapsuleShape] or [BoxShape] instead is recommended.
</description>
<tutorials>
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
Expand Down
1 change: 1 addition & 0 deletions doc/classes/Light.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
</member>
<member name="light_size" type="float" setter="set_param" getter="get_param" default="0.0">
The size of the light in Godot units. Only considered in baked lightmaps and only if [member light_bake_mode] is set to [constant BAKE_ALL]. Increasing this value will make the shadows appear blurrier. This can be used to simulate area lights to an extent.
[b]Note:[/b] [member light_size] is not affected by [member Spatial.scale] (the light's scale or its parent's scale).
</member>
<member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5">
The intensity of the specular blob in objects affected by the light. At [code]0[/code], the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface.
Expand Down
1 change: 1 addition & 0 deletions doc/classes/NavigationAgent.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<description>
3D agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO (Reciprocal Velocity Obstacles) collision avoidance. The agent needs navigation data to work correctly. By default this node will register to the default [World] navigation map. If this node is a child of a [Navigation] node it will register to the navigation map of the navigation node or the function [method set_navigation] can be used to set the navigation node directly. [NavigationAgent] is physics safe.
[b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
[b]Note:[/b] By default, the expensive calculations for avoidance are done in a thread. In HTML5 exports without thread support, they will be done on the main thread, which can lead to performance issues.
</description>
<tutorials>
</tutorials>
Expand Down
1 change: 1 addition & 0 deletions doc/classes/NavigationAgent2D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<description>
2D agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO (Reciprocal Velocity Obstacles) collision avoidance. The agent needs navigation data to work correctly. By default this node will register to the default [World2D] navigation map. If this node is a child of a [Navigation2D] node it will register to the navigation map of the navigation node or the function [method set_navigation] can be used to set the navigation node directly. [NavigationAgent2D] is physics safe.
[b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
[b]Note:[/b] By default, the expensive calculations for avoidance are done in a thread. In HTML5 exports without thread support, they will be done on the main thread, which can lead to performance issues.
</description>
<tutorials>
</tutorials>
Expand Down
1 change: 1 addition & 0 deletions doc/classes/NavigationServer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than [member Navigation.edge_connection_margin] to the respective other edge's vertex.
To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
[b]Note:[/b] The collision avoidance system ignores regions. Using the modified velocity as-is might lead to pushing and agent outside of a navigable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine.
[b]Note:[/b] By default, the expensive calculations for avoidance are done in a thread. In HTML5 exports without thread support, they will be done on the main thread, which can lead to performance issues.
This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
</description>
<tutorials>
Expand Down
1 change: 1 addition & 0 deletions doc/classes/OmniLight.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
</member>
<member name="omni_range" type="float" setter="set_param" getter="get_param" default="5.0">
The light's radius. Note that the effectively lit area may appear to be smaller depending on the [member omni_attenuation] in use. No matter the [member omni_attenuation] in use, the light will never reach anything outside this radius.
[b]Note:[/b] [member omni_range] is not affected by [member Spatial.scale] (the light's scale or its parent's scale).
</member>
<member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" enum="OmniLight.ShadowDetail" default="1">
See [enum ShadowDetail].
Expand Down
1 change: 1 addition & 0 deletions doc/classes/Spatial.xml
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@
<member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3( 1, 1, 1 )">
Scale part of the local transformation.
[b]Note:[/b] Mixed negative scales in 3D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, the scale values will either be all positive or all negative.
[b]Note:[/b] Not all nodes are visually scaled by the [member scale] property. For example, [Light]s are not visually affected by [member scale].
</member>
<member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )">
Local space [Transform] of this node, with respect to the parent node.
Expand Down
2 changes: 2 additions & 0 deletions doc/classes/SpotLight.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<members>
<member name="spot_angle" type="float" setter="set_param" getter="get_param" default="45.0">
The spotlight's angle in degrees.
[b]Note:[/b] [member spot_angle] is not affected by [member Spatial.scale] (the light's scale or its parent's scale).
</member>
<member name="spot_angle_attenuation" type="float" setter="set_param" getter="get_param" default="1.0">
The spotlight's angular attenuation curve.
Expand All @@ -25,6 +26,7 @@
</member>
<member name="spot_range" type="float" setter="set_param" getter="get_param" default="5.0">
The maximal range that can be reached by the spotlight. Note that the effectively lit area may appear to be smaller depending on the [member spot_attenuation] in use. No matter the [member spot_attenuation] in use, the light will never reach anything outside this range.
[b]Note:[/b] [member spot_range] is not affected by [member Spatial.scale] (the light's scale or its parent's scale).
</member>
</members>
<constants>
Expand Down
3 changes: 3 additions & 0 deletions drivers/gles2/rasterizer_storage_gles2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1680,6 +1680,9 @@ void RasterizerStorageGLES2::shader_get_param_list(RID p_shader, List<PropertyIn
case ShaderLanguage::TYPE_USAMPLER3D: {
// Not implemented in GLES2
} break;

default: {
}
}

p_param_list->push_back(pi);
Expand Down
2 changes: 2 additions & 0 deletions drivers/gles3/rasterizer_storage_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2460,6 +2460,8 @@ void RasterizerStorageGLES3::shader_get_param_list(RID p_shader, List<PropertyIn
pi.hint = PROPERTY_HINT_RESOURCE_TYPE;
pi.hint_string = "CubeMap";
} break;
default: {
}
};

p_param_list->push_back(pi);
Expand Down
4 changes: 4 additions & 0 deletions drivers/gles3/shader_compiler_gles3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ static int _get_datatype_size(SL::DataType p_type) {
return 16;
case SL::TYPE_STRUCT:
return 0;
default: {
}
}

ERR_FAIL_V(0);
Expand Down Expand Up @@ -185,6 +187,8 @@ static int _get_datatype_alignment(SL::DataType p_type) {
return 16;
case SL::TYPE_STRUCT:
return 0;
default: {
}
}

ERR_FAIL_V(0);
Expand Down
12 changes: 6 additions & 6 deletions drivers/gles3/shaders/tonemap.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -467,12 +467,6 @@ void main() {
color.rgb = apply_cas(color.rgb, full_exposure, uv_interp, sharpen_intensity);
#endif

#ifdef USE_DEBANDING
// For best results, debanding should be done before tonemapping.
// Otherwise, we're adding noise to an already-quantized image.
color.rgb += screen_space_dither(gl_FragCoord.xy);
#endif

// Early Tonemap & SRGB Conversion; note that Linear tonemapping does not clamp to [0, 1]; some operations below expect a [0, 1] range and will clamp
color.rgb = apply_tonemapping(color.rgb, white);

Expand Down Expand Up @@ -507,6 +501,12 @@ void main() {
color.rgb = apply_color_correction(color.rgb, color_correction);
#endif

#ifdef USE_DEBANDING
// Debanding should be done at the end of tonemapping, but before writing to the LDR buffer.
// Otherwise, we're adding noise to an already-quantized image.
color.rgb += screen_space_dither(gl_FragCoord.xy);
#endif

frag_color = color;

#ifdef DISABLE_ALPHA
Expand Down
2 changes: 1 addition & 1 deletion drivers/windows/dir_access_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Error DirAccessWindows::make_dir(String p_dir) {
if (p_dir.is_rel_path())
p_dir = current_dir.plus_file(p_dir);

p_dir = p_dir.replace("/", "\\");
p_dir = p_dir.simplify_path().replace("/", "\\");

bool success;
int err;
Expand Down
2 changes: 2 additions & 0 deletions editor/collada/collada.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,8 @@ void Collada::_parse_curve_geometry(XMLParser &parser, String p_id, String p_nam

CurveData &curvedata = state.curve_data_map[p_id];
curvedata.name = p_name;
String closed = parser.get_attribute_value_safe("closed").to_lower();
curvedata.closed = closed == "true" || closed == "1";

COLLADA_PRINT("curve name: " + p_name);

Expand Down
7 changes: 6 additions & 1 deletion editor/editor_file_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,12 @@ bool EditorFileSystem::_update_scan_actions() {
if (_test_for_reimport(full_path, false)) {
//must reimport
reimports.push_back(full_path);
reimports.append_array(_get_dependencies(full_path));
Vector<String> dependencies = _get_dependencies(full_path);
for (int i = 0; i < dependencies.size(); i++) {
if (import_extensions.has(dependencies[i].get_extension())) {
reimports.push_back(dependencies[i]);
}
}
} else {
//must not reimport, all was good
//update modified times, to avoid reimport
Expand Down
4 changes: 3 additions & 1 deletion editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3840,7 +3840,7 @@ void EditorNode::_quick_opened() {
List<String> scene_extensions;
ResourceLoader::get_recognized_extensions_for_type("PackedScene", &scene_extensions);

if (open_scene_dialog || scene_extensions.find(files[i].get_extension())) {
if (open_scene_dialog || scene_extensions.find(files[i].get_extension().to_lower())) {
open_request(res_path);
} else {
load_resource(res_path);
Expand Down Expand Up @@ -5630,6 +5630,8 @@ void EditorNode::_project_settings_changed() {
tree->set_debug_collision_contact_color(GLOBAL_GET("debug/shapes/collision/contact_color"));
tree->set_debug_navigation_color(GLOBAL_GET("debug/shapes/navigation/geometry_color"));
tree->set_debug_navigation_disabled_color(GLOBAL_GET("debug/shapes/navigation/disabled_geometry_color"));

_update_title();
}

void EditorNode::_feature_profile_changed() {
Expand Down
6 changes: 6 additions & 0 deletions editor/import/editor_import_collada.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,12 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, uint32_t p_use_com
c->set_point_tilt(i, tilts->array[i]);
}
}
if (cd.closed && pc > 1) {
Vector3 pos = c->get_point_position(0);
Vector3 in = c->get_point_in(0);
Vector3 out = c->get_point_out(0);
c->add_point(pos, in, out, -1);
}

curve_cache[ng->source] = c;
path->set_curve(c);
Expand Down
18 changes: 12 additions & 6 deletions editor/plugins/animation_blend_tree_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,16 +456,22 @@ void AnimationNodeBlendTreeEditor::_delete_request(const String &p_which) {
undo_redo->commit_action();
}

void AnimationNodeBlendTreeEditor::_delete_nodes_request() {
void AnimationNodeBlendTreeEditor::_delete_nodes_request(const Array &p_nodes) {
List<StringName> to_erase;

for (int i = 0; i < graph->get_child_count(); i++) {
GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
if (gn) {
if (gn->is_selected() && gn->is_close_button_visible()) {
to_erase.push_back(gn->get_name());
if (p_nodes.empty()) {
for (int i = 0; i < graph->get_child_count(); i++) {
GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
if (gn) {
if (gn->is_selected() && gn->is_close_button_visible()) {
to_erase.push_back(gn->get_name());
}
}
}
} else {
for (int i = 0; i < p_nodes.size(); i++) {
to_erase.push_back(p_nodes[i]);
}
}

if (to_erase.empty()) {
Expand Down
Loading