I was just looking through the code base for the commandline repo here
https://bitbucket.org/duststorm01/makehuman-commandline
My question is, in the headless.py script there's no code to save as a .mxh2 (or a .mhx) file.
I've added both the mhx and mhx2 plugins to the addons folder, and tried a few hacks but could not get wither to work. Here's what I've tried, adding to headless.py?
- Code: Select all
elif filepath.lower().endswith(".mhx2"):
ExporterMhx2 = _load_from_plugin("9_export_mhx2", "mh2mhx2")
Mhx2Config = _load_from_plugin("9_export_mhx2", "Mhx2Config") ## -- not tested see __init__.py see makehuman/plugins/9_export_mhx2
exportCfg = Mhx2Config
exportCfg.setHuman(human)
ExporterMhx2.exportMhx2(filepath, config=exportCfg) ## See mhx_main.py and __init__.py in makehuman/plugins/9_export_mhx
Here's the error
- Code: Select all
Traceback (most recent call last):
File "makehuman.py", line 846, in <module>
main()
File "makehuman.py", line 832, in main
headless.run(args)
File "./core/headless.py", line 78, in run
save(human, args["output"])
File "./core/headless.py", line 125, in save
exportCfg.setHuman(human)
TypeError: unbound method setHuman() must be called with Mhx2Config instance as first argument (got Human instance instead)
Any help really appreciated, this is a pure hobby thing nothing commercial. Thanks