import bpy import struct def read_pmx_header(file): # Read PMX header information magic = file.read(4) # Read magic bytes (should be "PMX ") if magic != b'PMX ': raise ValueError("Invalid PMX file") version = struct.unpack('