|
@@ -9284,6 +9284,9 @@ var BABYLON;
|
|
|
* content of this file is added into a new script element, attached to the DOM (body element)
|
|
|
*/
|
|
|
Tools.LoadScript = function (scriptUrl, onSuccess, onError) {
|
|
|
+ if (!Tools.IsWindowObjectExist()) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
var head = document.getElementsByTagName('head')[0];
|
|
|
var script = document.createElement('script');
|
|
|
script.type = 'text/javascript';
|
|
@@ -33323,6 +33326,9 @@ var BABYLON;
|
|
|
serializationObject.instances = [];
|
|
|
for (var index = 0; index < this.instances.length; index++) {
|
|
|
var instance = this.instances[index];
|
|
|
+ if (instance.doNotSerialize) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
var serializationInstance = {
|
|
|
name: instance.name,
|
|
|
id: instance.id,
|
|
@@ -72181,8 +72187,6 @@ var BABYLON;
|
|
|
};
|
|
|
FilesInput.prototype.loadFiles = function (event) {
|
|
|
var _this = this;
|
|
|
- if (this._startingProcessingFilesCallback)
|
|
|
- this._startingProcessingFilesCallback();
|
|
|
// Handling data transfer via drag'n'drop
|
|
|
if (event && event.dataTransfer && event.dataTransfer.files) {
|
|
|
this._filesToLoad = event.dataTransfer.files;
|
|
@@ -72191,6 +72195,12 @@ var BABYLON;
|
|
|
if (event && event.target && event.target.files) {
|
|
|
this._filesToLoad = event.target.files;
|
|
|
}
|
|
|
+ if (!this._filesToLoad || this._filesToLoad.length === 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (this._startingProcessingFilesCallback) {
|
|
|
+ this._startingProcessingFilesCallback(this._filesToLoad);
|
|
|
+ }
|
|
|
if (this._filesToLoad && this._filesToLoad.length > 0) {
|
|
|
var files_1 = new Array();
|
|
|
var folders = [];
|