Просмотр исходного кода

Merge pull request #58987 from akien-mga/3.x-cherrypicks

Rémi Verschelde 3 лет назад
Родитель
Сommit
65034f4cc5

+ 33 - 24
editor/animation_track_editor.cpp

@@ -1370,7 +1370,7 @@ int AnimationTimelineEdit::get_name_limit() const {
 }
 }
 
 
 void AnimationTimelineEdit::_notification(int p_what) {
 void AnimationTimelineEdit::_notification(int p_what) {
-	if (p_what == NOTIFICATION_ENTER_TREE) {
+	if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
 		add_track->set_icon(get_icon("Add", "EditorIcons"));
 		add_track->set_icon(get_icon("Add", "EditorIcons"));
 		loop->set_icon(get_icon("Loop", "EditorIcons"));
 		loop->set_icon(get_icon("Loop", "EditorIcons"));
 		time_icon->set_texture(get_icon("Time", "EditorIcons"));
 		time_icon->set_texture(get_icon("Time", "EditorIcons"));
@@ -1841,6 +1841,16 @@ AnimationTimelineEdit::AnimationTimelineEdit() {
 ////////////////////////////////////
 ////////////////////////////////////
 
 
 void AnimationTrackEdit::_notification(int p_what) {
 void AnimationTrackEdit::_notification(int p_what) {
+	if (p_what == NOTIFICATION_THEME_CHANGED) {
+		if (animation.is_null()) {
+			return;
+		}
+		ERR_FAIL_INDEX(track, animation->get_track_count());
+
+		type_icon = _get_key_type_icon();
+		selected_icon = get_icon("KeySelected", "EditorIcons");
+	}
+
 	if (p_what == NOTIFICATION_DRAW) {
 	if (p_what == NOTIFICATION_DRAW) {
 		if (animation.is_null()) {
 		if (animation.is_null()) {
 			return;
 			return;
@@ -1858,14 +1868,6 @@ void AnimationTrackEdit::_notification(int p_what) {
 
 
 		Ref<Font> font = get_font("font", "Label");
 		Ref<Font> font = get_font("font", "Label");
 		Color color = get_color("font_color", "Label");
 		Color color = get_color("font_color", "Label");
-		Ref<Texture> type_icons[6] = {
-			get_icon("KeyValue", "EditorIcons"),
-			get_icon("KeyXform", "EditorIcons"),
-			get_icon("KeyCall", "EditorIcons"),
-			get_icon("KeyBezier", "EditorIcons"),
-			get_icon("KeyAudio", "EditorIcons"),
-			get_icon("KeyAnimation", "EditorIcons")
-		};
 		int hsep = get_constant("hseparation", "ItemList");
 		int hsep = get_constant("hseparation", "ItemList");
 		Color linecolor = color;
 		Color linecolor = color;
 		linecolor.a = 0.2;
 		linecolor.a = 0.2;
@@ -1881,7 +1883,7 @@ void AnimationTrackEdit::_notification(int p_what) {
 			draw_texture(check, check_rect.position);
 			draw_texture(check, check_rect.position);
 			ofs += check->get_width() + hsep;
 			ofs += check->get_width() + hsep;
 
 
-			Ref<Texture> type_icon = type_icons[animation->track_get_type(track)];
+			Ref<Texture> type_icon = _get_key_type_icon();
 			draw_texture(type_icon, Point2(ofs, int(get_size().height - type_icon->get_height()) / 2));
 			draw_texture(type_icon, Point2(ofs, int(get_size().height - type_icon->get_height()) / 2));
 			ofs += type_icon->get_width() + hsep;
 			ofs += type_icon->get_width() + hsep;
 
 
@@ -2321,19 +2323,10 @@ void AnimationTrackEdit::set_animation_and_track(const Ref<Animation> &p_animati
 	track = p_track;
 	track = p_track;
 	update();
 	update();
 
 
-	Ref<Texture> type_icons[6] = {
-		get_icon("KeyValue", "EditorIcons"),
-		get_icon("KeyXform", "EditorIcons"),
-		get_icon("KeyCall", "EditorIcons"),
-		get_icon("KeyBezier", "EditorIcons"),
-		get_icon("KeyAudio", "EditorIcons"),
-		get_icon("KeyAnimation", "EditorIcons")
-	};
-
 	ERR_FAIL_INDEX(track, animation->get_track_count());
 	ERR_FAIL_INDEX(track, animation->get_track_count());
 
 
 	node_path = animation->track_get_path(p_track);
 	node_path = animation->track_get_path(p_track);
-	type_icon = type_icons[animation->track_get_type(track)];
+	type_icon = _get_key_type_icon();
 	selected_icon = get_icon("KeySelected", "EditorIcons");
 	selected_icon = get_icon("KeySelected", "EditorIcons");
 }
 }
 
 
@@ -2431,6 +2424,18 @@ bool AnimationTrackEdit::_is_value_key_valid(const Variant &p_key_value, Variant
 	return (!prop_exists || Variant::can_convert(p_key_value.get_type(), r_valid_type));
 	return (!prop_exists || Variant::can_convert(p_key_value.get_type(), r_valid_type));
 }
 }
 
 
+Ref<Texture> AnimationTrackEdit::_get_key_type_icon() const {
+	Ref<Texture> type_icons[6] = {
+		get_icon("KeyValue", "EditorIcons"),
+		get_icon("KeyXform", "EditorIcons"),
+		get_icon("KeyCall", "EditorIcons"),
+		get_icon("KeyBezier", "EditorIcons"),
+		get_icon("KeyAudio", "EditorIcons"),
+		get_icon("KeyAnimation", "EditorIcons")
+	};
+	return type_icons[animation->track_get_type(track)];
+}
+
 String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
 String AnimationTrackEdit::get_tooltip(const Point2 &p_pos) const {
 	if (check_rect.has_point(p_pos)) {
 	if (check_rect.has_point(p_pos)) {
 		return TTR("Toggle this track on/off.");
 		return TTR("Toggle this track on/off.");
@@ -5302,22 +5307,26 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
 					}
 					}
 				}
 				}
 
 
+				String track_type;
 				switch (animation->track_get_type(i)) {
 				switch (animation->track_get_type(i)) {
 					case Animation::TYPE_TRANSFORM:
 					case Animation::TYPE_TRANSFORM:
-						text += " (Transform)";
+						track_type = TTR("Transform");
 						break;
 						break;
 					case Animation::TYPE_METHOD:
 					case Animation::TYPE_METHOD:
-						text += " (Methods)";
+						track_type = TTR("Methods");
 						break;
 						break;
 					case Animation::TYPE_BEZIER:
 					case Animation::TYPE_BEZIER:
-						text += " (Bezier)";
+						track_type = TTR("Bezier");
 						break;
 						break;
 					case Animation::TYPE_AUDIO:
 					case Animation::TYPE_AUDIO:
-						text += " (Audio)";
+						track_type = TTR("Audio");
 						break;
 						break;
 					default: {
 					default: {
 					};
 					};
 				}
 				}
+				if (!track_type.empty()) {
+					text += vformat(" (%s)", track_type);
+				}
 
 
 				TreeItem *it = track_copy_select->create_item(troot);
 				TreeItem *it = track_copy_select->create_item(troot);
 				it->set_editable(0, true);
 				it->set_editable(0, true);

+ 2 - 0
editor/animation_track_editor.h

@@ -180,6 +180,8 @@ class AnimationTrackEdit : public Control {
 	void _play_position_draw();
 	void _play_position_draw();
 	bool _is_value_key_valid(const Variant &p_key_value, Variant::Type &r_valid_type) const;
 	bool _is_value_key_valid(const Variant &p_key_value, Variant::Type &r_valid_type) const;
 
 
+	Ref<Texture> _get_key_type_icon() const;
+
 	mutable int dropping_at;
 	mutable int dropping_at;
 	float insert_at_pos;
 	float insert_at_pos;
 	bool moving_selection_attempt;
 	bool moving_selection_attempt;

+ 6 - 2
editor/editor_audio_buses.cpp

@@ -90,6 +90,12 @@ void EditorAudioBus::_notification(int p_what) {
 			audio_value_preview_label->add_color_override("font_color", get_color("font_color", "TooltipLabel"));
 			audio_value_preview_label->add_color_override("font_color", get_color("font_color", "TooltipLabel"));
 			audio_value_preview_label->add_color_override("font_color_shadow", get_color("font_color_shadow", "TooltipLabel"));
 			audio_value_preview_label->add_color_override("font_color_shadow", get_color("font_color_shadow", "TooltipLabel"));
 			audio_value_preview_box->add_style_override("panel", get_stylebox("panel", "TooltipPanel"));
 			audio_value_preview_box->add_style_override("panel", get_stylebox("panel", "TooltipPanel"));
+
+			for (int i = 0; i < effect_options->get_item_count(); i++) {
+				String class_name = effect_options->get_item_metadata(i);
+				Ref<Texture> icon = EditorNode::get_singleton()->get_class_icon(class_name);
+				effect_options->set_item_icon(i, icon);
+			}
 		} break;
 		} break;
 
 
 		case NOTIFICATION_READY: {
 		case NOTIFICATION_READY: {
@@ -932,11 +938,9 @@ EditorAudioBus::EditorAudioBus(EditorAudioBuses *p_buses, bool p_is_master) {
 			continue;
 			continue;
 		}
 		}
 
 
-		Ref<Texture> icon = EditorNode::get_singleton()->get_class_icon(E->get());
 		String name = E->get().operator String().replace("AudioEffect", "");
 		String name = E->get().operator String().replace("AudioEffect", "");
 		effect_options->add_item(name);
 		effect_options->add_item(name);
 		effect_options->set_item_metadata(effect_options->get_item_count() - 1, E->get());
 		effect_options->set_item_metadata(effect_options->get_item_count() - 1, E->get());
-		effect_options->set_item_icon(effect_options->get_item_count() - 1, icon);
 	}
 	}
 
 
 	bus_popup = bus_options->get_popup();
 	bus_popup = bus_options->get_popup();

+ 2 - 7
editor/editor_export.cpp

@@ -1624,10 +1624,6 @@ List<String> EditorExportPlatformPC::get_binary_extensions(const Ref<EditorExpor
 Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
 Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
 	ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
 	ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
 
 
-	if (!DirAccess::exists(p_path.get_base_dir())) {
-		return ERR_FILE_BAD_PATH;
-	}
-
 	String custom_debug = p_preset->get("custom_template/debug");
 	String custom_debug = p_preset->get("custom_template/debug");
 	String custom_release = p_preset->get("custom_template/release");
 	String custom_release = p_preset->get("custom_template/release");
 
 
@@ -1656,9 +1652,9 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr
 		return ERR_FILE_NOT_FOUND;
 		return ERR_FILE_NOT_FOUND;
 	}
 	}
 
 
-	DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+	DirAccessRef da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+	da->make_dir_recursive(p_path.get_base_dir());
 	Error err = da->copy(template_path, p_path, get_chmod_flags());
 	Error err = da->copy(template_path, p_path, get_chmod_flags());
-	memdelete(da);
 
 
 	if (err == OK) {
 	if (err == OK) {
 		String pck_path;
 		String pck_path;
@@ -1694,7 +1690,6 @@ Error EditorExportPlatformPC::export_project(const Ref<EditorExportPreset> &p_pr
 					err = sign_shared_object(p_preset, p_debug, p_path.get_base_dir().plus_file(so_files[i].path.get_file()));
 					err = sign_shared_object(p_preset, p_debug, p_path.get_base_dir().plus_file(so_files[i].path.get_file()));
 				}
 				}
 			}
 			}
-			memdelete(da);
 		}
 		}
 	}
 	}
 
 

+ 2 - 1
editor/editor_file_dialog.cpp

@@ -378,7 +378,8 @@ void EditorFileDialog::_action_pressed() {
 		return;
 		return;
 	}
 	}
 
 
-	String f = dir_access->get_current_dir().plus_file(file->get_text());
+	String file_text = file->get_text();
+	String f = file_text.is_abs_path() ? file_text : dir_access->get_current_dir().plus_file(file_text);
 
 
 	if ((mode == MODE_OPEN_ANY || mode == MODE_OPEN_FILE) && dir_access->file_exists(f)) {
 	if ((mode == MODE_OPEN_ANY || mode == MODE_OPEN_FILE) && dir_access->file_exists(f)) {
 		_save_to_recent();
 		_save_to_recent();

+ 1 - 1
editor/editor_help_search.cpp

@@ -494,7 +494,7 @@ TreeItem *EditorHelpSearch::Runner::_create_class_item(TreeItem *p_parent, const
 	} else if (ClassDB::class_exists(p_doc->name) && ClassDB::is_parent_class(p_doc->name, "Object")) {
 	} else if (ClassDB::class_exists(p_doc->name) && ClassDB::is_parent_class(p_doc->name, "Object")) {
 		icon = ui_service->get_icon("Object", "EditorIcons");
 		icon = ui_service->get_icon("Object", "EditorIcons");
 	}
 	}
-	String tooltip = p_doc->brief_description.strip_edges();
+	String tooltip = DTR(p_doc->brief_description.strip_edges());
 
 
 	TreeItem *item = results_tree->create_item(p_parent);
 	TreeItem *item = results_tree->create_item(p_parent);
 	item->set_icon(0, icon);
 	item->set_icon(0, icon);

+ 1 - 1
editor/editor_node.cpp

@@ -5377,7 +5377,7 @@ void EditorNode::_add_dropped_files_recursive(const Vector<String> &p_files, Str
 }
 }
 
 
 void EditorNode::_file_access_close_error_notify(const String &p_str) {
 void EditorNode::_file_access_close_error_notify(const String &p_str) {
-	add_io_error("Unable to write to file '" + p_str + "', file in use, locked or lacking permissions.");
+	add_io_error(vformat(TTR("Unable to write to file '%s', file in use, locked or lacking permissions."), p_str));
 }
 }
 
 
 void EditorNode::reload_scene(const String &p_path) {
 void EditorNode::reload_scene(const String &p_path) {

+ 1 - 1
editor/import/resource_importer_texture.cpp

@@ -560,7 +560,7 @@ Error ResourceImporterTexture::import(const String &p_source_file, const String
 		}
 		}
 
 
 		if (!ok_on_pc) {
 		if (!ok_on_pc) {
-			EditorNode::add_io_error("Warning, no suitable PC VRAM compression enabled in Project Settings. This texture will not display correctly on PC.");
+			EditorNode::add_io_error(TTR("Warning, no suitable PC VRAM compression enabled in Project Settings. This texture will not display correctly on PC."));
 		}
 		}
 	} else {
 	} else {
 		//import normally
 		//import normally

+ 1 - 1
editor/plugins/animation_blend_space_1d_editor.cpp

@@ -86,7 +86,7 @@ void AnimationNodeBlendSpace1DEditor::_blend_space_gui_input(const Ref<InputEven
 			}
 			}
 
 
 			int idx = menu->get_item_count();
 			int idx = menu->get_item_count();
-			menu->add_item(vformat("Add %s", name), idx);
+			menu->add_item(vformat(TTR("Add %s"), name), idx);
 			menu->set_item_metadata(idx, E->get());
 			menu->set_item_metadata(idx, E->get());
 		}
 		}
 
 

