Browse Source

Merge pull request #7374 from yomotsu/fix-7368

Blender exporter: remove colorAmbient
Mr.doob 9 years ago
parent
commit
99a29592be

+ 0 - 2
utils/exporters/blender/addons/io_three/constants.py

@@ -272,7 +272,6 @@ SCL = 'scl'
 TIME = 'time'
 KEYS = 'keys'
 
-AMBIENT = 'ambient'
 COLOR = 'color'
 EMISSIVE = 'emissive'
 SPECULAR = 'specular'
@@ -352,7 +351,6 @@ BOTTOM = 'bottom'
 
 SHADING = 'shading'
 COLOR_DIFFUSE = 'colorDiffuse'
-COLOR_AMBIENT = 'colorAmbient'
 COLOR_EMISSIVE = 'colorEmissive'
 COLOR_SPECULAR = 'colorSpecular'
 DBG_NAME = 'DbgName'

+ 0 - 16
utils/exporters/blender/addons/io_three/exporter/api/material.py

@@ -30,22 +30,6 @@ def _material(func):
     return inner
 
 
-@_material
-def ambient_color(material):
-    """
-
-    :param material:
-    :return: rgb value
-    :rtype: tuple
-
-    """
-    logger.debug("material.ambient_color(%s)", material)
-    diffuse = diffuse_color(material)
-    return (material.ambient * diffuse[0],
-            material.ambient * diffuse[1],
-            material.ambient * diffuse[2])
-
-
 @_material
 def blending(material):
     """

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

@@ -527,7 +527,6 @@ def materials(mesh, options):
 
         logger.info("Compiling attributes for %s", mat.name)
         attributes = {
-            constants.COLOR_AMBIENT: material.ambient_color(mat),
             constants.COLOR_EMISSIVE: material.emissive_color(mat),
             constants.SHADING: material.shading(mat),
             constants.OPACITY: material.opacity(mat),

+ 0 - 3
utils/exporters/blender/addons/io_three/exporter/material.py

@@ -32,9 +32,6 @@ class Material(base_classes.BaseNode):
         self[constants.COLOR] = utilities.rgb2int(diffuse)
 
         if self[constants.TYPE] != constants.THREE_BASIC:
-            ambient = api.material.ambient_color(self.node)
-            self[constants.AMBIENT] = utilities.rgb2int(ambient)
-
             emissive = api.material.emissive_color(self.node)
             self[constants.EMISSIVE] = utilities.rgb2int(emissive)