فهرست منبع

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号