@@ -462,10 +462,26 @@ void EditorPropertyPath::_set_read_only(bool p_read_only) {
462462}
463463
464464void EditorPropertyPath::_path_selected (const String &p_path) {
465- emit_changed (get_edited_property (), p_path);
465+ String full_path = p_path;
466+ ResourceUID::ID id = ResourceLoader::get_resource_uid (full_path);
467+
468+ if (id != ResourceUID::INVALID_ID) {
469+ full_path = ResourceUID::get_singleton ()->id_to_text (id);
470+ }
471+
472+ emit_changed (get_edited_property (), full_path);
466473 update_property ();
467474}
468475
476+ String EditorPropertyPath::_get_path_text () {
477+ String full_path = get_edited_property_value ();
478+ if (full_path.begins_with (" uid://" )) {
479+ full_path = ResourceUID::get_singleton ()->get_id_path (ResourceUID::get_singleton ()->text_to_id (full_path));
480+ }
481+
482+ return full_path;
483+ }
484+
469485void EditorPropertyPath::_path_pressed () {
470486 if (!dialog) {
471487 dialog = memnew (EditorFileDialog);
@@ -474,7 +490,7 @@ void EditorPropertyPath::_path_pressed() {
474490 add_child (dialog);
475491 }
476492
477- String full_path = get_edited_property_value ();
493+ String full_path = _get_path_text ();
478494
479495 dialog->clear_filters ();
480496
@@ -502,7 +518,7 @@ void EditorPropertyPath::_path_pressed() {
502518}
503519
504520void EditorPropertyPath::update_property () {
505- String full_path = get_edited_property_value ();
521+ String full_path = _get_path_text ();
506522 path->set_text (full_path);
507523 path->set_tooltip_text (full_path);
508524}
@@ -547,8 +563,7 @@ void EditorPropertyPath::_drop_data_fw(const Point2 &p_point, const Variant &p_d
547563 return ;
548564 }
549565
550- emit_changed (get_edited_property (), filesPaths[0 ]);
551- update_property ();
566+ _path_selected (filesPaths[0 ]);
552567}
553568
554569bool EditorPropertyPath::_can_drop_data_fw (const Point2 &p_point, const Variant &p_data, Control *p_from) const {
0 commit comments