From 93259f401f04b7854e214fa463fa979933a56bef Mon Sep 17 00:00:00 2001 From: amorgun Date: Sun, 30 Jun 2024 14:26:03 +0300 Subject: [PATCH] Fix bone display again --- importer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/importer.py b/importer.py index 661475a..b152548 100644 --- a/importer.py +++ b/importer.py @@ -259,7 +259,9 @@ def CH_DATASKEL(self, reader: ChunkReader, xref: bool): # Chunk Handler - Skele for bone in created_bones_array: if len(bone.children) == 1: - bone.length = (bone.children[0].head - bone.head).length + new_length = (bone.children[0].head - bone.head).length + if new_length > 1e-3: + bone.length = new_length bpy.ops.object.mode_set(mode='EDIT', toggle=True) def CH_FOLDMSGR(self, reader: ChunkReader): # Chunk Handler - Mesh Data @@ -334,7 +336,6 @@ def CH_FOLDANIM(self, reader: ChunkReader): # Chunk Handler - Animations num_bones = reader.read_one('