From b7dce2b3654df801a3904bc270dfcb641fcdb66e Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Mon, 02 Nov 2015 19:20:40 -0500 Subject: [PATCH] Rename GrafreeD --- ObjEditor.java | 34 ++++++++++++++++++++++------------ 1 files changed, 22 insertions(+), 12 deletions(-) diff --git a/ObjEditor.java b/ObjEditor.java index 22fab98..228f57c 100644 --- a/ObjEditor.java +++ b/ObjEditor.java @@ -692,7 +692,7 @@ protected static ImageIcon createImageIcon(String path, String description) { - java.net.URL imgURL = GraphreeD.class.getResource(path); + java.net.URL imgURL = GrafreeD.class.getResource(path); if (imgURL != null) { return new ImageIcon(imgURL, description); @@ -1107,7 +1107,7 @@ //frontScroll.setLabel("------------------------------ XZ (front) ---------------------------------------------------"); //sideScroll.setLabel("------------------------------- YZ (side) ---------------------------------------------------"); -// GridBagConstraints gbc = (GridBagConstraints) GraphreeD.clone(aConstraints); +// GridBagConstraints gbc = (GridBagConstraints) GrafreeD.clone(aConstraints); Camera cam = GetCamera(copy, 0); Composite cams = null; @@ -1334,7 +1334,7 @@ frame.getContentPane().add(/*"Center",*/framePanel); //frame.getContentPane().add(/*"Center",*/ worldPane); -// aConstraints = gbc; // (GridBagConstraints) GraphreeD.clone(gbc); +// aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); frame.setSize(1024, 768); frame.show(); @@ -2345,7 +2345,7 @@ void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) { - if (GraphreeD.standAlone) + if (GrafreeD.standAlone) { /**/ FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); @@ -3183,8 +3183,8 @@ CameraPane.ANIMATION ^= true; - GraphreeD.wav.cursor = 0; - GraphreeD.wav.loop = 0; + GrafreeD.wav.cursor = 0; + GrafreeD.wav.loop = 0; } } else { @@ -4085,7 +4085,7 @@ void load() // throws ClassNotFoundException { - if (GraphreeD.standAlone) + if (GrafreeD.standAlone) { FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); browser.show(); @@ -4190,7 +4190,7 @@ void saveAs() { - if (GraphreeD.standAlone) + if (GrafreeD.standAlone) { FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); browser.setVisible(true); @@ -4213,10 +4213,20 @@ Object3D object = copy.selection.get(0); + FileObject fileobj = null; + + if (object instanceof FileObject) + fileobj = (FileObject)object; + if (object.fileparent != null) { - FileObject fileobj = (FileObject) object.fileparent; + assert(fileobj == null); + fileobj = (FileObject) object.fileparent; + } + + if (fileobj != null) + { System.out.println("WriteObject " + object + " : " + fileobj.name); WriteObject(object, fileobj.name); } @@ -4259,7 +4269,7 @@ } } else - //if (GraphreeD.standAlone) + //if (GrafreeD.standAlone) { FileDialog browser = new FileDialog(frame, "Export", FileDialog.SAVE); browser.setVisible(true); @@ -4291,7 +4301,7 @@ Object3D objectparent = obj.parent; obj.parent = null; - Object3D object = (Object3D) GraphreeD.clone(obj); + Object3D object = (Object3D) GrafreeD.clone(obj); obj.parent = objectparent; @@ -4325,7 +4335,7 @@ buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); copy.generatePOV(buffer); - if (GraphreeD.standAlone) + if (GrafreeD.standAlone) { FileDialog browser = new FileDialog(frame, "Export POV", 1); browser.show(); -- Gitblit v1.6.2