diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-12-02 19:03:56 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-12-02 19:03:56 +0300 |
commit | fb661e5a13e09d64629d5b3a8d88b1ba5df628f7 (patch) | |
tree | 0809df71035baf7325c98b6c6f47468d80295bb7 /io_scene_fbx/import_fbx.py | |
parent | e9de9eed5d91aedded71131118b0252aa078b947 (diff) |
Fix related to T46912: Check a bit better we get a valid object generated from crappy FBX data.
Also print version of FBX file in console messages.
Diffstat (limited to 'io_scene_fbx/import_fbx.py')
-rw-r--r-- | io_scene_fbx/import_fbx.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index d3dbf983..9b37f7d2 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -2092,7 +2092,7 @@ class FbxImportHelperNode: child_obj = child.build_skeleton_children(fbx_tmpl, settings, scene) return arm - elif self.fbx_elem: + elif self.fbx_elem and not self.is_bone: obj = self.build_node_obj(fbx_tmpl, settings) # walk through children @@ -2163,7 +2163,8 @@ class FbxImportHelperNode: # walk through children for child in self.children: child_obj = child.link_hierarchy(fbx_tmpl, settings, scene) - child_obj.parent = obj + if child_obj: + child_obj.parent = obj return obj else: @@ -2242,6 +2243,8 @@ def load(operator, context, filepath="", operator.report({'ERROR'}, "Version %r unsupported, must be %r or later" % (version, 7100)) return {'CANCELLED'} + print("FBX version: %r" % version) + if bpy.ops.object.mode_set.poll(): bpy.ops.object.mode_set(mode='OBJECT', toggle=False) |