From 024f12e59f6e4f04a1930ef4812ef3c70374e51c Mon Sep 17 00:00:00 2001 From: Campbell Barton <ideasman42@gmail.com> Date: Sat, 24 Aug 2013 05:10:27 +0000 Subject: [PATCH] fix for UDK FBX files which have smoothing layers with no data. --- io_scene_fbx/import_fbx.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index 74555173c..76363a35d 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -474,7 +474,7 @@ def blen_read_geom_layer_uv(fbx_obj, mesh): 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 @@ def blen_read_geom_layer_smooth(fbx_obj, mesh): 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( -- GitLab