+ 1 - 1
editor/plugins/animation_blend_space_2d_editor.cpp

@@ -109,7 +109,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
 				continue; // nope
 				continue; // nope
 			}
 			}
 			int idx = menu->get_item_count();
 			int idx = menu->get_item_count();
-			menu->add_item(vformat("Add %s", name), idx);
+			menu->add_item(vformat(TTR("Add %s"), name), idx);
 			menu->set_item_metadata(idx, E->get());
 			menu->set_item_metadata(idx, E->get());
 		}
 		}
 
 

+ 29 - 11
editor/plugins/animation_player_editor_plugin.cpp

@@ -152,6 +152,8 @@ void AnimationPlayerEditor::_notification(int p_what) {
 			ITEM_ICON(TOOL_EDIT_TRANSITIONS, "Blend");
 			ITEM_ICON(TOOL_EDIT_TRANSITIONS, "Blend");
 			ITEM_ICON(TOOL_EDIT_RESOURCE, "Edit");
 			ITEM_ICON(TOOL_EDIT_RESOURCE, "Edit");
 			ITEM_ICON(TOOL_REMOVE_ANIM, "Remove");
 			ITEM_ICON(TOOL_REMOVE_ANIM, "Remove");
+
+			_update_animation_list_icons();
 		} break;
 		} break;
 	}
 	}
 }
 }
