|
@@ -1509,6 +1509,19 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
|
|
|
|
|
|
void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
|
|
void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
|
|
|
|
|
|
|
|
+ { //check that .import folder exists
|
|
|
|
+ DirAccess *da = DirAccess::open("res://");
|
|
|
|
+ if (da->change_dir(".import") != OK) {
|
|
|
|
+ Error err = da->make_dir(".import");
|
|
|
|
+ if (err) {
|
|
|
|
+ memdelete(da);
|
|
|
|
+ ERR_EXPLAIN("Failed to create 'res://.import' folder.");
|
|
|
|
+ ERR_FAIL_COND(err != OK);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ memdelete(da);
|
|
|
|
+ }
|
|
|
|
+
|
|
importing = true;
|
|
importing = true;
|
|
EditorProgress pr("reimport", TTR("(Re)Importing Assets"), p_files.size());
|
|
EditorProgress pr("reimport", TTR("(Re)Importing Assets"), p_files.size());
|
|
|
|
|