trackeditor: don't warn about double sided objects with transparency
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9238 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 0e355e96a78c7c6cb57835a0079dc8f6b45b1269 Former-commit-id: 6a8f32eab0d2e59ce224d90f0b4530350b735ac1
This commit is contained in:
parent
9fbc858042
commit
28050d43ba
2 changed files with 25 additions and 3 deletions
|
@ -965,9 +965,31 @@ public class CheckDialog extends JDialog
|
|||
types.add(surface.getSurf());
|
||||
mats.add(surface.getMat());
|
||||
|
||||
if (surface.isDoubleSided())
|
||||
if (surface.isDoubleSided() && objectTexture != null)
|
||||
{
|
||||
doubleSided = true;
|
||||
File textureFile = findTextureFile(objectTexture);
|
||||
if (objectTexture.endsWith(".rgba"))
|
||||
{
|
||||
}
|
||||
else if (objectTexture.endsWith(".rgb"))
|
||||
{
|
||||
doubleSided = true;
|
||||
}
|
||||
else if (textureFile != null && objectTexture.endsWith(".png"))
|
||||
{
|
||||
try
|
||||
{
|
||||
BufferedImage image = ImageIO.read(textureFile);
|
||||
|
||||
if (!image.getColorModel().hasAlpha())
|
||||
{
|
||||
doubleSided = true;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (surface.isFlatShaded())
|
||||
|
|
|
@ -34,7 +34,7 @@ public class Properties
|
|||
private static Properties instance = new Properties();
|
||||
private Vector<ActionListener> propertiesListeners = new Vector<ActionListener>();
|
||||
public final String title = "sd2-trackeditor";
|
||||
public final String version = "1.3.32";
|
||||
public final String version = "1.3.33";
|
||||
private String path;
|
||||
|
||||
private double imageScale = 1;
|
||||
|
|
Loading…
Reference in a new issue