@@ -549,6 +551,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
 				}
 				}
 			}
 			}
 			new_anim->set_path("");
 			new_anim->set_path("");
+			new_anim->set_name(new_name);
 
 
 			undo_redo->create_action(TTR("Duplicate Animation"));
 			undo_redo->create_action(TTR("Duplicate Animation"));
 			undo_redo->add_do_method(player, "add_animation", new_name, new_anim);
 			undo_redo->add_do_method(player, "add_animation", new_name, new_anim);
@@ -859,22 +862,13 @@ void AnimationPlayerEditor::_update_player() {
 
 
 	int active_idx = -1;
 	int active_idx = -1;
 	for (List<StringName>::Element *E = animlist.front(); E; E = E->next()) {
 	for (List<StringName>::Element *E = animlist.front(); E; E = E->next()) {
-		Ref<Texture> icon;
-		if (E->get() == player->get_autoplay()) {
-			if (E->get() == "RESET") {
-				icon = autoplay_reset_icon;
-			} else {
-				icon = autoplay_icon;
-			}
-		} else if (E->get() == "RESET") {
-			icon = reset_icon;
-		}
-		animation->add_icon_item(icon, E->get());
+		animation->add_item(E->get());
 
 
 		if (player->get_assigned_animation() == E->get()) {
 		if (player->get_assigned_animation() == E->get()) {
 			active_idx = animation->get_item_count() - 1;
 			active_idx = animation->get_item_count() - 1;
 		}
 		}
 	}
 	}
+	_update_animation_list_icons();
 
 
 	updating = false;
 	updating = false;
 	if (active_idx != -1) {
 	if (active_idx != -1) {
@@ -903,6 +897,30 @@ void AnimationPlayerEditor::_update_player() {
 	_update_animation();
 	_update_animation();
 }
 }
 
 
+void AnimationPlayerEditor::_update_animation_list_icons() {
+	List<StringName> animlist;
+	if (player) {
+		player->get_animation_list(&animlist);
+	}
+
+	for (int i = 0; i < animation->get_item_count(); i++) {
+		String name = animation->get_item_text(i);
+
+		Ref<Texture> icon;
+		if (name == player->get_autoplay()) {
+			if (name == "RESET") {
+				icon = autoplay_reset_icon;
+			} else {
+				icon = autoplay_icon;
+			}
+		} else if (name == "RESET") {
+			icon = reset_icon;
+		}
+
+		animation->set_item_icon(i, icon);
+	}
+}
+
 void AnimationPlayerEditor::edit(AnimationPlayer *p_player) {
 void AnimationPlayerEditor::edit(AnimationPlayer *p_player) {
 	if (player && pin->is_pressed()) {
 	if (player && pin->is_pressed()) {
 		return; // Ignore, pinned.
 		return; // Ignore, pinned.

+ 1 - 0
editor/plugins/animation_player_editor_plugin.h

@@ -193,6 +193,7 @@ class AnimationPlayerEditor : public VBoxContainer {
 	void _list_changed();
 	void _list_changed();
 	void _update_animation();
 	void _update_animation();
 	void _update_player();
 	void _update_player();
+	void _update_animation_list_icons();
 	void _blend_edited();
 	void _blend_edited();
 
 
 	void _animation_player_changed(Object *p_pl);
 	void _animation_player_changed(Object *p_pl);

+ 1 - 1
editor/plugins/animation_state_machine_editor.cpp

@@ -106,7 +106,7 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref<InputEv
 				continue; // nope
 				continue; // nope
 			}
 			}
 			int idx = menu->get_item_count();
 			int idx = menu->get_item_count();
-			menu->add_item(vformat("Add %s", name), idx);
+			menu->add_item(vformat(TTR("Add %s"), name), idx);
 			menu->set_item_metadata(idx, E->get());
 			menu->set_item_metadata(idx, E->get());
 		}
 		}
 		Ref<AnimationNode> clipb = EditorSettings::get_singleton()->get_resource_clipboard();
 		Ref<AnimationNode> clipb = EditorSettings::get_singleton()->get_resource_clipboard();

+ 1 - 1
editor/plugins/canvas_item_editor_plugin.cpp

@@ -3825,7 +3825,7 @@ void CanvasItemEditor::_draw_locks_and_groups(Node *p_node, const Transform2D &p
 		return;
 		return;
 	}
 	}
 	CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
 	CanvasItem *canvas_item = Object::cast_to<CanvasItem>(p_node);
-	if (canvas_item && !canvas_item->is_visible()) {
+	if (canvas_item && !canvas_item->is_visible_in_tree()) {
 		return;
 		return;
 	}
 	}
 
 

+ 2 - 2
editor/plugins/mesh_library_editor_plugin.cpp

@@ -292,9 +292,9 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
 	cd_remove->get_ok()->connect("pressed", this, "_menu_remove_confirm");
 	cd_remove->get_ok()->connect("pressed", this, "_menu_remove_confirm");
 	cd_update = memnew(ConfirmationDialog);
 	cd_update = memnew(ConfirmationDialog);
 	add_child(cd_update);
 	add_child(cd_update);
-	cd_update->get_ok()->set_text("Apply without Transforms");
+	cd_update->get_ok()->set_text(TTR("Apply without Transforms"));
 	cd_update->get_ok()->connect("pressed", this, "_menu_update_confirm", varray(false));
 	cd_update->get_ok()->connect("pressed", this, "_menu_update_confirm", varray(false));
-	cd_update->add_button("Apply with Transforms")->connect("pressed", this, "_menu_update_confirm", varray(true));
+	cd_update->add_button(TTR("Apply with Transforms"))->connect("pressed", this, "_menu_update_confirm", varray(true));
 }
 }
 
 
 void MeshLibraryEditorPlugin::edit(Object *p_node) {
 void MeshLibraryEditorPlugin::edit(Object *p_node) {

+ 3 - 2
editor/plugins/texture_region_editor_plugin.cpp

@@ -87,8 +87,10 @@ void TextureRegionEditor::_region_draw() {
 	edit_draw->draw_texture(base_tex, Point2());
 	edit_draw->draw_texture(base_tex, Point2());
 	VS::get_singleton()->canvas_item_add_set_transform(edit_draw->get_canvas_item(), Transform2D());
 	VS::get_singleton()->canvas_item_add_set_transform(edit_draw->get_canvas_item(), Transform2D());
 
 
+	const Color color = get_color("mono_color", "Editor");
+
 	if (snap_mode == SNAP_GRID) {
 	if (snap_mode == SNAP_GRID) {
-		Color grid_color = Color(1.0, 1.0, 1.0, 0.15);
+		const Color grid_color = Color(color.r, color.g, color.b, color.a * 0.15);
 		Size2 s = edit_draw->get_size();
 		Size2 s = edit_draw->get_size();
 		int last_cell = 0;
 		int last_cell = 0;
 
 
@@ -175,7 +177,6 @@ void TextureRegionEditor::_region_draw() {
 		mtx.basis_xform(raw_endpoints[2]),
 		mtx.basis_xform(raw_endpoints[2]),
 		mtx.basis_xform(raw_endpoints[3])
 		mtx.basis_xform(raw_endpoints[3])
 	};
 	};
-	Color color = get_color("mono_color", "Editor");
 	for (int i = 0; i < 4; i++) {
 	for (int i = 0; i < 4; i++) {
 		int prev = (i + 3) % 4;
 		int prev = (i + 3) % 4;
 		int next = (i + 1) % 4;
 		int next = (i + 1) % 4;

+ 2 - 0
misc/dist/ios_xcode/godot_ios.xcodeproj/project.pbxproj

@@ -41,6 +41,7 @@
 		D0BCFE3418AEBDA2004A7AAE /* $binary.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "$binary.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		D0BCFE3418AEBDA2004A7AAE /* $binary.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "$binary.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		D0BCFE4318AEBDA2004A7AAE /* $binary-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "$binary-Info.plist"; sourceTree = "<group>"; };
 		D0BCFE4318AEBDA2004A7AAE /* $binary-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "$binary-Info.plist"; sourceTree = "<group>"; };
 		D0BCFE4518AEBDA2004A7AAE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		D0BCFE4518AEBDA2004A7AAE /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		$pbx_locale_file_reference
 		D0BCFE7718AEBFEB004A7AAE /* $binary.pck */ = {isa = PBXFileReference; lastKnownFileType = file; path = "$binary.pck"; sourceTree = "<group>"; };
 		D0BCFE7718AEBFEB004A7AAE /* $binary.pck */ = {isa = PBXFileReference; lastKnownFileType = file; path = "$binary.pck"; sourceTree = "<group>"; };
 		$pbx_launch_screen_file_reference
 		$pbx_launch_screen_file_reference
 /* End PBXFileReference section */
 /* End PBXFileReference section */
@@ -199,6 +200,7 @@
 			isa = PBXVariantGroup;
 			isa = PBXVariantGroup;
 			children = (
 			children = (
 				D0BCFE4518AEBDA2004A7AAE /* en */,
 				D0BCFE4518AEBDA2004A7AAE /* en */,
+				$pbx_locale_build_reference
 			);
 			);
 			name = InfoPlist.strings;
 			name = InfoPlist.strings;
 			sourceTree = "<group>";
 			sourceTree = "<group>";

+ 2 - 0
misc/dist/osx_template.app/Contents/Info.plist

@@ -8,6 +8,8 @@
 	<string>$binary</string>
 	<string>$binary</string>
 	<key>CFBundleName</key>
 	<key>CFBundleName</key>
 	<string>$name</string>
 	<string>$name</string>
+	<key>CFBundleDisplayName</key>
+	<string>$name</string>
 	<key>CFBundleGetInfoString</key>
 	<key>CFBundleGetInfoString</key>
 	<string>$info</string>
 	<string>$info</string>
 	<key>CFBundleIconFile</key>
 	<key>CFBundleIconFile</key>

+ 2 - 2
modules/bullet/rigid_body_bullet.cpp

@@ -766,7 +766,7 @@ void RigidBodyBullet::set_continuous_collision_detection(bool p_enable) {
 		}
 		}
 		btBody->setCcdSweptSphereRadius(radius * 0.2);
 		btBody->setCcdSweptSphereRadius(radius * 0.2);
 	} else {
 	} else {
-		btBody->setCcdMotionThreshold(10000.0);
+		btBody->setCcdMotionThreshold(0.);
 		btBody->setCcdSweptSphereRadius(0.);
 		btBody->setCcdSweptSphereRadius(0.);
 	}
 	}
 }
 }
@@ -846,7 +846,7 @@ void RigidBodyBullet::reload_shapes() {
 	btBody->updateInertiaTensor();
 	btBody->updateInertiaTensor();
 
 
 	reload_kinematic_shapes();
 	reload_kinematic_shapes();
-	set_continuous_collision_detection(btBody->getCcdMotionThreshold() < 9998.0);
+	set_continuous_collision_detection(is_continuous_collision_detection_enabled());
 	reload_body();
 	reload_body();
 }
 }
 
 

