Răsfoiți Sursa

Revert "remove emissive if it is BasicMaterial"

This reverts commit 5550061cf4fe46bcea3ce0993e4b489775d00aef.
yomotsu 9 ani în urmă
părinte
comite
a34af54c56

+ 1 - 6
utils/exporters/blender/addons/io_three/exporter/api/mesh.py

@@ -535,6 +535,7 @@ def materials(mesh, options):
 
         logger.info("Compiling attributes for %s", mat.name)
         attributes = {
+            constants.COLOR_EMISSIVE: material.emissive_color(mat),
             constants.SHADING: material.shading(mat),
             constants.OPACITY: material.opacity(mat),
             constants.TRANSPARENT: material.transparent(mat),
@@ -556,12 +557,6 @@ def materials(mesh, options):
             colors = material.diffuse_color(mat)
             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:
             logger.info("Adding specular attributes")
             attributes.update({