Normand Briere
2019-07-07 46dbce888e7c3eff8969f1ddbe22e144410b67f4
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
....@@ -35,6 +39,67 @@
3539
3640 GroupEditor callee;
3741 JFrame frame;
42
+
43
+ static ObjEditor theFrame;
44
+
45
+ cButton GetButton(String name, boolean border)
46
+ {
47
+ try
48
+ {
49
+ ImageIcon icon = GetIcon(name);
50
+ return new cButton(icon, border);
51
+ }
52
+ catch (Exception e)
53
+ {
54
+ return new cButton(name, border);
55
+ }
56
+ }
57
+
58
+ cToggleButton GetToggleButton(String name, boolean border)
59
+ {
60
+ try
61
+ {
62
+ ImageIcon icon = GetIcon(name);
63
+ return new cToggleButton(icon, border);
64
+ }
65
+ catch (Exception e)
66
+ {
67
+ return new cToggleButton(name, border);
68
+ }
69
+ }
70
+
71
+ cCheckBox GetCheckBox(String name, boolean border)
72
+ {
73
+ try
74
+ {
75
+ ImageIcon icon = GetIcon(name);
76
+ return new cCheckBox(icon, border);
77
+ }
78
+ catch (Exception e)
79
+ {
80
+ return new cCheckBox(name, border);
81
+ }
82
+ }
83
+
84
+ private ImageIcon GetIcon(String name) throws IOException
85
+ {
86
+ BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name));
87
+
88
+ if (image.getWidth() != 24 && image.getHeight() != 24)
89
+ {
90
+ BufferedImage resized = new BufferedImage(24, 24, image.getType());
91
+ Graphics2D g = resized.createGraphics();
92
+ g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
93
+ //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
94
+ g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null);
95
+ g.dispose();
96
+
97
+ image = resized;
98
+ }
99
+
100
+ javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image);
101
+ return icon;
102
+ }
38103
39104 // SCRIPT
40105
....@@ -145,7 +210,7 @@
145210
146211 objEditor.ctrlPanel.remove(namePanel);
147212
148
- if (!GroupEditor.allparams)
213
+ if (!allparams)
149214 return;
150215
151216 // objEditor.ctrlPanel.remove(liveCB);
....@@ -168,7 +233,8 @@
168233 // objEditor.ctrlPanel.remove(remarkButton);
169234
170235 objEditor.ctrlPanel.remove(setupPanel);
171
- objEditor.ctrlPanel.remove(commandsPanel);
236
+ objEditor.ctrlPanel.remove(setupPanel2);
237
+ objEditor.ctrlPanel.remove(objectCommandsPanel);
172238 objEditor.ctrlPanel.remove(pushPanel);
173239 //objEditor.ctrlPanel.remove(fillPanel);
174240
....@@ -243,6 +309,7 @@
243309 //localCopy.parent = null;
244310
245311 frame = new JFrame();
312
+ frame.setUndecorated(false);
246313 objEditor = this;
247314 this.callee = callee;
248315
....@@ -273,28 +340,49 @@
273340 return frame.action(event, obj);
274341 }
275342
343
+ // Cannot work without static
344
+ static boolean allparams = true;
345
+
346
+ static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>();
347
+
276348 void SetupMenu()
277349 {
278350 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..."));
351
+ menuBar.add(fileMenu = new Menu("File"));
352
+ fileMenu.add(newItem = new MenuItem("New"));
353
+ fileMenu.add(openItem = new MenuItem("Open..."));
354
+
355
+ //oe.menuBar.add(menu = new Menu("Include"));
356
+ Menu menu = new Menu("Import");
357
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
358
+ importOBJItem.addActionListener(this);
359
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
360
+ import3DSItem.addActionListener(this);
361
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
362
+ importVRMLX3DItem.addActionListener(this);
363
+ menu.add("-");
364
+ importGFDItem = menu.add(new MenuItem("Grafreed file..."));
365
+ importGFDItem.addActionListener(this);
366
+ fileMenu.add(menu);
367
+ fileMenu.add("-");
368
+
369
+ fileMenu.add(saveItem = new MenuItem("Save"));
370
+ fileMenu.add(saveAsItem = new MenuItem("Save As..."));
284371 //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("-");
372
+ fileMenu.add("-");
373
+ fileMenu.add(exportAsItem = new MenuItem("Export Selection..."));
374
+ fileMenu.add(reexportItem = new MenuItem("Re-export"));
375
+ fileMenu.add("-");
289376 if (client.parent != null)
290377 {
291
- windowMenu.add(closeItem = new MenuItem("Close"));
378
+ fileMenu.add(closeItem = new MenuItem("Close"));
292379 } else
293380 {
294
- windowMenu.add(closeItem = new MenuItem("Exit"));
381
+ fileMenu.add(closeItem = new MenuItem("Exit"));
295382 }
296383
297
- loadItem.addActionListener(this);
384
+ newItem.addActionListener(this);
385
+ openItem.addActionListener(this);
298386 saveItem.addActionListener(this);
299387 saveAsItem.addActionListener(this);
300388 exportAsItem.addActionListener(this);
....@@ -302,86 +390,53 @@
302390 //povItem.addActionListener(this);
303391 closeItem.addActionListener(this);
304392
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
- if (Globals.ADVANCED)
323
- {
324
- cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
325
- toggleLiveItem.addItemListener(this);
326
- toggleLiveItem.setState(Globals.isLIVE());
327
-
328
- cameraMenu.add(stepItem = new MenuItem("Step"));
329
- stepItem.addActionListener(this);
330
- // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
331
- // toggleDLItem.addItemListener(this);
332
- // toggleDLItem.setState(false);
333
-
334
- cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
335
- toggleRenderItem.addItemListener(this);
336
- toggleRenderItem.setState(!CameraPane.frozen);
337
-
338
- cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
339
- toggleDebugItem.addItemListener(this);
340
- toggleDebugItem.setState(CameraPane.DEBUG);
341
-
342
- cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
343
- toggleFrustumItem.addItemListener(this);
344
- toggleFrustumItem.setState(CameraPane.FRUSTUM);
345
-
346
- cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
347
- toggleFootContactItem.addItemListener(this);
348
- toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
349
-
350
- cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
351
- toggleTimelineItem.addItemListener(this);
352
- }
353
-
354
- cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
355
- toggleSwitchItem.addItemListener(this);
356
- toggleSwitchItem.setState(CameraPane.SWITCH);
357
-
358
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
359
- toggleHandleItem.addItemListener(this);
360
- toggleHandleItem.setState(CameraPane.HANDLES);
361
-
362
- cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
363
- togglePaintItem.addItemListener(this);
364
- togglePaintItem.setState(CameraPane.PAINTMODE);
365
-
366
-// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
367
-// toggleRootItem.addItemListener(this);
368
-// toggleRootItem.setState(false);
369
-// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
370
-// animationItem.addItemListener(this);
371
-// animationItem.setState(CameraPane.ANIMATION);
372
- cameraMenu.add("-");
373
- cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera"));
374
- editCameraItem.addActionListener(this);
375
-
376393 objectPanel = new JTabbedPane();
394
+
395
+ ChangeListener changeListener = new ChangeListener()
396
+ {
397
+ public void stateChanged(ChangeEvent changeEvent)
398
+ {
399
+// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed)
400
+// {
401
+// if (latestObject != null)
402
+// {
403
+// refreshContents(true);
404
+// SetMaterial(latestObject);
405
+// }
406
+//
407
+// materialFlushed = true;
408
+// }
409
+// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit"))
410
+// {
411
+// if (listUI.size() == 0)
412
+// EditSelection(false);
413
+// }
414
+
415
+ refreshContents(false); // To refresh Info tab
416
+ }
417
+ };
418
+ objectPanel.addChangeListener(changeListener);
419
+
377420 toolbarPanel = new JPanel();
378421 toolbarPanel.setName("Toolbar");
379422 treePanel = new cGridBag();
380423 treePanel.setName("Tree");
424
+
425
+ editPanel = new cGridBag().setVertical(true);
426
+ editPanel.setName("Edit");
427
+
381428 ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
382
- ctrlPanel.setName("Edit");
429
+
430
+ editCommandsPanel = new cGridBag();
431
+ editPanel.add(editCommandsPanel);
432
+ editPanel.add(ctrlPanel);
433
+
434
+ toolboxPanel = new cGridBag().setVertical(false);
435
+ toolboxPanel.setName("Toolbox");
436
+
383437 materialPanel = new cGridBag().setVertical(true);
384438 materialPanel.setName("Material");
439
+
385440 /*JTextPane*/
386441 infoarea = createTextPane();
387442 doc = infoarea.getStyledDocument();
....@@ -394,7 +449,7 @@
394449 // TEXTAREA infoarea.setLineWrap(true);
395450 // TEXTAREA infoarea.setWrapStyleWord(true);
396451 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED);
397
- infoPanel.setPreferredSize(new Dimension(50, 200));
452
+ infoPanel.setPreferredSize(new Dimension(1, 1));
398453 infoPanel.setName("Info");
399454 //infoPanel.setLayout(new BorderLayout());
400455 //infoPanel.add(createTextPane());
....@@ -406,7 +461,14 @@
406461 mainPanel.setDividerSize(9);
407462 mainPanel.setDividerLocation(0.5); //1.0);
408463 mainPanel.setResizeWeight(0.5);
409
-
464
+
465
+//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5));
466
+ BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider();
467
+ divider.setDividerSize(15);
468
+ divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!"));
469
+
470
+ mainPanel.setUI(new BasicSplitPaneUI());
471
+
410472 //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
411473 //mainPanel.setLayout(new GridBagLayout());
412474 toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
....@@ -474,10 +536,10 @@
474536 e.printStackTrace();
475537 }
476538
477
- String selection = infoarea.getText();
478
- java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection);
479
- java.awt.datatransfer.Clipboard clipboard =
480
- Toolkit.getDefaultToolkit().getSystemClipboard();
539
+// String selection = infoarea.getText();
540
+// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection);
541
+// java.awt.datatransfer.Clipboard clipboard =
542
+// Toolkit.getDefaultToolkit().getSystemClipboard();
481543 //clipboard.setContents(data, data);
482544 }
483545
....@@ -500,13 +562,13 @@
500562 //SendInfo("Name:", "bold");
501563 if (sel.GetTextures() != null || debug)
502564 {
503
- si.SendInfo(sel.toString(), "bold");
565
+ si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold");
504566 //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular");
505567 if (sel.Size() > 0)
506568 {
507569 si.SendInfo("#children = " + sel.Size(), "regular");
508570 }
509
- si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular");
571
+ si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular");
510572 if (debug)
511573 {
512574 try
....@@ -548,7 +610,7 @@
548610 }
549611 if (sel.support != null)
550612 {
551
- si.SendInfo(" support: " + sel.support, "regular");
613
+ si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular");
552614 }
553615 if (sel.scriptnode != null)
554616 {
....@@ -637,20 +699,121 @@
637699 }
638700 }
639701
702
+//static GraphicsDevice device = GraphicsEnvironment
703
+// .getLocalGraphicsEnvironment().getScreenDevices()[0];
704
+
705
+ Rectangle keeprect;
706
+ cRadio radio;
707
+
708
+cButton keepButton;
709
+ cButton twoButton; // Full 3D
710
+ cButton sixButton;
711
+ cButton threeButton;
712
+ cButton sevenButton;
713
+ cButton fourButton; // full panel
714
+ cButton oneButton; // full XYZ
715
+ //cButton currentLayout;
716
+
717
+ boolean maximized;
718
+
719
+ cButton fullscreenLayout;
720
+
721
+ void Minimize()
722
+ {
723
+ frame.setState(Frame.ICONIFIED);
724
+ frame.validate();
725
+ }
726
+
727
+// artifactURI=null, type=0, property=${file.reference.jfxrt.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@6767876f, broken=false, additional={}
728
+// artifactURI=null, type=0, property=${file.reference.mac-ui.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@16bdc817, broken=false, additional={}
729
+// artifactURI=null, type=0, property=${file.reference.classes.jar}, object=org.netbeans.modules.java.api.common.classpath.ClassPathSupport$RelativePath@9daa9c17, broken=false, additional={}
730
+ void Maximize()
731
+ {
732
+ if (CameraPane.FULLSCREEN)
733
+ {
734
+ ToggleFullScreen();
735
+ }
736
+
737
+ if (maximized)
738
+ {
739
+ frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height);
740
+ }
741
+ else
742
+ {
743
+ keeprect = frame.getBounds();
744
+// Rectangle rect = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds();
745
+// Dimension rect2 = frame.getToolkit().getScreenSize();
746
+// frame.setBounds(0, rect2.height - rect.height, rect.width, rect.height);
747
+// frame.setState(Frame.MAXIMIZED_BOTH);
748
+ frame.setBounds(frame.getGraphicsConfiguration().getBounds());
749
+ }
750
+
751
+ maximized ^= true;
752
+
753
+ frame.validate();
754
+ }
755
+
756
+ cButton minButton;
757
+ cButton maxButton;
758
+ cButton fullButton;
759
+
640760 void ToggleFullScreen()
641761 {
642
- if (CameraPane.FULLSCREEN)
762
+GraphicsDevice device = frame.getGraphicsConfiguration().getDevice();
763
+
764
+ cameraView.ToggleFullScreen();
765
+
766
+ if (!CameraPane.FULLSCREEN)
643767 {
644
- frame.getContentPane().remove(/*"Center",*/bigThree);
645
- framePanel.add(bigThree);
646
- frame.getContentPane().add(/*"Center",*/framePanel);
768
+ device.setFullScreenWindow(null);
769
+ frame.dispose();
770
+ frame.setUndecorated(false);
771
+ frame.validate();
772
+ frame.setVisible(true);
773
+
774
+ //frame.setVisible(false);
775
+// frame.removeNotify();
776
+// frame.setUndecorated(false);
777
+// frame.addNotify();
778
+ //frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height);
779
+
780
+// X frame.getContentPane().remove(/*"Center",*/bigThree);
781
+// X framePanel.add(bigThree);
782
+// X frame.getContentPane().add(/*"Center",*/framePanel);
783
+ framePanel.setDividerLocation(46);
784
+
785
+ //frame.setVisible(true);
786
+ radio.layout = keepButton;
787
+ //theFrame = null;
788
+ keepButton = null;
789
+ radio.layout.doClick();
790
+
647791 } else
648792 {
649
- frame.getContentPane().remove(/*"Center",*/framePanel);
650
- framePanel.remove(bigThree);
651
- frame.getContentPane().add(/*"Center",*/bigThree);
793
+ keepButton = radio.layout;
794
+ //keeprect = frame.getBounds();
795
+// frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width,
796
+// frame.getToolkit().getScreenSize().height);
797
+ //frame.setVisible(false);
798
+
799
+ frame.dispose();
800
+ frame.setUndecorated(true);
801
+ device.setFullScreenWindow(frame);
802
+ frame.validate();
803
+ frame.setVisible(true);
804
+// frame.removeNotify();
805
+// frame.setUndecorated(true);
806
+// frame.addNotify();
807
+// X frame.getContentPane().remove(/*"Center",*/framePanel);
808
+// X framePanel.remove(bigThree);
809
+// X frame.getContentPane().add(/*"Center",*/bigThree);
810
+ framePanel.setDividerLocation(0);
811
+
812
+ radio.layout = fullscreenLayout;
813
+ radio.layout.doClick();
814
+ //frame.setVisible(true);
652815 }
653
- cameraView.ToggleFullScreen();
816
+ frame.validate();
654817 }
655818
656819 private JTextPane createTextPane()
....@@ -751,7 +914,7 @@
751914 protected static ImageIcon createImageIcon(String path,
752915 String description)
753916 {
754
- java.net.URL imgURL = GrafreeD.class.getResource(path);
917
+ java.net.URL imgURL = Grafreed.class.getResource(path);
755918 if (imgURL != null)
756919 {
757920 return new ImageIcon(imgURL, description);
....@@ -783,6 +946,7 @@
783946 // NumberSlider vDivsField;
784947 // JCheckBox endcaps;
785948 JCheckBox liveCB;
949
+ JCheckBox selectCB;
786950 JCheckBox hideCB;
787951 JCheckBox link2masterCB;
788952 JCheckBox markCB;
....@@ -790,7 +954,12 @@
790954 JCheckBox speedupCB;
791955 JCheckBox rewindCB;
792956 JCheckBox flipVCB;
957
+
958
+ cCheckBox toggleTextureCB;
959
+ cCheckBox toggleSwitchCB;
960
+
793961 JComboBox texresMenu;
962
+
794963 JButton resetButton;
795964 JButton stepButton;
796965 JButton stepAllButton;
....@@ -799,9 +968,13 @@
799968 JButton fasterButton;
800969 JButton remarkButton;
801970
971
+ cGridBag editPanel;
972
+ cGridBag editCommandsPanel;
973
+
802974 cGridBag namePanel;
803975 cGridBag setupPanel;
804
- cGridBag commandsPanel;
976
+ cGridBag setupPanel2;
977
+ cGridBag objectCommandsPanel;
805978 cGridBag pushPanel;
806979 cGridBag fillPanel;
807980
....@@ -973,61 +1146,67 @@
9731146 namePanel = new cGridBag();
9741147
9751148 nameField = AddText(namePanel, copy.GetName());
976
- namePanel.add(nameField);
1149
+ namePanel.add(new JScrollPane(nameField, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER));
9771150 oe.ctrlPanel.add(namePanel);
9781151
9791152 oe.ctrlPanel.Return();
9801153
981
- if (!GroupEditor.allparams)
1154
+ if (!allparams)
9821155 return;
9831156
9841157 setupPanel = new cGridBag().setVertical(false);
9851158
9861159 liveCB = AddCheckBox(setupPanel, "Live", copy.live);
9871160 liveCB.setToolTipText("Animate object");
1161
+ selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
1162
+ selectCB.setToolTipText("Make object selectable");
1163
+// Return();
9881164 hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
9891165 hideCB.setToolTipText("Hide object");
990
-// Return();
9911166 markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
992
- markCB.setToolTipText("Set the animation target transform");
1167
+ markCB.setToolTipText("As animation target transform");
9931168
994
- rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind);
1169
+ setupPanel2 = new cGridBag().setVertical(false);
1170
+
1171
+ rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind);
9951172 rewindCB.setToolTipText("Rewind animation");
9961173
997
- randomCB = AddCheckBox(setupPanel, "Random", copy.random);
998
- randomCB.setToolTipText("Option for switch node");
1174
+ randomCB = AddCheckBox(setupPanel2, "Random", copy.random);
1175
+ randomCB.setToolTipText("Randomly Rewind (or Go back and forth)");
9991176
10001177 if (Globals.ADVANCED)
10011178 {
1002
- link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master);
1179
+ link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master);
10031180 link2masterCB.setToolTipText("Attach to support");
1004
- speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup);
1181
+ speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup);
10051182 speedupCB.setToolTipText("Option motion capture");
10061183 }
10071184
10081185 oe.ctrlPanel.add(setupPanel);
10091186 oe.ctrlPanel.Return();
1187
+ oe.ctrlPanel.add(setupPanel2);
1188
+ oe.ctrlPanel.Return();
10101189
1011
- commandsPanel = new cGridBag().setVertical(false);
1190
+ objectCommandsPanel = new cGridBag().setVertical(false);
10121191
1013
- resetButton = AddButton(commandsPanel, "Reset");
1192
+ resetButton = AddButton(objectCommandsPanel, "Reset");
10141193 resetButton.setToolTipText("Jump to frame zero");
1015
- stepButton = AddButton(commandsPanel, "Step");
1194
+ stepButton = AddButton(objectCommandsPanel, "Step");
10161195 stepButton.setToolTipText("Step one frame");
10171196 // resetAllButton = AddButton(oe, "Reset All");
10181197 // stepAllButton = AddButton(oe, "Step All");
10191198 // Return();
1020
- slowerButton = AddButton(commandsPanel, "Slow");
1199
+ slowerButton = AddButton(objectCommandsPanel, "Slow");
10211200 slowerButton.setToolTipText("Decrease animation speed");
1022
- fasterButton = AddButton(commandsPanel, "Fast");
1201
+ fasterButton = AddButton(objectCommandsPanel, "Fast");
10231202 fasterButton.setToolTipText("Increase animation speed");
1024
- remarkButton = AddButton(commandsPanel, "Remark");
1203
+ remarkButton = AddButton(objectCommandsPanel, "Remark");
10251204 remarkButton.setToolTipText("Set the current transform as the target");
10261205
1027
- oe.ctrlPanel.add(commandsPanel);
1206
+ oe.ctrlPanel.add(objectCommandsPanel);
10281207 oe.ctrlPanel.Return();
10291208
1030
- pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1);
1209
+ pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons
10311210 normalpushField = (cNumberSlider)pushPanel.getComponent(1);
10321211 //Return();
10331212
....@@ -1230,8 +1409,11 @@
12301409 //worldPanel.setName("World");
12311410 centralPanel = new cGridBag();
12321411 centralPanel.preferredWidth = 20;
1233
- timelinePanel = new JPanel(new BorderLayout());
1234
- timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel);
1412
+
1413
+ if (Globals.ADVANCED)
1414
+ {
1415
+ timelinePanel = new JPanel(new BorderLayout());
1416
+ timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel);
12351417
12361418 cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel);
12371419 cameraPanel.setContinuousLayout(true);
....@@ -1240,7 +1422,10 @@
12401422 // cameraPanel.setDividerSize(9);
12411423 cameraPanel.setResizeWeight(1.0);
12421424
1425
+ }
1426
+
12431427 centralPanel.add(cameraView);
1428
+ centralPanel.setFocusable(true);
12441429 //frame.setJMenuBar(timelineMenubar);
12451430 //centralPanel.add(timelinePanel);
12461431
....@@ -1307,8 +1492,12 @@
13071492 // north.setName("Edit");
13081493 // north.add(ctrlPanel, BorderLayout.NORTH);
13091494 // objectPanel.add(north);
1310
- objectPanel.add(ctrlPanel);
1311
- objectPanel.add(infoPanel);
1495
+ objectPanel.add(editPanel);
1496
+
1497
+ //if (Globals.ADVANCED)
1498
+ objectPanel.add(infoPanel);
1499
+
1500
+ objectPanel.add(toolboxPanel);
13121501
13131502 /*
13141503 aConstraints.gridx = 0;
....@@ -1317,7 +1506,7 @@
13171506 aConstraints.gridy += 1;
13181507 aConstraints.gridwidth = 1;
13191508 mainPanel.add(objectPanel, aConstraints);
1320
- */
1509
+ */
13211510
13221511 scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS,
13231512 VERTICAL_SCROLLBAR_AS_NEEDED,
....@@ -1329,14 +1518,12 @@
13291518 scrollpane.addMouseWheelListener(this); // Default not fast enough
13301519
13311520 /*JTabbedPane*/ scenePanel = new cGridBag();
1332
- scenePanel.preferredWidth = 7;
1521
+ scenePanel.preferredWidth = 6;
13331522
13341523 JTabbedPane tabbedPane = new JTabbedPane();
13351524 tabbedPane.add(scrollpane);
13361525
1337
- tabbedPane.add(FSPane = new cFileSystemPane(this));
1338
-
1339
- optionsPanel = new cGridBag().setVertical(true);
1526
+ optionsPanel = new cGridBag().setVertical(false);
13401527
13411528 optionsPanel.setName("Options");
13421529
....@@ -1344,6 +1531,8 @@
13441531
13451532 tabbedPane.add(optionsPanel);
13461533
1534
+ tabbedPane.add(FSPane = new cFileSystemPane(this));
1535
+
13471536 scenePanel.add(tabbedPane);
13481537
13491538 /*
....@@ -1416,9 +1605,9 @@
14161605 // aConstraints.gridheight = 1;
14171606
14181607 framePanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, toolbarPanel, bigThree);
1419
- framePanel.setContinuousLayout(true);
1420
- framePanel.setOneTouchExpandable(true);
1421
- framePanel.setDividerLocation(0.8);
1608
+ framePanel.setContinuousLayout(false);
1609
+ framePanel.setOneTouchExpandable(false);
1610
+ //.setDividerLocation(0.8);
14221611 //framePanel.setDividerSize(15);
14231612 //framePanel.setResizeWeight(0.15);
14241613 framePanel.setName("Frame");
....@@ -1435,10 +1624,15 @@
14351624
14361625 // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc);
14371626
1438
- frame.setSize(1024, 768);
1439
- frame.show();
1440
-
1627
+ frame.setSize(1280, 860);
1628
+
1629
+ cameraView.requestFocusInWindow();
1630
+
14411631 gridPanel.setDividerLocation(1.0);
1632
+
1633
+ frame.validate();
1634
+
1635
+ frame.setVisible(true);
14421636
14431637 frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
14441638 frame.addWindowListener(new WindowAdapter()
....@@ -1475,19 +1669,19 @@
14751669
14761670 cGridBag editBar = new cGridBag().setVertical(false);
14771671
1478
- editBar.add(createMaterialButton = new cButton("Create", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1672
+ editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints);
14791673 createMaterialButton.setToolTipText("Create material");
14801674
14811675 /*
14821676 ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints);
14831677 */
14841678
1485
- editBar.add(clearMaterialButton = new cButton("Clear", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1679
+ editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints);
14861680 clearMaterialButton.setToolTipText("Clear material");
14871681
14881682 if (Globals.ADVANCED)
14891683 {
1490
- editBar.add(resetSlidersButton = new cButton("Reset", !GrafreeD.NIMBUSLAF)); // , aConstraints);
1684
+ editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints);
14911685 editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
14921686 editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
14931687 }
....@@ -1524,24 +1718,6 @@
15241718 textureLabel.setHorizontalAlignment(SwingConstants.TRAILING);
15251719 texture.add(textureField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
15261720 colorSection.add(texture);
1527
-
1528
- cGridBag anisoU = new cGridBag();
1529
- anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);
1530
- anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1531
- anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1532
- colorSection.add(anisoU);
1533
-
1534
- cGridBag anisoV = new cGridBag();
1535
- anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);
1536
- anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1537
- anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1538
- colorSection.add(anisoV);
1539
-
1540
- cGridBag shadowbias = new cGridBag();
1541
- shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);
1542
- shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1543
- shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1544
- colorSection.add(shadowbias);
15451721
15461722 panel.add(new JSeparator());
15471723
....@@ -1593,6 +1769,12 @@
15931769 fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
15941770 diffuseSection.add(fakedepth);
15951771
1772
+ cGridBag shadowbias = new cGridBag();
1773
+ shadowbias.add(shadowbiasLabel = new JLabel("Shadowbias")); // , aConstraints);
1774
+ shadowbiasLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1775
+ shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1776
+ diffuseSection.add(shadowbias);
1777
+
15961778 panel.add(new JSeparator());
15971779
15981780 panel.add(diffuseSection);
....@@ -1643,6 +1825,18 @@
16431825 // aConstraints.gridy += 1;
16441826 // aConstraints.gridwidth = 1;
16451827
1828
+ cGridBag anisoU = new cGridBag();
1829
+ anisoU.add(anisoLabel = new JLabel("AnisoU")); // , aConstraints);
1830
+ anisoLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1831
+ anisoU.add(anisoField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1832
+ specularSection.add(anisoU);
1833
+
1834
+ cGridBag anisoV = new cGridBag();
1835
+ anisoV.add(anisoVLabel = new JLabel("AnisoV")); // , aConstraints);
1836
+ anisoVLabel.setHorizontalAlignment(SwingConstants.TRAILING);
1837
+ anisoV.add(anisoVField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1838
+ specularSection.add(anisoV);
1839
+
16461840
16471841 panel.add(new JSeparator());
16481842
....@@ -1650,35 +1844,35 @@
16501844
16511845 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16521846
1653
- cGridBag globalSection = new cGridBag().setVertical(true);
1847
+ //cGridBag globalSection = new cGridBag().setVertical(true);
16541848
16551849 cGridBag camera = new cGridBag();
16561850 camera.add(cameraLabel = new JLabel("GlobalLight")); // , aConstraints);
16571851 cameraLabel.setHorizontalAlignment(SwingConstants.TRAILING);
16581852 camera.add(cameraField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1659
- globalSection.add(camera);
1853
+ colorSection.add(camera);
16601854
16611855 cGridBag ambient = new cGridBag();
16621856 ambient.add(ambientLabel = new JLabel("Ambient")); // , aConstraints);
16631857 ambientLabel.setHorizontalAlignment(SwingConstants.TRAILING);
16641858 ambient.add(ambientField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1665
- globalSection.add(ambient);
1859
+ colorSection.add(ambient);
16661860
16671861 cGridBag backlit = new cGridBag();
16681862 backlit.add(backlitLabel = new JLabel("Backlit")); // , aConstraints);
16691863 backlitLabel.setHorizontalAlignment(SwingConstants.TRAILING);
16701864 backlit.add(backlitField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
1671
- globalSection.add(backlit);
1865
+ colorSection.add(backlit);
16721866
16731867 cGridBag opacity = new cGridBag();
16741868 opacity.add(opacityLabel = new JLabel("Opacity")); // , aConstraints);
16751869 opacityLabel.setHorizontalAlignment(SwingConstants.TRAILING);
16761870 opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
1677
- globalSection.add(opacity);
1871
+ colorSection.add(opacity);
16781872
1679
- panel.add(new JSeparator());
1873
+ //panel.add(new JSeparator());
16801874
1681
- panel.add(globalSection);
1875
+ //panel.add(globalSection);
16821876
16831877 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16841878
....@@ -1785,8 +1979,9 @@
17851979 // 3D models
17861980 if (filename.endsWith(".3ds") || filename.endsWith(".3DS"))
17871981 {
1788
- lastConverter = new com.jmex.model.converters.MaxToJme();
1789
- LoadFile(filename, lastConverter);
1982
+ //lastConverter = new com.jmex.model.converters.MaxToJme();
1983
+ //LoadFile(filename, lastConverter);
1984
+ LoadObjFile(filename); // New 3ds loader
17901985 continue;
17911986 }
17921987 if (filename.endsWith(".dae") || filename.endsWith(".DAE"))
....@@ -1938,7 +2133,7 @@
19382133
19392134 //? flashIt = false;
19402135 CameraPane pane = (CameraPane) cameraView;
1941
- pane.clickStart(location.x, location.y, 0);
2136
+ pane.clickStart(location.x, location.y, 0, 0);
19422137 pane.clickEnd(location.x, location.y, 0, true);
19432138
19442139 if (group.selection.size() == 1)
....@@ -1987,6 +2182,7 @@
19872182 e2.printStackTrace();
19882183 }
19892184 }
2185
+
19902186 LoadJMEThread loadThread;
19912187
19922188 class LoadJMEThread extends Thread
....@@ -2044,6 +2240,7 @@
20442240 //LoadFile0(filename, converter);
20452241 }
20462242 }
2243
+
20472244 LoadOBJThread loadObjThread;
20482245
20492246 class LoadOBJThread extends Thread
....@@ -2122,19 +2319,19 @@
21222319
21232320 void LoadObjFile(String fullname)
21242321 {
2125
- /*
2322
+ System.out.println("Loading " + fullname);
2323
+ /**/
21262324 //lastFilename = fullname;
21272325 if(loadObjThread == null)
21282326 {
2129
- loadObjThread = new LoadOBJThread();
2130
- loadObjThread.start();
2327
+ loadObjThread = new LoadOBJThread();
2328
+ loadObjThread.start();
21312329 }
21322330
21332331 loadObjThread.add(fullname);
2134
- */
2332
+ /**/
21352333
2136
- System.out.println("Loading " + fullname);
2137
- makeSomething(new FileObject(fullname, true), true);
2334
+ //makeSomething(new FileObject(fullname, true), true);
21382335 }
21392336
21402337 void LoadGFDFile(String fullname)
....@@ -2395,11 +2592,11 @@
23952592
23962593 void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName)
23972594 {
2398
- if (GrafreeD.standAlone)
2595
+ if (Grafreed.standAlone)
23992596 {
24002597 /**/
24012598 FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD);
2402
- browser.show();
2599
+ browser.setVisible(true);
24032600 String filename = browser.getFile();
24042601 if (filename != null && filename.length() > 0)
24052602 {
....@@ -2510,6 +2707,7 @@
25102707 LA.matXRotate(((Object3D) group.get(group.size() - 1)).toParent, -Math.PI / 2);
25112708 LA.matXRotate(((Object3D) group.get(group.size() - 1)).fromParent, Math.PI / 2);
25122709 }
2710
+
25132711 //cJME.count++;
25142712 //cJME.count %= 12;
25152713 if (gc)
....@@ -2693,6 +2891,7 @@
26932891 }
26942892 }
26952893 }
2894
+
26962895 cFileSystemPane FSPane;
26972896
26982897 void SetMaterial(cMaterial mat, Object3D.cVector2[] others)
....@@ -2746,11 +2945,14 @@
27462945 }
27472946 }
27482947 }
2948
+
27492949 freezematerial = false;
27502950 }
27512951
27522952 void SetMaterial(Object3D object)
27532953 {
2954
+ latestObject = object;
2955
+
27542956 cMaterial mat = object.material;
27552957
27562958 if (mat == null)
....@@ -2862,12 +3064,17 @@
28623064 // }
28633065
28643066 /**/
2865
- if (deselect)
3067
+ if (deselect || child == null)
28663068 {
28673069 //group.deselectAll();
28683070 //freeze = true;
28693071 GetTree().clearSelection();
28703072 //freeze = false;
3073
+
3074
+ if (child == null)
3075
+ {
3076
+ return;
3077
+ }
28713078 }
28723079
28733080 //group.addSelectee(child);
....@@ -2936,7 +3143,7 @@
29363143 cameraView.ToggleDL();
29373144 cameraView.repaint();
29383145 return;
2939
- } else if (event.getSource() == toggleTextureItem)
3146
+ } else if (event.getSource() == toggleTextureItem || event.getSource() == toggleTextureCB)
29403147 {
29413148 cameraView.ToggleTexture();
29423149 // june 2013 copy.HardTouch();
....@@ -2975,9 +3182,9 @@
29753182 frame.validate();
29763183
29773184 return;
2978
- } else if (event.getSource() == toggleSwitchItem)
3185
+ } else if (event.getSource() == toggleSwitchItem || event.getSource() == toggleSwitchCB)
29793186 {
2980
- cameraView.ToggleRandom();
3187
+ cameraView.ToggleSwitch();
29813188 cameraView.repaint();
29823189 return;
29833190 } else if (event.getSource() == toggleHandleItem)
....@@ -3005,6 +3212,10 @@
30053212 } else if (event.getSource() == liveCB)
30063213 {
30073214 copy.live ^= true;
3215
+ return;
3216
+ } else if (event.getSource() == selectCB)
3217
+ {
3218
+ copy.dontselect ^= true;
30083219 return;
30093220 } else if (event.getSource() == hideCB)
30103221 {
....@@ -3044,8 +3255,9 @@
30443255
30453256 public void actionPerformed(ActionEvent event)
30463257 {
3258
+ Object source = event.getSource();
30473259 // SCRIPT DIALOG
3048
- if (event.getSource() == okbutton)
3260
+ if (source == okbutton)
30493261 {
30503262 textpanel.setVisible(false);
30513263 textpanel.remove(textarea);
....@@ -3057,7 +3269,7 @@
30573269 textarea = null;
30583270 textpanel = null;
30593271 }
3060
- if (event.getSource() == cancelbutton)
3272
+ if (source == cancelbutton)
30613273 {
30623274 textpanel.setVisible(false);
30633275 textpanel.remove(textarea);
....@@ -3069,50 +3281,50 @@
30693281 //applySelf();
30703282 //client.refreshEditWindow();
30713283 //refreshContents();
3072
- if (event.getSource() == nameField)
3284
+ if (source == nameField)
30733285 {
30743286 //System.out.println("ObjEditor " + event);
30753287 applySelf0(true);
30763288 //parent.applySelf();
30773289 objEditor.refreshContents();
3078
- } else if (event.getSource() == resetButton)
3290
+ } else if (source == resetButton)
30793291 {
30803292 CameraPane.fullreset = true;
30813293 copy.Reset(); // ResetMeshes();
30823294 copy.Touch();
30833295 objEditor.refreshContents();
3084
- } else if (event.getSource() == stepItem)
3296
+ } else if (source == stepItem)
30853297 {
30863298 //cameraView.ONESTEP = true;
30873299 Globals.ONESTEP = true;
30883300 cameraView.repaint();
30893301 return;
3090
- } else if (event.getSource() == stepButton)
3302
+ } else if (source == stepButton)
30913303 {
30923304 copy.Step();
30933305 copy.Touch();
30943306 objEditor.refreshContents();
3095
- } else if (event.getSource() == slowerButton)
3307
+ } else if (source == slowerButton)
30963308 {
30973309 copy.Slower();
30983310 copy.Touch();
30993311 objEditor.refreshContents();
3100
- } else if (event.getSource() == fasterButton)
3312
+ } else if (source == fasterButton)
31013313 {
31023314 copy.Faster();
31033315 copy.Touch();
31043316 objEditor.refreshContents();
3105
- } else if (event.getSource() == remarkButton)
3317
+ } else if (source == remarkButton)
31063318 {
31073319 copy.Remark();
31083320 copy.Touch();
31093321 objEditor.refreshContents();
3110
- } else if (event.getSource() == stepAllButton)
3322
+ } else if (source == stepAllButton)
31113323 {
31123324 copy.StepAll();
31133325 copy.Touch();
31143326 objEditor.refreshContents();
3115
- } else if (event.getSource() == resetAllButton)
3327
+ } else if (source == resetAllButton)
31163328 {
31173329 //CameraPane.fullreset = true;
31183330 copy.ResetAll(); // ResetMeshes();
....@@ -3145,53 +3357,79 @@
31453357 // Close();
31463358 // }
31473359 // else
3148
- if (event.getSource() == resetSlidersButton)
3360
+ if (source == resetSlidersButton)
31493361 {
31503362 ResetSliders();
3151
- } else if (event.getSource() == clearMaterialButton)
3363
+ } else if (source == clearMaterialButton)
31523364 {
31533365 ClearMaterial();
3154
- } else if (event.getSource() == createMaterialButton)
3366
+ } else if (source == createMaterialButton)
31553367 {
31563368 CreateMaterial();
3157
- } else if (event.getSource() == clearPanelButton)
3369
+ } else if (source == clearPanelButton)
31583370 {
31593371 copy.ClearUI();
31603372 refreshContents(true);
3161
- } /*
3162
- }
3163
-
3164
- public boolean action(Event event, Object arg)
3165
- {
3166
- */ else if (event.getSource() == closeItem)
3373
+ } else if (source == importGFDItem)
3374
+ {
3375
+ ImportGFD();
3376
+ } else
3377
+ if (source == importVRMLX3DItem)
3378
+ {
3379
+ ImportVRMLX3D();
3380
+ } else
3381
+ if (source == import3DSItem)
3382
+ {
3383
+ objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
3384
+ } else
3385
+ if (source == importOBJItem)
3386
+ {
3387
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
3388
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
3389
+ browser.setVisible(true);
3390
+ String filename = browser.getFile();
3391
+ if (filename != null && filename.length() > 0)
3392
+ {
3393
+ String fullname = browser.getDirectory() + filename;
3394
+ makeSomething(ReadOBJ(fullname), true);
3395
+ }
3396
+ } else
3397
+ if (source == closeItem)
31673398 {
31683399 Close();
31693400 //return true;
3170
- } else if (event.getSource() == loadItem)
3401
+ } else if (source == openItem)
31713402 {
3172
- load();
3403
+ Open();
31733404 //return true;
3174
- } else if (event.getSource() == saveItem)
3405
+ } else if (source == newItem)
3406
+ {
3407
+ New();
3408
+ } else if (source == saveItem)
31753409 {
31763410 save();
31773411 //return true;
3178
- } else if (event.getSource() == saveAsItem)
3412
+ } else if (source == saveAsItem)
31793413 {
31803414 saveAs();
31813415 //return true;
3182
- } else if (event.getSource() == reexportItem)
3416
+ } else if (source == reexportItem)
31833417 {
31843418 reexport();
31853419 //return true;
3186
- } else if (event.getSource() == exportAsItem)
3420
+ } else if (source == exportAsItem)
31873421 {
31883422 export();
31893423 //return true;
3190
- } else if (event.getSource() == povItem)
3424
+ } else if (source == povItem)
31913425 {
31923426 generatePOV();
31933427 //return true;
3194
- } else if (event.getSource() == zBufferItem)
3428
+ } else if (event.getSource() == archiveItem)
3429
+ {
3430
+ cTools.Archive(frame);
3431
+ return;
3432
+ } else if (source == zBufferItem)
31953433 {
31963434 try
31973435 {
....@@ -3213,21 +3451,8 @@
32133451 cameraView.repaint();
32143452 //return true;
32153453 }
3216
- */ else if (event.getSource() == editCameraItem)
3217
- {
3218
- cameraView.ProtectCamera();
3219
- cameraView.repaint();
3220
- return;
3221
- } else if (event.getSource() == revertCameraItem)
3222
- {
3223
- cameraView.RevertCamera();
3224
- cameraView.repaint();
3225
- return;
3226
-// } else if (event.getSource() == textureButton)
3227
-// {
3228
-// return; // true;
3229
- } else // combos...
3230
- if (event.getSource() == texresMenu)
3454
+ */ else // combos...
3455
+ if (source == texresMenu)
32313456 {
32323457 System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex());
32333458 copy.texres = texresMenu.getSelectedIndex();
....@@ -3239,6 +3464,332 @@
32393464 }
32403465 }
32413466
3467
+ void New()
3468
+ {
3469
+ while (copy.Size() > 1)
3470
+ {
3471
+ copy.remove(1);
3472
+ }
3473
+
3474
+ ResetModel();
3475
+ objEditor.refreshContents();
3476
+ }
3477
+
3478
+ static public byte[] Compress(Object3D o)
3479
+ {
3480
+ try
3481
+ {
3482
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
3483
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos);
3484
+ ObjectOutputStream out = new ObjectOutputStream(zstream);
3485
+
3486
+ Object3D parent = o.parent;
3487
+ o.parent = null;
3488
+
3489
+ out.writeObject(o);
3490
+
3491
+ o.parent = parent;
3492
+
3493
+ out.flush();
3494
+
3495
+ zstream.close();
3496
+ out.close();
3497
+
3498
+ return baos.toByteArray();
3499
+ } catch (Exception e)
3500
+ {
3501
+ System.err.println(e);
3502
+ return null;
3503
+ }
3504
+ }
3505
+
3506
+ static public Object Uncompress(byte[] bytes)
3507
+ {
3508
+ System.out.println("#bytes = " + bytes.length);
3509
+ try
3510
+ {
3511
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
3512
+ java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais);
3513
+ ObjectInputStream in = new ObjectInputStream(istream);
3514
+ Object obj = in.readObject();
3515
+ in.close();
3516
+
3517
+ return obj;
3518
+ } catch (Exception e)
3519
+ {
3520
+ System.err.println(e);
3521
+ return null;
3522
+ }
3523
+ }
3524
+
3525
+ static public Object clone(Object o)
3526
+ {
3527
+ try
3528
+ {
3529
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
3530
+ ObjectOutputStream out = new ObjectOutputStream(baos);
3531
+
3532
+ out.writeObject(o);
3533
+
3534
+ out.flush();
3535
+ out.close();
3536
+
3537
+ byte[] bytes = baos.toByteArray();
3538
+
3539
+ System.out.println("clone = " + bytes.length);
3540
+
3541
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
3542
+ ObjectInputStream in = new ObjectInputStream(bais);
3543
+ Object obj = in.readObject();
3544
+ in.close();
3545
+
3546
+ return obj;
3547
+ } catch (Exception e)
3548
+ {
3549
+ System.err.println(e);
3550
+ return null;
3551
+ }
3552
+ }
3553
+
3554
+ cRadio GetCurrentTab()
3555
+ {
3556
+ cRadio ab;
3557
+ for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
3558
+ {
3559
+ ab = (cRadio)e.nextElement();
3560
+ if(ab.GetObject() == copy)
3561
+ {
3562
+ return ab;
3563
+ }
3564
+ }
3565
+
3566
+ return null;
3567
+ }
3568
+
3569
+ java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>();
3570
+
3571
+ public void Save()
3572
+ {
3573
+ // Default reduces the probability of heuristics errors.
3574
+ Save(true);
3575
+ }
3576
+
3577
+ private boolean Equal(byte[] compress, byte[] name)
3578
+ {
3579
+ if (compress.length != name.length)
3580
+ {
3581
+ return false;
3582
+ }
3583
+
3584
+ for (int i=compress.length; --i>=0;)
3585
+ {
3586
+ if (compress[i] != name[i])
3587
+ return false;
3588
+ }
3589
+
3590
+ return true;
3591
+ }
3592
+
3593
+ public boolean Save(boolean user)
3594
+ {
3595
+ System.err.println("Save");
3596
+
3597
+ cRadio tab = GetCurrentTab();
3598
+
3599
+ boolean temp = CameraPane.SWITCH;
3600
+ CameraPane.SWITCH = false;
3601
+
3602
+ copy.ExtractBigData(hashtable);
3603
+
3604
+ byte[] compress = Compress(copy);
3605
+
3606
+ CameraPane.SWITCH = temp;
3607
+
3608
+ boolean thesame = false;
3609
+
3610
+ // Quick heuristic using length. Works only when stream is compressed.
3611
+ if (tab.undoindex > 0 && tab.graphs[tab.undoindex-1] != null && Equal(compress, tab.graphs[tab.undoindex-1]))
3612
+ {
3613
+ thesame = true;
3614
+ }
3615
+
3616
+ //EditorFrame.m_MainFrame.requestFocusInWindow();
3617
+ if (!thesame)
3618
+ {
3619
+ tab.user[tab.undoindex] = user;
3620
+ tab.graphs[tab.undoindex++] = compress;
3621
+ }
3622
+
3623
+ copy.RestoreBigData(hashtable);
3624
+
3625
+ //assert(hashtable.isEmpty());
3626
+
3627
+ for (int i = tab.undoindex; i < tab.graphs.length; i++)
3628
+ {
3629
+ tab.user[i] = false;
3630
+ tab.graphs[i] = null;
3631
+ }
3632
+
3633
+ SetUndoStates();
3634
+
3635
+ // test save
3636
+ if (false)
3637
+ {
3638
+ try
3639
+ {
3640
+ FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex);
3641
+ ObjectOutputStream p = new ObjectOutputStream(ostream);
3642
+
3643
+ p.writeObject(copy);
3644
+
3645
+ p.flush();
3646
+
3647
+ ostream.close();
3648
+ } catch (Exception e)
3649
+ {
3650
+ e.printStackTrace();
3651
+ }
3652
+ }
3653
+
3654
+ return !thesame;
3655
+ }
3656
+
3657
+ void CopyChanged(Object3D obj)
3658
+ {
3659
+ SetUndoStates();
3660
+
3661
+ boolean temp = CameraPane.SWITCH;
3662
+ CameraPane.SWITCH = false;
3663
+
3664
+ copy.ExtractBigData(hashtable);
3665
+
3666
+ copy.clear();
3667
+
3668
+ for (int i=0; i<obj.Size(); i++)
3669
+ {
3670
+ copy.add(obj.get(i));
3671
+ }
3672
+
3673
+ copy.RestoreBigData(hashtable);
3674
+
3675
+ CameraPane.SWITCH = temp;
3676
+
3677
+ //assert(hashtable.isEmpty());
3678
+
3679
+ copy.Touch();
3680
+
3681
+ ResetModel();
3682
+ copy.HardTouch(); // recompile?
3683
+
3684
+ cRadio ab;
3685
+ for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
3686
+ {
3687
+ ab = (cRadio)e.nextElement();
3688
+ Object3D test = copy.GetObject(ab.object.GetUUID());
3689
+ //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID());
3690
+ if (test != null)
3691
+ {
3692
+ test.editWindow = ab.object.editWindow;
3693
+ ab.object = test;
3694
+ }
3695
+ }
3696
+
3697
+ refreshContents();
3698
+ }
3699
+
3700
+ cButton undoButton;
3701
+ cButton redoButton;
3702
+
3703
+ void SetUndoStates()
3704
+ {
3705
+ cRadio tab = GetCurrentTab();
3706
+
3707
+ undoButton.setEnabled(tab.undoindex > 0);
3708
+ redoButton.setEnabled(tab.graphs[tab.undoindex + 1] != null);
3709
+ }
3710
+
3711
+ public boolean Undo()
3712
+ {
3713
+ System.err.println("Undo");
3714
+
3715
+ cRadio tab = GetCurrentTab();
3716
+
3717
+ if (tab.undoindex == 0)
3718
+ {
3719
+ java.awt.Toolkit.getDefaultToolkit().beep();
3720
+ return false;
3721
+ }
3722
+
3723
+ if (tab.graphs[tab.undoindex] == null || !tab.user[tab.undoindex])
3724
+ {
3725
+ if (Save(false))
3726
+ tab.undoindex -= 1;
3727
+ else
3728
+ {
3729
+ if (tab.undoindex <= 0)
3730
+ return false;
3731
+ else
3732
+ tab.undoindex -= 1;
3733
+ }
3734
+ }
3735
+
3736
+ tab.undoindex -= 1;
3737
+
3738
+ CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
3739
+
3740
+ return true;
3741
+ }
3742
+
3743
+ public void Redo()
3744
+ {
3745
+ cRadio tab = GetCurrentTab();
3746
+
3747
+ if (tab.graphs[tab.undoindex + 1] == null)
3748
+ {
3749
+ java.awt.Toolkit.getDefaultToolkit().beep();
3750
+ return;
3751
+ }
3752
+
3753
+ tab.undoindex += 1;
3754
+
3755
+ CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
3756
+
3757
+ if (!tab.user[tab.undoindex])
3758
+ tab.graphs[tab.undoindex] = null;
3759
+ }
3760
+
3761
+ void ImportGFD()
3762
+ {
3763
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
3764
+ browser.show();
3765
+ String filename = browser.getFile();
3766
+ if (filename != null && filename.length() > 0)
3767
+ {
3768
+ String fullname = browser.getDirectory() + filename;
3769
+
3770
+ //Object3D readobj =
3771
+ objEditor.ReadGFD(fullname, objEditor);
3772
+ //makeSomething(readobj);
3773
+ }
3774
+ }
3775
+
3776
+ void ImportVRMLX3D()
3777
+ {
3778
+ if (Grafreed.standAlone)
3779
+ {
3780
+ /**/
3781
+ FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
3782
+ browser.show();
3783
+ String filename = browser.getFile();
3784
+ if (filename != null && filename.length() > 0)
3785
+ {
3786
+ String fullname = browser.getDirectory() + filename;
3787
+ LoadVRMLX3D(fullname);
3788
+ }
3789
+ /**/
3790
+ }
3791
+ }
3792
+
32423793 void ToggleAnimation()
32433794 {
32443795 if (!Globals.ANIMATION)
....@@ -3254,8 +3805,8 @@
32543805
32553806 Globals.ANIMATION ^= true;
32563807
3257
- GrafreeD.wav.cursor = 0;
3258
- GrafreeD.wav.loop = 0;
3808
+ Grafreed.wav.cursor = 0;
3809
+ Grafreed.wav.loop = 0;
32593810 }
32603811 } else
32613812 {
....@@ -3276,7 +3827,6 @@
32763827 callee.refreshContents();
32773828 } else
32783829 {
3279
- new Exception().printStackTrace();
32803830 System.exit(0);
32813831 }
32823832 }
....@@ -3357,7 +3907,7 @@
33573907 assert false;
33583908 }
33593909
3360
- void EditSelection()
3910
+ void EditSelection(boolean newWindow)
33613911 {
33623912 }
33633913
....@@ -3443,6 +3993,36 @@
34433993 {
34443994 //System.out.println("Propagate = " + propagate);
34453995 copy.UpdateMaterial(anchor, current, propagate);
3996
+
3997
+ if (copy.material != null)
3998
+ {
3999
+ cMaterial mat = copy.material;
4000
+
4001
+ colorField.SetToolTipValue((mat.color));
4002
+ modulationField.SetToolTipValue((mat.modulation));
4003
+ metalnessField.SetToolTipValue((mat.metalness));
4004
+ diffuseField.SetToolTipValue((mat.diffuse));
4005
+ specularField.SetToolTipValue((mat.specular));
4006
+ shininessField.SetToolTipValue((mat.shininess));
4007
+ shiftField.SetToolTipValue((mat.shift));
4008
+ ambientField.SetToolTipValue((mat.ambient));
4009
+ lightareaField.SetToolTipValue((mat.lightarea));
4010
+ diffusenessField.SetToolTipValue((mat.factor));
4011
+ velvetField.SetToolTipValue((mat.velvet));
4012
+ sheenField.SetToolTipValue((mat.sheen));
4013
+ subsurfaceField.SetToolTipValue((mat.subsurface));
4014
+ backlitField.SetToolTipValue((mat.bump));
4015
+ anisoField.SetToolTipValue((mat.aniso));
4016
+ anisoVField.SetToolTipValue((mat.anisoV));
4017
+ cameraField.SetToolTipValue((mat.cameralight));
4018
+ selfshadowField.SetToolTipValue((mat.diffuseness));
4019
+ shadowField.SetToolTipValue((mat.shadow));
4020
+ textureField.SetToolTipValue((mat.texture));
4021
+ opacityField.SetToolTipValue((mat.opacity));
4022
+ fakedepthField.SetToolTipValue((mat.fakedepth));
4023
+ shadowbiasField.SetToolTipValue((mat.shadowbias));
4024
+ }
4025
+
34464026 if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null)
34474027 {
34484028 copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000);
....@@ -3558,7 +4138,7 @@
35584138 }
35594139
35604140 if (normalpushField != null)
3561
- copy.NORMALPUSH = (float)normalpushField.getFloat()/1000;
4141
+ copy.NORMALPUSH = (float)normalpushField.getFloat()/100;
35624142 }
35634143
35644144 void SnapObject()
....@@ -3822,6 +4402,8 @@
38224402
38234403 void makeSomething(Object3D thing, boolean resetmodel) // deselect)
38244404 {
4405
+ if (Globals.SAVEONMAKE) // && resetmodel)
4406
+ Save();
38254407 //Tween.set(thing, 0).target(1).start(tweenManager);
38264408 //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager);
38274409 // if (thing instanceof GenericJointDemo)
....@@ -3908,6 +4490,12 @@
39084490 {
39094491 ResetModel();
39104492 Select(thing.GetTreePath(), true, false); // unselect... false);
4493
+
4494
+ if (thing.Size() == 0)
4495
+ {
4496
+ //EditSelection(false);
4497
+ }
4498
+
39114499 refreshContents();
39124500 }
39134501
....@@ -4025,6 +4613,7 @@
40254613 }
40264614 }
40274615 }
4616
+
40284617 LoadGFDThread loadGFDThread;
40294618
40304619 void ReadGFD(String fullname, iCallBack cb)
....@@ -4044,8 +4633,10 @@
40444633
40454634 try
40464635 {
4636
+ // Try compressed version first.
40474637 java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
4048
- java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream);
4638
+ java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream);
4639
+ java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream);
40494640
40504641 readobj = (Object3D) p.readObject();
40514642 istream.close();
....@@ -4053,7 +4644,20 @@
40534644 readobj.ResetDisplayList();
40544645 } catch (Exception e)
40554646 {
4056
- e.printStackTrace();
4647
+ //e.printStackTrace();
4648
+ try
4649
+ {
4650
+ java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
4651
+ java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream);
4652
+
4653
+ readobj = (Object3D) p.readObject();
4654
+ istream.close();
4655
+
4656
+ readobj.ResetDisplayList();
4657
+ } catch (Exception e2)
4658
+ {
4659
+ e2.printStackTrace();
4660
+ }
40574661 }
40584662 // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); }
40594663 // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); }
....@@ -4099,6 +4703,12 @@
40994703
41004704 void LoadIt(Object obj)
41014705 {
4706
+ if (obj == null)
4707
+ {
4708
+ // Invalid file
4709
+ return;
4710
+ }
4711
+
41024712 System.out.println("Loaded " + obj);
41034713 //new Exception().printStackTrace();
41044714 Object3D readobj = (Object3D) obj;
....@@ -4108,6 +4718,8 @@
41084718
41094719 if (readobj != null)
41104720 {
4721
+ if (Globals.SAVEONMAKE)
4722
+ Save();
41114723 try
41124724 {
41134725 //readobj.deepCopySelf(copy);
....@@ -4168,9 +4780,9 @@
41684780 }
41694781 }
41704782
4171
- void load() // throws ClassNotFoundException
4783
+ void Open() // throws ClassNotFoundException
41724784 {
4173
- if (GrafreeD.standAlone)
4785
+ if (Grafreed.standAlone)
41744786 {
41754787 FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD);
41764788 browser.show();
....@@ -4257,11 +4869,13 @@
42574869 try
42584870 {
42594871 FileOutputStream ostream = new FileOutputStream(lastname);
4260
- ObjectOutputStream p = new ObjectOutputStream(ostream);
4872
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4873
+ ObjectOutputStream p = new ObjectOutputStream(zstream);
42614874
42624875 p.writeObject(copy);
42634876 p.flush();
42644877
4878
+ zstream.close();
42654879 ostream.close();
42664880
42674881 //FileOutputStream fos = new FileOutputStream(fullname);
....@@ -4271,17 +4885,20 @@
42714885 {
42724886 }
42734887 }
4888
+
42744889 String lastname;
42754890
42764891 void saveAs()
42774892 {
4278
- if (GrafreeD.standAlone)
4893
+ if (Grafreed.standAlone)
42794894 {
42804895 FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE);
42814896 browser.setVisible(true);
42824897 String filename = browser.getFile();
42834898 if (filename != null && filename.length() > 0)
42844899 {
4900
+ if (!filename.endsWith(".gfd"))
4901
+ filename += ".gfd";
42854902 lastname = browser.getDirectory() + filename;
42864903 save();
42874904 }
....@@ -4380,13 +4997,13 @@
43804997 try
43814998 {
43824999 FileOutputStream ostream = new FileOutputStream(filename);
4383
- // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4384
- ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream);
5000
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
5001
+ ObjectOutputStream p = new ObjectOutputStream(zstream);
43855002
43865003 Object3D objectparent = obj.parent;
43875004 obj.parent = null;
43885005
4389
- Object3D object = (Object3D) GrafreeD.clone(obj);
5006
+ Object3D object = (Object3D) Grafreed.clone(obj);
43905007
43915008 obj.parent = objectparent;
43925009
....@@ -4398,8 +5015,8 @@
43985015 p.writeObject(object);
43995016 p.flush();
44005017
5018
+ zstream.close();
44015019 ostream.close();
4402
- // zstream.close();
44035020
44045021 // group.selection.get(0).parent = parent;
44055022 //FileOutputStream fos = new FileOutputStream(fullname);
....@@ -4420,7 +5037,7 @@
44205037 buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n");
44215038 cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height);
44225039 copy.generatePOV(buffer);
4423
- if (GrafreeD.standAlone)
5040
+ if (Grafreed.standAlone)
44245041 {
44255042 FileDialog browser = new FileDialog(frame, "Export POV", 1);
44265043 browser.show();
....@@ -4446,19 +5063,18 @@
44465063 Object3D client;
44475064 Object3D copy;
44485065 MenuBar menuBar;
4449
- Menu windowMenu;
4450
- MenuItem loadItem;
5066
+ Menu fileMenu;
5067
+ MenuItem newItem;
5068
+ MenuItem openItem;
44515069 MenuItem saveItem;
44525070 MenuItem saveAsItem;
44535071 MenuItem exportAsItem;
44545072 MenuItem reexportItem;
44555073 MenuItem povItem;
44565074 MenuItem closeItem;
4457
- Menu cameraMenu;
5075
+
44585076 CheckboxMenuItem zBufferItem;
44595077 //MenuItem normalLensItem;
4460
- MenuItem editCameraItem;
4461
- MenuItem revertCameraItem;
44625078 MenuItem stepItem;
44635079 CheckboxMenuItem toggleLiveItem;
44645080 CheckboxMenuItem toggleFullScreenItem;
....@@ -4472,22 +5088,36 @@
44725088 CheckboxMenuItem toggleSwitchItem;
44735089 CheckboxMenuItem toggleRootItem;
44745090 CheckboxMenuItem animationItem;
5091
+ MenuItem archiveItem;
44755092 CheckboxMenuItem toggleHandleItem;
44765093 CheckboxMenuItem togglePaintItem;
44775094 JSplitPane mainPanel;
44785095 JScrollPane scrollpane;
5096
+
44795097 JPanel toolbarPanel;
5098
+
44805099 cGridBag treePanel;
5100
+
44815101 JPanel radioPanel;
44825102 ButtonGroup buttonGroup;
4483
- cGridBag ctrlPanel;
5103
+
5104
+ cGridBag toolboxPanel;
44845105 cGridBag materialPanel;
5106
+ cGridBag ctrlPanel;
5107
+
44855108 JScrollPane infoPanel;
5109
+
44865110 cGridBag optionsPanel;
5111
+
44875112 JTabbedPane objectPanel;
5113
+ boolean materialFlushed;
5114
+ Object3D latestObject;
5115
+
44885116 cGridBag XYZPanel;
5117
+
44895118 JSplitPane gridPanel;
44905119 JSplitPane bigPanel;
5120
+
44915121 cGridBag bigThree;
44925122 cGridBag scenePanel;
44935123 cGridBag centralPanel;
....@@ -4602,8 +5232,13 @@
46025232 cNumberSlider fogField;
46035233 JLabel opacityPowerLabel;
46045234 cNumberSlider opacityPowerField;
4605
- JTree jTree;
5235
+ cTree jTree;
46065236 //ObjectUI parent;
46075237
46085238 cNumberSlider normalpushField;
5239
+
5240
+ private MenuItem importGFDItem;
5241
+ private MenuItem importVRMLX3DItem;
5242
+ private MenuItem import3DSItem;
5243
+ private MenuItem importOBJItem;
46095244 }