[Bf-extensions-cvs] [35d2c40] master: FBX export: do not export textures from non-enabled material texslots.

Bastien Montagne noreply at git.blender.org
Tue Jun 17 16:53:15 CEST 2014


Commit: 35d2c407eeab7ea31438d16e2189f4152fc15ca5
Author: Bastien Montagne
Date:   Tue Jun 17 16:52:25 2014 +0200
https://developer.blender.org/rBA35d2c407eeab7ea31438d16e2189f4152fc15ca5

FBX export: do not export textures from non-enabled material texslots.

Based on patch/idea by jrestemeier (Jens Restemeier), many thanks!

Differential Revision: https://developer.blender.org/D601

===================================================================

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 ef40faa..52dabb2 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -1963,8 +1963,8 @@ def fbx_data_from_scene(scene, settings):
     data_videos = OrderedDict()
     # For now, do not use world textures, don't think they can be linked to anything FBX wise...
     for mat in data_materials.keys():
-        for tex in mat.texture_slots:
-            if tex is None:
+        for tex, use_tex in zip(mat.texture_slots, mat.use_textures):
+            if tex is None or not use_tex:
                 continue
             # For now, only consider image textures.
             # Note FBX does has support for procedural, but this is not portable at all (opaque blob),



More information about the Bf-extensions-cvs mailing list