浏览代码

Changed transparency to opacity

The OBJ to JSON converter uses now opacity instead of transparency
attribute.

Fixes #6645
Thomas FORGIONE 10 年之前
父节点
当前提交
cd83fb8c5c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      utils/converters/obj/convert_obj_three.py

+ 2 - 2
utils/converters/obj/convert_obj_three.py

@@ -443,9 +443,9 @@ def parse_mtl(fname):
             if (chunks[0] == "Tr" or chunks[0] == "d") and len(chunks) == 2:
             if (chunks[0] == "Tr" or chunks[0] == "d") and len(chunks) == 2:
                 materials[identifier]["transparent"] = True
                 materials[identifier]["transparent"] = True
                 if TRANSPARENCY == "invert":
                 if TRANSPARENCY == "invert":
-                    materials[identifier]["transparency"] = 1.0 - float(chunks[1])
+                    materials[identifier]["opacity"] = float(chunks[1])
                 else:
                 else:
-                    materials[identifier]["transparency"] = float(chunks[1])
+                    materials[identifier]["opacity"] = 1.0 - float(chunks[1])
 
 
             # Optical density
             # Optical density
             # Ni 1.0
             # Ni 1.0