OSDN Git Service

add blender26-meshio
[meshio/pymeshio.git] / setup.py
1 #!/usr/bin/env python
2 # coding: utf-8
3
4 from setuptools import setup
5 import sys
6 import os
7 import shutil
8
9 name='pymeshio'
10 version='2.2.3'
11 short_description='3d model io library for mqo, pmd, pmx, vmd and vpd'
12 long_description='''\
13 `pymeshio` is a package for 3d model io.
14 create for blender import/expoert plugin backend.
15
16 Requirements
17 ------------
18 * Python 3
19 * Python 2.7
20
21 Features
22 --------
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
30 Install
31 -------
32 ::
33
34    $ easy_install pymeshio
35    or
36    $ unzip pymeshio-x.x.x.zip
37    $ cd pymeshio-x.x.x
38    $ python setup.py install
39
40 Usage
41 -----
42 ::
43
44     >>> import pymeshio.pmd.reader
45     >>> m=pymeshio.pmd.reader.read_from_file('resources/初音ミクVer2.pmd')
46     >>> print(m)
47     <pmd-1, "初音ミク" vertex: 12354, face: 68883, material: 17, bone: 140 ik: 7, skin: 31>
48     >>> import pymeshio.converter
49     >>> pmx_model=pymeshio.converter.pmd_to_pmx(m)
50     >>> print(pmx_model)
51     <pmx-2.0 "Miku Hatsune" 12354vertices>
52     >>> import pymeshio.pmx.writer
53     >>> import io
54     >>> pymeshio.pmx.writer.write(io.open("out.pmx", "wb"), pmx_model)
55     True
56
57
58 ToDo
59 --------
60
61 * update blender25 plugin to blender26
62 * blender26 importer for pmx
63 * blender26 exporter for pmx
64
65
66 New
67 -------
68 2.2.3 (2011-10-12)
69 ~~~~~~~~~~~~~~~~~~
70 * fix for pmxmca
71
72 2.2.2 (2011-10-10)
73 ~~~~~~~~~~~~~~~~~~
74 * add pmd2pmx script
75
76 2.2.1 (2011-10-07)
77 ~~~~~~~~~~~~~~~~~~
78 * implement pmd to pmx converter
79
80 2.2.0 (2011-10-03)
81 ~~~~~~~~~~~~~~~~~~
82 * implement pmx writer
83
84 '''
85
86 classifiers=[
87         'Programming Language :: Python :: 3',
88         'License :: OSI Approved :: zlib/libpng License',
89         'Topic :: Multimedia :: Graphics :: 3D Modeling',
90         ]
91
92 # copy pymeshio dir for blender25 plugin
93 PYMESHIO_DIR_IN_BLENDER25='blender25-meshio/pymeshio'
94 if os.path.exists(PYMESHIO_DIR_IN_BLENDER25):
95     shutil.rmtree(PYMESHIO_DIR_IN_BLENDER25)    
96 print("copy pymeshio to %s" % PYMESHIO_DIR_IN_BLENDER25)
97 shutil.copytree('pymeshio', PYMESHIO_DIR_IN_BLENDER25)
98 # copy pymeshio dir for blender26 plugin
99 PYMESHIO_DIR_IN_BLENDER26='blender26-meshio/pymeshio'
100 if os.path.exists(PYMESHIO_DIR_IN_BLENDER26):
101     shutil.rmtree(PYMESHIO_DIR_IN_BLENDER26)    
102 print("copy pymeshio to %s" % PYMESHIO_DIR_IN_BLENDER26)
103 shutil.copytree('pymeshio', PYMESHIO_DIR_IN_BLENDER26)
104
105
106 setup(
107         name=name,
108         version=version,
109         description=short_description,
110         long_description=long_description,
111         classifiers=classifiers,
112         keywords=['mqo', 'pmd', 'pmx', 'vmd', 'vpd', 'mmd', 'blender'],
113         author='ousttrue',
114         author_email='ousttrue@gmail.com',
115         url='http://meshio.sourceforge.jp/',
116         license='zlib',
117         #package_dir={
118         #    'pymeshio': 'blender25-meshio/pymeshio'
119         #    },
120         packages=['pymeshio'],
121         test_suite='nose.collector',
122         tests_require=['Nose'],
123         zip_safe = (sys.version>="2.5"),   # <2.5 needs unzipped for -m to work
124         entry_points = {
125             'console_scripts': [
126                 'pmd2pmx = pymeshio.main:pmd_to_pmx',
127                 ]
128             }
129         )
130