Which fuction do I have to call to set a pose

If your topic doesn't fit anywhere else, put it here.

Moderator: joepal

Which fuction do I have to call to set a pose

Postby Ottega » Fri Feb 26, 2021 10:37 am

Hi,
I'm currently modifying the mass produce plug-in, so it also randomizes poses.

I managed to get all the available system and user poses in mass produce but now I'm not sure which function to call to apply the pose.
Is it the load() in the bvh.py or is there a simpler way to load a pose?

Thanks for your help in advance.

Best,
Ottega


Edit 1: fixed typo in subject
No reinstall necessary until I inevitably break something beyond my googling skills.
Ottega
 
Posts: 4
Joined: Wed Feb 24, 2021 10:39 am

Re: Which fuction do I have to call to set a pose

Postby joepal » Sat Feb 27, 2021 8:08 am

Take a look at line 146 and onwards in https://github.com/makehumancommunity/m ... es_pose.py

It is a few different calls.
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4098
Joined: Wed Jun 04, 2008 11:20 am

Re: Which fuction do I have to call to set a pose

Postby Ottega » Thu Mar 04, 2021 5:11 pm

joepal wrote:Take a look at line 146 and onwards in https://github.com/makehumancommunity/m ... es_pose.py

It is a few different calls.


I did that, I managed to apply poses randomly but when I open the .obj files in Bender they turn out quite distorted, one can tell which pose it is supposed to be not more than that.

Here is the code I adapted and which I'm using to apply the poses.
https://pastebin.com/dbpvkE8x

Do I need more to it than that? What am I missing?

Thanks in advance,

Ottega


Edit1 1: Fixed typo
Last edited by Ottega on Tue Mar 30, 2021 6:07 pm, edited 1 time in total.
No reinstall necessary until I inevitably break something beyond my googling skills.
Ottega
 
Posts: 4
Joined: Wed Feb 24, 2021 10:39 am

Re: Which fuction do I have to call to set a pose

Postby joepal » Fri Mar 05, 2021 6:41 am

I don't see immediately what is wrong with this, although I would start looking at the redraw/refresh methods for the pose, for gui3d.Action and for Human.

For example, there is line 225-228 in 3_libraries_pose.py:

Code: Select all
    def onShow(self, event):
        self.filechooser.refresh()
        self.filechooser.selectItem(self.currentPose)
        self.human.refreshPose()


Maybe refreshPose() makes a difference?

Other alternative are that there might be some clues in Human too, https://github.com/makehumancommunity/m ... s/human.py, for example lines 1428-1457
Joel Palmius (LinkedIn)
MakeHuman Infrastructure Manager
http://www.palmius.com/joel
joepal
 
Posts: 4098
Joined: Wed Jun 04, 2008 11:20 am

Re: Which fuction do I have to call to set a pose

Postby RobBaer » Sat Mar 27, 2021 11:54 am

Random question. Do you have the default skeleton selected when running the code?
User avatar
RobBaer
 
Posts: 1109
Joined: Sat Jul 13, 2013 3:30 pm
Location: Kirksville, MO USA

Re: Which fuction do I have to call to set a pose

Postby Ottega » Sun Mar 28, 2021 1:42 pm

RobBaer wrote:Random question. Do you have the default skeleton selected when running the code?

tbh. I do not know for sure. How would that piece of code look like?

I took some screenshots https://imgur.com/a/1mPf0j6 of the resulting models, maybe they will help in some way...

Two things to note
- the 4. models was much larger in scale than the rest of the models.
- when I export the models as MHM instead of OBJ the pose is not applied and the models are in the std. A-pose

joepal wrote:For example, there is line 225-228 in 3_libraries_pose.py:

I tried adding self.human.refreshPose() after applying the pose, but it din't really change anything...

PS: Sorry for the late reply, I was quite busy with my new internship.

Thank you for your time.

Best,
Ottega
No reinstall necessary until I inevitably break something beyond my googling skills.
Ottega
 
Posts: 4
Joined: Wed Feb 24, 2021 10:39 am


Return to General discussions about makehuman

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest