Clear importer data after import.
This commit is contained in:
parent
2e85bf20b5
commit
ddec4bd898
@ -344,6 +344,9 @@ OV.Importer = class
|
||||
onError : function () {
|
||||
let message = importer.GetMessage ();
|
||||
callbacks.onError (new OV.ImportError (OV.ImportErrorCode.ImportFailed, message));
|
||||
},
|
||||
onComplete : function () {
|
||||
importer.Clear ();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -36,17 +36,20 @@ OV.ImporterBase = class
|
||||
{
|
||||
if (this.error) {
|
||||
callbacks.onError ();
|
||||
callbacks.onComplete ();
|
||||
return;
|
||||
}
|
||||
|
||||
if (OV.IsModelEmpty (this.model)) {
|
||||
this.error = true;
|
||||
callbacks.onError ();
|
||||
callbacks.onComplete ();
|
||||
return;
|
||||
}
|
||||
|
||||
OV.FinalizeModel (this.model, this.callbacks.getDefaultMaterial);
|
||||
callbacks.onSuccess ();
|
||||
callbacks.onComplete ();
|
||||
}
|
||||
|
||||
CanImportExtension (extension)
|
||||
|
||||
@ -84,6 +84,9 @@ module.exports =
|
||||
},
|
||||
onError : function () {
|
||||
onReady (model);
|
||||
},
|
||||
onComplete : function () {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user