Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2015-12-02 19:03:56 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-12-02 19:03:56 +0300
commitfb661e5a13e09d64629d5b3a8d88b1ba5df628f7 (patch)
tree0809df71035baf7325c98b6c6f47468d80295bb7
parente9de9eed5d91aedded71131118b0252aa078b947 (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.
-rw-r--r--io_scene_fbx/__init__.py2
-rw-r--r--io_scene_fbx/import_fbx.py7
2 files changed, 6 insertions, 3 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 6e23b499..f1a19c0b 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 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)