how to integrate with makehuman with my project?

MakeHuman python API, python plugins, etc

Moderator: joepal

Re: how to integrate with makehuman with my project?

Postby 7yl4r » Thu May 08, 2014 3:47 pm

7yl4r wrote:
7yl4r wrote:
duststorm wrote:makehuman --help will tell you all there is to know about the interface.
If you are using the official MH you will note that there are no output options at all.


ah, of course. thanks.


Oops, nope. `-h and --help` don't work. At least not when running from python source. It's giving `TypeError: not all arguments converted during string formatting` in the log, which (I've learned) actually means that the argument isn't recognized. I was able to figure it out by looking at the source though. `python makehuman.py myInputFile.mhm -o outputFile.mhx`


bah. no... that only appears to work, but actually the contents of the mhm file are completely ignored and I get the default human every time.
7yl4r
 
Posts: 15
Joined: Fri Apr 18, 2014 3:44 pm

Re: how to integrate with makehuman with my project?

Postby duststorm » Thu May 08, 2014 11:43 pm

7yl4r wrote:Oops, nope. `-h and --help` don't work. At least not when running from python source. It's giving `TypeError: not all arguments converted during string formatting` in the log, which (I've learned) actually means that the argument isn't recognized. I was able to figure it out by looking at the source though. `python makehuman.py myInputFile.mhm -o outputFile.mhx`


Run
Code: Select all
makehuman.py -h

It works, just tested with latest source.

Note that -o option DOES NOT EXIST. So I wouldn't be surprised you're getting some kind of error using it.


Edit: ah, it appears that you are talking about the commandline fork, not the official version. You should have said this more clearly.
Confirmed, I'll create an issue for it.

Note that I'm working on this when I have time, but currently I'm occupied with more pressing MakeHuman core features. It's not officially supported until it is included in the official release. Use at your own risk applies here.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: how to integrate with makehuman with my project?

Postby 7yl4r » Fri May 09, 2014 12:31 am

duststorm wrote:
7yl4r wrote:Oops, nope. `-h and --help` don't work. At least not when running from python source. It's giving `TypeError: not all arguments converted during string formatting` in the log, which (I've learned) actually means that the argument isn't recognized. I was able to figure it out by looking at the source though. `python makehuman.py myInputFile.mhm -o outputFile.mhx`


Run
Code: Select all
makehuman.py -h

It works, just tested with latest source.

Note that -o option DOES NOT EXIST. So I wouldn't be surprised you're getting some kind of error using it.


Edit: ah, it appears that you are talking about the commandline fork, not the official version. You should have said this more clearly.
Confirmed, I'll create an issue for it.

Note that I'm working on this when I have time, but currently I'm occupied with more pressing MakeHuman core features. It's not officially supported until it is included in the official release. Use at your own risk applies here.


Totally understandable. Thanks for all your great work, btw. I wouldn't mind putting some of my time into getting it working, but I'm finding the makehuman codebase pretty tough to get into. Any thoughts on why the mhm isn't getting read? The logs don't seem to have anything... my python_err.txt has the following bit between version info and MHX info that might be related, but I don't know what it is talking about... doesn't seem related but could be.

Code: Select all
...
version stuff
...
NUMPY.VERSION: 1.8.0
compiled file missing: data/3dobjs/base.npz
Problem loading binary mesh: ('compiled file missing: %s', 'data/3dobjs/base.npz')
Loading ASCII mesh data/3dobjs/base.obj.
Not writing compiled meshes to system paths (data/3dobjs/base.npz).
Loading material from file data/skins/default.mhmat
Exporting test.mhx
...
test.mhx exported


Running `makehuman.py myInputFile.mhm` loads up the file as expected, but if output file is specified (with -o) I just get the default (all .5s) mhx. Perhaps there is a load-mhm method somewhere which is getting skipped over because it is nested in one of the skipped gui methods?
7yl4r
 
Posts: 15
Joined: Fri Apr 18, 2014 3:44 pm

Re: how to integrate with makehuman with my project?

Postby duststorm » Fri May 09, 2014 9:09 am

MHM loading is a commandline feature of official MH. Output file is a feature of the fork.
Perhaps they are not unified yet, I can't remember.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: how to integrate with makehuman with my project?

Postby 7yl4r » Fri May 09, 2014 1:38 pm

duststorm wrote:MHM loading is a commandline feature of official MH. Output file is a feature of the fork.
Perhaps they are not unified yet, I can't remember.


mhm loading into the gui works on the cmd-line fork, but if I specify -o I get the default human every time. Regardless of what mhm I specify. I'll dig in some more now and see if I can track down where the .mhm gets loaded...
7yl4r
 
Posts: 15
Joined: Fri Apr 18, 2014 3:44 pm

Re: how to integrate with makehuman with my project?

Postby 7yl4r » Fri May 09, 2014 6:10 pm

7yl4r wrote:
duststorm wrote:MHM loading is a commandline feature of official MH. Output file is a feature of the fork.
Perhaps they are not unified yet, I can't remember.


mhm loading into the gui works on the cmd-line fork, but if I specify -o I get the default human every time. Regardless of what mhm I specify. I'll dig in some more now and see if I can track down where the .mhm gets loaded...


The console app doesn't seem to have any code for loading the mhm. I can use human.Human.load('fname.mhm') iff G.app.loadHandlers has been initialized by mhmain.MHApplication.loadPlugins which requires all kinds of other things to be set first. Looks like I've hit yet another dead end. Maybe there is an easier way?

Ideally I think consoleApp and mhApp would inherit from a base-app class, but that might require a lot of work.
7yl4r
 
Posts: 15
Joined: Fri Apr 18, 2014 3:44 pm

Re: how to integrate with makehuman with my project?

Postby duststorm » Sun May 11, 2014 9:45 pm

I have refreshed my memory on this: it's not possible (read: it's too much of a hassle to do).
mhm file loading will work in GUI mode only.

For commandline use, use the separate input commands. MHM files are redundant in this case anyway.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: how to integrate with makehuman with my project?

Postby 7yl4r » Mon May 12, 2014 12:53 am

duststorm wrote:I have refreshed my memory on this: it's not possible (read: it's too much of a hassle to do).
mhm file loading will work in GUI mode only.

For commandline use, use the separate input commands. MHM files are redundant in this case anyway.


I didn't realize that. I'll have to check out the man pages, but right now I only have the mh-cmdline branch (with broken -h). Is there a help page on cmd interface? I found this (http://www.makehuman.org/doc/node/comma ... usage.html), but it's very outdated.
7yl4r
 
Posts: 15
Joined: Fri Apr 18, 2014 3:44 pm

Re: how to integrate with makehuman with my project?

Postby duststorm » Mon May 12, 2014 2:22 am

That is the documentation of MakeTarget standalone, which has nothing to do with the MakeHuman application. (here is the most up to date version of it: http://www.makehuman.org/doc/node/maket ... alone.html)
Since this is an experimental branch, of course there is no documentation for it. You'll just have to read the source code in that case (the part that prints out the --help mesages).
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: how to integrate with makehuman with my project?

Postby 7yl4r » Mon May 12, 2014 2:30 am

duststorm wrote:That is the documentation of MakeTarget standalone, which has nothing to do with the MakeHuman application. (here is the most up to date version of it: http://www.makehuman.org/doc/node/maket ... alone.html)
Since this is an experimental branch, of course there is no documentation for it. You'll just have to read the source code in that case (the part that prints out the --help mesages).


blarg. my mistake. Well I've fixed the --help issue on the cmd branch so I'll just use that now. =)
7yl4r
 
Posts: 15
Joined: Fri Apr 18, 2014 3:44 pm

PreviousNext

Return to Python scripts

Who is online

Users browsing this forum: No registered users and 1 guest