|
@@ -535,7 +535,6 @@ def materials(mesh, options):
|
|
|
|
|
|
logger.info("Compiling attributes for %s", mat.name)
|
|
logger.info("Compiling attributes for %s", mat.name)
|
|
attributes = {
|
|
attributes = {
|
|
- constants.COLOR_EMISSIVE: material.emissive_color(mat),
|
|
|
|
constants.SHADING: material.shading(mat),
|
|
constants.SHADING: material.shading(mat),
|
|
constants.OPACITY: material.opacity(mat),
|
|
constants.OPACITY: material.opacity(mat),
|
|
constants.TRANSPARENT: material.transparent(mat),
|
|
constants.TRANSPARENT: material.transparent(mat),
|
|
@@ -557,6 +556,12 @@ def materials(mesh, options):
|
|
colors = material.diffuse_color(mat)
|
|
colors = material.diffuse_color(mat)
|
|
attributes[constants.COLOR_DIFFUSE] = colors
|
|
attributes[constants.COLOR_DIFFUSE] = colors
|
|
|
|
|
|
|
|
+ if attributes[constants.SHADING] != constants.BASIC:
|
|
|
|
+ logger.info("Adding emissive attributes")
|
|
|
|
+ attributes.update({
|
|
|
|
+ constants.COLOR_EMISSIVE: material.emissive_color(mat),
|
|
|
|
+ })
|
|
|
|
+
|
|
if attributes[constants.SHADING] == constants.PHONG:
|
|
if attributes[constants.SHADING] == constants.PHONG:
|
|
logger.info("Adding specular attributes")
|
|
logger.info("Adding specular attributes")
|
|
attributes.update({
|
|
attributes.update({
|