List of API functions

MakeHuman python API, python plugins, etc

Moderator: joepal

List of API functions

Postby KaiCode2 » Wed May 25, 2022 10:10 pm

Hi there, does MH have a central list of all available functions? I've built a tool that connects to MH via sockets and sends functions to be executed. I've taken a look through the MH docs but can't seem to find a list of available functions. Any pointers would be much appreciated.

The specific functions I'm trying to locate are:
- Load model
- Apply clothes
- Save new model

Thanks,
KA
KaiCode2
 
Posts: 1
Joined: Wed May 25, 2022 10:02 pm

Re: List of API functions

Postby RobBaer » Sat May 28, 2022 3:39 pm

KaiCode2 wrote:Hi there, does MH have a central list of all available functions? I've built a tool that connects to MH via sockets and sends functions to be executed. I've taken a look through the MH docs but can't seem to find a list of available functions. Any pointers would be much appreciated.

The specific functions I'm trying to locate are:
- Load model
- Apply clothes
- Save new model

Thanks,
KA

Not sure about Apply clothes, but the other two are:
# loadModel(<model name>,[path])
#
# This will load a human model from an MHM file. The <model name> part should be a string without spaces
# and without the .MHM extension. The [path] part defaults to the user's makehuman/models directory.

MHScript.loadModel('myTestModel')

# saveModel(<model name>,[path])
#
# This will save the human model to an MHM file. The <model name> part should be a string without spaces
# and without the .MHM extension. The [path] part defaults to the user's makehuman/models directory.
# Note that this will not save any thumbnail.

MHScript.saveModel('myTestModel')

You can see at least a partial list of exposed MAPI by choosing Utilities | Sculpting from the menu. If this does not show up for you, you will need to enable the plugins that are unchecked by default by going to Settings | Plugins. I believe the #7 plugins are unchecked by default.
User avatar
RobBaer
 
Posts: 1146
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA


Return to Python scripts

Who is online

Users browsing this forum: No registered users and 1 guest

cron