Fixed mesh importing when multiple materials are present

This commit is contained in:
Daniel J. Ramirez 2017-11-17 16:47:11 -06:00
parent ca19403306
commit 62eda56e67

View file

@ -1097,11 +1097,13 @@ void ArrayMesh::_bind_methods() {
}
void ArrayMesh::reload_from_file() {
for (int i = 0; i < get_surface_count(); i++) {
surface_remove(i);
}
VisualServer::get_singleton()->mesh_clear(mesh);
surfaces.clear();
clear_blend_shapes();
Resource::reload_from_file();
String path = get_path();
_change_notify();
}
ArrayMesh::ArrayMesh() {