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!
This commit is contained in:
parent
1ba40272a0
commit
f539dbf190
Notes:
blender-bot
2023-02-14 20:04:13 +01:00
Referenced by issue #41712, [FBX Importer] Does not impor fbx model
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue