[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [4699] trunk/py/scripts/addons/ io_scene_fbx/import_fbx.py: fix for UDK FBX files which have smoothing layers with no data.

Campbell Barton ideasman42 at gmail.com
Sat Aug 24 07:10:28 CEST 2013


Revision: 4699
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=4699
Author:   campbellbarton
Date:     2013-08-24 05:10:27 +0000 (Sat, 24 Aug 2013)
Log Message:
-----------
fix for UDK FBX files which have smoothing layers with no data.

Modified Paths:
--------------
    trunk/py/scripts/addons/io_scene_fbx/import_fbx.py

Modified: trunk/py/scripts/addons/io_scene_fbx/import_fbx.py
===================================================================
--- trunk/py/scripts/addons/io_scene_fbx/import_fbx.py	2013-08-24 01:32:44 UTC (rev 4698)
+++ trunk/py/scripts/addons/io_scene_fbx/import_fbx.py	2013-08-24 05:10:27 UTC (rev 4699)
@@ -474,7 +474,7 @@
 
 def blen_read_geom_layer_smooth(fbx_obj, mesh):
     fbx_layer = elem_find_first(fbx_obj, b'LayerElementSmoothing')
-    
+
     if fbx_layer is None:
         return False
 
@@ -487,6 +487,10 @@
     layer_id = b'Smoothing'
     fbx_layer_data = elem_prop_first(elem_find_first(fbx_layer, layer_id))
 
+    # udk has 'Direct' mapped, with no Smoothing, not sure why, but ignore these
+    if fbx_layer_data is None:
+        return False
+
     if fbx_layer_mapping == b'ByEdge':
         blen_data = mesh.edges
         ok_smooth = blen_read_geom_array_mapped_edge(



More information about the Bf-extensions-cvs mailing list