Need help with using MH from outside

If you have problems understanding something or getting started, ask here

Moderator: joepal

Need help with using MH from outside

Postby oshanath » Sun Sep 25, 2022 11:31 am

Hi everyone,

My project requires the automation of the creation of humans. The facial features don't matter, only the body measurements do. My goal is to write a script or a program that can take the measurements I give, and output a character mesh but without opening the MH program GUI. Is this possible?

Thank you
oshanath
 
Posts: 1
Joined: Sun Sep 25, 2022 11:23 am

Re: Need help with using MH from outside

Postby joepal » Mon Sep 26, 2022 8:00 am

If the restriction is that the GUI shouldn't be opened, then the answer is no. However, it is possible to open one instance of the GUI and script operations against that instance. This can be done either from the script tab in the UI or via JSON commands via a network socket.

The scripting tab is available under utilities. There are some template commands available, but you can call every function in the MH source code via that interface.

The socket server plugin is here: https://github.com/makehumancommunity/c ... ins-socket (it is bundled with MH too, so you don't need to install it). Example calls are available here: https://github.com/makehumancommunity/c ... master/cli ... However, only a small subset of what is available to MH is implementer via the socket server. If you want to do things outside this, you will have to provide an interface in the socket server source code. Essentially, write a wrapper around the corresponding MH call in, for example, https://github.com/makehumancommunity/c ... /modops.py
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am


Return to Newbies

Who is online

Users browsing this forum: No registered users and 1 guest