How to save as .mhx2 using the commandline repo

MakeHuman python API, python plugins, etc

Moderator: joepal

How to save as .mhx2 using the commandline repo

Postby AjayT » Tue Jun 16, 2015 2:55 pm

Hi,

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
AjayT
 
Posts: 10
Joined: Tue Jun 16, 2015 2:22 am
Location: United Kingdom

Re: How to save as .mhx2 using the commandline repo

Postby duststorm » Tue Jun 16, 2015 7:09 pm

Because MHX is not officially supported or included with MakeHuman, it's not so unlogical that a feature branch to go into the official release at some point in the future does not contain it either.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: How to save as .mhx2 using the commandline repo

Postby AjayT » Tue Jun 16, 2015 7:26 pm

Ah ... thanks a lot that clarifies things.

May I ask when the headless/command line version is likely to be officially released? Is there a time set for it? I think I would be really interested in something like that. Be happy to be a beta tester if you need one?

Thanks a lot for your reply :P

PS - I finally got your repo to save in mhx format, but it was a real hassle. Would prefer to use something which has active development.
AjayT
 
Posts: 10
Joined: Tue Jun 16, 2015 2:22 am
Location: United Kingdom

Re: How to save as .mhx2 using the commandline repo

Postby duststorm » Wed Jun 17, 2015 9:23 am

MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: How to save as .mhx2 using the commandline repo

Postby qiuwch » Tue Oct 27, 2015 9:44 pm

Hi, I am trying to do the exact same thing which AjayT did before.
The bugtracker is not accessible. Is there any tutorial or blog post related to how to do this? Thanks a lot.
qiuwch
 
Posts: 2
Joined: Tue Oct 27, 2015 7:09 pm

Re: How to save as .mhx2 using the commandline repo

Postby joepal » Wed Oct 28, 2015 10:06 am

The bugtracker has moved to http://bugtracker.makehumancommunity.org/

(or you could just click the bugtracker link in the top of the page)
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am


Return to Python scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron