|
|
@ -46,6 +46,8 @@ public final class MaterialContext implements Savable { |
|
|
|
public static final int MTEX_ALPHA = 0x80; |
|
|
|
public static final int MTEX_ALPHA = 0x80; |
|
|
|
public static final int MTEX_AMB = 0x800; |
|
|
|
public static final int MTEX_AMB = 0x800; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static final int FLAG_TRANSPARENT = 0x10000; |
|
|
|
|
|
|
|
|
|
|
|
/* package */final String name; |
|
|
|
/* package */final String name; |
|
|
|
/* package */final List<CombinedTexture> loadedTextures; |
|
|
|
/* package */final List<CombinedTexture> loadedTextures; |
|
|
|
|
|
|
|
|
|
|
@ -96,6 +98,8 @@ public final class MaterialContext implements Savable { |
|
|
|
TextureHelper textureHelper = blenderContext.getHelper(TextureHelper.class); |
|
|
|
TextureHelper textureHelper = blenderContext.getHelper(TextureHelper.class); |
|
|
|
loadedTextures = textureHelper.readTextureData(structure, new float[] { diffuseColor.r, diffuseColor.g, diffuseColor.b, diffuseColor.a }, false); |
|
|
|
loadedTextures = textureHelper.readTextureData(structure, new float[] { diffuseColor.r, diffuseColor.g, diffuseColor.b, diffuseColor.a }, false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
long flag = ((Number)structure.getFieldValue("flag")).longValue(); |
|
|
|
|
|
|
|
if((flag & FLAG_TRANSPARENT) != 0) { |
|
|
|
// veryfying if the transparency is present
|
|
|
|
// veryfying if the transparency is present
|
|
|
|
// (in blender transparent mask is 0x10000 but its better to verify it because blender can indicate transparency when
|
|
|
|
// (in blender transparent mask is 0x10000 but its better to verify it because blender can indicate transparency when
|
|
|
|
// it is not required
|
|
|
|
// it is not required
|
|
|
@ -110,6 +114,9 @@ public final class MaterialContext implements Savable { |
|
|
|
transparent = transparent || specularColor.a < 1.0f; |
|
|
|
transparent = transparent || specularColor.a < 1.0f; |
|
|
|
} |
|
|
|
} |
|
|
|
this.transparent = transparent; |
|
|
|
this.transparent = transparent; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
transparent = false; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|