|
|
@ -577,13 +577,7 @@ class MaterialConverter: |
|
|
|
else: |
|
|
|
else: |
|
|
|
# Using bpy.types.Image.pixels is VERY VERY VERY slow... |
|
|
|
# Using bpy.types.Image.pixels is VERY VERY VERY slow... |
|
|
|
with korlib.GLTexture(image) as glimage: |
|
|
|
with korlib.GLTexture(image) as glimage: |
|
|
|
data = glimage.get_level_data(quiet=True) |
|
|
|
result = glimage.has_alpha |
|
|
|
for i in range(3, len(data), 4): |
|
|
|
|
|
|
|
if data[i] != 255: |
|
|
|
|
|
|
|
result = True |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
else: |
|
|
|
|
|
|
|
result = False |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self._alphatest[image] = result |
|
|
|
self._alphatest[image] = result |
|
|
|
return result |
|
|
|
return result |
|
|
|