Normand Briere
2019-07-21 5a546232b84ce65d8779d29e9171e7e2df013614
ObjEditor.java
....@@ -4,6 +4,7 @@
44
55 import java.awt.*;
66 import java.awt.event.*;
7
+import java.awt.image.BufferedImage;
78 import javax.swing.*;
89 import javax.swing.event.*;
910 import javax.swing.text.*;
....@@ -13,6 +14,9 @@
1314 import javax.swing.plaf.metal.MetalLookAndFeel;
1415 //import javax.swing.plaf.ColorUIResource;
1516 //import javax.swing.plaf.metal.DefaultMetalTheme;
17
+
18
+import javax.swing.plaf.basic.BasicSplitPaneDivider;
19
+import javax.swing.plaf.basic.BasicSplitPaneUI;
1620
1721 //import javax.media.opengl.GLCanvas;
1822
....@@ -37,6 +41,51 @@
3741 JFrame frame;
3842
3943 static ObjEditor theFrame;
44
+
45
+ cButton GetButton(String name, boolean border)
46
+ {
47
+ ImageIcon icon = GetIcon(name);
48
+ return new cButton(icon, border);
49
+ }
50
+
51
+ cToggleButton GetToggleButton(String name, boolean border)
52
+ {
53
+ ImageIcon icon = GetIcon(name);
54
+ return new cToggleButton(icon, border);
55
+ }
56
+
57
+ cCheckBox GetCheckBox(String name, boolean border)
58
+ {
59
+ ImageIcon icon = GetIcon(name);
60
+ return new cCheckBox(icon, border);
61
+ }
62
+
63
+ private ImageIcon GetIcon(String name)
64
+ {
65
+ try
66
+ {
67
+ BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name));
68
+
69
+ if (image.getWidth() != 24 && image.getHeight() != 24)
70
+ {
71
+ BufferedImage resized = new BufferedImage(24, 24, image.getType());
72
+ Graphics2D g = resized.createGraphics();
73
+ g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
74
+ //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
75
+ g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null);
76
+ g.dispose();
77
+
78
+ image = resized;
79
+ }
80
+
81
+ javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image);
82
+ return icon;
83
+ }
84
+ catch (Exception e)
85
+ {
86
+ return null;
87
+ }
88
+ }
4089
4190 // SCRIPT
4291
....@@ -147,7 +196,7 @@
147196
148197 objEditor.ctrlPanel.remove(namePanel);
149198
150
- if (!GroupEditor.allparams)
199
+ if (!allparams)
151200 return;
152201
153202 // objEditor.ctrlPanel.remove(liveCB);
....@@ -171,7 +220,7 @@
171220
172221 objEditor.ctrlPanel.remove(setupPanel);
173222 objEditor.ctrlPanel.remove(setupPanel2);
174
- objEditor.ctrlPanel.remove(commandsPanel);
223
+ objEditor.ctrlPanel.remove(objectCommandsPanel);
175224 objEditor.ctrlPanel.remove(pushPanel);
176225 //objEditor.ctrlPanel.remove(fillPanel);
177226
....@@ -219,6 +268,12 @@
219268 client = inClient;
220269 copy = client;
221270
271
+ if (copy.versions == null)
272
+ {
273
+ copy.versions = new byte[100][];
274
+ copy.versionindex = -1;
275
+ }
276
+
222277 // "this" is not called: SetupUI2(objEditor);
223278 }
224279
....@@ -232,6 +287,12 @@
232287 client = inClient;
233288 copy = client;
234289
290
+ if (copy.versions == null)
291
+ {
292
+ copy.versions = new byte[100][];
293
+ copy.versionindex = -1;
294
+ }
295
+
235296 SetupUI2(callee.GetEditor());
236297 }
237298
....@@ -246,7 +307,7 @@
246307 //localCopy.parent = null;
247308
248309 frame = new JFrame();
249
- frame.setUndecorated(true);
310
+ frame.setUndecorated(false);
250311 objEditor = this;
251312 this.callee = callee;
252313
....@@ -264,6 +325,12 @@
264325 copy = localCopy;
265326 copy.editWindow = this;
266327
328
+ if (copy.versions == null)
329
+ {
330
+// copy.versions = new byte[100][];
331
+// copy.versionindex = -1;
332
+ }
333
+
267334 SetupMenu();
268335
269336 //SetupName(objEditor); // new
....@@ -277,12 +344,17 @@
277344 return frame.action(event, obj);
278345 }
279346
347
+ // Cannot work without static
348
+ static boolean allparams = true;
349
+
350
+ static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>();
351
+
280352 void SetupMenu()
281353 {
282354 frame.setMenuBar(menuBar = new MenuBar());
283355 menuBar.add(fileMenu = new Menu("File"));
284356 fileMenu.add(newItem = new MenuItem("New"));
285
- fileMenu.add(loadItem = new MenuItem("Open..."));
357
+ fileMenu.add(openItem = new MenuItem("Open..."));
286358
287359 //oe.menuBar.add(menu = new Menu("Include"));
288360 Menu menu = new Menu("Import");
....@@ -314,7 +386,7 @@
314386 }
315387
316388 newItem.addActionListener(this);
317
- loadItem.addActionListener(this);
389
+ openItem.addActionListener(this);
318390 saveItem.addActionListener(this);
319391 saveAsItem.addActionListener(this);
320392 exportAsItem.addActionListener(this);
....@@ -323,28 +395,68 @@
323395 closeItem.addActionListener(this);
324396
325397 objectPanel = new JTabbedPane();
398
+
399
+ ChangeListener changeListener = new ChangeListener()
400
+ {
401
+ public void stateChanged(ChangeEvent changeEvent)
402
+ {
403
+// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed)
404
+// {
405
+// if (latestObject != null)
406
+// {
407
+// refreshContents(true);
408
+// SetMaterial(latestObject);
409
+// }
410
+//
411
+// materialFlushed = true;
412
+// }
413
+// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit"))
414
+// {
415
+// if (listUI.size() == 0)
416
+// EditSelection(false);
417
+// }
418
+
419
+ refreshContents(false); // To refresh Info tab
420
+ }
421
+ };
422
+ objectPanel.addChangeListener(changeListener);
423
+
326424 toolbarPanel = new JPanel();
327425 toolbarPanel.setName("Toolbar");
426
+
328427 treePanel = new cGridBag();
329428 treePanel.setName("Tree");
429
+
430
+ editPanel = new cGridBag().setVertical(true);
431
+ //editPanel.setName("Edit");
432
+
330433 ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
331
- ctrlPanel.setName("Edit");
434
+
435
+ editCommandsPanel = new cGridBag();
436
+ editPanel.add(editCommandsPanel);
437
+ editPanel.add(ctrlPanel);
438
+
439
+ toolboxPanel = new cGridBag().setVertical(false);
440
+ //toolboxPanel.setName("Toolbox");
441
+
332442 materialPanel = new cGridBag().setVertical(true);
333
- materialPanel.setName("Material");
443
+ //materialPanel.setName("Material");
444
+
334445 /*JTextPane*/
335446 infoarea = createTextPane();
336447 doc = infoarea.getStyledDocument();
337448
338449 infoarea.setEditable(true);
339450 SetText();
451
+
340452 // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f));
341453 // infoarea.setOpaque(false);
342454 // //infoarea.setForeground(textcolor);
343455 // TEXTAREA infoarea.setLineWrap(true);
344456 // TEXTAREA infoarea.setWrapStyleWord(true);
345457 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED);
346
- infoPanel.setPreferredSize(new Dimension(50, 200));
347
- infoPanel.setName("Info");
458
+ infoPanel.setPreferredSize(new Dimension(1, 1));
459
+ //infoPanel.setName("Info");
348460 //infoPanel.setLayout(new BorderLayout());
349461 //infoPanel.add(createTextPane());
350462
....@@ -355,7 +467,14 @@
355467 mainPanel.setDividerSize(9);
356468 mainPanel.setDividerLocation(0.5); //1.0);
357469 mainPanel.setResizeWeight(0.5);
358
-
470
+
471
+//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5));
472
+ BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider();
473
+ divider.setDividerSize(15);
474
+ divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!"));
475
+
476
+ mainPanel.setUI(new BasicSplitPaneUI());
477
+
359478 //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
360479 //mainPanel.setLayout(new GridBagLayout());
361480 toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
....@@ -586,8 +705,8 @@
586705 }
587706 }
588707
589
-static GraphicsDevice device = GraphicsEnvironment
590
- .getLocalGraphicsEnvironment().getScreenDevices()[0];
708
+//static GraphicsDevice device = GraphicsEnvironment
709
+// .getLocalGraphicsEnvironment().getScreenDevices()[0];
591710
592711 Rectangle keeprect;
593712 cRadio radio;
....@@ -603,13 +722,24 @@
603722
604723 boolean maximized;
605724
725
+ cButton fullscreenLayout;
726
+
606727 void Minimize()
607728 {
608729 frame.setState(Frame.ICONIFIED);
730
+ frame.validate();
609731 }
610732
733
+// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={}
734
+// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={}
735
+// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={}
611736 void Maximize()
612737 {
738
+ if (CameraPane.FULLSCREEN)
739
+ {
740
+ ToggleFullScreen();
741
+ }
742
+
613743 if (maximized)
614744 {
615745 frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height);
....@@ -617,20 +747,36 @@
617747 else
618748 {
619749 keeprect = frame.getBounds();
620
- Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
621
- Dimension rect2 = frame.getToolkit().getScreenSize();
622
- frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height);
750
+// Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
751
+// Dimension rect2 = frame.getToolkit().getScreenSize();
752
+// frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height);
623753 // frame.setState(Frame.MAXIMIZED_BOTH);
754
+ frame.setBounds(frame.getGraphicsConfiguration().getBounds());
624755 }
625756
626757 maximized ^= true;
758
+
759
+ frame.validate();
627760 }
761
+
762
+ cButton minButton;
763
+ cButton maxButton;
764
+ cButton fullButton;
628765
629766 void ToggleFullScreen()
630767 {
631
- if (CameraPane.FULLSCREEN)
768
+GraphicsDevice device = frame.getGraphicsConfiguration().getDevice();
769
+
770
+ cameraView.ToggleFullScreen();
771
+
772
+ if (!CameraPane.FULLSCREEN)
632773 {
633774 device.setFullScreenWindow(null);
775
+ frame.dispose();
776
+ frame.setUndecorated(false);
777
+ frame.validate();
778
+ frame.setVisible(true);
779
+
634780 //frame.setVisible(false);
635781 // frame.removeNotify();
636782 // frame.setUndecorated(false);
....@@ -640,7 +786,7 @@
640786 // X frame.getContentPane().remove(/*"Center",*/bigThree);
641787 // X framePanel.add(bigThree);
642788 // X frame.getContentPane().add(/*"Center",*/framePanel);
643
- framePanel.setDividerLocation(1);
789
+ framePanel.setDividerLocation(46);
644790
645791 //frame.setVisible(true);
646792 radio.layout = keepButton;
....@@ -655,7 +801,12 @@
655801 // frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width,
656802 // frame.getToolkit().getScreenSize().height);
657803 //frame.setVisible(false);
804
+
805
+ frame.dispose();
806
+ frame.setUndecorated(true);
658807 device.setFullScreenWindow(frame);
808
+ frame.validate();
809
+ frame.setVisible(true);
659810 // frame.removeNotify();
660811 // frame.setUndecorated(true);
661812 // frame.addNotify();
....@@ -664,13 +815,34 @@
664815 // X frame.getContentPane().add(/*"Center",*/bigThree);
665816 framePanel.setDividerLocation(0);
666817
667
- radio.layout = twoButton;
818
+ radio.layout = fullscreenLayout;
668819 radio.layout.doClick();
669820 //frame.setVisible(true);
670821 }
671
-
672
- cameraView.ToggleFullScreen();
822
+ frame.validate();
673823 }
824
+
825
+ private byte[] CompressCopy()
826
+ {
827
+ boolean temp = CameraPane.SWITCH;
828
+ CameraPane.SWITCH = false;
829
+
830
+ copy.ExtractBigData(versiontable);
831
+ // if (copy == client)
832
+
833
+ byte[] versions[] = copy.versions;
834
+ copy.versions = null;
835
+
836
+ byte[] compress = Compress(copy);
837
+
838
+ copy.versions = versions;
839
+
840
+ copy.RestoreBigData(versiontable);
841
+
842
+ CameraPane.SWITCH = temp;
843
+
844
+ return compress;
845
+ }
674846
675847 private JTextPane createTextPane()
676848 {
....@@ -802,7 +974,7 @@
802974 // NumberSlider vDivsField;
803975 // JCheckBox endcaps;
804976 JCheckBox liveCB;
805
- JCheckBox selectCB;
977
+ JCheckBox selectableCB;
806978 JCheckBox hideCB;
807979 JCheckBox link2masterCB;
808980 JCheckBox markCB;
....@@ -810,7 +982,12 @@
810982 JCheckBox speedupCB;
811983 JCheckBox rewindCB;
812984 JCheckBox flipVCB;
985
+
986
+ cCheckBox toggleTextureCB;
987
+ cCheckBox toggleSwitchCB;
988
+
813989 JComboBox texresMenu;
990
+
814991 JButton resetButton;
815992 JButton stepButton;
816993 JButton stepAllButton;
....@@ -819,10 +996,13 @@
819996 JButton fasterButton;
820997 JButton remarkButton;
821998
999
+ cGridBag editPanel;
1000
+ cGridBag editCommandsPanel;
1001
+
8221002 cGridBag namePanel;
8231003 cGridBag setupPanel;
8241004 cGridBag setupPanel2;
825
- cGridBag commandsPanel;
1005
+ cGridBag objectCommandsPanel;
8261006 cGridBag pushPanel;
8271007 cGridBag fillPanel;
8281008
....@@ -994,38 +1174,40 @@
9941174 namePanel = new cGridBag();
9951175
9961176 nameField = AddText(namePanel, copy.GetName());
997
- namePanel.add(nameField);
1177
+ namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER));
9981178 oe.ctrlPanel.add(namePanel);
9991179
10001180 oe.ctrlPanel.Return();
10011181
1002
- if (!GroupEditor.allparams)
1182
+ if (!allparams)
10031183 return;
10041184
10051185 setupPanel = new cGridBag().setVertical(false);
10061186
10071187 liveCB = AddCheckBox(setupPanel, "Live", copy.live);
10081188 liveCB.setToolTipText("Animate object");
1009
- selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
1010
- selectCB.setToolTipText("Make object selectable");
1189
+ selectableCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
1190
+ selectableCB.setToolTipText("Make object selectable");
10111191 // Return();
1192
+
10121193 hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
10131194 hideCB.setToolTipText("Hide object");
10141195 markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
1015
- markCB.setToolTipText("Set the animation target transform");
1196
+ markCB.setToolTipText("As animation target transform");
10161197
10171198 setupPanel2 = new cGridBag().setVertical(false);
10181199
10191200 rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind);
10201201 rewindCB.setToolTipText("Rewind animation");
10211202
1022
- randomCB = AddCheckBox(setupPanel2, "Rand", copy.random);
1023
- randomCB.setToolTipText("Randomly Rewind or Go back and forth");
1203
+ randomCB = AddCheckBox(setupPanel2, "Random", copy.random);
1204
+ randomCB.setToolTipText("Randomly Rewind (or Go back and forth)");
10241205
1206
+ link2masterCB = AddCheckBox(setupPanel2, "Support", copy.link2master);
1207
+ link2masterCB.setToolTipText("Attach to support");
1208
+
10251209 if (Globals.ADVANCED)
10261210 {
1027
- link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master);
1028
- link2masterCB.setToolTipText("Attach to support");
10291211 speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup);
10301212 speedupCB.setToolTipText("Option motion capture");
10311213 }
....@@ -1035,23 +1217,23 @@
10351217 oe.ctrlPanel.add(setupPanel2);
10361218 oe.ctrlPanel.Return();
10371219
1038
- commandsPanel = new cGridBag().setVertical(false);
1220
+ objectCommandsPanel = new cGridBag().setVertical(false);
10391221
1040
- resetButton = AddButton(commandsPanel, "Reset");
1222
+ resetButton = AddButton(objectCommandsPanel, "Reset");
10411223 resetButton.setToolTipText("Jump to frame zero");
1042
- stepButton = AddButton(commandsPanel, "Step");
1224
+ stepButton = AddButton(objectCommandsPanel, "Step");
10431225 stepButton.setToolTipText("Step one frame");
10441226 // resetAllButton = AddButton(oe, "Reset All");
10451227 // stepAllButton = AddButton(oe, "Step All");
10461228 // Return();
1047
- slowerButton = AddButton(commandsPanel, "Slow");
1229
+ slowerButton = AddButton(objectCommandsPanel, "Slow");
10481230 slowerButton.setToolTipText("Decrease animation speed");
1049
- fasterButton = AddButton(commandsPanel, "Fast");
1231
+ fasterButton = AddButton(objectCommandsPanel, "Fast");
10501232 fasterButton.setToolTipText("Increase animation speed");
1051
- remarkButton = AddButton(commandsPanel, "Remark");
1233
+ remarkButton = AddButton(objectCommandsPanel, "Remark");
10521234 remarkButton.setToolTipText("Set the current transform as the target");
10531235
1054
- oe.ctrlPanel.add(commandsPanel);
1236
+ oe.ctrlPanel.add(objectCommandsPanel);
10551237 oe.ctrlPanel.Return();
10561238
10571239 pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons
....@@ -1299,6 +1481,7 @@
12991481 XYZPanel.addComponent(/*BorderLayout.SOUTH,*/sideView); // Scroll);
13001482 XYZPanel.addComponent(/*BorderLayout.CENTER,*/frontView); // Scroll);
13011483 XYZPanel.addComponent(/*BorderLayout.NORTH,*/topView); // Scroll);
1484
+ //XYZPanel.setName("XYZ");
13021485
13031486 /*
13041487 gridPanel = new JPanel(); //new BorderLayout());
....@@ -1336,12 +1519,23 @@
13361519 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
13371520 //tmp.setName("Edit");
13381521 objectPanel.add(materialPanel);
1522
+ objectPanel.setIconAt(0, GetIcon("icons/material.png"));
13391523 // JPanel north = new JPanel(new BorderLayout());
13401524 // north.setName("Edit");
13411525 // north.add(ctrlPanel, BorderLayout.NORTH);
13421526 // objectPanel.add(north);
1343
- objectPanel.add(ctrlPanel);
1344
- objectPanel.add(infoPanel);
1527
+ objectPanel.add(editPanel);
1528
+ objectPanel.setIconAt(1, GetIcon("icons/write.png"));
1529
+
1530
+ //if (Globals.ADVANCED)
1531
+ objectPanel.add(infoPanel);
1532
+ objectPanel.setIconAt(2, GetIcon("icons/info.png"));
1533
+
1534
+ objectPanel.add(XYZPanel);
1535
+ objectPanel.setIconAt(3, GetIcon("icons/XYZ.png"));
1536
+
1537
+ objectPanel.add(toolboxPanel);
1538
+ objectPanel.setIconAt(4, GetIcon("icons/primitives.png"));
13451539
13461540 /*
13471541 aConstraints.gridx = 0;
....@@ -1350,7 +1544,7 @@
13501544 aConstraints.gridy += 1;
13511545 aConstraints.gridwidth = 1;
13521546 mainPanel.add(objectPanel, aConstraints);
1353
- */
1547
+ */
13541548
13551549 scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS,
13561550 VERTICAL_SCROLLBAR_AS_NEEDED,
....@@ -1362,14 +1556,12 @@
13621556 scrollpane.addMouseWheelListener(this); // Default not fast enough
13631557
13641558 /*JTabbedPane*/ scenePanel = new cGridBag();
1365
- scenePanel.preferredWidth = 6;
1559
+ scenePanel.preferredWidth = 5;
13661560
13671561 JTabbedPane tabbedPane = new JTabbedPane();
13681562 tabbedPane.add(scrollpane);
13691563
1370
- tabbedPane.add(FSPane = new cFileSystemPane(this));
1371
-
1372
- optionsPanel = new cGridBag().setVertical(true);
1564
+ optionsPanel = new cGridBag().setVertical(false);
13731565
13741566 optionsPanel.setName("Options");
13751567
....@@ -1377,6 +1569,8 @@
13771569
13781570 tabbedPane.add(optionsPanel);
13791571
1572
+ tabbedPane.add(FSPane = new cFileSystemPane(this));
1573
+
13801574 scenePanel.add(tabbedPane);
13811575
13821576 /*
....@@ -1440,7 +1634,7 @@
14401634 bigThree = new cGridBag();
14411635 bigThree.addComponent(scenePanel);
14421636 bigThree.addComponent(centralPanel);
1443
- bigThree.addComponent(XYZPanel);
1637
+ //bigThree.addComponent(XYZPanel);
14441638
14451639 // // SIDE EFFECT!!!
14461640 // aConstraints.gridx = 0;
....@@ -1449,9 +1643,9 @@
14491643 // aConstraints.gridheight = 1;
14501644
14511645 framePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, toolbarPanel, bigThree);
1452
- framePanel.setContinuousLayout(true);
1453
- framePanel.setOneTouchExpandable(true);
1454
- framePanel.setDividerLocation(0.8);
1646
+ framePanel.setContinuousLayout(false);
1647
+ framePanel.setOneTouchExpandable(false);
1648
+ //.setDividerLocation(0.8);
14551649 //framePanel.setDividerSize(15);
14561650 //framePanel.setResizeWeight(0.15);
14571651 framePanel.setName("Frame");
....@@ -1469,11 +1663,14 @@
14691663 // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc);
14701664
14711665 frame.setSize(1280, 860);
1472
- frame.setVisible(true);
1473
-
1666
+
14741667 cameraView.requestFocusInWindow();
14751668
14761669 gridPanel.setDividerLocation(1.0);
1670
+
1671
+ frame.validate();
1672
+
1673
+ frame.setVisible(true);
14771674
14781675 frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
14791676 frame.addWindowListener(new WindowAdapter()
....@@ -1560,24 +1757,6 @@
15601757 texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
15611758 colorSection.add(texture);
15621759
1563
- cGridBag anisoU = new cGridBag();
1564
- anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);
1565
- anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1566
- anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1567
- colorSection.add(anisoU);
1568
-
1569
- cGridBag anisoV = new cGridBag();
1570
- anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);
1571
- anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1572
- anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1573
- colorSection.add(anisoV);
1574
-
1575
- cGridBag shadowbias = new cGridBag();
1576
- shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);
1577
- shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1578
- shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1579
- colorSection.add(shadowbias);
1580
-
15811760 panel.add(new JSeparator());
15821761
15831762 panel.add(colorSection);
....@@ -1627,6 +1806,12 @@
16271806 fakedepthLabel.setHorizontalAlignment(SwingConstants.TRAILING);
16281807 fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
16291808 diffuseSection.add(fakedepth);
1809
+
1810
+ cGridBag shadowbias = new cGridBag();
1811
+ shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);
1812
+ shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1813
+ shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1814
+ diffuseSection.add(shadowbias);
16301815
16311816 panel.add(new JSeparator());
16321817
....@@ -1678,6 +1863,18 @@
16781863 // aConstraints.gridy += 1;
16791864 // aConstraints.gridwidth = 1;
16801865
1866
+ cGridBag anisoU = new cGridBag();
1867
+ anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);
1868
+ anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1869
+ anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1870
+ specularSection.add(anisoU);
1871
+
1872
+ cGridBag anisoV = new cGridBag();
1873
+ anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);
1874
+ anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1875
+ anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1876
+ specularSection.add(anisoV);
1877
+
16811878
16821879 panel.add(new JSeparator());
16831880
....@@ -1685,35 +1882,35 @@
16851882
16861883 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16871884
1688
- cGridBag globalSection = new cGridBag().setVertical(true);
1885
+ //cGridBag globalSection = new cGridBag().setVertical(true);
16891886
16901887 cGridBag camera = new cGridBag();
16911888 camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints);
16921889 cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
16931890 camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1694
- globalSection.add(camera);
1891
+ colorSection.add(camera);
16951892
16961893 cGridBag ambient = new cGridBag();
16971894 ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints);
16981895 ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
16991896 ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1700
- globalSection.add(ambient);
1897
+ colorSection.add(ambient);
17011898
17021899 cGridBag backlit = new cGridBag();
17031900 backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints);
17041901 backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
17051902 backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1706
- globalSection.add(backlit);
1903
+ colorSection.add(backlit);
17071904
17081905 cGridBag opacity = new cGridBag();
17091906 opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints);
17101907 opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
17111908 opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1712
- globalSection.add(opacity);
1909
+ colorSection.add(opacity);
17131910
1714
- panel.add(new JSeparator());
1911
+ //panel.add(new JSeparator());
17151912
1716
- panel.add(globalSection);
1913
+ //panel.add(globalSection);
17171914
17181915 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
17191916
....@@ -1820,8 +2017,9 @@
18202017 // 3D models
18212018 if (filename.endsWith(".3ds") || filename.endsWith(".3DS"))
18222019 {
1823
- lastConverter = new com.jmex.model.converters.MaxToJme();
1824
- LoadFile(filename, lastConverter);
2020
+ //lastConverter = new com.jmex.model.converters.MaxToJme();
2021
+ //LoadFile(filename, lastConverter);
2022
+ LoadObjFile(filename); // New 3ds loader
18252023 continue;
18262024 }
18272025 if (filename.endsWith(".dae") || filename.endsWith(".DAE"))
....@@ -2547,6 +2745,7 @@
25472745 LA.matXRotate(((Object3D) group.get(group.size() - 1)).toParent, -Math.PI / 2);
25482746 LA.matXRotate(((Object3D) group.get(group.size() - 1)).fromParent, Math.PI / 2);
25492747 }
2748
+
25502749 //cJME.count++;
25512750 //cJME.count %= 12;
25522751 if (gc)
....@@ -2730,6 +2929,7 @@
27302929 }
27312930 }
27322931 }
2932
+
27332933 cFileSystemPane FSPane;
27342934
27352935 void SetMaterial(cMaterial mat, Object3D.cVector2[] others)
....@@ -2783,11 +2983,14 @@
27832983 }
27842984 }
27852985 }
2986
+
27862987 freezematerial = false;
27872988 }
27882989
27892990 void SetMaterial(Object3D object)
27902991 {
2992
+ latestObject = object;
2993
+
27912994 cMaterial mat = object.material;
27922995
27932996 if (mat == null)
....@@ -2899,12 +3102,17 @@
28993102 // }
29003103
29013104 /**/
2902
- if (deselect)
3105
+ if (deselect || child == null)
29033106 {
29043107 //group.deselectAll();
29053108 //freeze = true;
29063109 GetTree().clearSelection();
29073110 //freeze = false;
3111
+
3112
+ if (child == null)
3113
+ {
3114
+ return;
3115
+ }
29083116 }
29093117
29103118 //group.addSelectee(child);
....@@ -2973,7 +3181,7 @@
29733181 cameraView.ToggleDL();
29743182 cameraView.repaint();
29753183 return;
2976
- } else if (event.getSource() == toggleTextureItem)
3184
+ } else if (event.getSource() == toggleTextureItem || event.getSource() == toggleTextureCB)
29773185 {
29783186 cameraView.ToggleTexture();
29793187 // june 2013 copy.HardTouch();
....@@ -3012,7 +3220,7 @@
30123220 frame.validate();
30133221
30143222 return;
3015
- } else if (event.getSource() == toggleSwitchItem)
3223
+ } else if (event.getSource() == toggleSwitchItem || event.getSource() == toggleSwitchCB)
30163224 {
30173225 cameraView.ToggleSwitch();
30183226 cameraView.repaint();
....@@ -3043,7 +3251,7 @@
30433251 {
30443252 copy.live ^= true;
30453253 return;
3046
- } else if (event.getSource() == selectCB)
3254
+ } else if (event.getSource() == selectableCB)
30473255 {
30483256 copy.dontselect ^= true;
30493257 return;
....@@ -3228,9 +3436,9 @@
32283436 {
32293437 Close();
32303438 //return true;
3231
- } else if (source == loadItem)
3439
+ } else if (source == openItem)
32323440 {
3233
- load();
3441
+ Open();
32343442 //return true;
32353443 } else if (source == newItem)
32363444 {
....@@ -3255,6 +3463,10 @@
32553463 {
32563464 generatePOV();
32573465 //return true;
3466
+ } else if (event.getSource() == archiveItem)
3467
+ {
3468
+ cTools.Archive(frame);
3469
+ return;
32583470 } else if (source == zBufferItem)
32593471 {
32603472 try
....@@ -3306,8 +3518,8 @@
33063518 try
33073519 {
33083520 ByteArrayOutputStream baos = new ByteArrayOutputStream();
3309
- java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos);
3310
- ObjectOutputStream out = new ObjectOutputStream(zstream);
3521
+// java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos);
3522
+ ObjectOutputStream out = new ObjectOutputStream(baos); //zstream);
33113523
33123524 Object3D parent = o.parent;
33133525 o.parent = null;
....@@ -3318,10 +3530,14 @@
33183530
33193531 out.flush();
33203532
3321
- zstream.close();
3533
+ baos //zstream
3534
+ .close();
33223535 out.close();
33233536
3324
- return baos.toByteArray();
3537
+ byte[] bytes = baos.toByteArray();
3538
+
3539
+ System.out.println("save #bytes = " + bytes.length);
3540
+ return bytes;
33253541 } catch (Exception e)
33263542 {
33273543 System.err.println(e);
....@@ -3331,13 +3547,16 @@
33313547
33323548 static public Object Uncompress(byte[] bytes)
33333549 {
3334
- System.out.println("#bytes = " + bytes.length);
3550
+ System.out.println("restore #bytes = " + bytes.length);
33353551 try
33363552 {
33373553 ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
3338
- java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais);
3339
- ObjectInputStream in = new ObjectInputStream(istream);
3554
+ //java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais);
3555
+ ObjectInputStream in = new ObjectInputStream(bais); // istream);
33403556 Object obj = in.readObject();
3557
+
3558
+ bais //istream
3559
+ .close();
33413560 in.close();
33423561
33433562 return obj;
....@@ -3392,37 +3611,77 @@
33923611 return null;
33933612 }
33943613
3395
- java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>();
33963614
33973615 public void Save()
33983616 {
3617
+ //Save(true);
3618
+ Replace();
3619
+ }
3620
+
3621
+ private boolean Equal(byte[] compress, byte[] name)
3622
+ {
3623
+ if (compress.length != name.length)
3624
+ {
3625
+ return false;
3626
+ }
3627
+
3628
+ for (int i=compress.length; --i>=0;)
3629
+ {
3630
+ if (compress[i] != name[i])
3631
+ return false;
3632
+ }
3633
+
3634
+ return true;
3635
+ }
3636
+
3637
+ java.util.Hashtable<java.util.UUID, Object3D> versiontable = new java.util.Hashtable<java.util.UUID, Object3D>();
3638
+
3639
+ public boolean Save(boolean user)
3640
+ {
3641
+ System.err.println("Save");
3642
+
33993643 cRadio tab = GetCurrentTab();
34003644
3401
- boolean temp = CameraPane.SWITCH;
3402
- CameraPane.SWITCH = false;
3645
+ byte[] compress = CompressCopy();
34033646
3404
- copy.ExtractBigData(hashtable);
3647
+ boolean thesame = false;
3648
+
3649
+ // Quick heuristic using length. Works only when stream is compressed.
3650
+ if (copy.versionindex > 0 && copy.versions[copy.versionindex-1] != null && Equal(compress, copy.versions[copy.versionindex-1]))
3651
+ {
3652
+ thesame = true;
3653
+ }
34053654
34063655 //EditorFrame.m_MainFrame.requestFocusInWindow();
3407
- tab.graphs[tab.undoindex++] = Compress(copy);
3408
-
3409
- copy.RestoreBigData(hashtable);
3410
-
3411
- CameraPane.SWITCH = temp;
3412
-
3413
- //assert(hashtable.isEmpty());
3414
-
3415
- for (int i = tab.undoindex; i < tab.graphs.length; i++)
3656
+ if (!thesame)
34163657 {
3417
- tab.graphs[i] = null;
3658
+ //tab.user[tab.versionindex] = user;
3659
+ //boolean increment = true; // tab.graphs[tab.versionindex] == null;
3660
+
3661
+ copy.versions[++copy.versionindex] = compress;
3662
+
3663
+ // if (increment)
3664
+ // tab.versionindex++;
34183665 }
34193666
3667
+ //copy.RestoreBigData(versiontable);
3668
+
3669
+ //assert(hashtable.isEmpty());
3670
+
3671
+ for (int i = copy.versionindex+1; i < copy.versions.length; i++)
3672
+ {
3673
+ //tab.user[i] = false;
3674
+ copy.versions[i] = null;
3675
+ }
3676
+
3677
+ SetUndoStates();
3678
+
34203679 // test save
34213680 if (false)
34223681 {
34233682 try
34243683 {
3425
- FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex);
3684
+ FileOutputStream ostream = new FileOutputStream("save" + copy.versionindex);
34263685 ObjectOutputStream p = new ObjectOutputStream(ostream);
34273686
34283687 p.writeObject(copy);
....@@ -3435,14 +3694,18 @@
34353694 e.printStackTrace();
34363695 }
34373696 }
3697
+
3698
+ return !thesame;
34383699 }
34393700
34403701 void CopyChanged(Object3D obj)
34413702 {
3703
+ SetUndoStates();
3704
+
34423705 boolean temp = CameraPane.SWITCH;
34433706 CameraPane.SWITCH = false;
34443707
3445
- copy.ExtractBigData(hashtable);
3708
+ copy.ExtractBigData(versiontable);
34463709
34473710 copy.clear();
34483711
....@@ -3451,7 +3714,7 @@
34513714 copy.add(obj.get(i));
34523715 }
34533716
3454
- copy.RestoreBigData(hashtable);
3717
+ copy.RestoreBigData(versiontable);
34553718
34563719 CameraPane.SWITCH = temp;
34573720
....@@ -3478,40 +3741,130 @@
34783741 refreshContents();
34793742 }
34803743
3481
- public void Undo()
3744
+ cButton undoButton;
3745
+ cButton restoreButton;
3746
+ cButton replaceButton;
3747
+ cButton redoButton;
3748
+
3749
+ boolean muteSlider;
3750
+
3751
+ int VersionCount()
3752
+ {
3753
+ int count = 0;
3754
+
3755
+ for (int i = copy.versions.length; --i >= 0;)
3756
+ {
3757
+ if (copy.versions[i] != null)
3758
+ count++;
3759
+ }
3760
+
3761
+ return count;
3762
+ }
3763
+
3764
+ void SetUndoStates()
34823765 {
34833766 cRadio tab = GetCurrentTab();
34843767
3485
- if (tab.undoindex == 0)
3768
+ restoreButton.setEnabled(copy.versionindex != -1);
3769
+ replaceButton.setEnabled(copy.versionindex != -1);
3770
+
3771
+ undoButton.setEnabled(copy.versionindex > 0);
3772
+ redoButton.setEnabled(copy.versions[copy.versionindex + 1] != null);
3773
+
3774
+ muteSlider = true;
3775
+ versionSlider.setMaximum(VersionCount() - 1);
3776
+ versionSlider.setInteger(copy.versionindex);
3777
+ muteSlider = false;
3778
+ }
3779
+
3780
+ public boolean Undo()
3781
+ {
3782
+ // Option?
3783
+ Replace();
3784
+
3785
+ System.err.println("Undo");
3786
+
3787
+ cRadio tab = GetCurrentTab();
3788
+
3789
+ if (copy.versionindex == 0)
34863790 {
34873791 java.awt.Toolkit.getDefaultToolkit().beep();
3488
- return;
3792
+ return false;
34893793 }
34903794
3491
- if (tab.graphs[tab.undoindex] == null)
3795
+// if (tab.graphs[tab.versionindex] == null) // || !tab.user[tab.versionindex])
3796
+// {
3797
+// if (Save(false))
3798
+// tab.versionindex -= 1;
3799
+// else
3800
+// {
3801
+// if (tab.versionindex <= 0)
3802
+// return false;
3803
+// else
3804
+// tab.versionindex -= 1;
3805
+// }
3806
+// }
3807
+
3808
+ copy.versionindex -= 1;
3809
+
3810
+ CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex]));
3811
+
3812
+ return true;
3813
+ }
3814
+
3815
+ public boolean Restore()
3816
+ {
3817
+ System.err.println("Restore");
3818
+
3819
+ cRadio tab = GetCurrentTab();
3820
+
3821
+ if (copy.versionindex == -1 || copy.versions[copy.versionindex] == null)
34923822 {
3493
- Save();
3494
- tab.undoindex -= 1;
3823
+ java.awt.Toolkit.getDefaultToolkit().beep();
3824
+ return false;
34953825 }
34963826
3497
- tab.undoindex -= 1;
3827
+ CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex]));
3828
+
3829
+ return true;
3830
+ }
34983831
3499
- CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
3832
+ public boolean Replace()
3833
+ {
3834
+ System.err.println("Replace");
3835
+
3836
+ cRadio tab = GetCurrentTab();
3837
+
3838
+ if (copy.versionindex == -1 || copy.versions[copy.versionindex] == null)
3839
+ {
3840
+ // No version yet. OK. java.awt.Toolkit.getDefaultToolkit().beep();
3841
+ return false;
3842
+ }
3843
+
3844
+ copy.versions[copy.versionindex] = CompressCopy();
3845
+
3846
+ return true;
35003847 }
35013848
35023849 public void Redo()
35033850 {
3851
+ // Option?
3852
+ Replace();
3853
+
35043854 cRadio tab = GetCurrentTab();
35053855
3506
- if (tab.graphs[tab.undoindex + 1] == null)
3856
+ if (copy.versions[copy.versionindex + 1] == null)
35073857 {
35083858 java.awt.Toolkit.getDefaultToolkit().beep();
35093859 return;
35103860 }
35113861
3512
- tab.undoindex += 1;
3862
+ copy.versionindex += 1;
35133863
3514
- CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
3864
+ CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex]));
3865
+
3866
+ //if (!tab.user[tab.versionindex])
3867
+ // tab.graphs[tab.versionindex] = null;
35153868 }
35163869
35173870 void ImportGFD()
....@@ -3663,7 +4016,7 @@
36634016 assert false;
36644017 }
36654018
3666
- void EditSelection()
4019
+ void EditSelection(boolean newWindow)
36674020 {
36684021 }
36694022
....@@ -3807,9 +4160,25 @@
38074160 //copy.Touch();
38084161 }
38094162
4163
+ cNumberSlider versionSlider;
4164
+
38104165 public void stateChanged(ChangeEvent e)
38114166 {
38124167 // assert(false);
4168
+ if (e.getSource() == versionSlider)
4169
+ {
4170
+ if (muteSlider)
4171
+ return;
4172
+
4173
+ int version = versionSlider.getInteger();
4174
+
4175
+ if (copy.versions[version] != null)
4176
+ {
4177
+ CopyChanged((Object3D)Uncompress(copy.versions[copy.versionindex = version]));
4178
+ }
4179
+
4180
+ return;
4181
+ }
38134182
38144183 if (freezematerial)
38154184 {
....@@ -4158,7 +4527,8 @@
41584527
41594528 void makeSomething(Object3D thing, boolean resetmodel) // deselect)
41604529 {
4161
- Save();
4530
+ if (Globals.REPLACEONMAKE) // && resetmodel)
4531
+ Save();
41624532 //Tween.set(thing, 0).target(1).start(tweenManager);
41634533 //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager);
41644534 // if (thing instanceof GenericJointDemo)
....@@ -4245,6 +4615,12 @@
42454615 {
42464616 ResetModel();
42474617 Select(thing.GetTreePath(), true, false); // unselect... false);
4618
+
4619
+ if (thing.Size() == 0)
4620
+ {
4621
+ //EditSelection(false);
4622
+ }
4623
+
42484624 refreshContents();
42494625 }
42504626
....@@ -4393,7 +4769,7 @@
43934769 readobj.ResetDisplayList();
43944770 } catch (Exception e)
43954771 {
4396
- //e.printStackTrace();
4772
+ e.printStackTrace();
43974773 try
43984774 {
43994775 java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
....@@ -4467,7 +4843,8 @@
44674843
44684844 if (readobj != null)
44694845 {
4470
- Save();
4846
+ //if (Globals.SAVEONMAKE) // A new object cannot share meshes
4847
+ // Save();
44714848 try
44724849 {
44734850 //readobj.deepCopySelf(copy);
....@@ -4522,13 +4899,24 @@
45224899 c.addChild(csg);
45234900 }
45244901
4902
+ copy.versions = readobj.versions;
4903
+ copy.versionindex = readobj.versionindex;
4904
+
4905
+ if (copy.versions == null)
4906
+ {
4907
+ copy.versions = new byte[100][];
4908
+ copy.versionindex = -1;
4909
+ }
4910
+
4911
+ //? SetUndoStates();
4912
+
45254913 ResetModel();
45264914 copy.HardTouch(); // recompile?
45274915 refreshContents();
45284916 }
45294917 }
45304918
4531
- void load() // throws ClassNotFoundException
4919
+ void Open() // throws ClassNotFoundException
45324920 {
45334921 if (Grafreed.standAlone)
45344922 {
....@@ -4645,6 +5033,8 @@
46455033 String filename = browser.getFile();
46465034 if (filename != null && filename.length() > 0)
46475035 {
5036
+ if (!filename.endsWith(".gfd"))
5037
+ filename += ".gfd";
46485038 lastname = browser.getDirectory() + filename;
46495039 save();
46505040 }
....@@ -4811,7 +5201,7 @@
48115201 MenuBar menuBar;
48125202 Menu fileMenu;
48135203 MenuItem newItem;
4814
- MenuItem loadItem;
5204
+ MenuItem openItem;
48155205 MenuItem saveItem;
48165206 MenuItem saveAsItem;
48175207 MenuItem exportAsItem;
....@@ -4834,22 +5224,36 @@
48345224 CheckboxMenuItem toggleSwitchItem;
48355225 CheckboxMenuItem toggleRootItem;
48365226 CheckboxMenuItem animationItem;
5227
+ MenuItem archiveItem;
48375228 CheckboxMenuItem toggleHandleItem;
48385229 CheckboxMenuItem togglePaintItem;
48395230 JSplitPane mainPanel;
48405231 JScrollPane scrollpane;
5232
+
48415233 JPanel toolbarPanel;
5234
+
48425235 cGridBag treePanel;
5236
+
48435237 JPanel radioPanel;
48445238 ButtonGroup buttonGroup;
4845
- cGridBag ctrlPanel;
5239
+
5240
+ cGridBag toolboxPanel;
48465241 cGridBag materialPanel;
5242
+ cGridBag ctrlPanel;
5243
+
48475244 JScrollPane infoPanel;
5245
+
48485246 cGridBag optionsPanel;
5247
+
48495248 JTabbedPane objectPanel;
5249
+ boolean materialFlushed;
5250
+ Object3D latestObject;
5251
+
48505252 cGridBag XYZPanel;
5253
+
48515254 JSplitPane gridPanel;
48525255 JSplitPane bigPanel;
5256
+
48535257 cGridBag bigThree;
48545258 cGridBag scenePanel;
48555259 cGridBag centralPanel;
....@@ -4964,7 +5368,7 @@
49645368 cNumberSlider fogField;
49655369 JLabel opacityPowerLabel;
49665370 cNumberSlider opacityPowerField;
4967
- JTree jTree;
5371
+ cTree jTree;
49685372 //ObjectUI parent;
49695373
49705374 cNumberSlider normalpushField;