+ 49 - 0
platform/iphone/export/export.cpp

@@ -656,6 +656,32 @@ void EditorExportPlatformIOS::_fix_config_file(const Ref<EditorExportPreset> &p_
 			String value = value_format.format(value_dictionary, "$_");
 			String value = value_format.format(value_dictionary, "$_");
 
 
 			strnew += lines[i].replace("$launch_screen_background_color", value) + "\n";
 			strnew += lines[i].replace("$launch_screen_background_color", value) + "\n";
+		} else if (lines[i].find("$pbx_locale_file_reference") != -1) {
+			String locale_files;
+			Vector<String> translations = ProjectSettings::get_singleton()->get("locale/translations");
+			if (translations.size() > 0) {
+				for (int j = 0; j < translations.size(); j++) {
+					Ref<Translation> tr = ResourceLoader::load(translations[j]);
+					if (tr.is_valid()) {
+						String lang = tr->get_locale();
+						locale_files += "D0BCFE4518AEBDA2004A" + itos(j).pad_zeros(4) + " /* " + lang + " */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = " + lang + "; path = " + lang + ".lproj/InfoPlist.strings; sourceTree = \"<group>\"; };";
+					}
+				}
+			}
+			strnew += lines[i].replace("$pbx_locale_file_reference", locale_files);
+		} else if (lines[i].find("$pbx_locale_build_reference") != -1) {
+			String locale_files;
+			Vector<String> translations = ProjectSettings::get_singleton()->get("locale/translations");
+			if (translations.size() > 0) {
+				for (int j = 0; j < translations.size(); j++) {
+					Ref<Translation> tr = ResourceLoader::load(translations[j]);
+					if (tr.is_valid()) {
+						String lang = tr->get_locale();
+						locale_files += "D0BCFE4518AEBDA2004A" + itos(j).pad_zeros(4) + " /* " + lang + " */,";
+					}
+				}
+			}
+			strnew += lines[i].replace("$pbx_locale_build_reference", locale_files);
 		} else {
 		} else {
 			strnew += lines[i] + "\n";
 			strnew += lines[i] + "\n";
 		}
 		}
