ousttrue / pymeshio

3d model reader/writer for python
http://pypi.python.org/pypi/pymeshio/
92 stars 26 forks source link

export to shape key 'type 0' (bug fix) #23

Closed Hogarth-MMD closed 9 years ago

Hogarth-MMD commented 9 years ago

export to shape key 'type 0' (bug fix)

If you create a shape key/morph/facial for your model in Blender, it will not export correctly with Pymeshio. The shape key type of the exported shape key will be 0. There is no facial type 0 for a pmd or pmx model. The allowed types are 1,2,3,4 (brow, eyes, mouth, other).

Here is a quick and easy bug fix for this problem, exporting to a .pmd file with pymeshio:

In export_pmd.py find line 216

v=[m.name, m.name, 0]

Change the 0 to 4

v=[m.name, m.name, 4]

Now all shape keys whose names are not listed in englishmap.py will be

exported in the Other category (instead of being exported in the

non-existent 'type 0' category)

Here is a similar easy bug fix for exporting to a .pmx file with pymeshio:

In export_pmx.py, find line 298

change panel=0 to panel=4
ousttrue commented 9 years ago

I applied the correction. Thank you !