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
This commit is contained in:
iobyte 2024-01-08 17:10:20 +00:00
parent e9fb076b1f
commit 88b2a5291c
2 changed files with 25 additions and 3 deletions

View File

@ -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())

View File

@ -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;