@@ -1865,6 +1891,29 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
 		return ERR_FILE_NOT_FOUND;
 		return ERR_FILE_NOT_FOUND;
 	}
 	}
 
 
+	Vector<String> translations = ProjectSettings::get_singleton()->get("locale/translations");
+	if (translations.size() > 0) {
+		{
+			String fname = dest_dir + binary_name + "/en.lproj";
+			tmp_app_path->make_dir_recursive(fname);
+			FileAccessRef f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
+			f->store_line("CFBundleDisplayName = \"" + ProjectSettings::get_singleton()->get("application/config/name").operator String() + "\";");
+		}
+
+		for (int i = 0; i < translations.size(); i++) {
+			Ref<Translation> tr = ResourceLoader::load(translations[i]);
+			if (tr.is_valid()) {
+				String fname = dest_dir + binary_name + "/" + tr->get_locale() + ".lproj";
+				tmp_app_path->make_dir_recursive(fname);
+				FileAccessRef f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
+				String prop = "application/config/name_" + tr->get_locale();
+				if (ProjectSettings::get_singleton()->has_setting(prop)) {
+					f->store_line("CFBundleDisplayName = \"" + ProjectSettings::get_singleton()->get(prop).operator String() + "\";");
+				}
+			}
+		}
+	}
+
 	// Copy project static libs to the project
 	// Copy project static libs to the project
 	Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins();
 	Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins();
 	for (int i = 0; i < export_plugins.size(); i++) {
 	for (int i = 0; i < export_plugins.size(); i++) {

+ 5 - 0
platform/osx/export/export.cpp

@@ -876,6 +876,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
 			String fname = tmp_app_path_name + "/Contents/Resources/en.lproj";
 			String fname = tmp_app_path_name + "/Contents/Resources/en.lproj";
 			tmp_app_dir->make_dir_recursive(fname);
 			tmp_app_dir->make_dir_recursive(fname);
 			FileAccessRef f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
 			FileAccessRef f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
+			f->store_line("CFBundleDisplayName = \"" + ProjectSettings::get_singleton()->get("application/config/name").operator String() + "\";");
 		}
 		}
 
 
 		for (int i = 0; i < translations.size(); i++) {
 		for (int i = 0; i < translations.size(); i++) {
@@ -884,6 +885,10 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
 				String fname = tmp_app_path_name + "/Contents/Resources/" + tr->get_locale() + ".lproj";
 				String fname = tmp_app_path_name + "/Contents/Resources/" + tr->get_locale() + ".lproj";
 				tmp_app_dir->make_dir_recursive(fname);
 				tmp_app_dir->make_dir_recursive(fname);
 				FileAccessRef f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
 				FileAccessRef f = FileAccess::open(fname + "/InfoPlist.strings", FileAccess::WRITE);
+				String prop = "application/config/name_" + tr->get_locale();
+				if (ProjectSettings::get_singleton()->has_setting(prop)) {
+					f->store_line("CFBundleDisplayName = \"" + ProjectSettings::get_singleton()->get(prop).operator String() + "\";");
+				}
 			}
 			}
 		}
 		}
 	}
 	}

