diff --git a/core/__init__.py b/core/__init__.py index 8f5256c..d9c067f 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -1,3 +1,4 @@ # core/__init__.py from .register import register_wrap +from . import pmx \ No newline at end of file diff --git a/core/pmd/import_pmd.py b/core/pmd/import_pmd.py new file mode 100644 index 0000000..d23f4a9 --- /dev/null +++ b/core/pmd/import_pmd.py @@ -0,0 +1,224 @@ +import bpy +import struct +import mathutils + +def read_pmd_header(file): + # Read PMD header information + magic = file.read(3) + if magic != b'Pmd': + raise ValueError("Invalid PMD file") + + version = struct.unpack('