[Bf-extensions-cvs] [298e850] dxf_import: Grr, yet another FBX export material fix, hope this is the last!

Bastien Montagne noreply at git.blender.org
Fri Aug 15 12:38:30 CEST 2014


Commit: 298e8506cf4f2d2727c961146155319ab95d9e4a
Author: Bastien Montagne
Date:   Tue Aug 12 12:04:24 2014 +0200
Branches: dxf_import
https://developer.blender.org/rBA298e8506cf4f2d2727c961146155319ab95d9e4a

Grr, yet another FBX export material fix, hope this is the last!

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

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 65bec71..857b8a8 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -1102,7 +1102,7 @@ def fbx_data_mesh_elements(root, me_obj, scene_data, done_meshes):
 
                 # We have to validate mat indices, and map them to FBX indices.
                 # Note a mat might not be in me_fbxmats_idx (e.g. node mats are ignored).
-                blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats]
+                blmats_to_fbxmats_idxs = [me_fbxmats_idx[m] for m in me_blmats if m in me_fbxmats_idx]
                 mat_idx_limit = len(blmats_to_fbxmats_idxs)
                 def_mat = blmats_to_fbxmats_idxs[0]
                 _gen = (blmats_to_fbxmats_idxs[m] if m < mat_idx_limit else def_mat for m in t_pm)



More information about the Bf-extensions-cvs mailing list