Is there a description of codeflow somewhere?

MakeHuman python API, python plugins, etc

Moderator: joepal

Is there a description of codeflow somewhere?

Postby rajataggarwal91 » Thu Jun 25, 2015 1:51 pm

Hi,
I have been going through documentation and forum posts, but I am largely stuck with understanding what is the codeflow when a slider is changed. I am especially interested in "Measures" plugin slider.
I can also see updateMeshes() being called, but could not trace the mathematics involved in deformation or the flow of code. Is there a way to create changes in measurements without using GUI objects. I can see that MeasureTaskView object is being used to call this method, but would like to have the required functions called without GUI elements.

PS : I am a newbie to python and Makehuman, but do intend to contribute to Makehuman.

Thanks.
rajataggarwal91
 
Posts: 11
Joined: Fri Jun 19, 2015 3:25 am

Re: Is there a description of codeflow somewhere?

Postby joepal » Thu Jun 25, 2015 4:00 pm

What code documentation there is, is available here: http://download.tuxfamily.org/makehuman/api/index.html
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4465
Joined: Wed Jun 04, 2008 11:20 am

Re: Is there a description of codeflow somewhere?

Postby rajataggarwal91 » Thu Jun 25, 2015 11:30 pm

Thanks Joel for your answer. I have read the comments a lot of times now, either I am dumb or the documentation is just not enough explanatory to a newbie. To get into very specific questions:
1. I need to understand what a target is and if it is being used only when a user externally applies a target, or on every slider modification.
2. Is it correct that makehuman does not uses accurate units to model its human - that means there is no actual mapping of real world space and makehuman cartesian space and it is just representative.
3. Where is all the mathematics for local and global deformation coming from?
4.self._exec()
Now I dont understand this command at all. I am new to python and have basic understanding of OpenGL. Every breakpoint goes and gets basically useless here. I am guessing it is calling some OpenGL C library maybe? Does that mean that there is some part of source code which is not in python and invisible somewhere? I read somewhere that Makehuman code was almost completely ported from C to python, does that mean there is some portion that has not.

Sorry for so many questions together, but after a week of brainstorming with code, I am just a lot more confused. I have few other friends who want to get involved in this project too, if I could understand the codebase, I would be able to help them too. Thanks.
rajataggarwal91
 
Posts: 11
Joined: Fri Jun 19, 2015 3:25 am

Re: Is there a description of codeflow somewhere?

Postby duststorm » Tue Jun 30, 2015 7:49 am

rajataggarwal91 wrote:Is there a way to create changes in measurements without using GUI objects.

You can control the modifiers.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Is there a description of codeflow somewhere?

Postby duststorm » Tue Jun 30, 2015 7:58 am

rajataggarwal91 wrote:1. I need to understand what a target is

http://www.makehuman.org/doc/node/mhble ... arget.html

rajataggarwal91 wrote:and if it is being used only when a user externally applies a target, or on every slider modification.

Every slider controls a modifier. Every modifier controls from 2 up to about 60 targets.

rajataggarwal91 wrote:2. Is it correct that makehuman does not uses accurate units to model its human

MakeHuman uses 1 unit == 1dm scale

rajataggarwal91 wrote:3. Where is all the mathematics for local and global deformation coming from?

algos3d

rajataggarwal91 wrote:4.self._exec()

You will need to read up on Qt. Any experience with a different GUI toolkit will help, though.
http://doc.qt.io/qt-4.8/qapplication.html#exec
If you understand the event loop, you will know how events propagate through the application:
http://doc.qt.io/qt-4.8/eventsandfilters.html

rajataggarwal91 wrote:Does that mean that there is some part of source code which is not in python

Yes, Qt, and the Qt event loop are written in C++.
MakeHuman™ developer
User avatar
duststorm
 
Posts: 2569
Joined: Fri Jan 27, 2012 11:57 am
Location: Belgium

Re: Is there a description of codeflow somewhere?

Postby rajataggarwal91 » Tue Jun 30, 2015 11:20 pm

<post was edited>
Thank you. That was a great answer. I figured out some myself, but it rippled into some more questions:
1. Which target files are used when each modifier is changed. How does the application decides that. If measurements take in values for girth and circular measures, with what morphFactors are the targets which are all defined by length measures of various body parts used?

2. Can the maketarget program be made topology independent? I am guessing this would also require changing the targets of body parts, which makes me wonder how they were made in the first place. Were they manually segmented and computed for each new model (min/max - height/weight, etc.)? Is it possible to have another model instead of base.obj as the starting point of creating a new model? In short "how to use different topology with same target files, or making new parts target files based on new model"

3. base.obj is having helper clothes. How do I get rid of them before using them for maketarget command line interface. I can see makehuman loads 3dobjs/base.obj that is with helper clothes, but viewer shows model without any helpers, which makes me wonder if some other object file is being imported instead.

Thanks.
rajataggarwal91
 
Posts: 11
Joined: Fri Jun 19, 2015 3:25 am


Return to Python scripts

Who is online

Users browsing this forum: No registered users and 1 guest