[Bf-extensions-cvs] [bf38cb7] master: FBX export: always export enabled textures, even if they have a null influence.
Bastien Montagne
noreply at git.blender.org
Tue Jun 17 16:27:43 CEST 2014
Commit: bf38cb7252219bca1dd6c1f0361e7c37aab0f83d
Author: Bastien Montagne
Date: Tue Jun 17 16:25:50 2014 +0200
https://developer.blender.org/rBAbf38cb7252219bca1dd6c1f0361e7c37aab0f83d
FBX export: always export enabled textures, even if they have a null influence.
Based on patch/idea by jrestemeier (Jens Restemeier), many thanks!
Differential Revision: https://developer.blender.org/D600
===================================================================
M io_scene_fbx/export_fbx_bin.py
===================================================================
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index c902a66..ef40faa 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -1477,9 +1477,6 @@ def fbx_mat_properties_from_texture(tex):
Quite obviously, this is a fuzzy and far-from-perfect mapping! Amounts of influence are completely lost, e.g.
Note tex is actually expected to be a texture slot.
"""
- # Tex influence does not exists in FBX, so assume influence < 0.5 = no influence... :/
- INFLUENCE_THRESHOLD = 0.5
-
# Mapping Blender -> FBX (blend_use_name, blend_fact_name, fbx_name).
blend_to_fbx = (
# Lambert & Phong...
@@ -1509,7 +1506,8 @@ def fbx_mat_properties_from_texture(tex):
tex_fbx_props = set()
for use_map_name, name_factor, fbx_prop_name in blend_to_fbx:
- if getattr(tex, "use_map_" + use_map_name) and getattr(tex, name_factor + "_factor") >= INFLUENCE_THRESHOLD:
+ # Always export enabled textures, even if they have a null influence...
+ if getattr(tex, "use_map_" + use_map_name):
tex_fbx_props.add(fbx_prop_name)
return tex_fbx_props
More information about the Bf-extensions-cvs
mailing list