trackeditor: check for state changes in objects
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9234 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 737b7f3b267dedf2ee1f42312cc42eaf39752939 Former-commit-id: d10367260a393e66b3465a56984b2510f677f4c7
This commit is contained in:
parent
30e97c6450
commit
1e57210aa3
2 changed files with 46 additions and 2 deletions
|
@ -48,6 +48,10 @@ public class CheckDialog extends JDialog
|
||||||
private EditorFrame editorFrame = null;
|
private EditorFrame editorFrame = null;
|
||||||
private Vector<Surface> defaultSurfaces = null;
|
private Vector<Surface> defaultSurfaces = null;
|
||||||
private Vector<TrackObject> defaultObjects = null;
|
private Vector<TrackObject> defaultObjects = null;
|
||||||
|
private Boolean doubleSided = false;
|
||||||
|
private Boolean flatShaded = false;
|
||||||
|
private Boolean multipleTextures = false;
|
||||||
|
private String texture = null;
|
||||||
private String dataDirectory = null;
|
private String dataDirectory = null;
|
||||||
private TrackData trackData = null;
|
private TrackData trackData = null;
|
||||||
|
|
||||||
|
@ -807,6 +811,11 @@ public class CheckDialog extends JDialog
|
||||||
}
|
}
|
||||||
private void checkTrackObject(TrackObject trackObject, String type)
|
private void checkTrackObject(TrackObject trackObject, String type)
|
||||||
{
|
{
|
||||||
|
doubleSided = false;
|
||||||
|
flatShaded = false;
|
||||||
|
multipleTextures = false;
|
||||||
|
texture = null;
|
||||||
|
|
||||||
String object = trackObject.getObject();
|
String object = trackObject.getObject();
|
||||||
|
|
||||||
if (!hasText(object))
|
if (!hasText(object))
|
||||||
|
@ -871,6 +880,21 @@ public class CheckDialog extends JDialog
|
||||||
checkKid(file, root.getKids().get(i));
|
checkKid(file, root.getKids().get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (doubleSided)
|
||||||
|
{
|
||||||
|
textArea.append("Object file " + file.toString() + " : has double sided surface\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flatShaded)
|
||||||
|
{
|
||||||
|
textArea.append("Object file " + file.toString() + " : has flat shaded surface\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (multipleTextures)
|
||||||
|
{
|
||||||
|
textArea.append("Object file " + file.toString() + " : has multiple textures\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Ac3dException e)
|
catch (Ac3dException e)
|
||||||
{
|
{
|
||||||
|
@ -899,6 +923,16 @@ public class CheckDialog extends JDialog
|
||||||
|
|
||||||
Set<Integer> types = new HashSet<Integer>();
|
Set<Integer> types = new HashSet<Integer>();
|
||||||
Set<Integer> mats = new HashSet<Integer>();
|
Set<Integer> mats = new HashSet<Integer>();
|
||||||
|
String objectTexture = object.getTexture();
|
||||||
|
|
||||||
|
if (texture == null)
|
||||||
|
{
|
||||||
|
texture = objectTexture;
|
||||||
|
}
|
||||||
|
else if (objectTexture != null && !texture.equals(objectTexture))
|
||||||
|
{
|
||||||
|
multipleTextures = true;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < object.getSurfaces().size(); i++)
|
for (int i = 0; i < object.getSurfaces().size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -911,6 +945,16 @@ public class CheckDialog extends JDialog
|
||||||
|
|
||||||
types.add(surface.getSurf());
|
types.add(surface.getSurf());
|
||||||
mats.add(surface.getMat());
|
mats.add(surface.getMat());
|
||||||
|
|
||||||
|
if (surface.isDoubleSided())
|
||||||
|
{
|
||||||
|
doubleSided = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (surface.isFlatShaded())
|
||||||
|
{
|
||||||
|
flatShaded = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (types.size() > 1)
|
if (types.size() > 1)
|
||||||
|
|
|
@ -34,7 +34,7 @@ public class Properties
|
||||||
private static Properties instance = new Properties();
|
private static Properties instance = new Properties();
|
||||||
private Vector<ActionListener> propertiesListeners = new Vector<ActionListener>();
|
private Vector<ActionListener> propertiesListeners = new Vector<ActionListener>();
|
||||||
public final String title = "sd2-trackeditor";
|
public final String title = "sd2-trackeditor";
|
||||||
public final String version = "1.3.29";
|
public final String version = "1.3.30";
|
||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
private double imageScale = 1;
|
private double imageScale = 1;
|
||||||
|
|
Loading…
Reference in a new issue