Enable material transparency when its alpha is below 1.0.

Differential Revision: https://developer.blender.org/D1934
This commit is contained in:
Sandy Carter 2016-04-29 14:21:23 +02:00 committed by Bastien Montagne
parent fb768079f5
commit dbb54eee76
2 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,7 @@
bl_info = {
"name": "FBX format",
"author": "Campbell Barton, Bastien Montagne, Jens Restemeier",
"version": (3, 7, 2),
"version": (3, 7, 3),
"blender": (2, 77, 0),
"location": "File > Import-Export",
"description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions",

View File

@ -1305,6 +1305,9 @@ def blen_read_material(fbx_tmpl, fbx_obj, settings):
ma.diffuse_color = ma_diff
ma.specular_color = ma_spec
ma.alpha = ma_alpha
if ma_alpha < 1.0:
ma.use_transparency = True
ma.transparency_method = 'RAYTRACE'
ma.specular_intensity = ma_spec_intensity
ma.specular_hardness = ma_spec_hardness * 5.10 + 1.0