[Bf-extensions-cvs] [56e3ec1] master: FBX import: fix for newest FBX format (>= 7.4) using no more leading 'K' in templates' type names.

Bastien Montagne noreply at git.blender.org
Mon Apr 14 17:39:59 CEST 2014


Commit: 56e3ec1402fcd39e945090471c7a704696d4d9a7
Author: Bastien Montagne
Date:   Mon Apr 14 17:18:23 2014 +0200
https://developer.blender.org/rBA56e3ec1402fcd39e945090471c7a704696d4d9a7

FBX import: fix for newest FBX format (>= 7.4) using no more leading 'K' in templates' type names.

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

M	io_scene_fbx/import_fbx.py

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

diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index c23247e..1ed46ee 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -962,7 +962,12 @@ def load(operator, context, filepath="",
     _(); del _
 
     def fbx_template_get(key):
-        return fbx_templates.get(key, fbx_elem_nil)
+        ret = fbx_templates.get(key, fbx_elem_nil)
+        if ret is None:
+            # Newest FBX (7.4 and above) use no more 'K' in their type names...
+            key = (key[0], key[1][1:])
+            return fbx_templates.get(key, fbx_elem_nil)
+        return ret
 
     # ----
     # Build FBX node-table
@@ -1104,6 +1109,7 @@ def load(operator, context, filepath="",
                     if isinstance(fbx_lnk_item, (bpy.types.Material, bpy.types.Image)):
                         continue
                     # Need to check why this happens, Bird_Leg.fbx
+                    # This is basic object parenting, also used by "bones".
                     if isinstance(fbx_lnk_item, (bpy.types.Object)):
                         continue
                     ok = True



More information about the Bf-extensions-cvs mailing list