Changeset View
Changeset View
Standalone View
Standalone View
io_scene_obj/export_obj.py
| Context not available. | |||||
| fw('illum 2\n') # light normaly | fw('illum 2\n') # light normaly | ||||
| else: | else: | ||||
| #write a dummy material here? | # Write a dummy material here? | ||||
| fw('Ns 0\n') | fw('Ns 0\n') | ||||
| fw('Ka %.6f %.6f %.6f\n' % world_amb[:]) # Ambient, uses mirror color, | fw('Ka %.6f %.6f %.6f\n' % world_amb[:]) # Ambient, uses mirror color, | ||||
| fw('Kd 0.8 0.8 0.8\n') | fw('Kd 0.8 0.8 0.8\n') | ||||
| Context not available. | |||||
| if mtex.use_map_normal: | if mtex.use_map_normal: | ||||
| image_map["map_Bump"] = image | image_map["map_Bump"] = image | ||||
| if mtex.use_map_displacement: | if mtex.use_map_displacement: | ||||
| image_map["disp"] = image | image_map["disp"] = image | ||||
| if mtex.use_map_color_diffuse and (mtex.texture_coords == 'REFLECTION'): | if mtex.use_map_color_diffuse and (mtex.texture_coords == 'REFLECTION'): | ||||
| image_map["refl"] = image | image_map["refl"] = image | ||||
| if mtex.use_map_emit: | if mtex.use_map_emit: | ||||
| Context not available. | |||||
| fw('s off\n') | fw('s off\n') | ||||
| contextSmooth = f_smooth | contextSmooth = f_smooth | ||||
| #f_v = [(vi, me_verts[v_idx]) for vi, v_idx in enumerate(f.vertices)] | |||||
| f_v = [(vi, me_verts[v_idx], l_idx) for vi, (v_idx, l_idx) in enumerate(zip(f.vertices, f.loop_indices))] | f_v = [(vi, me_verts[v_idx], l_idx) for vi, (v_idx, l_idx) in enumerate(zip(f.vertices, f.loop_indices))] | ||||
| fw('f') | fw('f') | ||||
| Context not available. | |||||