Hi,
I’m creating an object with a mesh and a material for the mesh in this way:
mesh = bpy.data.meshes.new("mymesh")
obj = bpy.data.objects.new("myobj",mesh)
material = bpy.data.materials.new("mymaterial")
material.diffuse_color = (1.0,0.0,1.0)
material.alpha = 0.9
mesh.materials.append(material)
# set location and link
obj.location = (0,0,0)
bpy.context.scene.objects.link(obj)
# set mesh from python data
mesh.from_pydata(verts,[],faces)
mesh.update(calc_edges=True)
It should make the object a little transparent. But it doesn’t work.
The color setting works. But it doesn’t get transparent. What could be wrong?