Home

Awesome

MHAPI

MHAPI is a set of convenience calls intented to help you get access to things which might be difficult to find in the code otherwise. The main purpose is to serve as a base library for writing plugins for MakeHuman.

Installation and usage

If you place 1_mhapi in the plugins directory, it will self-register so that app.mhapi becomes available. Then (in a plugin or whatever it is you are working with) you can make a call to one of MHAPI's functions. For example:

from core import G
someDir = G.app.mhapi.locations.getUserDataDir()

This would store the location of the "data" directory located amongst the user's makehuman files, i.e ~/makehuman/v1/data on a unixoid system or MY DOCUMENTS\makehuman\v1\data on windows.

API reference

In the reference, "G.app.mhapi.NAMESPACE" has been excluded. So the "getHuman()" call found on the "internals" page here is actuall called "G.app.mhapi.internals.getHuman()".