.. | .. |
---|
168 | 168 | // objEditor.ctrlPanel.remove(remarkButton); |
---|
169 | 169 | |
---|
170 | 170 | objEditor.ctrlPanel.remove(setupPanel); |
---|
| 171 | + objEditor.ctrlPanel.remove(setupPanel2); |
---|
171 | 172 | objEditor.ctrlPanel.remove(commandsPanel); |
---|
172 | 173 | objEditor.ctrlPanel.remove(pushPanel); |
---|
173 | 174 | //objEditor.ctrlPanel.remove(fillPanel); |
---|
.. | .. |
---|
278 | 279 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
279 | 280 | menuBar.add(fileMenu = new Menu("File")); |
---|
280 | 281 | fileMenu.add(newItem = new MenuItem("New")); |
---|
281 | | - fileMenu.add(loadItem = new MenuItem("Load...")); |
---|
| 282 | + fileMenu.add(loadItem = new MenuItem("Open...")); |
---|
282 | 283 | |
---|
283 | 284 | //oe.menuBar.add(menu = new Menu("Include")); |
---|
284 | 285 | Menu menu = new Menu("Import"); |
---|
.. | .. |
---|
419 | 420 | e.printStackTrace(); |
---|
420 | 421 | } |
---|
421 | 422 | |
---|
422 | | - String selection = infoarea.getText(); |
---|
423 | | - java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
424 | | - java.awt.datatransfer.Clipboard clipboard = |
---|
425 | | - Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
| 423 | +// String selection = infoarea.getText(); |
---|
| 424 | +// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
| 425 | +// java.awt.datatransfer.Clipboard clipboard = |
---|
| 426 | +// Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
426 | 427 | //clipboard.setContents(data, data); |
---|
427 | 428 | } |
---|
428 | 429 | |
---|
.. | .. |
---|
747 | 748 | |
---|
748 | 749 | cGridBag namePanel; |
---|
749 | 750 | cGridBag setupPanel; |
---|
| 751 | + cGridBag setupPanel2; |
---|
750 | 752 | cGridBag commandsPanel; |
---|
751 | 753 | cGridBag pushPanel; |
---|
752 | 754 | cGridBag fillPanel; |
---|
.. | .. |
---|
939 | 941 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
940 | 942 | markCB.setToolTipText("Set the animation target transform"); |
---|
941 | 943 | |
---|
942 | | - rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 944 | + setupPanel2 = new cGridBag().setVertical(false); |
---|
| 945 | + |
---|
| 946 | + rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
943 | 947 | rewindCB.setToolTipText("Rewind animation"); |
---|
944 | 948 | |
---|
945 | | - randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
946 | | - randomCB.setToolTipText("Option for switch node"); |
---|
| 949 | + randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); |
---|
| 950 | + randomCB.setToolTipText("Rewind or Go back and forth randomly"); |
---|
947 | 951 | |
---|
948 | 952 | if (Globals.ADVANCED) |
---|
949 | 953 | { |
---|
950 | | - link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
| 954 | + link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master); |
---|
951 | 955 | link2masterCB.setToolTipText("Attach to support"); |
---|
952 | | - speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 956 | + speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup); |
---|
953 | 957 | speedupCB.setToolTipText("Option motion capture"); |
---|
954 | 958 | } |
---|
955 | 959 | |
---|
956 | 960 | oe.ctrlPanel.add(setupPanel); |
---|
| 961 | + oe.ctrlPanel.Return(); |
---|
| 962 | + oe.ctrlPanel.add(setupPanel2); |
---|
957 | 963 | oe.ctrlPanel.Return(); |
---|
958 | 964 | |
---|
959 | 965 | commandsPanel = new cGridBag().setVertical(false); |
---|
.. | .. |
---|
2072 | 2078 | |
---|
2073 | 2079 | void LoadObjFile(String fullname) |
---|
2074 | 2080 | { |
---|
2075 | | - /* |
---|
| 2081 | + System.out.println("Loading " + fullname); |
---|
| 2082 | + /**/ |
---|
2076 | 2083 | //lastFilename = fullname; |
---|
2077 | 2084 | if(loadObjThread == null) |
---|
2078 | 2085 | { |
---|
2079 | | - loadObjThread = new LoadOBJThread(); |
---|
2080 | | - loadObjThread.start(); |
---|
| 2086 | + loadObjThread = new LoadOBJThread(); |
---|
| 2087 | + loadObjThread.start(); |
---|
2081 | 2088 | } |
---|
2082 | 2089 | |
---|
2083 | 2090 | loadObjThread.add(fullname); |
---|
2084 | | - */ |
---|
| 2091 | + /**/ |
---|
2085 | 2092 | |
---|
2086 | | - System.out.println("Loading " + fullname); |
---|
2087 | | - makeSomething(new FileObject(fullname, true), true); |
---|
| 2093 | + //makeSomething(new FileObject(fullname, true), true); |
---|
2088 | 2094 | } |
---|
2089 | 2095 | |
---|
2090 | 2096 | void LoadGFDFile(String fullname) |
---|
.. | .. |
---|
3214 | 3220 | objEditor.refreshContents(); |
---|
3215 | 3221 | } |
---|
3216 | 3222 | |
---|
3217 | | - static public byte[] Compress(Object o) |
---|
| 3223 | + static public byte[] Compress(Object3D o) |
---|
3218 | 3224 | { |
---|
3219 | 3225 | try |
---|
3220 | 3226 | { |
---|
.. | .. |
---|
3222 | 3228 | java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
3223 | 3229 | ObjectOutputStream out = new ObjectOutputStream(zstream); |
---|
3224 | 3230 | |
---|
| 3231 | + Object3D parent = o.parent; |
---|
| 3232 | + o.parent = null; |
---|
| 3233 | + |
---|
3225 | 3234 | out.writeObject(o); |
---|
3226 | 3235 | |
---|
| 3236 | + o.parent = parent; |
---|
| 3237 | + |
---|
3227 | 3238 | out.flush(); |
---|
3228 | 3239 | |
---|
3229 | 3240 | zstream.close(); |
---|
.. | .. |
---|
4290 | 4301 | |
---|
4291 | 4302 | try |
---|
4292 | 4303 | { |
---|
| 4304 | + // Try compressed version first. |
---|
4293 | 4305 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4294 | 4306 | java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
4295 | 4307 | java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
.. | .. |
---|
4359 | 4371 | |
---|
4360 | 4372 | void LoadIt(Object obj) |
---|
4361 | 4373 | { |
---|
| 4374 | + if (obj == null) |
---|
| 4375 | + { |
---|
| 4376 | + // Invalid file |
---|
| 4377 | + return; |
---|
| 4378 | + } |
---|
| 4379 | + |
---|
4362 | 4380 | System.out.println("Loaded " + obj); |
---|
4363 | 4381 | //new Exception().printStackTrace(); |
---|
4364 | 4382 | Object3D readobj = (Object3D) obj; |
---|