diff --git a/editor/owner_picker.cpp b/editor/owner_picker.cpp index fc63632..8dc1b5e 100644 --- a/editor/owner_picker.cpp +++ b/editor/owner_picker.cpp @@ -27,10 +27,16 @@ Vector OwnerPicker::_find_owners(const String &p_path) const { Vector owners; + + if (RESOURCE_PATH_IS_BUILT_IN(p_path)) { + // For built-in resources we use the path to the containing resource. + String owner_path = p_path.substr(0, p_path.rfind("::")); + owners.append(owner_path); + return owners; + } + List dirs; - dirs.push_back(EDITOR_FILE_SYSTEM()->get_filesystem()); - while (dirs.size() > 0) { EditorFileSystemDirectory *efd = dirs.front()->get(); dirs.pop_front(); diff --git a/util/limbo_compat.h b/util/limbo_compat.h index 433e6f2..55760f5 100644 --- a/util/limbo_compat.h +++ b/util/limbo_compat.h @@ -237,6 +237,7 @@ Variant VARIANT_DEFAULT(Variant::Type p_type); #define IS_RESOURCE_FILE(m_path) (m_path.begins_with("res://") && m_path.find("::") == -1) #define RESOURCE_TYPE_HINT(m_type) vformat("%s/%s:%s", Variant::OBJECT, PROPERTY_HINT_RESOURCE_TYPE, m_type) #define RESOURCE_IS_BUILT_IN(m_res) (m_res->get_path().is_empty() || m_res->get_path().contains("::")) +#define RESOURCE_PATH_IS_BUILT_IN(m_path) (m_path.is_empty() || m_path.contains("::")) #ifdef TOOLS_ENABLED