Skip to content
The MHAPI library is a hard dependency for most community plugins
Python
Branch: master
Clone or download
Latest commit 9f96e85 Mar 3, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
1_mhapi Merge branch 'master' of github.com:makehumancommunity/community-plug… Feb 16, 2019
buildscripts It doesn't make sense to recommend blender here Nov 27, 2018
docs Rebuild docs Mar 3, 2019
.gitignore Ignore pycharm project settings Apr 14, 2017
README.md Rebuild docs Mar 3, 2019
genDoc.py Autogen documentation Apr 2, 2017

README.md

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()".

  • assets: These are calls related to reading, parsing and manipulating assets.
  • exports: Functionality for exporting the human to a file, and for listing available export formats.
  • internals: These are calls which you would normally not need to make. They give you low-level access to internal MakeHuman objects.
  • locations: Gives you information about file and directory locations.
  • mesh: Operations on and info about the mesh as such (ie direct access to vertices, edges and faces)
  • modifiers: Gives you control and information about modifiers and targets.
  • skeleton: Operations concerning aspects of skeleton, such as rig, pose, expression and similar.
  • ui: Operations for constructing and manipulating the UI
  • version: Information about hg and the current makehuman version.
  • viewport: Operations for manipulating the viewport and the camera
You can’t perform that action at this time.