Преглед изворни кода

In OBJ converter added handling of cases where there are no materials specified in OBJ file (which is different from having null materials or no MTL file).

alteredq пре 15 година
родитељ
комит
93c2ed9474
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4 2
      utils/exporters/convert_obj_threejs.py

+ 4 - 2
utils/exporters/convert_obj_threejs.py

@@ -756,8 +756,10 @@ def convert(infile, outfile):
             
             
 
 
     # default materials with debug colors for when
     # default materials with debug colors for when
-    # there is no specified MTL, if loading failed
-    # or there were null materials
+    # there is no specified MTL / MTL loading failed,
+    # or if there were no materials / null materials
+    if not materials:
+        materials = { 'default':0 }
     mtl = generate_mtl(materials)
     mtl = generate_mtl(materials)
     
     
     if mtllib:
     if mtllib:

粤ICP备19079148号