diff --git a/core/import_pmx.py b/core/import_pmx.py index 67a6ae2..ee95b31 100644 --- a/core/import_pmx.py +++ b/core/import_pmx.py @@ -1,6 +1,7 @@ import bpy import struct import traceback +import mathutils from mathutils import Matrix, Vector @@ -40,7 +41,7 @@ def read_pmx_header(file): print(model_english_comment) return version, encoding, additional_uvs, vertex_index_size, texture_index_size, material_index_size, bone_index_size, morph_index_size, rigid_body_index_size, model_name, model_english_name, model_comment, model_english_comment -def read_vertex(file, bone_index_size, additional_uvs): +def read_vertex(file, string_build, byte_size, additional_uvs): position = struct.unpack('<3f', file.read(12)) normal = struct.unpack('<3f', file.read(12)) uv = struct.unpack('<2f', file.read(8)) @@ -50,48 +51,35 @@ def read_vertex(file, bone_index_size, additional_uvs): weight_deform_type = struct.unpack('