Skip to content

Commit b7dae3c

Browse files
committed
Minor changes
1 parent 7bac242 commit b7dae3c

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

clmh.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,19 @@ def saviour(age, gendere, weighte, body_proportion, heighte, name, key_string, i
8989
humanoid.setAgeYears(age)
9090
humanoid.setGender(gendere)
9191

92-
humanoid.setWeight(1)
93-
humanoid.setBodyProportions(body_proportion)
92+
# setting muscle to zero is the only way after which we can add fat to the body (by increasing weight, through calculating BMI)
93+
humanoid.setMuscle(0)
9494

9595
BMI = weighte / ((heighte/100) * (heighte/100))
9696

97-
if(BMI )
98-
99-
97+
if (BMI > 30):
98+
humanoid.setWeight(0.9)
99+
elif (BMI > 26):
100+
humanoid.setWeight(0.7)
101+
elif (BMI > 18.5):
102+
humanoid.setWeight(0.5)
103+
else:
104+
humanoid.setWeight(0.3)
100105

101106
## Modelling the face using BetaFaceAPI
102107
if(len(image_path) > 1):
@@ -236,7 +241,7 @@ def saviour(age, gendere, weighte, body_proportion, heighte, name, key_string, i
236241
humanoid.applyAllTargets()
237242

238243
print humanoid.targetsDetailStack
239-
wavefront.writeObjFile(fpa + name + '.obj' , humanoid.mesh)
244+
wavefront.writeObjFile(fpa + name + '.obj', humanoid.mesh)
240245

241246
def delete_obj(ide):
242247
os.remove(fpa + str(ide) + '.obj')

db.sqlite3

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)