Skip to content

Commit

Permalink
images added, license-parser changed
Browse files Browse the repository at this point in the history
Old makehuman does not save the license created by makeclothes, because
of a ":" at the end of the line. This has been fixed.

Furthermore NO mhxpy had been parsed correctly for a license, because b'author' is not
the same key as "author" ... str(..., "utf-8") was missing.

I added the output of filename, author and license in the material
editor
  • Loading branch information
black-punkduck committed Nov 3, 2021
1 parent 2bdef3c commit c65fa05
Show file tree
Hide file tree
Showing 27 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions makehuman/data/modifiers/bodyshapes_modifiers_desc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"bodyshapes/bodyshapes-elvs-fem-lean-column": "Straight skinny shape with chest, hips and waist are about the same width.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-fem-rectangle": "Straight shape with chest, hips and waist are about the same width.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-fem-triangle": "Wide hips, narrow shoulders and a small waistline.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-fem-adrenal": "The adrenal glands are producing cortisol (a stress hormone). If too much is produced, protein needed for muscles are turned into sugar, which then is converted into belly fat.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-fem-adrenal": "The adrenal glands are producing cortisol (a stress hormone). If too much is produced, protein needed for muscles is turned into sugar, which then is converted into belly fat.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-fem-liver": "If the liver is damaged, it could result in fluid belly.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-fem-ovary": "A surplus of estrogen will gain fat in the areas it is produced and the surrounding areas, lower belly, hips, and thighs.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-fem-thyroid": "Thyroid hypofunction is slowing down metabolism which usually results in obesity.<p>Target by Elvaerwyn",
Expand All @@ -18,7 +18,7 @@
"bodyshapes/bodyshapes-elvs-man-invert-triangle": "Muscular body, wide shoulders and narrow hips.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-man-trapezoid": "Athletic shape, upper torso is bigger than the lower torso.<p>Target by Elvaerwyn",

"bodyshapes/bodyshapes-elvs-man-adrenal": "The adrenal glands are producing cortisol (a stress hormone). If too much is produced, protein needed for muscles are turned into sugar, which then is converted into belly fat.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-man-adrenal": "The adrenal glands are producing cortisol (a stress hormone). If too much is produced, protein needed for muscles is turned into sugar, which then is converted into belly fat.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-man-liver": "If the liver is damaged, it could result in fluid belly.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-man-gonadal": "High insulin resistance, low testosterone and high estrogen which cannot be cleared from the liver change the body.<p>Target by Elvaerwyn",
"bodyshapes/bodyshapes-elvs-man-thyroid": "Thyroid hypofunction is slowing down metabolism which usually results in obesity.<p>Target by Elvaerwyn"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions makehuman/makehuman.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def updateFromComment(self, commentLine):
if len(words) < 1:
return

key = words[0]
key = words[0].rstrip(":")
value = " ".join(words[1:])

self.setProperty(key,value)
Expand Down Expand Up @@ -415,7 +415,7 @@ def _unpackStringDict(text, index):
l_key = index[i]
l_val = index[i+1]

key = text[last:last+l_key].tostring()
key = str(text[last:last+l_key].tostring(), 'utf8')
val = str(text[last+l_key:last+l_key+l_val].tostring(), 'utf8')
stringDict[key] = val

Expand Down
12 changes: 10 additions & 2 deletions makehuman/plugins/7_material_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,20 @@ def getSelectedShader(self):

def reloadMaterial(self):
obj = self.getSelectedObject()

pxy = self.humanObjSelector.getSelectedProxy()
author = "unknown"
license = "unknown"
filename = "internal"
if pxy is not None:
author = pxy.license.author
license = pxy.license.license
filename = pxy.file
# update description
self.descrLbl.setText (obj.name + ":\n" +
str(len(obj.mesh.coord)) + " vertices\n" +
str(len(obj.mesh.fvert)) + " faces\n" +
str (obj.mesh.vertsPerFaceForExport) + " vertices per face.")
str (obj.mesh.vertsPerFaceForExport) + " vertices per face.\n" +
"Author: " + author + "\nLicense: " + license + "\n\nFile: " + filename )

if shader.Shader.supported():
self.listShaders(obj.material)
Expand Down
2 changes: 1 addition & 1 deletion makehuman/shared/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def loadTextProxy(human, filepath, type="Clothes"):
proxy.uuid = " ".join(words[1:])
elif key == 'description':
proxy.description = " ".join(words[1:])
elif key in ['author', 'license', 'homepage']:
elif key in ['author', 'license', 'homepage', 'author:', 'license:']:
proxy.license.updateFromComment(words)
elif key == 'tag':
proxy.tags.append( " ".join(words[1:]).lower() )
Expand Down

0 comments on commit c65fa05

Please sign in to comment.