Pārlūkot izejas kodu

Blender Version 4.4.1

- texture sub-directory path created when missing
jeff 9 gadi atpakaļ
vecāks
revīzija
19164cf410
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      Exporters/Blender/io_export_babylon.py

+ 3 - 2
Exporters/Blender/io_export_babylon.py

@@ -1,7 +1,7 @@
 bl_info = {
     'name': 'Babylon.js',
     'author': 'David Catuhe, Jeff Palmer',
-    'version': (4, 4, 0),
+    'version': (4, 4, 1),
     'blender': (2, 75, 0),
     'location': 'File > Export > Babylon.js (.babylon)',
     'description': 'Export Babylon.js scenes (.babylon)',
@@ -266,7 +266,8 @@ class Main(bpy.types.Operator, bpy_extras.io_utils.ExportHelper):
             if not scene.inlineTextures:
                 self.textureDir = os.path.join(self.textureDir, scene.textureDir)
                 if not os.path.isdir(self.textureDir):
-                    raise EnvironmentError('directory for textures, ' + self.textureDir + ', DOES NOT EXIST')
+                    os.makedirs(self.textureDir)
+                    Main.warn("Texture sub-directory did not already exist, created: " + self.textureDir)
 
             Main.log('========= Conversion from Blender to Babylon.js =========', 0)
             Main.log('Scene settings used:', 1)