[Bf-extensions-cvs] [fb661e5] master: Fix related to T46912: Check a bit better we get a valid object generated from crappy FBX data.
Bastien Montagne
noreply at git.blender.org
Wed Dec 2 17:27:17 CET 2015
Commit: fb661e5a13e09d64629d5b3a8d88b1ba5df628f7
Author: Bastien Montagne
Date: Wed Dec 2 17:03:56 2015 +0100
Branches: master
https://developer.blender.org/rBAfb661e5a13e09d64629d5b3a8d88b1ba5df628f7
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.
===================================================================
M io_scene_fbx/__init__.py
M io_scene_fbx/import_fbx.py
===================================================================
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 6e23b49..f1a19c0 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -21,7 +21,7 @@
bl_info = {
"name": "FBX format",
"author": "Campbell Barton, Bastien Montagne, Jens Restemeier",
- "version": (3, 6, 4),
+ "version": (3, 6, 5),
"blender": (2, 76, 0),
"location": "File > Import-Export",
"description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions",
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index d3dbf98..9b37f7d 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)
More information about the Bf-extensions-cvs
mailing list