4 def createEmptyObject(scene, name):
5 empty=bpy.data.objects.new(name, None)
6 scene.objects.link(empty)
10 material = bpy.data.materials.new(m.getName())
11 material.diffuse_color=[m.color.r, m.color.g, m.color.b]
12 material.alpha=m.color.a
13 material.diffuse_intensity=m.diffuse
18 def createTexture(path):
19 texture=bpy.data.textures.new(os.path.basename(path))
21 texture=texture.recast_type()
22 image=bpy.data.images.load(path)
25 texture.interpolation = True
26 texture.use_alpha = True
29 def materialAddTexture(material, texture):
30 #material.add_texture(texture, "UV", {"COLOR", "ALPHA"})
31 material.add_texture(texture, "UV", "COLOR")