4 from setuptools import setup
11 short_description='3d model io library for mqo, pmd, pmx, vmd and vpd'
13 `pymeshio` is a package for 3d model io.
14 create for blender import/expoert plugin backend.
23 * read Metasequioa mqo format
24 * read/write MikuMikuDance pmd format
25 * read/write MikuMikuDance pmx format
26 * read MikuMikuDance vmd format
27 * read MikuMikuDance vpd format
28 * convert MikuMikuDance pmd format to MikuMikuDance pmx format
29 * blender-2.6 import/export plugin
35 $ easy_install pymeshio
37 $ unzip pymeshio-x.x.x.zip
39 $ python setup.py install
45 >>> import pymeshio.pmd.reader
46 >>> m=pymeshio.pmd.reader.read_from_file('resources/初音ミクVer2.pmd')
48 <pmd-1, "初音ミク" vertex: 12354, face: 68883, material: 17, bone: 140 ik: 7, skin: 31>
49 >>> import pymeshio.converter
50 >>> pmx_model=pymeshio.converter.pmd_to_pmx(m)
52 <pmx-2.0 "Miku Hatsune" 12354vertices>
53 >>> import pymeshio.pmx.writer
55 >>> pymeshio.pmx.writer.write(io.open("out.pmx", "wb"), pmx_model)
70 * fix blender-2.5 plugin for blender-2.6
76 'Programming Language :: Python :: 3',
77 'License :: OSI Approved :: zlib/libpng License',
78 'Topic :: Multimedia :: Graphics :: 3D Modeling',
81 # copy pymeshio dir for blender25 plugin
82 PYMESHIO_DIR_IN_BLENDER25='blender25-meshio/pymeshio'
83 if os.path.exists(PYMESHIO_DIR_IN_BLENDER25):
84 shutil.rmtree(PYMESHIO_DIR_IN_BLENDER25)
85 print("copy pymeshio to %s" % PYMESHIO_DIR_IN_BLENDER25)
86 shutil.copytree('pymeshio', PYMESHIO_DIR_IN_BLENDER25)
87 # copy pymeshio dir for blender26 plugin
88 PYMESHIO_DIR_IN_BLENDER26='blender26-meshio/pymeshio'
89 if os.path.exists(PYMESHIO_DIR_IN_BLENDER26):
90 shutil.rmtree(PYMESHIO_DIR_IN_BLENDER26)
91 print("copy pymeshio to %s" % PYMESHIO_DIR_IN_BLENDER26)
92 shutil.copytree('pymeshio', PYMESHIO_DIR_IN_BLENDER26)
98 description=short_description,
99 long_description=long_description,
100 classifiers=classifiers,
101 keywords=['mqo', 'pmd', 'pmx', 'vmd', 'vpd', 'mmd', 'blender'],
103 author_email='ousttrue@gmail.com',
104 url='http://meshio.sourceforge.jp/',
107 # 'pymeshio': 'blender25-meshio/pymeshio'
109 packages=['pymeshio'],
110 test_suite='nose.collector',
111 tests_require=['Nose'],
112 zip_safe = (sys.version>="2.5"), # <2.5 needs unzipped for -m to work
115 'pmd2pmx = pymeshio.main:pmd_to_pmx',