+ 2 - 1
scene/gui/file_dialog.cpp

@@ -195,7 +195,8 @@ void FileDialog::_action_pressed() {
 		return;
 		return;
 	}
 	}
 
 
-	String f = dir_access->get_current_dir().plus_file(file->get_text());
+	String file_text = file->get_text();
+	String f = file_text.is_abs_path() ? file_text : dir_access->get_current_dir().plus_file(file_text);
 
 
 	if ((mode == MODE_OPEN_ANY || mode == MODE_OPEN_FILE) && dir_access->file_exists(f)) {
 	if ((mode == MODE_OPEN_ANY || mode == MODE_OPEN_FILE) && dir_access->file_exists(f)) {
 		emit_signal("file_selected", f);
 		emit_signal("file_selected", f);

+ 4 - 2
scene/gui/text_edit.cpp

@@ -4364,8 +4364,10 @@ void TextEdit::_generate_context_menu() {
 	if (!readonly) {
 	if (!readonly) {
 		menu->add_item(RTR("Paste"), MENU_PASTE, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_V : 0);
 		menu->add_item(RTR("Paste"), MENU_PASTE, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_V : 0);
 	}
 	}
-	menu->add_separator();
-	if (is_selecting_enabled()) {
+	if (selecting_enabled || !readonly) {
+		menu->add_separator();
+	}
+	if (selecting_enabled) {
 		menu->add_item(RTR("Select All"), MENU_SELECT_ALL, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_A : 0);
 		menu->add_item(RTR("Select All"), MENU_SELECT_ALL, is_shortcut_keys_enabled() ? KEY_MASK_CMD | KEY_A : 0);
 	}
 	}
 	if (!readonly) {
 	if (!readonly) {