Normand Briere
2017-05-07 314b34423070cf127464da79a53cddf6b1c38587
ObjEditor.java
....@@ -692,7 +692,7 @@
692692 protected static ImageIcon createImageIcon(String path,
693693 String description)
694694 {
695
- java.net.URL imgURL = GraphreeD.class.getResource(path);
695
+ java.net.URL imgURL = GrafreeD.class.getResource(path);
696696 if (imgURL != null)
697697 {
698698 return new ImageIcon(imgURL, description);
....@@ -1107,7 +1107,7 @@
11071107 //frontScroll.setLabel("------------------------------ XZ (front) ---------------------------------------------------");
11081108 //sideScroll.setLabel("------------------------------- YZ (side) ---------------------------------------------------");
11091109
1110
-// GridBagConstraints gbc = (GridBagConstraints) GraphreeD.clone(aConstraints);
1110
+// GridBagConstraints gbc = (GridBagConstraints) GrafreeD.clone(aConstraints);
11111111 Camera cam = GetCamera(copy, 0);
11121112
11131113 Composite cams = null;
....@@ -1334,7 +1334,7 @@
13341334 frame.getContentPane().add(/*"Center",*/framePanel);
13351335 //frame.getContentPane().add(/*"Center",*/ worldPane);
13361336
1337
-// aConstraints = gbc; // (GridBagConstraints) GraphreeD.clone(gbc);
1337
+// aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc);
13381338
13391339 frame.setSize(1024, 768);
13401340 frame.show();
....@@ -2345,7 +2345,7 @@
23452345
23462346 void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName)
23472347 {
2348
- if (GraphreeD.standAlone)
2348
+ if (GrafreeD.standAlone)
23492349 {
23502350 /**/
23512351 FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD);
....@@ -3183,8 +3183,8 @@
31833183
31843184 CameraPane.ANIMATION ^= true;
31853185
3186
- GraphreeD.wav.cursor = 0;
3187
- GraphreeD.wav.loop = 0;
3186
+ GrafreeD.wav.cursor = 0;
3187
+ GrafreeD.wav.loop = 0;
31883188 }
31893189 } else
31903190 {
....@@ -4085,7 +4085,7 @@
40854085
40864086 void load() // throws ClassNotFoundException
40874087 {
4088
- if (GraphreeD.standAlone)
4088
+ if (GrafreeD.standAlone)
40894089 {
40904090 FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD);
40914091 browser.show();
....@@ -4190,7 +4190,7 @@
41904190
41914191 void saveAs()
41924192 {
4193
- if (GraphreeD.standAlone)
4193
+ if (GrafreeD.standAlone)
41944194 {
41954195 FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE);
41964196 browser.setVisible(true);
....@@ -4213,10 +4213,20 @@
42134213
42144214 Object3D object = copy.selection.get(0);
42154215
4216
+ FileObject fileobj = null;
4217
+
4218
+ if (object instanceof FileObject)
4219
+ fileobj = (FileObject)object;
4220
+
42164221 if (object.fileparent != null)
42174222 {
4218
- FileObject fileobj = (FileObject) object.fileparent;
4223
+ assert(fileobj == null);
42194224
4225
+ fileobj = (FileObject) object.fileparent;
4226
+ }
4227
+
4228
+ if (fileobj != null)
4229
+ {
42204230 System.out.println("WriteObject " + object + " : " + fileobj.name);
42214231 WriteObject(object, fileobj.name);
42224232 }
....@@ -4259,7 +4269,7 @@
42594269 }
42604270 }
42614271 else
4262
- //if (GraphreeD.standAlone)
4272
+ //if (GrafreeD.standAlone)
42634273 {
42644274 FileDialog browser = new FileDialog(frame, "Export", FileDialog.SAVE);
42654275 browser.setVisible(true);
....@@ -4291,7 +4301,7 @@
42914301 Object3D objectparent = obj.parent;
42924302 obj.parent = null;
42934303
4294
- Object3D object = (Object3D) GraphreeD.clone(obj);
4304
+ Object3D object = (Object3D) GrafreeD.clone(obj);
42954305
42964306 obj.parent = objectparent;
42974307
....@@ -4325,7 +4335,7 @@
43254335 buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n");
43264336 cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height);
43274337 copy.generatePOV(buffer);
4328
- if (GraphreeD.standAlone)
4338
+ if (GrafreeD.standAlone)
43294339 {
43304340 FileDialog browser = new FileDialog(frame, "Export POV", 1);
43314341 browser.show();