Explorar o código

bump map export doesn't work correctly, can cause TypeError

railla %!s(int64=11) %!d(string=hai) anos
pai
achega
a3dce6069e

+ 2 - 2
utils/exporters/blender/2.65/scripts/addons/io_mesh_threejs/export_threejs.py

@@ -1965,8 +1965,8 @@ def extract_material_data(m, option_colors):
 
 
     if textures['bump']:
     if textures['bump']:
         material['mapBump'] = textures['bump']['texture'].image.name
         material['mapBump'] = textures['bump']['texture'].image.name
-        if textures['normal']['slot'].use_map_normal:
-            material['mapBumpScale'] = textures['normal']['slot'].normal_factor
+        if textures['bump']['slot'].use_map_normal:
+            material['mapBumpScale'] = textures['bump']['slot'].normal_factor
 
 
     material['shading'] = m.THREE_materialType
     material['shading'] = m.THREE_materialType
     material['blending'] = m.THREE_blendingType
     material['blending'] = m.THREE_blendingType