Prevent Editor from hang when importing stl as mesh
When Importing an stl file into Godot from the import mesh menu, the editor hangs indefinitely. Since only Obj files are supported, the data remains unparsed and hence the editor enters an infinte loop. This commit fixes this issue by exiting the loop when godot has finished parsing the file, irrespective of whether any meaningful data was extracted out. Fixes: #9200
This commit is contained in:
parent
e17966ca01
commit
945f40303a
1 changed files with 3 additions and 2 deletions
|
@ -513,12 +513,13 @@ Error EditorMeshImportPlugin::import(const String &p_path, const Ref<ResourceImp
|
|||
|
||||
has_index_data = false;
|
||||
|
||||
if (f->eof_reached())
|
||||
break;
|
||||
}
|
||||
|
||||
if (l.begins_with("o ")) //name
|
||||
name = l.substr(2, l.length()).strip_edges();
|
||||
|
||||
if (f->eof_reached())
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue