You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Changed import workflow
-Rearrange favorites in fs dock with drag and drop -Removed import -> sub-scene, moved to scenetree contextual menu -Removed import -> re-import , moved and integrated to FS dock -Added ability in FS dock to re-import more than one resource simultaneously -Added ability to drag from native filesystem explorer to Godot, only works on Windows though -Removed scene reimport merge options, never worked well. Eventually merging materials should be re-added -Added ability to set custom root node type when importing scenes -Re-Import is now automatic, can be configured back to manual in editor settings -Added resource previews in property list for many resource types
This commit is contained in:
@@ -330,6 +330,31 @@ Ref<ResourceImportMetadata> Resource::get_import_metadata() const {
|
||||
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
||||
uint32_t Resource::hash_edited_version() const {
|
||||
|
||||
uint32_t hash = hash_djb2_one_32(get_edited_version());
|
||||
|
||||
List<PropertyInfo> plist;
|
||||
get_property_list(&plist);
|
||||
|
||||
for (List<PropertyInfo>::Element *E=plist.front();E;E=E->next()) {
|
||||
|
||||
if (E->get().type==Variant::OBJECT && E->get().hint==PROPERTY_HINT_RESOURCE_TYPE) {
|
||||
RES res = get(E->get().name);
|
||||
if (res.is_valid()) {
|
||||
hash = hash_djb2_one_32(res->hash_edited_version(),hash);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return hash;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Resource::Resource() {
|
||||
|
||||
@@ -341,6 +366,8 @@ Resource::Resource() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Resource::~Resource() {
|
||||
|
||||
if (path_cache!="")
|
||||
|
||||
Reference in New Issue
Block a user