Thanks, Elvaerwyn and punkduck,for your responses.
Punduck,I actually managed to solve my problem a while ago and I think we followed the same idea. I basically created the functions that I needed, inspired on the setBreastSize and setBreastFirmness located at the makehuman/apps/human.py file and using the information about the breast parameters' names presented in the makehuman/data/modifiers/modeling_modifiers.json file.
Here's an example of the Breast Volume functions I implemented at the makehuman/apps/human.py file:
- Code: Select all
def setBreastVolume(self, size, updateModifier = True):
if updateModifier:
modifier = self.getModifier('breast/breast-volume-vert-down|up')
modifier.setValue(size)
self.applyAllTargets()
return
size = min(max(size, 0.0), 1.0)
if self.breastVolume == size:
return
self.breastVolume = size
self._setBreastVolumeVals()
self.callEvent('onChanging', events3d.HumanEvent(self, 'breastVolume'))
def getBreastVolume(self):
return self.breastVolume
def _setBreastVolumeVals(self):
self.maxcupVal = max(0.0, self.breastVolume * 2 - 1)
self.mincupVal = max(0.0, 1 - self.breastVolume * 2)
if self.maxcupVal > self.mincupVal:
self.averagecupVal = 1 - self.maxcupVal
else:
self.averagecupVal = 1 - self.mincupVal
where, self.breastVolume and self._setBreastVolumeVals() were initialized at setDefaultValues function also presented in that file and 'breast/breast-volume-vert-down|up' came from the json file.
I followed this method for each parameter that I needed (Vertical position, Horizontal position, Pointiness, Breast volume, Nipple Size and Nipple Point).
After this, I'm able to open the app with this new functions and change these parameters using a script.
Thankfully, this is a Open Source app. Hope this helps someone.