Why is the transparency so strange?

Good health to everybody!
I have created coordinate planes with simple script:


import bpy
 
# Settings
name = 'Gridtastic'
verts = [(x, y, z) for z in range(-1, 2) for y in range(-1, 2) for x in range(-1, 2)] 
faces = [(13, 22, 25, 16), (13, 16,  7,  4), (13,  4,  1, 10), (13, 10, 19, 22), 
         (13, 14, 23, 22), (13, 22, 21, 12), (13, 12,  3,  4), (13,  4,  5, 14),
         (13, 16, 17, 14), (13, 14, 11, 10), (13, 10,  9, 12), (13, 12, 15, 16)]
 
# Create Mesh Datablock
mesh = bpy.data.meshes.new(name)
mesh.from_pydata(verts, [], faces)
 
# Create Object and link to scene
obj = bpy.data.objects.new(name, mesh)
bpy.context.scene.objects.link(obj)


# Select the object
bpy.context.scene.objects.active = obj
obj.select = True

Why are planes have so strange transparency differ from each other? Some planes are not transparent at all. Can it be fixed?


I think this has to do with the viewport drawing, and not really with your script. In cycles rendering they should look fine.