.. | .. |
---|
4 | 4 | |
---|
5 | 5 | import java.awt.*; |
---|
6 | 6 | import java.awt.event.*; |
---|
| 7 | +import java.awt.image.BufferedImage; |
---|
7 | 8 | import javax.swing.*; |
---|
8 | 9 | import javax.swing.event.*; |
---|
9 | 10 | import javax.swing.text.*; |
---|
.. | .. |
---|
35 | 36 | |
---|
36 | 37 | GroupEditor callee; |
---|
37 | 38 | JFrame frame; |
---|
| 39 | + |
---|
| 40 | + static ObjEditor theFrame; |
---|
| 41 | + |
---|
| 42 | + cButton GetButton(String name, boolean border) |
---|
| 43 | + { |
---|
| 44 | + try |
---|
| 45 | + { |
---|
| 46 | + ImageIcon icon = GetIcon(name); |
---|
| 47 | + return new cButton(icon, border); |
---|
| 48 | + } |
---|
| 49 | + catch (Exception e) |
---|
| 50 | + { |
---|
| 51 | + return new cButton(name, border); |
---|
| 52 | + } |
---|
| 53 | + } |
---|
| 54 | + |
---|
| 55 | + cToggleButton GetToggleButton(String name, boolean border) |
---|
| 56 | + { |
---|
| 57 | + try |
---|
| 58 | + { |
---|
| 59 | + ImageIcon icon = GetIcon(name); |
---|
| 60 | + return new cToggleButton(icon, border); |
---|
| 61 | + } |
---|
| 62 | + catch (Exception e) |
---|
| 63 | + { |
---|
| 64 | + return new cToggleButton(name, border); |
---|
| 65 | + } |
---|
| 66 | + } |
---|
| 67 | + |
---|
| 68 | + cCheckBox GetCheckBox(String name, boolean border) |
---|
| 69 | + { |
---|
| 70 | + try |
---|
| 71 | + { |
---|
| 72 | + ImageIcon icon = GetIcon(name); |
---|
| 73 | + return new cCheckBox(icon, border); |
---|
| 74 | + } |
---|
| 75 | + catch (Exception e) |
---|
| 76 | + { |
---|
| 77 | + return new cCheckBox(name, border); |
---|
| 78 | + } |
---|
| 79 | + } |
---|
| 80 | + |
---|
| 81 | + private ImageIcon GetIcon(String name) throws IOException |
---|
| 82 | + { |
---|
| 83 | + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 84 | + |
---|
| 85 | + if (image.getWidth() != 24 && image.getHeight() != 24) |
---|
| 86 | + { |
---|
| 87 | + BufferedImage resized = new BufferedImage(24, 24, image.getType()); |
---|
| 88 | + Graphics2D g = resized.createGraphics(); |
---|
| 89 | + g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
---|
| 90 | + //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
---|
| 91 | + g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null); |
---|
| 92 | + g.dispose(); |
---|
| 93 | + |
---|
| 94 | + image = resized; |
---|
| 95 | + } |
---|
| 96 | + |
---|
| 97 | + javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
| 98 | + return icon; |
---|
| 99 | + } |
---|
38 | 100 | |
---|
39 | 101 | // SCRIPT |
---|
40 | 102 | |
---|
.. | .. |
---|
168 | 230 | // objEditor.ctrlPanel.remove(remarkButton); |
---|
169 | 231 | |
---|
170 | 232 | objEditor.ctrlPanel.remove(setupPanel); |
---|
171 | | - objEditor.ctrlPanel.remove(commandsPanel); |
---|
| 233 | + objEditor.ctrlPanel.remove(setupPanel2); |
---|
| 234 | + objEditor.ctrlPanel.remove(objectCommandsPanel); |
---|
172 | 235 | objEditor.ctrlPanel.remove(pushPanel); |
---|
173 | 236 | //objEditor.ctrlPanel.remove(fillPanel); |
---|
174 | 237 | |
---|
.. | .. |
---|
243 | 306 | //localCopy.parent = null; |
---|
244 | 307 | |
---|
245 | 308 | frame = new JFrame(); |
---|
| 309 | + frame.setUndecorated(true); |
---|
246 | 310 | objEditor = this; |
---|
247 | 311 | this.callee = callee; |
---|
248 | 312 | |
---|
.. | .. |
---|
276 | 340 | void SetupMenu() |
---|
277 | 341 | { |
---|
278 | 342 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
279 | | - menuBar.add(windowMenu = new Menu("File")); |
---|
280 | | - windowMenu.add(loadItem = new MenuItem("Load...")); |
---|
281 | | - windowMenu.add("-"); |
---|
282 | | - windowMenu.add(saveItem = new MenuItem("Save")); |
---|
283 | | - windowMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
| 343 | + menuBar.add(fileMenu = new Menu("File")); |
---|
| 344 | + fileMenu.add(newItem = new MenuItem("New")); |
---|
| 345 | + fileMenu.add(loadItem = new MenuItem("Open...")); |
---|
| 346 | + |
---|
| 347 | + //oe.menuBar.add(menu = new Menu("Include")); |
---|
| 348 | + Menu menu = new Menu("Import"); |
---|
| 349 | + importOBJItem = menu.add(new MenuItem("OBJ file...")); |
---|
| 350 | + importOBJItem.addActionListener(this); |
---|
| 351 | + import3DSItem = menu.add(new MenuItem("3DS file...")); |
---|
| 352 | + import3DSItem.addActionListener(this); |
---|
| 353 | + importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file...")); |
---|
| 354 | + importVRMLX3DItem.addActionListener(this); |
---|
| 355 | + menu.add("-"); |
---|
| 356 | + importGFDItem = menu.add(new MenuItem("Grafreed file...")); |
---|
| 357 | + importGFDItem.addActionListener(this); |
---|
| 358 | + fileMenu.add(menu); |
---|
| 359 | + fileMenu.add("-"); |
---|
| 360 | + |
---|
| 361 | + fileMenu.add(saveItem = new MenuItem("Save")); |
---|
| 362 | + fileMenu.add(saveAsItem = new MenuItem("Save As...")); |
---|
284 | 363 | //windowMenu.add(povItem = new MenuItem("Emit POV-Ray...")); |
---|
285 | | - windowMenu.add("-"); |
---|
286 | | - windowMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
287 | | - windowMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
288 | | - windowMenu.add("-"); |
---|
| 364 | + fileMenu.add("-"); |
---|
| 365 | + fileMenu.add(exportAsItem = new MenuItem("Export Selection...")); |
---|
| 366 | + fileMenu.add(reexportItem = new MenuItem("Re-export")); |
---|
| 367 | + fileMenu.add("-"); |
---|
289 | 368 | if (client.parent != null) |
---|
290 | 369 | { |
---|
291 | | - windowMenu.add(closeItem = new MenuItem("Close")); |
---|
| 370 | + fileMenu.add(closeItem = new MenuItem("Close")); |
---|
292 | 371 | } else |
---|
293 | 372 | { |
---|
294 | | - windowMenu.add(closeItem = new MenuItem("Exit")); |
---|
| 373 | + fileMenu.add(closeItem = new MenuItem("Exit")); |
---|
295 | 374 | } |
---|
296 | 375 | |
---|
| 376 | + newItem.addActionListener(this); |
---|
297 | 377 | loadItem.addActionListener(this); |
---|
298 | 378 | saveItem.addActionListener(this); |
---|
299 | 379 | saveAsItem.addActionListener(this); |
---|
.. | .. |
---|
302 | 382 | //povItem.addActionListener(this); |
---|
303 | 383 | closeItem.addActionListener(this); |
---|
304 | 384 | |
---|
305 | | - menuBar.add(cameraMenu = new Menu("View")); |
---|
306 | | - //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer")); |
---|
307 | | - //zBufferItem.addActionListener(this); |
---|
308 | | - //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
309 | | - //normalLensItem.addActionListener(this); |
---|
310 | | - cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
311 | | - revertCameraItem.addActionListener(this); |
---|
312 | | - |
---|
313 | | - cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
314 | | - toggleFullScreenItem.addItemListener(this); |
---|
315 | | - toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
316 | | - cameraMenu.add("-"); |
---|
317 | | - |
---|
318 | | - cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
319 | | - toggleTextureItem.addItemListener(this); |
---|
320 | | - toggleTextureItem.setState(CameraPane.textureon); |
---|
321 | | - |
---|
322 | | - cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch")); |
---|
323 | | - toggleSwitchItem.addItemListener(this); |
---|
324 | | - toggleSwitchItem.setState(CameraPane.SWITCH); |
---|
325 | | - |
---|
326 | | - cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
327 | | - toggleHandleItem.addItemListener(this); |
---|
328 | | - toggleHandleItem.setState(CameraPane.HANDLES); |
---|
329 | | - |
---|
330 | | - cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode")); |
---|
331 | | - togglePaintItem.addItemListener(this); |
---|
332 | | - togglePaintItem.setState(CameraPane.PAINTMODE); |
---|
333 | | - |
---|
334 | | - if (Globals.ADVANCED) |
---|
335 | | - { |
---|
336 | | - cameraMenu.add("-"); |
---|
337 | | - cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live")); |
---|
338 | | - toggleLiveItem.addItemListener(this); |
---|
339 | | - toggleLiveItem.setState(Globals.isLIVE()); |
---|
340 | | - |
---|
341 | | - cameraMenu.add(stepItem = new MenuItem("Step")); |
---|
342 | | - stepItem.addActionListener(this); |
---|
343 | | - // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List")); |
---|
344 | | - // toggleDLItem.addItemListener(this); |
---|
345 | | - // toggleDLItem.setState(false); |
---|
346 | | - |
---|
347 | | - cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render")); |
---|
348 | | - toggleRenderItem.addItemListener(this); |
---|
349 | | - toggleRenderItem.setState(!CameraPane.frozen); |
---|
350 | | - |
---|
351 | | - cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug")); |
---|
352 | | - toggleDebugItem.addItemListener(this); |
---|
353 | | - toggleDebugItem.setState(CameraPane.DEBUG); |
---|
354 | | - |
---|
355 | | - cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum")); |
---|
356 | | - toggleFrustumItem.addItemListener(this); |
---|
357 | | - toggleFrustumItem.setState(CameraPane.FRUSTUM); |
---|
358 | | - |
---|
359 | | - cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact")); |
---|
360 | | - toggleFootContactItem.addItemListener(this); |
---|
361 | | - toggleFootContactItem.setState(CameraPane.FOOTCONTACT); |
---|
362 | | - |
---|
363 | | - cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
364 | | - toggleTimelineItem.addItemListener(this); |
---|
365 | | - } |
---|
366 | | - |
---|
367 | | -// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root")); |
---|
368 | | -// toggleRootItem.addItemListener(this); |
---|
369 | | -// toggleRootItem.setState(false); |
---|
370 | | -// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation")); |
---|
371 | | -// animationItem.addItemListener(this); |
---|
372 | | -// animationItem.setState(CameraPane.ANIMATION); |
---|
373 | | - cameraMenu.add("-"); |
---|
374 | | - cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera")); |
---|
375 | | - editCameraItem.addActionListener(this); |
---|
376 | | - |
---|
377 | 385 | objectPanel = new JTabbedPane(); |
---|
378 | 386 | toolbarPanel = new JPanel(); |
---|
379 | 387 | toolbarPanel.setName("Toolbar"); |
---|
380 | 388 | treePanel = new cGridBag(); |
---|
381 | 389 | treePanel.setName("Tree"); |
---|
| 390 | + |
---|
| 391 | + editPanel = new cGridBag().setVertical(true); |
---|
| 392 | + editPanel.setName("Edit"); |
---|
| 393 | + |
---|
382 | 394 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
383 | | - ctrlPanel.setName("Edit"); |
---|
| 395 | + |
---|
| 396 | + editCommandsPanel = new cGridBag(); |
---|
| 397 | + editPanel.add(editCommandsPanel); |
---|
| 398 | + editPanel.add(ctrlPanel); |
---|
| 399 | + |
---|
| 400 | + toolboxPanel = new cGridBag().setVertical(false); |
---|
| 401 | + toolboxPanel.setName("Toolbox"); |
---|
| 402 | + |
---|
384 | 403 | materialPanel = new cGridBag().setVertical(true); |
---|
385 | 404 | materialPanel.setName("Material"); |
---|
| 405 | + |
---|
386 | 406 | /*JTextPane*/ |
---|
387 | 407 | infoarea = createTextPane(); |
---|
388 | 408 | doc = infoarea.getStyledDocument(); |
---|
.. | .. |
---|
475 | 495 | e.printStackTrace(); |
---|
476 | 496 | } |
---|
477 | 497 | |
---|
478 | | - String selection = infoarea.getText(); |
---|
479 | | - java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
480 | | - java.awt.datatransfer.Clipboard clipboard = |
---|
481 | | - Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
| 498 | +// String selection = infoarea.getText(); |
---|
| 499 | +// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection); |
---|
| 500 | +// java.awt.datatransfer.Clipboard clipboard = |
---|
| 501 | +// Toolkit.getDefaultToolkit().getSystemClipboard(); |
---|
482 | 502 | //clipboard.setContents(data, data); |
---|
483 | 503 | } |
---|
484 | 504 | |
---|
.. | .. |
---|
501 | 521 | //SendInfo("Name:", "bold"); |
---|
502 | 522 | if (sel.GetTextures() != null || debug) |
---|
503 | 523 | { |
---|
504 | | - si.SendInfo(sel.toString(), "bold"); |
---|
| 524 | + si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold"); |
---|
505 | 525 | //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular"); |
---|
506 | 526 | if (sel.Size() > 0) |
---|
507 | 527 | { |
---|
508 | 528 | si.SendInfo("#children = " + sel.Size(), "regular"); |
---|
509 | 529 | } |
---|
510 | | - si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular"); |
---|
| 530 | + si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular"); |
---|
511 | 531 | if (debug) |
---|
512 | 532 | { |
---|
513 | 533 | try |
---|
.. | .. |
---|
549 | 569 | } |
---|
550 | 570 | if (sel.support != null) |
---|
551 | 571 | { |
---|
552 | | - si.SendInfo(" support: " + sel.support, "regular"); |
---|
| 572 | + si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular"); |
---|
553 | 573 | } |
---|
554 | 574 | if (sel.scriptnode != null) |
---|
555 | 575 | { |
---|
.. | .. |
---|
638 | 658 | } |
---|
639 | 659 | } |
---|
640 | 660 | |
---|
| 661 | +static GraphicsDevice device = GraphicsEnvironment |
---|
| 662 | + .getLocalGraphicsEnvironment().getScreenDevices()[0]; |
---|
| 663 | + |
---|
| 664 | + Rectangle keeprect; |
---|
| 665 | + cRadio radio; |
---|
| 666 | + |
---|
| 667 | +cButton keepButton; |
---|
| 668 | + cButton twoButton; // Full 3D |
---|
| 669 | + cButton sixButton; |
---|
| 670 | + cButton threeButton; |
---|
| 671 | + cButton sevenButton; |
---|
| 672 | + cButton fourButton; // full panel |
---|
| 673 | + cButton oneButton; // full XYZ |
---|
| 674 | + //cButton currentLayout; |
---|
| 675 | + |
---|
| 676 | + boolean maximized; |
---|
| 677 | + |
---|
| 678 | + cButton fullscreenLayout; |
---|
| 679 | + |
---|
| 680 | + void Minimize() |
---|
| 681 | + { |
---|
| 682 | + frame.setState(Frame.ICONIFIED); |
---|
| 683 | + } |
---|
| 684 | + |
---|
| 685 | + void Maximize() |
---|
| 686 | + { |
---|
| 687 | + if (maximized) |
---|
| 688 | + { |
---|
| 689 | + frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 690 | + } |
---|
| 691 | + else |
---|
| 692 | + { |
---|
| 693 | + keeprect = frame.getBounds(); |
---|
| 694 | + Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); |
---|
| 695 | + Dimension rect2 = frame.getToolkit().getScreenSize(); |
---|
| 696 | + frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height); |
---|
| 697 | +// frame.setState(Frame.MAXIMIZED_BOTH); |
---|
| 698 | + } |
---|
| 699 | + |
---|
| 700 | + maximized ^= true; |
---|
| 701 | + } |
---|
| 702 | + |
---|
641 | 703 | void ToggleFullScreen() |
---|
642 | 704 | { |
---|
643 | 705 | if (CameraPane.FULLSCREEN) |
---|
644 | 706 | { |
---|
645 | | - frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
646 | | - framePanel.add(bigThree); |
---|
647 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 707 | + device.setFullScreenWindow(null); |
---|
| 708 | + //frame.setVisible(false); |
---|
| 709 | +// frame.removeNotify(); |
---|
| 710 | +// frame.setUndecorated(false); |
---|
| 711 | +// frame.addNotify(); |
---|
| 712 | + //frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height); |
---|
| 713 | + |
---|
| 714 | +// X frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
| 715 | +// X framePanel.add(bigThree); |
---|
| 716 | +// X frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 717 | + framePanel.setDividerLocation(1); |
---|
| 718 | + |
---|
| 719 | + //frame.setVisible(true); |
---|
| 720 | + radio.layout = keepButton; |
---|
| 721 | + //theFrame = null; |
---|
| 722 | + keepButton = null; |
---|
| 723 | + radio.layout.doClick(); |
---|
| 724 | + |
---|
648 | 725 | } else |
---|
649 | 726 | { |
---|
650 | | - frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
651 | | - framePanel.remove(bigThree); |
---|
652 | | - frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 727 | + keepButton = radio.layout; |
---|
| 728 | + //keeprect = frame.getBounds(); |
---|
| 729 | +// frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width, |
---|
| 730 | +// frame.getToolkit().getScreenSize().height); |
---|
| 731 | + //frame.setVisible(false); |
---|
| 732 | + device.setFullScreenWindow(frame); |
---|
| 733 | +// frame.removeNotify(); |
---|
| 734 | +// frame.setUndecorated(true); |
---|
| 735 | +// frame.addNotify(); |
---|
| 736 | +// X frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
| 737 | +// X framePanel.remove(bigThree); |
---|
| 738 | +// X frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 739 | + framePanel.setDividerLocation(0); |
---|
| 740 | + |
---|
| 741 | + radio.layout = fullscreenLayout; |
---|
| 742 | + radio.layout.doClick(); |
---|
| 743 | + //frame.setVisible(true); |
---|
653 | 744 | } |
---|
| 745 | + |
---|
654 | 746 | cameraView.ToggleFullScreen(); |
---|
655 | 747 | } |
---|
656 | 748 | |
---|
.. | .. |
---|
752 | 844 | protected static ImageIcon createImageIcon(String path, |
---|
753 | 845 | String description) |
---|
754 | 846 | { |
---|
755 | | - java.net.URL imgURL = GrafreeD.class.getResource(path); |
---|
| 847 | + java.net.URL imgURL = Grafreed.class.getResource(path); |
---|
756 | 848 | if (imgURL != null) |
---|
757 | 849 | { |
---|
758 | 850 | return new ImageIcon(imgURL, description); |
---|
.. | .. |
---|
784 | 876 | // NumberSlider vDivsField; |
---|
785 | 877 | // JCheckBox endcaps; |
---|
786 | 878 | JCheckBox liveCB; |
---|
| 879 | + JCheckBox selectCB; |
---|
787 | 880 | JCheckBox hideCB; |
---|
788 | 881 | JCheckBox link2masterCB; |
---|
789 | 882 | JCheckBox markCB; |
---|
.. | .. |
---|
800 | 893 | JButton fasterButton; |
---|
801 | 894 | JButton remarkButton; |
---|
802 | 895 | |
---|
| 896 | + cGridBag editPanel; |
---|
| 897 | + cGridBag editCommandsPanel; |
---|
| 898 | + |
---|
803 | 899 | cGridBag namePanel; |
---|
804 | 900 | cGridBag setupPanel; |
---|
805 | | - cGridBag commandsPanel; |
---|
| 901 | + cGridBag setupPanel2; |
---|
| 902 | + cGridBag objectCommandsPanel; |
---|
806 | 903 | cGridBag pushPanel; |
---|
807 | 904 | cGridBag fillPanel; |
---|
808 | 905 | |
---|
.. | .. |
---|
986 | 1083 | |
---|
987 | 1084 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
988 | 1085 | liveCB.setToolTipText("Animate object"); |
---|
| 1086 | + selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 1087 | + selectCB.setToolTipText("Make object selectable"); |
---|
| 1088 | +// Return(); |
---|
989 | 1089 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
990 | 1090 | hideCB.setToolTipText("Hide object"); |
---|
991 | | -// Return(); |
---|
992 | 1091 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
993 | 1092 | markCB.setToolTipText("Set the animation target transform"); |
---|
994 | 1093 | |
---|
995 | | - rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind); |
---|
| 1094 | + setupPanel2 = new cGridBag().setVertical(false); |
---|
| 1095 | + |
---|
| 1096 | + rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind); |
---|
996 | 1097 | rewindCB.setToolTipText("Rewind animation"); |
---|
997 | 1098 | |
---|
998 | | - randomCB = AddCheckBox(setupPanel, "Random", copy.random); |
---|
999 | | - randomCB.setToolTipText("Option for switch node"); |
---|
| 1099 | + randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); |
---|
| 1100 | + randomCB.setToolTipText("Randomly Rewind or Go back and forth"); |
---|
1000 | 1101 | |
---|
1001 | 1102 | if (Globals.ADVANCED) |
---|
1002 | 1103 | { |
---|
1003 | | - link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master); |
---|
| 1104 | + link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master); |
---|
1004 | 1105 | link2masterCB.setToolTipText("Attach to support"); |
---|
1005 | | - speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup); |
---|
| 1106 | + speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup); |
---|
1006 | 1107 | speedupCB.setToolTipText("Option motion capture"); |
---|
1007 | 1108 | } |
---|
1008 | 1109 | |
---|
1009 | 1110 | oe.ctrlPanel.add(setupPanel); |
---|
1010 | 1111 | oe.ctrlPanel.Return(); |
---|
| 1112 | + oe.ctrlPanel.add(setupPanel2); |
---|
| 1113 | + oe.ctrlPanel.Return(); |
---|
1011 | 1114 | |
---|
1012 | | - commandsPanel = new cGridBag().setVertical(false); |
---|
| 1115 | + objectCommandsPanel = new cGridBag().setVertical(false); |
---|
1013 | 1116 | |
---|
1014 | | - resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 1117 | + resetButton = AddButton(objectCommandsPanel, "Reset"); |
---|
1015 | 1118 | resetButton.setToolTipText("Jump to frame zero"); |
---|
1016 | | - stepButton = AddButton(commandsPanel, "Step"); |
---|
| 1119 | + stepButton = AddButton(objectCommandsPanel, "Step"); |
---|
1017 | 1120 | stepButton.setToolTipText("Step one frame"); |
---|
1018 | 1121 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
1019 | 1122 | // stepAllButton = AddButton(oe, "Step All"); |
---|
1020 | 1123 | // Return(); |
---|
1021 | | - slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 1124 | + slowerButton = AddButton(objectCommandsPanel, "Slow"); |
---|
1022 | 1125 | slowerButton.setToolTipText("Decrease animation speed"); |
---|
1023 | | - fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 1126 | + fasterButton = AddButton(objectCommandsPanel, "Fast"); |
---|
1024 | 1127 | fasterButton.setToolTipText("Increase animation speed"); |
---|
1025 | | - remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 1128 | + remarkButton = AddButton(objectCommandsPanel, "Remark"); |
---|
1026 | 1129 | remarkButton.setToolTipText("Set the current transform as the target"); |
---|
1027 | 1130 | |
---|
1028 | | - oe.ctrlPanel.add(commandsPanel); |
---|
| 1131 | + oe.ctrlPanel.add(objectCommandsPanel); |
---|
1029 | 1132 | oe.ctrlPanel.Return(); |
---|
1030 | 1133 | |
---|
1031 | | - pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1); |
---|
| 1134 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
1032 | 1135 | normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
1033 | 1136 | //Return(); |
---|
1034 | 1137 | |
---|
.. | .. |
---|
1231 | 1334 | //worldPanel.setName("World"); |
---|
1232 | 1335 | centralPanel = new cGridBag(); |
---|
1233 | 1336 | centralPanel.preferredWidth = 20; |
---|
1234 | | - timelinePanel = new JPanel(new BorderLayout()); |
---|
1235 | | - timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
| 1337 | + |
---|
| 1338 | + if (Globals.ADVANCED) |
---|
| 1339 | + { |
---|
| 1340 | + timelinePanel = new JPanel(new BorderLayout()); |
---|
| 1341 | + timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1236 | 1342 | |
---|
1237 | 1343 | cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel); |
---|
1238 | 1344 | cameraPanel.setContinuousLayout(true); |
---|
.. | .. |
---|
1241 | 1347 | // cameraPanel.setDividerSize(9); |
---|
1242 | 1348 | cameraPanel.setResizeWeight(1.0); |
---|
1243 | 1349 | |
---|
| 1350 | + } |
---|
| 1351 | + |
---|
1244 | 1352 | centralPanel.add(cameraView); |
---|
| 1353 | + centralPanel.setFocusable(true); |
---|
1245 | 1354 | //frame.setJMenuBar(timelineMenubar); |
---|
1246 | 1355 | //centralPanel.add(timelinePanel); |
---|
1247 | 1356 | |
---|
.. | .. |
---|
1303 | 1412 | |
---|
1304 | 1413 | //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
---|
1305 | 1414 | //tmp.setName("Edit"); |
---|
| 1415 | + objectPanel.add(toolboxPanel); |
---|
1306 | 1416 | objectPanel.add(materialPanel); |
---|
1307 | 1417 | // JPanel north = new JPanel(new BorderLayout()); |
---|
1308 | 1418 | // north.setName("Edit"); |
---|
1309 | 1419 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1310 | 1420 | // objectPanel.add(north); |
---|
1311 | | - objectPanel.add(ctrlPanel); |
---|
| 1421 | + objectPanel.add(editPanel); |
---|
1312 | 1422 | objectPanel.add(infoPanel); |
---|
1313 | 1423 | |
---|
1314 | 1424 | /* |
---|
.. | .. |
---|
1439 | 1549 | frame.setSize(1280, 860); |
---|
1440 | 1550 | frame.setVisible(true); |
---|
1441 | 1551 | |
---|
| 1552 | + cameraView.requestFocusInWindow(); |
---|
| 1553 | + |
---|
1442 | 1554 | gridPanel.setDividerLocation(1.0); |
---|
1443 | 1555 | |
---|
1444 | 1556 | frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); |
---|
.. | .. |
---|
1476 | 1588 | |
---|
1477 | 1589 | cGridBag editBar = new cGridBag().setVertical(false); |
---|
1478 | 1590 | |
---|
1479 | | - editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1591 | + editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1480 | 1592 | createMaterialButton.setToolTipText("Create material"); |
---|
1481 | 1593 | |
---|
1482 | 1594 | /* |
---|
1483 | 1595 | ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints); |
---|
1484 | 1596 | */ |
---|
1485 | 1597 | |
---|
1486 | | - editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1598 | + editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1487 | 1599 | clearMaterialButton.setToolTipText("Clear material"); |
---|
1488 | 1600 | |
---|
1489 | 1601 | if (Globals.ADVANCED) |
---|
1490 | 1602 | { |
---|
1491 | | - editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints); |
---|
| 1603 | + editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints); |
---|
1492 | 1604 | editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints); |
---|
1493 | 1605 | editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints); |
---|
1494 | 1606 | } |
---|
.. | .. |
---|
1988 | 2100 | e2.printStackTrace(); |
---|
1989 | 2101 | } |
---|
1990 | 2102 | } |
---|
| 2103 | + |
---|
1991 | 2104 | LoadJMEThread loadThread; |
---|
1992 | 2105 | |
---|
1993 | 2106 | class LoadJMEThread extends Thread |
---|
.. | .. |
---|
2045 | 2158 | //LoadFile0(filename, converter); |
---|
2046 | 2159 | } |
---|
2047 | 2160 | } |
---|
| 2161 | + |
---|
2048 | 2162 | LoadOBJThread loadObjThread; |
---|
2049 | 2163 | |
---|
2050 | 2164 | class LoadOBJThread extends Thread |
---|
.. | .. |
---|
2123 | 2237 | |
---|
2124 | 2238 | void LoadObjFile(String fullname) |
---|
2125 | 2239 | { |
---|
2126 | | - /* |
---|
| 2240 | + System.out.println("Loading " + fullname); |
---|
| 2241 | + /**/ |
---|
2127 | 2242 | //lastFilename = fullname; |
---|
2128 | 2243 | if(loadObjThread == null) |
---|
2129 | 2244 | { |
---|
2130 | | - loadObjThread = new LoadOBJThread(); |
---|
2131 | | - loadObjThread.start(); |
---|
| 2245 | + loadObjThread = new LoadOBJThread(); |
---|
| 2246 | + loadObjThread.start(); |
---|
2132 | 2247 | } |
---|
2133 | 2248 | |
---|
2134 | 2249 | loadObjThread.add(fullname); |
---|
2135 | | - */ |
---|
| 2250 | + /**/ |
---|
2136 | 2251 | |
---|
2137 | | - System.out.println("Loading " + fullname); |
---|
2138 | | - makeSomething(new FileObject(fullname, true), true); |
---|
| 2252 | + //makeSomething(new FileObject(fullname, true), true); |
---|
2139 | 2253 | } |
---|
2140 | 2254 | |
---|
2141 | 2255 | void LoadGFDFile(String fullname) |
---|
.. | .. |
---|
2396 | 2510 | |
---|
2397 | 2511 | void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName) |
---|
2398 | 2512 | { |
---|
2399 | | - if (GrafreeD.standAlone) |
---|
| 2513 | + if (Grafreed.standAlone) |
---|
2400 | 2514 | { |
---|
2401 | 2515 | /**/ |
---|
2402 | 2516 | FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD); |
---|
.. | .. |
---|
2978 | 3092 | return; |
---|
2979 | 3093 | } else if (event.getSource() == toggleSwitchItem) |
---|
2980 | 3094 | { |
---|
2981 | | - cameraView.ToggleRandom(); |
---|
| 3095 | + cameraView.ToggleSwitch(); |
---|
2982 | 3096 | cameraView.repaint(); |
---|
2983 | 3097 | return; |
---|
2984 | 3098 | } else if (event.getSource() == toggleHandleItem) |
---|
.. | .. |
---|
3006 | 3120 | } else if (event.getSource() == liveCB) |
---|
3007 | 3121 | { |
---|
3008 | 3122 | copy.live ^= true; |
---|
| 3123 | + return; |
---|
| 3124 | + } else if (event.getSource() == selectCB) |
---|
| 3125 | + { |
---|
| 3126 | + copy.dontselect ^= true; |
---|
3009 | 3127 | return; |
---|
3010 | 3128 | } else if (event.getSource() == hideCB) |
---|
3011 | 3129 | { |
---|
.. | .. |
---|
3045 | 3163 | |
---|
3046 | 3164 | public void actionPerformed(ActionEvent event) |
---|
3047 | 3165 | { |
---|
| 3166 | + Object source = event.getSource(); |
---|
3048 | 3167 | // SCRIPT DIALOG |
---|
3049 | | - if (event.getSource() == okbutton) |
---|
| 3168 | + if (source == okbutton) |
---|
3050 | 3169 | { |
---|
3051 | 3170 | textpanel.setVisible(false); |
---|
3052 | 3171 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3058 | 3177 | textarea = null; |
---|
3059 | 3178 | textpanel = null; |
---|
3060 | 3179 | } |
---|
3061 | | - if (event.getSource() == cancelbutton) |
---|
| 3180 | + if (source == cancelbutton) |
---|
3062 | 3181 | { |
---|
3063 | 3182 | textpanel.setVisible(false); |
---|
3064 | 3183 | textpanel.remove(textarea); |
---|
.. | .. |
---|
3070 | 3189 | //applySelf(); |
---|
3071 | 3190 | //client.refreshEditWindow(); |
---|
3072 | 3191 | //refreshContents(); |
---|
3073 | | - if (event.getSource() == nameField) |
---|
| 3192 | + if (source == nameField) |
---|
3074 | 3193 | { |
---|
3075 | 3194 | //System.out.println("ObjEditor " + event); |
---|
3076 | 3195 | applySelf0(true); |
---|
3077 | 3196 | //parent.applySelf(); |
---|
3078 | 3197 | objEditor.refreshContents(); |
---|
3079 | | - } else if (event.getSource() == resetButton) |
---|
| 3198 | + } else if (source == resetButton) |
---|
3080 | 3199 | { |
---|
3081 | 3200 | CameraPane.fullreset = true; |
---|
3082 | 3201 | copy.Reset(); // ResetMeshes(); |
---|
3083 | 3202 | copy.Touch(); |
---|
3084 | 3203 | objEditor.refreshContents(); |
---|
3085 | | - } else if (event.getSource() == stepItem) |
---|
| 3204 | + } else if (source == stepItem) |
---|
3086 | 3205 | { |
---|
3087 | 3206 | //cameraView.ONESTEP = true; |
---|
3088 | 3207 | Globals.ONESTEP = true; |
---|
3089 | 3208 | cameraView.repaint(); |
---|
3090 | 3209 | return; |
---|
3091 | | - } else if (event.getSource() == stepButton) |
---|
| 3210 | + } else if (source == stepButton) |
---|
3092 | 3211 | { |
---|
3093 | 3212 | copy.Step(); |
---|
3094 | 3213 | copy.Touch(); |
---|
3095 | 3214 | objEditor.refreshContents(); |
---|
3096 | | - } else if (event.getSource() == slowerButton) |
---|
| 3215 | + } else if (source == slowerButton) |
---|
3097 | 3216 | { |
---|
3098 | 3217 | copy.Slower(); |
---|
3099 | 3218 | copy.Touch(); |
---|
3100 | 3219 | objEditor.refreshContents(); |
---|
3101 | | - } else if (event.getSource() == fasterButton) |
---|
| 3220 | + } else if (source == fasterButton) |
---|
3102 | 3221 | { |
---|
3103 | 3222 | copy.Faster(); |
---|
3104 | 3223 | copy.Touch(); |
---|
3105 | 3224 | objEditor.refreshContents(); |
---|
3106 | | - } else if (event.getSource() == remarkButton) |
---|
| 3225 | + } else if (source == remarkButton) |
---|
3107 | 3226 | { |
---|
3108 | 3227 | copy.Remark(); |
---|
3109 | 3228 | copy.Touch(); |
---|
3110 | 3229 | objEditor.refreshContents(); |
---|
3111 | | - } else if (event.getSource() == stepAllButton) |
---|
| 3230 | + } else if (source == stepAllButton) |
---|
3112 | 3231 | { |
---|
3113 | 3232 | copy.StepAll(); |
---|
3114 | 3233 | copy.Touch(); |
---|
3115 | 3234 | objEditor.refreshContents(); |
---|
3116 | | - } else if (event.getSource() == resetAllButton) |
---|
| 3235 | + } else if (source == resetAllButton) |
---|
3117 | 3236 | { |
---|
3118 | 3237 | //CameraPane.fullreset = true; |
---|
3119 | 3238 | copy.ResetAll(); // ResetMeshes(); |
---|
.. | .. |
---|
3146 | 3265 | // Close(); |
---|
3147 | 3266 | // } |
---|
3148 | 3267 | // else |
---|
3149 | | - if (event.getSource() == resetSlidersButton) |
---|
| 3268 | + if (source == resetSlidersButton) |
---|
3150 | 3269 | { |
---|
3151 | 3270 | ResetSliders(); |
---|
3152 | | - } else if (event.getSource() == clearMaterialButton) |
---|
| 3271 | + } else if (source == clearMaterialButton) |
---|
3153 | 3272 | { |
---|
3154 | 3273 | ClearMaterial(); |
---|
3155 | | - } else if (event.getSource() == createMaterialButton) |
---|
| 3274 | + } else if (source == createMaterialButton) |
---|
3156 | 3275 | { |
---|
3157 | 3276 | CreateMaterial(); |
---|
3158 | | - } else if (event.getSource() == clearPanelButton) |
---|
| 3277 | + } else if (source == clearPanelButton) |
---|
3159 | 3278 | { |
---|
3160 | 3279 | copy.ClearUI(); |
---|
3161 | 3280 | refreshContents(true); |
---|
3162 | | - } /* |
---|
3163 | | - } |
---|
3164 | | - |
---|
3165 | | - public boolean action(Event event, Object arg) |
---|
3166 | | - { |
---|
3167 | | - */ else if (event.getSource() == closeItem) |
---|
| 3281 | + } else if (source == importGFDItem) |
---|
| 3282 | + { |
---|
| 3283 | + ImportGFD(); |
---|
| 3284 | + } else |
---|
| 3285 | + if (source == importVRMLX3DItem) |
---|
| 3286 | + { |
---|
| 3287 | + ImportVRMLX3D(); |
---|
| 3288 | + } else |
---|
| 3289 | + if (source == import3DSItem) |
---|
| 3290 | + { |
---|
| 3291 | + objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
| 3292 | + } else |
---|
| 3293 | + if (source == importOBJItem) |
---|
| 3294 | + { |
---|
| 3295 | + //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
| 3296 | + FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD); |
---|
| 3297 | + browser.setVisible(true); |
---|
| 3298 | + String filename = browser.getFile(); |
---|
| 3299 | + if (filename != null && filename.length() > 0) |
---|
| 3300 | + { |
---|
| 3301 | + String fullname = browser.getDirectory() + filename; |
---|
| 3302 | + makeSomething(ReadOBJ(fullname), true); |
---|
| 3303 | + } |
---|
| 3304 | + } else |
---|
| 3305 | + if (source == closeItem) |
---|
3168 | 3306 | { |
---|
3169 | 3307 | Close(); |
---|
3170 | 3308 | //return true; |
---|
3171 | | - } else if (event.getSource() == loadItem) |
---|
| 3309 | + } else if (source == loadItem) |
---|
3172 | 3310 | { |
---|
3173 | 3311 | load(); |
---|
3174 | 3312 | //return true; |
---|
3175 | | - } else if (event.getSource() == saveItem) |
---|
| 3313 | + } else if (source == newItem) |
---|
| 3314 | + { |
---|
| 3315 | + New(); |
---|
| 3316 | + } else if (source == saveItem) |
---|
3176 | 3317 | { |
---|
3177 | 3318 | save(); |
---|
3178 | 3319 | //return true; |
---|
3179 | | - } else if (event.getSource() == saveAsItem) |
---|
| 3320 | + } else if (source == saveAsItem) |
---|
3180 | 3321 | { |
---|
3181 | 3322 | saveAs(); |
---|
3182 | 3323 | //return true; |
---|
3183 | | - } else if (event.getSource() == reexportItem) |
---|
| 3324 | + } else if (source == reexportItem) |
---|
3184 | 3325 | { |
---|
3185 | 3326 | reexport(); |
---|
3186 | 3327 | //return true; |
---|
3187 | | - } else if (event.getSource() == exportAsItem) |
---|
| 3328 | + } else if (source == exportAsItem) |
---|
3188 | 3329 | { |
---|
3189 | 3330 | export(); |
---|
3190 | 3331 | //return true; |
---|
3191 | | - } else if (event.getSource() == povItem) |
---|
| 3332 | + } else if (source == povItem) |
---|
3192 | 3333 | { |
---|
3193 | 3334 | generatePOV(); |
---|
3194 | 3335 | //return true; |
---|
3195 | | - } else if (event.getSource() == zBufferItem) |
---|
| 3336 | + } else if (source == zBufferItem) |
---|
3196 | 3337 | { |
---|
3197 | 3338 | try |
---|
3198 | 3339 | { |
---|
.. | .. |
---|
3214 | 3355 | cameraView.repaint(); |
---|
3215 | 3356 | //return true; |
---|
3216 | 3357 | } |
---|
3217 | | - */ else if (event.getSource() == editCameraItem) |
---|
3218 | | - { |
---|
3219 | | - cameraView.ProtectCamera(); |
---|
3220 | | - cameraView.repaint(); |
---|
3221 | | - return; |
---|
3222 | | - } else if (event.getSource() == revertCameraItem) |
---|
3223 | | - { |
---|
3224 | | - cameraView.RevertCamera(); |
---|
3225 | | - cameraView.repaint(); |
---|
3226 | | - return; |
---|
3227 | | -// } else if (event.getSource() == textureButton) |
---|
3228 | | -// { |
---|
3229 | | -// return; // true; |
---|
3230 | | - } else // combos... |
---|
3231 | | - if (event.getSource() == texresMenu) |
---|
| 3358 | + */ else // combos... |
---|
| 3359 | + if (source == texresMenu) |
---|
3232 | 3360 | { |
---|
3233 | 3361 | System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex()); |
---|
3234 | 3362 | copy.texres = texresMenu.getSelectedIndex(); |
---|
.. | .. |
---|
3240 | 3368 | } |
---|
3241 | 3369 | } |
---|
3242 | 3370 | |
---|
| 3371 | + void New() |
---|
| 3372 | + { |
---|
| 3373 | + while (copy.Size() > 1) |
---|
| 3374 | + { |
---|
| 3375 | + copy.remove(1); |
---|
| 3376 | + } |
---|
| 3377 | + |
---|
| 3378 | + ResetModel(); |
---|
| 3379 | + objEditor.refreshContents(); |
---|
| 3380 | + } |
---|
| 3381 | + |
---|
| 3382 | + static public byte[] Compress(Object3D o) |
---|
| 3383 | + { |
---|
| 3384 | + try |
---|
| 3385 | + { |
---|
| 3386 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3387 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos); |
---|
| 3388 | + ObjectOutputStream out = new ObjectOutputStream(zstream); |
---|
| 3389 | + |
---|
| 3390 | + Object3D parent = o.parent; |
---|
| 3391 | + o.parent = null; |
---|
| 3392 | + |
---|
| 3393 | + out.writeObject(o); |
---|
| 3394 | + |
---|
| 3395 | + o.parent = parent; |
---|
| 3396 | + |
---|
| 3397 | + out.flush(); |
---|
| 3398 | + |
---|
| 3399 | + zstream.close(); |
---|
| 3400 | + out.close(); |
---|
| 3401 | + |
---|
| 3402 | + return baos.toByteArray(); |
---|
| 3403 | + } catch (Exception e) |
---|
| 3404 | + { |
---|
| 3405 | + System.err.println(e); |
---|
| 3406 | + return null; |
---|
| 3407 | + } |
---|
| 3408 | + } |
---|
| 3409 | + |
---|
| 3410 | + static public Object Uncompress(byte[] bytes) |
---|
| 3411 | + { |
---|
| 3412 | + System.out.println("#bytes = " + bytes.length); |
---|
| 3413 | + try |
---|
| 3414 | + { |
---|
| 3415 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3416 | + java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais); |
---|
| 3417 | + ObjectInputStream in = new ObjectInputStream(istream); |
---|
| 3418 | + Object obj = in.readObject(); |
---|
| 3419 | + in.close(); |
---|
| 3420 | + |
---|
| 3421 | + return obj; |
---|
| 3422 | + } catch (Exception e) |
---|
| 3423 | + { |
---|
| 3424 | + System.err.println(e); |
---|
| 3425 | + return null; |
---|
| 3426 | + } |
---|
| 3427 | + } |
---|
| 3428 | + |
---|
| 3429 | + static public Object clone(Object o) |
---|
| 3430 | + { |
---|
| 3431 | + try |
---|
| 3432 | + { |
---|
| 3433 | + ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
---|
| 3434 | + ObjectOutputStream out = new ObjectOutputStream(baos); |
---|
| 3435 | + |
---|
| 3436 | + out.writeObject(o); |
---|
| 3437 | + |
---|
| 3438 | + out.flush(); |
---|
| 3439 | + out.close(); |
---|
| 3440 | + |
---|
| 3441 | + byte[] bytes = baos.toByteArray(); |
---|
| 3442 | + |
---|
| 3443 | + System.out.println("clone = " + bytes.length); |
---|
| 3444 | + |
---|
| 3445 | + ByteArrayInputStream bais = new ByteArrayInputStream(bytes); |
---|
| 3446 | + ObjectInputStream in = new ObjectInputStream(bais); |
---|
| 3447 | + Object obj = in.readObject(); |
---|
| 3448 | + in.close(); |
---|
| 3449 | + |
---|
| 3450 | + return obj; |
---|
| 3451 | + } catch (Exception e) |
---|
| 3452 | + { |
---|
| 3453 | + System.err.println(e); |
---|
| 3454 | + return null; |
---|
| 3455 | + } |
---|
| 3456 | + } |
---|
| 3457 | + |
---|
| 3458 | + cRadio GetCurrentTab() |
---|
| 3459 | + { |
---|
| 3460 | + cRadio ab; |
---|
| 3461 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3462 | + { |
---|
| 3463 | + ab = (cRadio)e.nextElement(); |
---|
| 3464 | + if(ab.GetObject() == copy) |
---|
| 3465 | + { |
---|
| 3466 | + return ab; |
---|
| 3467 | + } |
---|
| 3468 | + } |
---|
| 3469 | + |
---|
| 3470 | + return null; |
---|
| 3471 | + } |
---|
| 3472 | + |
---|
| 3473 | + java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>(); |
---|
| 3474 | + |
---|
| 3475 | + public void Save() |
---|
| 3476 | + { |
---|
| 3477 | + System.err.println("Save"); |
---|
| 3478 | + |
---|
| 3479 | + cRadio tab = GetCurrentTab(); |
---|
| 3480 | + |
---|
| 3481 | + boolean temp = CameraPane.SWITCH; |
---|
| 3482 | + CameraPane.SWITCH = false; |
---|
| 3483 | + |
---|
| 3484 | + copy.ExtractBigData(hashtable); |
---|
| 3485 | + |
---|
| 3486 | + //EditorFrame.m_MainFrame.requestFocusInWindow(); |
---|
| 3487 | + tab.graphs[tab.undoindex++] = Compress(copy); |
---|
| 3488 | + |
---|
| 3489 | + copy.RestoreBigData(hashtable); |
---|
| 3490 | + |
---|
| 3491 | + CameraPane.SWITCH = temp; |
---|
| 3492 | + |
---|
| 3493 | + //assert(hashtable.isEmpty()); |
---|
| 3494 | + |
---|
| 3495 | + for (int i = tab.undoindex; i < tab.graphs.length; i++) |
---|
| 3496 | + { |
---|
| 3497 | + tab.graphs[i] = null; |
---|
| 3498 | + } |
---|
| 3499 | + |
---|
| 3500 | + // test save |
---|
| 3501 | + if (false) |
---|
| 3502 | + { |
---|
| 3503 | + try |
---|
| 3504 | + { |
---|
| 3505 | + FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex); |
---|
| 3506 | + ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 3507 | + |
---|
| 3508 | + p.writeObject(copy); |
---|
| 3509 | + |
---|
| 3510 | + p.flush(); |
---|
| 3511 | + |
---|
| 3512 | + ostream.close(); |
---|
| 3513 | + } catch (Exception e) |
---|
| 3514 | + { |
---|
| 3515 | + e.printStackTrace(); |
---|
| 3516 | + } |
---|
| 3517 | + } |
---|
| 3518 | + } |
---|
| 3519 | + |
---|
| 3520 | + void CopyChanged(Object3D obj) |
---|
| 3521 | + { |
---|
| 3522 | + boolean temp = CameraPane.SWITCH; |
---|
| 3523 | + CameraPane.SWITCH = false; |
---|
| 3524 | + |
---|
| 3525 | + copy.ExtractBigData(hashtable); |
---|
| 3526 | + |
---|
| 3527 | + copy.clear(); |
---|
| 3528 | + |
---|
| 3529 | + for (int i=0; i<obj.Size(); i++) |
---|
| 3530 | + { |
---|
| 3531 | + copy.add(obj.get(i)); |
---|
| 3532 | + } |
---|
| 3533 | + |
---|
| 3534 | + copy.RestoreBigData(hashtable); |
---|
| 3535 | + |
---|
| 3536 | + CameraPane.SWITCH = temp; |
---|
| 3537 | + |
---|
| 3538 | + //assert(hashtable.isEmpty()); |
---|
| 3539 | + |
---|
| 3540 | + copy.Touch(); |
---|
| 3541 | + |
---|
| 3542 | + ResetModel(); |
---|
| 3543 | + copy.HardTouch(); // recompile? |
---|
| 3544 | + |
---|
| 3545 | + cRadio ab; |
---|
| 3546 | + for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
| 3547 | + { |
---|
| 3548 | + ab = (cRadio)e.nextElement(); |
---|
| 3549 | + Object3D test = copy.GetObject(ab.object.GetUUID()); |
---|
| 3550 | + //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID()); |
---|
| 3551 | + if (test != null) |
---|
| 3552 | + { |
---|
| 3553 | + test.editWindow = ab.object.editWindow; |
---|
| 3554 | + ab.object = test; |
---|
| 3555 | + } |
---|
| 3556 | + } |
---|
| 3557 | + |
---|
| 3558 | + refreshContents(); |
---|
| 3559 | + } |
---|
| 3560 | + |
---|
| 3561 | + public void Undo() |
---|
| 3562 | + { |
---|
| 3563 | + System.err.println("Undo"); |
---|
| 3564 | + |
---|
| 3565 | + cRadio tab = GetCurrentTab(); |
---|
| 3566 | + |
---|
| 3567 | + if (tab.undoindex == 0) |
---|
| 3568 | + { |
---|
| 3569 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3570 | + return; |
---|
| 3571 | + } |
---|
| 3572 | + |
---|
| 3573 | + if (tab.graphs[tab.undoindex] == null) |
---|
| 3574 | + { |
---|
| 3575 | + Save(); |
---|
| 3576 | + tab.undoindex -= 1; |
---|
| 3577 | + } |
---|
| 3578 | + |
---|
| 3579 | + tab.undoindex -= 1; |
---|
| 3580 | + |
---|
| 3581 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3582 | + } |
---|
| 3583 | + |
---|
| 3584 | + public void Redo() |
---|
| 3585 | + { |
---|
| 3586 | + cRadio tab = GetCurrentTab(); |
---|
| 3587 | + |
---|
| 3588 | + if (tab.graphs[tab.undoindex + 1] == null) |
---|
| 3589 | + { |
---|
| 3590 | + java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
| 3591 | + return; |
---|
| 3592 | + } |
---|
| 3593 | + |
---|
| 3594 | + tab.undoindex += 1; |
---|
| 3595 | + |
---|
| 3596 | + CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex])); |
---|
| 3597 | + } |
---|
| 3598 | + |
---|
| 3599 | + void ImportGFD() |
---|
| 3600 | + { |
---|
| 3601 | + FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD); |
---|
| 3602 | + browser.show(); |
---|
| 3603 | + String filename = browser.getFile(); |
---|
| 3604 | + if (filename != null && filename.length() > 0) |
---|
| 3605 | + { |
---|
| 3606 | + String fullname = browser.getDirectory() + filename; |
---|
| 3607 | + |
---|
| 3608 | + //Object3D readobj = |
---|
| 3609 | + objEditor.ReadGFD(fullname, objEditor); |
---|
| 3610 | + //makeSomething(readobj); |
---|
| 3611 | + } |
---|
| 3612 | + } |
---|
| 3613 | + |
---|
| 3614 | + void ImportVRMLX3D() |
---|
| 3615 | + { |
---|
| 3616 | + if (Grafreed.standAlone) |
---|
| 3617 | + { |
---|
| 3618 | + /**/ |
---|
| 3619 | + FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD); |
---|
| 3620 | + browser.show(); |
---|
| 3621 | + String filename = browser.getFile(); |
---|
| 3622 | + if (filename != null && filename.length() > 0) |
---|
| 3623 | + { |
---|
| 3624 | + String fullname = browser.getDirectory() + filename; |
---|
| 3625 | + LoadVRMLX3D(fullname); |
---|
| 3626 | + } |
---|
| 3627 | + /**/ |
---|
| 3628 | + } |
---|
| 3629 | + } |
---|
| 3630 | + |
---|
3243 | 3631 | void ToggleAnimation() |
---|
3244 | 3632 | { |
---|
3245 | 3633 | if (!Globals.ANIMATION) |
---|
.. | .. |
---|
3255 | 3643 | |
---|
3256 | 3644 | Globals.ANIMATION ^= true; |
---|
3257 | 3645 | |
---|
3258 | | - GrafreeD.wav.cursor = 0; |
---|
3259 | | - GrafreeD.wav.loop = 0; |
---|
| 3646 | + Grafreed.wav.cursor = 0; |
---|
| 3647 | + Grafreed.wav.loop = 0; |
---|
3260 | 3648 | } |
---|
3261 | 3649 | } else |
---|
3262 | 3650 | { |
---|
.. | .. |
---|
3357 | 3745 | assert false; |
---|
3358 | 3746 | } |
---|
3359 | 3747 | |
---|
3360 | | - void EditSelection() |
---|
| 3748 | + void EditSelection(boolean newWindow) |
---|
3361 | 3749 | { |
---|
3362 | 3750 | } |
---|
3363 | 3751 | |
---|
.. | .. |
---|
3443 | 3831 | { |
---|
3444 | 3832 | //System.out.println("Propagate = " + propagate); |
---|
3445 | 3833 | copy.UpdateMaterial(anchor, current, propagate); |
---|
| 3834 | + |
---|
| 3835 | + if (copy.material != null) |
---|
| 3836 | + { |
---|
| 3837 | + cMaterial mat = copy.material; |
---|
| 3838 | + |
---|
| 3839 | + colorField.SetToolTipValue((mat.color)); |
---|
| 3840 | + modulationField.SetToolTipValue((mat.modulation)); |
---|
| 3841 | + metalnessField.SetToolTipValue((mat.metalness)); |
---|
| 3842 | + diffuseField.SetToolTipValue((mat.diffuse)); |
---|
| 3843 | + specularField.SetToolTipValue((mat.specular)); |
---|
| 3844 | + shininessField.SetToolTipValue((mat.shininess)); |
---|
| 3845 | + shiftField.SetToolTipValue((mat.shift)); |
---|
| 3846 | + ambientField.SetToolTipValue((mat.ambient)); |
---|
| 3847 | + lightareaField.SetToolTipValue((mat.lightarea)); |
---|
| 3848 | + diffusenessField.SetToolTipValue((mat.factor)); |
---|
| 3849 | + velvetField.SetToolTipValue((mat.velvet)); |
---|
| 3850 | + sheenField.SetToolTipValue((mat.sheen)); |
---|
| 3851 | + subsurfaceField.SetToolTipValue((mat.subsurface)); |
---|
| 3852 | + backlitField.SetToolTipValue((mat.bump)); |
---|
| 3853 | + anisoField.SetToolTipValue((mat.aniso)); |
---|
| 3854 | + anisoVField.SetToolTipValue((mat.anisoV)); |
---|
| 3855 | + cameraField.SetToolTipValue((mat.cameralight)); |
---|
| 3856 | + selfshadowField.SetToolTipValue((mat.diffuseness)); |
---|
| 3857 | + shadowField.SetToolTipValue((mat.shadow)); |
---|
| 3858 | + textureField.SetToolTipValue((mat.texture)); |
---|
| 3859 | + opacityField.SetToolTipValue((mat.opacity)); |
---|
| 3860 | + fakedepthField.SetToolTipValue((mat.fakedepth)); |
---|
| 3861 | + shadowbiasField.SetToolTipValue((mat.shadowbias)); |
---|
| 3862 | + } |
---|
| 3863 | + |
---|
3446 | 3864 | if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null) |
---|
3447 | 3865 | { |
---|
3448 | 3866 | copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000); |
---|
.. | .. |
---|
3558 | 3976 | } |
---|
3559 | 3977 | |
---|
3560 | 3978 | if (normalpushField != null) |
---|
3561 | | - copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
| 3979 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
3562 | 3980 | } |
---|
3563 | 3981 | |
---|
3564 | 3982 | void SnapObject() |
---|
.. | .. |
---|
3822 | 4240 | |
---|
3823 | 4241 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
3824 | 4242 | { |
---|
| 4243 | + if (Globals.SAVEONMAKE) // && resetmodel) |
---|
| 4244 | + Save(); |
---|
3825 | 4245 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
3826 | 4246 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
3827 | 4247 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
3908 | 4328 | { |
---|
3909 | 4329 | ResetModel(); |
---|
3910 | 4330 | Select(thing.GetTreePath(), true, false); // unselect... false); |
---|
| 4331 | + |
---|
| 4332 | + if (thing.Size() == 0) |
---|
| 4333 | + { |
---|
| 4334 | + //EditSelection(false); |
---|
| 4335 | + } |
---|
| 4336 | + |
---|
3911 | 4337 | refreshContents(); |
---|
3912 | 4338 | } |
---|
3913 | 4339 | |
---|
.. | .. |
---|
4025 | 4451 | } |
---|
4026 | 4452 | } |
---|
4027 | 4453 | } |
---|
| 4454 | + |
---|
4028 | 4455 | LoadGFDThread loadGFDThread; |
---|
4029 | 4456 | |
---|
4030 | 4457 | void ReadGFD(String fullname, iCallBack cb) |
---|
.. | .. |
---|
4044 | 4471 | |
---|
4045 | 4472 | try |
---|
4046 | 4473 | { |
---|
| 4474 | + // Try compressed version first. |
---|
4047 | 4475 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4048 | | - java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4476 | + java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
| 4477 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
4049 | 4478 | |
---|
4050 | 4479 | readobj = (Object3D) p.readObject(); |
---|
4051 | 4480 | istream.close(); |
---|
.. | .. |
---|
4053 | 4482 | readobj.ResetDisplayList(); |
---|
4054 | 4483 | } catch (Exception e) |
---|
4055 | 4484 | { |
---|
4056 | | - e.printStackTrace(); |
---|
| 4485 | + //e.printStackTrace(); |
---|
| 4486 | + try |
---|
| 4487 | + { |
---|
| 4488 | + java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
| 4489 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4490 | + |
---|
| 4491 | + readobj = (Object3D) p.readObject(); |
---|
| 4492 | + istream.close(); |
---|
| 4493 | + |
---|
| 4494 | + readobj.ResetDisplayList(); |
---|
| 4495 | + } catch (Exception e2) |
---|
| 4496 | + { |
---|
| 4497 | + e2.printStackTrace(); |
---|
| 4498 | + } |
---|
4057 | 4499 | } |
---|
4058 | 4500 | // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); } |
---|
4059 | 4501 | // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); } |
---|
.. | .. |
---|
4099 | 4541 | |
---|
4100 | 4542 | void LoadIt(Object obj) |
---|
4101 | 4543 | { |
---|
| 4544 | + if (obj == null) |
---|
| 4545 | + { |
---|
| 4546 | + // Invalid file |
---|
| 4547 | + return; |
---|
| 4548 | + } |
---|
| 4549 | + |
---|
4102 | 4550 | System.out.println("Loaded " + obj); |
---|
4103 | 4551 | //new Exception().printStackTrace(); |
---|
4104 | 4552 | Object3D readobj = (Object3D) obj; |
---|
.. | .. |
---|
4108 | 4556 | |
---|
4109 | 4557 | if (readobj != null) |
---|
4110 | 4558 | { |
---|
| 4559 | + if (Globals.SAVEONMAKE) |
---|
| 4560 | + Save(); |
---|
4111 | 4561 | try |
---|
4112 | 4562 | { |
---|
4113 | 4563 | //readobj.deepCopySelf(copy); |
---|
.. | .. |
---|
4170 | 4620 | |
---|
4171 | 4621 | void load() // throws ClassNotFoundException |
---|
4172 | 4622 | { |
---|
4173 | | - if (GrafreeD.standAlone) |
---|
| 4623 | + if (Grafreed.standAlone) |
---|
4174 | 4624 | { |
---|
4175 | 4625 | FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD); |
---|
4176 | 4626 | browser.show(); |
---|
.. | .. |
---|
4257 | 4707 | try |
---|
4258 | 4708 | { |
---|
4259 | 4709 | FileOutputStream ostream = new FileOutputStream(lastname); |
---|
4260 | | - ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 4710 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4711 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4261 | 4712 | |
---|
4262 | 4713 | p.writeObject(copy); |
---|
4263 | 4714 | p.flush(); |
---|
4264 | 4715 | |
---|
| 4716 | + zstream.close(); |
---|
4265 | 4717 | ostream.close(); |
---|
4266 | 4718 | |
---|
4267 | 4719 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4271 | 4723 | { |
---|
4272 | 4724 | } |
---|
4273 | 4725 | } |
---|
| 4726 | + |
---|
4274 | 4727 | String lastname; |
---|
4275 | 4728 | |
---|
4276 | 4729 | void saveAs() |
---|
4277 | 4730 | { |
---|
4278 | | - if (GrafreeD.standAlone) |
---|
| 4731 | + if (Grafreed.standAlone) |
---|
4279 | 4732 | { |
---|
4280 | 4733 | FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE); |
---|
4281 | 4734 | browser.setVisible(true); |
---|
.. | .. |
---|
4380 | 4833 | try |
---|
4381 | 4834 | { |
---|
4382 | 4835 | FileOutputStream ostream = new FileOutputStream(filename); |
---|
4383 | | - // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
4384 | | - ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream); |
---|
| 4836 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4837 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4385 | 4838 | |
---|
4386 | 4839 | Object3D objectparent = obj.parent; |
---|
4387 | 4840 | obj.parent = null; |
---|
4388 | 4841 | |
---|
4389 | | - Object3D object = (Object3D) GrafreeD.clone(obj); |
---|
| 4842 | + Object3D object = (Object3D) Grafreed.clone(obj); |
---|
4390 | 4843 | |
---|
4391 | 4844 | obj.parent = objectparent; |
---|
4392 | 4845 | |
---|
.. | .. |
---|
4398 | 4851 | p.writeObject(object); |
---|
4399 | 4852 | p.flush(); |
---|
4400 | 4853 | |
---|
| 4854 | + zstream.close(); |
---|
4401 | 4855 | ostream.close(); |
---|
4402 | | - // zstream.close(); |
---|
4403 | 4856 | |
---|
4404 | 4857 | // group.selection.get(0).parent = parent; |
---|
4405 | 4858 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4420 | 4873 | buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n"); |
---|
4421 | 4874 | cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height); |
---|
4422 | 4875 | copy.generatePOV(buffer); |
---|
4423 | | - if (GrafreeD.standAlone) |
---|
| 4876 | + if (Grafreed.standAlone) |
---|
4424 | 4877 | { |
---|
4425 | 4878 | FileDialog browser = new FileDialog(frame, "Export POV", 1); |
---|
4426 | 4879 | browser.show(); |
---|
.. | .. |
---|
4446 | 4899 | Object3D client; |
---|
4447 | 4900 | Object3D copy; |
---|
4448 | 4901 | MenuBar menuBar; |
---|
4449 | | - Menu windowMenu; |
---|
| 4902 | + Menu fileMenu; |
---|
| 4903 | + MenuItem newItem; |
---|
4450 | 4904 | MenuItem loadItem; |
---|
4451 | 4905 | MenuItem saveItem; |
---|
4452 | 4906 | MenuItem saveAsItem; |
---|
.. | .. |
---|
4454 | 4908 | MenuItem reexportItem; |
---|
4455 | 4909 | MenuItem povItem; |
---|
4456 | 4910 | MenuItem closeItem; |
---|
4457 | | - Menu cameraMenu; |
---|
| 4911 | + |
---|
4458 | 4912 | CheckboxMenuItem zBufferItem; |
---|
4459 | 4913 | //MenuItem normalLensItem; |
---|
4460 | | - MenuItem editCameraItem; |
---|
4461 | | - MenuItem revertCameraItem; |
---|
4462 | 4914 | MenuItem stepItem; |
---|
4463 | 4915 | CheckboxMenuItem toggleLiveItem; |
---|
4464 | 4916 | CheckboxMenuItem toggleFullScreenItem; |
---|
.. | .. |
---|
4476 | 4928 | CheckboxMenuItem togglePaintItem; |
---|
4477 | 4929 | JSplitPane mainPanel; |
---|
4478 | 4930 | JScrollPane scrollpane; |
---|
| 4931 | + |
---|
4479 | 4932 | JPanel toolbarPanel; |
---|
| 4933 | + |
---|
4480 | 4934 | cGridBag treePanel; |
---|
| 4935 | + |
---|
4481 | 4936 | JPanel radioPanel; |
---|
4482 | 4937 | ButtonGroup buttonGroup; |
---|
4483 | | - cGridBag ctrlPanel; |
---|
| 4938 | + |
---|
| 4939 | + cGridBag toolboxPanel; |
---|
4484 | 4940 | cGridBag materialPanel; |
---|
| 4941 | + cGridBag ctrlPanel; |
---|
| 4942 | + |
---|
4485 | 4943 | JScrollPane infoPanel; |
---|
| 4944 | + |
---|
4486 | 4945 | cGridBag optionsPanel; |
---|
| 4946 | + |
---|
4487 | 4947 | JTabbedPane objectPanel; |
---|
| 4948 | + |
---|
4488 | 4949 | cGridBag XYZPanel; |
---|
| 4950 | + |
---|
4489 | 4951 | JSplitPane gridPanel; |
---|
4490 | 4952 | JSplitPane bigPanel; |
---|
| 4953 | + |
---|
4491 | 4954 | cGridBag bigThree; |
---|
4492 | 4955 | cGridBag scenePanel; |
---|
4493 | 4956 | cGridBag centralPanel; |
---|
.. | .. |
---|
4602 | 5065 | cNumberSlider fogField; |
---|
4603 | 5066 | JLabel opacityPowerLabel; |
---|
4604 | 5067 | cNumberSlider opacityPowerField; |
---|
4605 | | - JTree jTree; |
---|
| 5068 | + cTree jTree; |
---|
4606 | 5069 | //ObjectUI parent; |
---|
4607 | 5070 | |
---|
4608 | 5071 | cNumberSlider normalpushField; |
---|
| 5072 | + |
---|
| 5073 | + private MenuItem importGFDItem; |
---|
| 5074 | + private MenuItem importVRMLX3DItem; |
---|
| 5075 | + private MenuItem import3DSItem; |
---|
| 5076 | + private MenuItem importOBJItem; |
---|
4609 | 5077 | } |
---|