You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
options.logger('Could not read texture file at '+texturePath+' because it is outside of the mtl directory and the secure flag is true. This texture will be ignored.');
229
-
texturePromise=Promise.resolve();
229
+
// Try looking for the texture in the same directory as the obj
230
+
options.logger('Texture file is outside of the mtl directory and the secure flag is true. Attempting to read the texture file from within the obj directory instead.');
options.logger('Could not read mtl file at '+mtlPath+' because it is outside of the obj directory and the secure flag is true. Using default material instead.');
538
-
return;
549
+
// Try looking for the .mtl in the same directory as the obj
550
+
options.logger('The material file is outside of the obj directory and the secure flag is true. Attempting to read the material file from within the obj directory instead.');
551
+
returnloadMtl(shallowPath,options)
552
+
.then(function(materialsInMtl){
553
+
materials=materials.concat(materialsInMtl);
554
+
})
555
+
.catch(function(error){
556
+
options.logger(error.message);
557
+
options.logger('Could not read material file at '+shallowPath+'. Using default material instead.');
558
+
});
539
559
}
560
+
540
561
returnloadMtl(mtlPath,options)
562
+
.catch(function(error){
563
+
// Try looking for the .mtl in the same directory as the obj
564
+
options.logger(error.message);
565
+
options.logger('Could not read material file at '+mtlPath+'. Attempting to read the material file from within the obj directory instead.');
566
+
returnloadMtl(shallowPath,options);
567
+
})
541
568
.then(function(materialsInMtl){
542
569
materials=materials.concat(materialsInMtl);
543
570
})
544
-
.catch(function(){
545
-
options.logger('Could not read mtl file at '+mtlPath+'. Using default material instead.');
571
+
.catch(function(error){
572
+
options.logger(error.message);
573
+
options.logger('Could not read material file at '+shallowPath+'. Using default material instead.');
546
574
});
547
575
},{concurrency : 10})
548
576
.then(function(){
@@ -615,13 +643,12 @@ function setDefaultNames(items, defaultName, usedNames) {
0 commit comments