Questions with Python scripts api

MakeHuman python API, python plugins, etc

Moderator: joepal

Questions with Python scripts api

Postby oddnorge » Thu Aug 20, 2015 11:34 am

Hi People!

First of all, thanks for backing up this amazing project. It is already my go to choice on my research.

I have a question regarding batch processing. I have to generate a few thousands Images for this project we are working on here at the University.
Basically I need to generate lot of different humans, 'dress' them in different clothes, pose them with different poses,and acquire images with a specific background showing.

I was looking at the nightly build, and at the plugin 7_scripting.py. It seems I could just manipulate my saved mhm file to change all this.
But I have an issue with the background. It keeps toggling off whenever a new file is loaded.

I've event tried modifying the loading function on 7_scripting.py.. by debugging ( So I could explore my variables) ... and by adding the background toggle action.

Code: Select all
        from PyQt4.QtCore import pyqtRemoveInputHook
        import ipdb
        pyqtRemoveInputHook()
        ipdb.set_trace()
        gui3d.app.actions.background.toggle()
        mh.redraw()

But although the background is toggled, it only renders the background image after interact with the human using the mouse..



So is there any way for me to solve this ? Any hint in a better way to do this ( generates all these images ) ?

Sorry for the question at the time, but I've seemed to hit a bump where I am stuck.
How can I get access to the online API docs ? It seems they are dowm atm.
oddnorge
 
Posts: 2
Joined: Thu Aug 13, 2015 1:54 pm

Re: Questions with Python scripts api

Postby joepal » Thu Aug 20, 2015 5:33 pm

I have no clue to as for the problem in question. But I've now mirrored the API docs at http://www.makehumancommunity.org/api/. I guess they'll have to live there until such a point as when there is an official spot for the API docs again.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Questions with Python scripts api

Postby oddnorge » Fri Aug 21, 2015 7:23 am

Okay.
Thanks for the link!
oddnorge
 
Posts: 2
Joined: Thu Aug 13, 2015 1:54 pm

Re: Questions with Python scripts api

Postby duststorm » Tue Aug 25, 2015 12:30 pm

You need to trigger a redraw event
Code: Select all
gui3d.app.redraw()
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium


Return to Python scripts

Who is online

Users browsing this forum: No registered users and 1 guest