Skip to content

Commit

Permalink
Merge pull request godotengine#79576 from YuriSizov/4.1-cherrypicks
Browse files Browse the repository at this point in the history
Cherry-picks for the 4.1 branch (future 4.1.1) - 2nd batch
  • Loading branch information
YuriSizov authored Jul 17, 2023
2 parents e709ad4 + e94d355 commit bd6af8e
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 5 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [4.1.1] - TBD
## [4.1.1] - 2023-07-17

See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-1-1) for details.

Expand Down Expand Up @@ -81,6 +81,7 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
#### Animation

- Fix infinite loop state check in `AnimationStateMachine` ([GH-79141](https://github.com/godotengine/godot/pull/79141)).
- Fix `tween_property` on `Basis` to properly update its value ([GH-79426](https://github.com/godotengine/godot/pull/79426)).

#### Buildsystem

Expand All @@ -103,6 +104,8 @@ See the [release announcement](https://godotengine.org/article/maintenance-relea
- Fix dropping files from `res://` to `res://` ([GH-78914](https://github.com/godotengine/godot/pull/78914)).
- Do not change a node unique name to the same name ([GH-78925](https://github.com/godotengine/godot/pull/78925)).
- Collapse bottom panel if there is no active tab ([GH-79078](https://github.com/godotengine/godot/pull/79078)).
- Fix `ui_cancel` action not closing `FindReplaceBar` ([GH-79079](https://github.com/godotengine/godot/pull/79079)).
- Emit `history_changed` on merged UndoRedo actions ([GH-79484](https://github.com/godotengine/godot/pull/79484)).

#### Export

Expand Down Expand Up @@ -319,6 +322,7 @@ See the [release announcement](https://godotengine.org/article/godot-4-1-is-here

#### Core

- The strings returned by `ResourceLoader::get_dependencies()` now include paths in addition to UIDs ([GH-73131](https://github.com/godotengine/godot/pull/73131)).
- Optimize Node children management ([GH-75627](https://github.com/godotengine/godot/pull/75627)).
- Deprecate `NOTIFICATION_MOVED_IN_PARENT` for `NOTIFICATION_CHILD_ORDER_CHANGED` ([GH-75701](https://github.com/godotengine/godot/pull/75701)).
- Optimize `Node::add_child` validation ([GH-75760](https://github.com/godotengine/godot/pull/75760)).
Expand Down
6 changes: 6 additions & 0 deletions doc/classes/ResourceLoader.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@
<param index="0" name="path" type="String" />
<description>
Returns the dependencies for the resource at the given [param path].
[b]Note:[/b] The dependencies are returned with slices separated by [code]::[/code]. You can use [method String.get_slice] to get their components.
[codeblock]
for dep in ResourceLoader.get_dependencies(path):
print(dep.get_slice("::", 0)) # Prints UID.
print(dep.get_slice("::", 2)) # Prints path.
[/codeblock]
</description>
</method>
<method name="get_recognized_extensions_for_type">
Expand Down
2 changes: 1 addition & 1 deletion editor/code_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void FindReplaceBar::unhandled_input(const Ref<InputEvent> &p_event) {
if (k.is_valid() && k->is_action_pressed(SNAME("ui_cancel"), false, true)) {
Control *focus_owner = get_viewport()->gui_get_focus_owner();

if (text_editor->has_focus() || (focus_owner && vbc_lineedit->is_ancestor_of(focus_owner))) {
if (text_editor->has_focus() || (focus_owner && is_ancestor_of(focus_owner))) {
_hide_bar();
accept_event();
}
Expand Down
2 changes: 1 addition & 1 deletion editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,7 @@ void EditorNode::_dialog_display_load_error(String p_file, Error p_error) {
show_accept(vformat(TTR("Scene file '%s' appears to be invalid/corrupt."), p_file.get_file()), TTR("OK"));
} break;
case ERR_FILE_NOT_FOUND: {
show_accept(vformat(TTR("Missing file '%s' or one its dependencies."), p_file.get_file()), TTR("OK"));
show_accept(vformat(TTR("Missing file '%s' or one of its dependencies."), p_file.get_file()), TTR("OK"));
} break;
default: {
show_accept(vformat(TTR("Error while loading file '%s'."), p_file.get_file()), TTR("OK"));
Expand Down
2 changes: 2 additions & 0 deletions editor/editor_undo_redo_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ void EditorUndoRedoManager::commit_action(bool p_execute) {
pending_action.action_name == prev_action.action_name && pending_action.action_name == pre_prev_action.action_name) {
pending_action = Action();
is_committing = false;
emit_signal(SNAME("history_changed"));
return;
}
} break;
Expand All @@ -272,6 +273,7 @@ void EditorUndoRedoManager::commit_action(bool p_execute) {
if (pending_action.merge_mode == prev_action.merge_mode && pending_action.action_name == prev_action.action_name) {
pending_action = Action();
is_committing = false;
emit_signal(SNAME("history_changed"));
return;
}
} break;
Expand Down
5 changes: 4 additions & 1 deletion editor/gui/scene_tree_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1208,8 +1208,11 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2 &p_point, Control *p_from
if (i < list_max) {
HBoxContainer *hb = memnew(HBoxContainer);
TextureRect *tf = memnew(TextureRect);
int icon_size = get_theme_constant(SNAME("class_icon_size"), SNAME("Editor"));
tf->set_custom_minimum_size(Size2(icon_size, icon_size));
tf->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED);
tf->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE);
tf->set_texture(icons[i]);
tf->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED);
hb->add_child(tf);
Label *label = memnew(Label(selected_nodes[i]->get_name()));
hb->add_child(label);
Expand Down
6 changes: 6 additions & 0 deletions scene/resources/animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5508,6 +5508,9 @@ Variant Animation::add_variant(const Variant &a, const Variant &b) {
const ::AABB ab = b.operator ::AABB();
return ::AABB(aa.position + ab.position, aa.size + ab.size);
}
case Variant::BASIS: {
return (a.operator Basis()) * (b.operator Basis());
}
case Variant::QUATERNION: {
return (a.operator Quaternion()) * (b.operator Quaternion());
}
Expand Down Expand Up @@ -5555,6 +5558,9 @@ Variant Animation::subtract_variant(const Variant &a, const Variant &b) {
const ::AABB ab = b.operator ::AABB();
return ::AABB(aa.position - ab.position, aa.size - ab.size);
}
case Variant::BASIS: {
return (b.operator Basis()).inverse() * (a.operator Basis());
}
case Variant::QUATERNION: {
return (b.operator Quaternion()).inverse() * (a.operator Quaternion());
}
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
major = 4
minor = 1
patch = 1
status = "rc"
status = "stable"
module_config = ""
year = 2023
website = "https://godotengine.org"
Expand Down

0 comments on commit bd6af8e

Please sign in to comment.