OSDN Git Service

implement converter
[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.1'
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
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.pmx.reader
45     >>> m=pymeshio.pmx.reader.read_from_file('resources/初音ミクVer2.pmx')
46     >>> print(m)
47     <pmx-2.0 "Miku Hatsune" 12354vertices>
48     >>> print(dir(m))
49     ['__class__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', 'bones', 'comment', 'display_slots', 'english_comment', 'english_name', 'indices', 'joints', 'materials', 'morphs', 'name', 'rigidbodies', 'textures', 'version', 'vertices']
50
51 ToDo
52 --------
53
54 * pmd to pmx converter
55 * update blender25 plugin to blender26
56 * blender26 importer for pmx
57 * blender26 exporter for pmx
58
59
60 New
61 -------
62 2.2.1 (2011-10-07)
63 ~~~~~~~~~~~~~~~~~~
64 * implement pmd to pmx converter
65
66 2.2.0 (2011-10-03)
67 ~~~~~~~~~~~~~~~~~~
68 * implement pmx writer
69
70 '''
71
72 classifiers=[
73         'Programming Language :: Python :: 3',
74         'License :: OSI Approved :: zlib/libpng License',
75         'Topic :: Multimedia :: Graphics :: 3D Modeling',
76         ]
77
78 # copy pymeshio dir for blender25 plugin
79 PYMESHIO_DIR_IN_BLENDER='blender25-meshio/pymeshio'
80 if os.path.exists(PYMESHIO_DIR_IN_BLENDER):
81     shutil.rmtree(PYMESHIO_DIR_IN_BLENDER)    
82 print("copy pymeshio to blender-25")
83 shutil.copytree('pymeshio', PYMESHIO_DIR_IN_BLENDER)
84
85 setup(
86         name=name,
87         version=version,
88         description=short_description,
89         long_description=long_description,
90         classifiers=classifiers,
91         keywords=['mqo', 'pmd', 'pmx', 'vmd', 'vpd', 'mmd', 'blender'],
92         author='ousttrue',
93         author_email='ousttrue@gmail.com',
94         url='http://meshio.sourceforge.jp/',
95         license='zlib',
96         #package_dir={
97         #    'pymeshio': 'blender25-meshio/pymeshio'
98         #    },
99         packages=['pymeshio'],
100         test_suite='nose.collector',
101         tests_require=['Nose'],
102         zip_safe = (sys.version>="2.5"),   # <2.5 needs unzipped for -m to work
103         entry_points = {
104             'console_scripts': [
105                 'pmd2pmx = pymeshio.main:pmd_to_pmx',
106                 ]
107             }
108         )
109