[Bf-extensions-cvs] [f539dbf] master: Fix T41712: tris, do not allow zero-length bones.
Bastien Montagne
noreply at git.blender.org
Sat Sep 6 16:06:09 CEST 2014
Commit: f539dbf1906eeb2ef0ddc0d4b8f109e5a8f84d90
Author: Bastien Montagne
Date: Sat Sep 6 16:05:00 2014 +0200
Branches: master
https://developer.blender.org/rBAf539dbf1906eeb2ef0ddc0d4b8f109e5a8f84d90
Fix T41712: tris, do not allow zero-length bones.
We now this has to be rework completely anyway, but until then, better to avoid crash!
===================================================================
M io_scene_fbx/import_fbx.py
===================================================================
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index fed034a..d809fd6 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -529,7 +529,8 @@ def blen_read_armatures_add_bone(bl_obj, bl_arm, bones, b_uuid, matrices, fbx_tm
b_item[1] = bone_name # since ebo is only valid in Edit mode... :/
# So that our bone gets its final length, but still Y-aligned in armature space.
- ebo.tail = Vector((0.0, 1.0, 0.0)) * bsize
+ # XXX We now know bsize is not len of bone... but still forbid zero len!
+ ebo.tail = Vector((0.0, 1.0, 0.0)) * max(bsize, 1e-3)
# And rotate/move it to its final "rest pose".
ebo.matrix = bmat_arm.normalized()
More information about the Bf-extensions-cvs
mailing list