Change Eyes via script

MakeHuman python API, python plugins, etc

Moderator: joepal

Change Eyes via script

Postby vostho » Mon Jun 24, 2019 3:46 pm

Hey, is it possible to create a new EyeProxy-Object with a .mhclo-Path via scripting interface?
My plan is to use G.app.selectedHuman.setEyesProxy() to select my own .mhmat to change the eyes-texture.
I would be very grateful to any other option to change the eyes diffuse texture too :)
vostho
 
Posts: 1
Joined: Mon Jun 24, 2019 3:36 pm

Re: Change Eyes via script

Postby MTKnife » Thu Jun 27, 2019 3:06 am

Why not just make an eye material and select it in the "Materials" tab?
MTKnife
 
Posts: 311
Joined: Tue Sep 01, 2015 5:22 am

Re: Change Eyes via script

Postby joepal » Thu Jun 27, 2019 7:06 am

You can't create new items in MH. In order to create a new eye proxy, you should use MakeClothes.

Selecting an existing item can be done with MHAPI, see https://github.com/makehumancommunity/c ... _assets.py. I realize now that there's no convenience method for eyes (like there is for, for example, eyebrows), but it should be easy to simply copy and modify lines 571-573 and change them to instead adress eyes.
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