初始化测量

MakeHuman python API, python plugins, etc

Moderator: joepal

初始化测量

Postby xqy » Wed Dec 02, 2020 9:25 am

2.jpg
change the value of the slider


Need help please, How can I initialize the contents in the text box of the measurement module.

I have to modify it in the python source code.

I can only change the value of the slider

But I have to input the actual size, for example 39.00 cm.

Where can I add code to implement this function.
xqy
 
Posts: 6
Joined: Wed Dec 02, 2020 9:08 am

Re: 初始化测量

Postby loki1950 » Wed Dec 02, 2020 5:18 pm

There is no mathematical relationship between the slider values and actual measurement the measurement is derived from the final mesh by calculation.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo Ideapad 320-15ABR Win 10/Mint 19
User avatar
loki1950
 
Posts: 1219
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario

Re: 初始化测量

Postby xqy » Thu Dec 03, 2020 1:34 am

loki1950 wrote:There is no mathematical relationship between the slider values and actual measurement the measurement is derived from the final mesh by calculation.

Enjoy the Choice :)


but in the measurement part, if i input a value (38.00) and press enter, the text box and slider will change together.

in this case, The human model is changed by inputting a specific value ?

1234.jpg


12345.jpg
xqy
 
Posts: 6
Joined: Wed Dec 02, 2020 9:08 am

Re: 初始化测量

Postby loki1950 » Thu Dec 03, 2020 4:36 am

If you fallow that code you will find that it just changes particular part of the mesh interpolating to the correct slider value and it is an iterative process not calculated more like solving a deferential equation by numerical methods ie; Euler's method or Runge-Kutta fist order.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo Ideapad 320-15ABR Win 10/Mint 19
User avatar
loki1950
 
Posts: 1219
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario

Re: 初始化测量

Postby xqy » Thu Dec 03, 2020 11:11 am

loki1950 wrote:If you fallow that code you will find that it just changes particular part of the mesh interpolating to the correct slider value and it is an iterative process not calculated more like solving a deferential equation by numerical methods ie; Euler's method or Runge-Kutta fist order.

Enjoy the Choice :)


another question, I want to know what the maximum value of the slider is, and why it keeps changing when i move other sliders?

and where is my output when i use print( ), it is not in the console...

(my English is poor, Maybe I can't express my ideas clearly)
xqy
 
Posts: 6
Joined: Wed Dec 02, 2020 9:08 am

Re: 初始化测量

Postby loki1950 » Thu Dec 03, 2020 4:52 pm

The slider values are between 0 and 1 only basically no influence/full influence.The values of the various sliders are interdependent so yes changing one may force a change in an other related target(what the sliders actually control) which ones that influence depends on how close they are to each other on the mesh.As for where your print() output will be that is really controlled by which OS you are running Python on and how you have set up the Environment variables not sure in detail as I am not the much of a coder these days though I wrote my first code back in the 60's yeah been around that long ;)

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo Ideapad 320-15ABR Win 10/Mint 19
User avatar
loki1950
 
Posts: 1219
Joined: Thu Dec 18, 2014 6:27 pm
Location: Ottawa,Ontario


Return to Python scripts

Who is online

Users browsing this forum: No registered users and 1 guest