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