Start programming scripts

MakeHuman python API, python plugins, etc

Moderator: joepal

Start programming scripts

Postby Dippo » Wed Aug 26, 2015 8:00 am

Hi guys,
I faced with MakeHuman for research purposes, but I have no idea where to start. :D
I downloaded the .dmg file of MakeHuman, the python interpreter and an IDE for python; I started reading the example plugins, but I didn't understand very much... Where do you advice to start from?
In particular I do not understand the points below:
1 - how can I import modules, such as NLOpt and Numpy, into a MakeHuman script? Where should I install these modules?
2 - it seems to me that whenever I have to test my script I must reboot the MakeHuman application and wait it loads the plugins, is it correct? There is a way of fast compiling, without closing and reopening the app?
3 - Is there a way to extract the set of points that make the humanoid up? I need to minimize the distance between a few fixed points and the points of the humanoid closest to them...some advice on how to do it?

Thank you in advance.

Filippo
Dippo
 
Posts: 2
Joined: Tue Aug 18, 2015 5:19 pm

Re: Start programming scripts

Postby joepal » Wed Aug 26, 2015 11:02 am

You have a series of problems here:

a. You shouldn't download the dmg file if you want to do development. Instead you should clone the raw source code from bitbucket https://bitbucket.org/MakeHuman/makehuman. In order to do this you need to understand what Mercurial is, and be able to install it on your computer.
b. To be able to run the source checkout, you need a system-wide python interpreter, which needs to be in the 2.7 series (ie not python 3.x)
c. You also need to install dependencies, such as numpy, pyqt and pyopengl system-wide.

To get a basic overview of what is needed for the above, you can view https://www.youtube.com/watch?v=3CCHGX-6Mtk. This instruction is made for windows, but as far as I know, there are no similar docs for the mac platform. So you'll have to figure out how to do the corresponding operations on your platform.

All in all, you'd probably have an easier time of it if you did the makehuman development on windows or on linux, possibly in a virtual machine.

But given the above, the answers to your questions are:

1. Make sure your system-wide installed dependencies are possible to find via PYTHONPATH (this usually happens automatically). If they are, just do an "import".
2. Yes, you need to restart makehuman each time you make a code change.
3. If you enable all plugins you can find a data structure explorer on a tab under utilities. There you can browse through the data to see how it's organized. OTOH, I think you find the "human" data structure via G.app.selectedHuman. This contains information about the mesh.
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