Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandy Carter <noreply@blender.org>2016-04-29 15:21:23 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-04-29 15:24:32 +0300
commitdbb54eee76d38e6936f0a32fd21a14844800f498 (patch)
tree2eddce3bcf36b5101e10725be4b280e2b1f97b7e
parentfb768079f5ab2b6e561606d84f421086f1f922e7 (diff)
Enable material transparency when its alpha is below 1.0.
Differential Revision: https://developer.blender.org/D1934
-rw-r--r--io_scene_fbx/__init__.py2
-rw-r--r--io_scene_fbx/import_fbx.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 39e8e7a9..c97478b6 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -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",
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index b8429071..ca3a06e1 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -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