Browse Source

Update material.py

Fixed blender  not export the material's opacity
gaoqi8985 8 years ago
parent
commit
6cb9db1878
1 changed files with 1 additions and 0 deletions
  1. 1 0
      utils/exporters/blender/addons/io_three/exporter/material.py

+ 1 - 0
utils/exporters/blender/addons/io_three/exporter/material.py

@@ -45,6 +45,7 @@ class Material(base_classes.BaseNode):
 
 
         if api.material.transparent(self.node):
         if api.material.transparent(self.node):
             self[constants.TRANSPARENT] = True
             self[constants.TRANSPARENT] = True
+            self[constants.OPACITY] = api.material.opacity(self.node)
 
 
         if api.material.double_sided(self.node):
         if api.material.double_sided(self.node):
             self[constants.SIDE] = constants.SIDE_DOUBLE
             self[constants.SIDE] = constants.SIDE_DOUBLE