Normand Briere
2019-06-23 8088590686a45e71278f9a52bb9cc37943dc0c37
ObjEditor.java
....@@ -36,6 +36,8 @@
3636 GroupEditor callee;
3737 JFrame frame;
3838
39
+ static ObjEditor theFrame;
40
+
3941 // SCRIPT
4042
4143 transient JFrame textpanel = null;
....@@ -138,34 +140,42 @@
138140 public void closeUI()
139141 {
140142 //new Exception().printStackTrace();
141
- System.out.println("this = " + this);
142
- System.out.println("objEditor = " + objEditor);
143
+// System.out.println("this = " + this);
144
+// System.out.println("objEditor = " + objEditor);
143145 //nameField.removeActionListener(this);
144
- objEditor.ctrlPanel.remove(nameField);
146
+// objEditor.ctrlPanel.remove(nameField);
147
+
148
+ objEditor.ctrlPanel.remove(namePanel);
145149
146150 if (!GroupEditor.allparams)
147151 return;
148152
149
- objEditor.ctrlPanel.remove(liveCB);
150
- objEditor.ctrlPanel.remove(hideCB);
151
- objEditor.ctrlPanel.remove(markCB);
152
-
153
- objEditor.ctrlPanel.remove(randomCB);
154
- objEditor.ctrlPanel.remove(speedupCB);
155
- objEditor.ctrlPanel.remove(rewindCB);
156
-
157
- objEditor.ctrlPanel.remove(resetButton);
158
- objEditor.ctrlPanel.remove(stepButton);
159
-// objEditor.ctrlPanel.remove(stepAllButton);
160
-// objEditor.ctrlPanel.remove(resetAllButton);
161
- objEditor.ctrlPanel.remove(link2masterCB);
162
- //objEditor.ctrlPanel.remove(flipVCB);
163
- //objEditor.ctrlPanel.remove(texresMenu);
164
- objEditor.ctrlPanel.remove(slowerButton);
165
- objEditor.ctrlPanel.remove(fasterButton);
166
- objEditor.ctrlPanel.remove(remarkButton);
153
+// objEditor.ctrlPanel.remove(liveCB);
154
+// objEditor.ctrlPanel.remove(hideCB);
155
+// objEditor.ctrlPanel.remove(markCB);
156
+//
157
+// objEditor.ctrlPanel.remove(randomCB);
158
+// objEditor.ctrlPanel.remove(speedupCB);
159
+// objEditor.ctrlPanel.remove(rewindCB);
160
+//
161
+// objEditor.ctrlPanel.remove(resetButton);
162
+// objEditor.ctrlPanel.remove(stepButton);
163
+//// objEditor.ctrlPanel.remove(stepAllButton);
164
+//// objEditor.ctrlPanel.remove(resetAllButton);
165
+// objEditor.ctrlPanel.remove(link2masterCB);
166
+// //objEditor.ctrlPanel.remove(flipVCB);
167
+// //objEditor.ctrlPanel.remove(texresMenu);
168
+// objEditor.ctrlPanel.remove(slowerButton);
169
+// objEditor.ctrlPanel.remove(fasterButton);
170
+// objEditor.ctrlPanel.remove(remarkButton);
167171
168
- Remove(normalpushField);
172
+ objEditor.ctrlPanel.remove(setupPanel);
173
+ objEditor.ctrlPanel.remove(setupPanel2);
174
+ objEditor.ctrlPanel.remove(commandsPanel);
175
+ objEditor.ctrlPanel.remove(pushPanel);
176
+ //objEditor.ctrlPanel.remove(fillPanel);
177
+
178
+ //Remove(normalpushField);
169179 }
170180
171181 public ObjEditor GetEditor()
....@@ -236,6 +246,7 @@
236246 //localCopy.parent = null;
237247
238248 frame = new JFrame();
249
+ frame.setUndecorated(true);
239250 objEditor = this;
240251 this.callee = callee;
241252
....@@ -269,24 +280,40 @@
269280 void SetupMenu()
270281 {
271282 frame.setMenuBar(menuBar = new MenuBar());
272
- menuBar.add(windowMenu = new Menu("File"));
273
- windowMenu.add(loadItem = new MenuItem("Load..."));
274
- windowMenu.add("-");
275
- windowMenu.add(saveItem = new MenuItem("Save"));
276
- windowMenu.add(saveAsItem = new MenuItem("Save As..."));
283
+ menuBar.add(fileMenu = new Menu("File"));
284
+ fileMenu.add(newItem = new MenuItem("New"));
285
+ fileMenu.add(loadItem = new MenuItem("Open..."));
286
+
287
+ //oe.menuBar.add(menu = new Menu("Include"));
288
+ Menu menu = new Menu("Import");
289
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
290
+ importOBJItem.addActionListener(this);
291
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
292
+ import3DSItem.addActionListener(this);
293
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
294
+ importVRMLX3DItem.addActionListener(this);
295
+ menu.add("-");
296
+ importGFDItem = menu.add(new MenuItem("Grafreed file..."));
297
+ importGFDItem.addActionListener(this);
298
+ fileMenu.add(menu);
299
+ fileMenu.add("-");
300
+
301
+ fileMenu.add(saveItem = new MenuItem("Save"));
302
+ fileMenu.add(saveAsItem = new MenuItem("Save As..."));
277303 //windowMenu.add(povItem = new MenuItem("Emit POV-Ray..."));
278
- windowMenu.add("-");
279
- windowMenu.add(exportAsItem = new MenuItem("Export Selection..."));
280
- windowMenu.add(reexportItem = new MenuItem("Re-export"));
281
- windowMenu.add("-");
304
+ fileMenu.add("-");
305
+ fileMenu.add(exportAsItem = new MenuItem("Export Selection..."));
306
+ fileMenu.add(reexportItem = new MenuItem("Re-export"));
307
+ fileMenu.add("-");
282308 if (client.parent != null)
283309 {
284
- windowMenu.add(closeItem = new MenuItem("Close"));
310
+ fileMenu.add(closeItem = new MenuItem("Close"));
285311 } else
286312 {
287
- windowMenu.add(closeItem = new MenuItem("Exit"));
313
+ fileMenu.add(closeItem = new MenuItem("Exit"));
288314 }
289315
316
+ newItem.addActionListener(this);
290317 loadItem.addActionListener(this);
291318 saveItem.addActionListener(this);
292319 saveAsItem.addActionListener(this);
....@@ -295,79 +322,26 @@
295322 //povItem.addActionListener(this);
296323 closeItem.addActionListener(this);
297324
298
- menuBar.add(cameraMenu = new Menu("View"));
299
- //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
300
- //zBufferItem.addActionListener(this);
301
- //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
302
- //normalLensItem.addActionListener(this);
303
- cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
304
- revertCameraItem.addActionListener(this);
305
- cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
306
- toggleTimelineItem.addItemListener(this);
307
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
308
- toggleFullScreenItem.addItemListener(this);
309
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
310
- cameraMenu.add("-");
311
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
312
- toggleTextureItem.addItemListener(this);
313
- toggleTextureItem.setState(CameraPane.textureon);
314
- cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
315
- toggleLiveItem.addItemListener(this);
316
- toggleLiveItem.setState(Globals.isLIVE());
317
- cameraMenu.add(stepItem = new MenuItem("Step"));
318
- stepItem.addActionListener(this);
319
-// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
320
-// toggleDLItem.addItemListener(this);
321
-// toggleDLItem.setState(false);
322
- cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
323
- toggleRenderItem.addItemListener(this);
324
- toggleRenderItem.setState(!CameraPane.frozen);
325
- cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
326
- toggleDebugItem.addItemListener(this);
327
- toggleDebugItem.setState(CameraPane.DEBUG);
328
- cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
329
- toggleFrustumItem.addItemListener(this);
330
- toggleFrustumItem.setState(CameraPane.FRUSTUM);
331
- cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
332
- toggleFootContactItem.addItemListener(this);
333
- toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
334
- cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random"));
335
- toggleRandomItem.addItemListener(this);
336
- toggleRandomItem.setState(CameraPane.RANDOM);
337
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
338
- toggleHandleItem.addItemListener(this);
339
- toggleHandleItem.setState(CameraPane.HANDLES);
340
- cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
341
- togglePaintItem.addItemListener(this);
342
- togglePaintItem.setState(CameraPane.PAINTMODE);
343
-// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
344
-// toggleRootItem.addItemListener(this);
345
-// toggleRootItem.setState(false);
346
-// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
347
-// animationItem.addItemListener(this);
348
-// animationItem.setState(CameraPane.ANIMATION);
349
- cameraMenu.add("-");
350
- cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera"));
351
- editCameraItem.addActionListener(this);
352
-
353325 objectPanel = new JTabbedPane();
354326 toolbarPanel = new JPanel();
355327 toolbarPanel.setName("Toolbar");
356
- treePanel = new JPanel();
328
+ treePanel = new cGridBag();
357329 treePanel.setName("Tree");
358
- ctrlPanel = new cGridBag(); // new GridBagLayout());
330
+ ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
359331 ctrlPanel.setName("Edit");
360332 materialPanel = new cGridBag().setVertical(true);
361333 materialPanel.setName("Material");
362334 /*JTextPane*/
363335 infoarea = createTextPane();
336
+ doc = infoarea.getStyledDocument();
337
+
364338 infoarea.setEditable(true);
365339 SetText();
366340 // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f));
367341 // infoarea.setOpaque(false);
368342 // //infoarea.setForeground(textcolor);
369
- infoarea.setLineWrap(true);
370
- infoarea.setWrapStyleWord(true);
343
+// TEXTAREA infoarea.setLineWrap(true);
344
+// TEXTAREA infoarea.setWrapStyleWord(true);
371345 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED);
372346 infoPanel.setPreferredSize(new Dimension(50, 200));
373347 infoPanel.setName("Info");
....@@ -378,15 +352,15 @@
378352 mainPanel.setName("Main");
379353 mainPanel.setContinuousLayout(true);
380354 mainPanel.setOneTouchExpandable(true);
381
- mainPanel.setDividerLocation(1.0);
382355 mainPanel.setDividerSize(9);
383
- mainPanel.setResizeWeight(0);
356
+ mainPanel.setDividerLocation(0.5); //1.0);
357
+ mainPanel.setResizeWeight(0.5);
384358
385359 //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
386360 //mainPanel.setLayout(new GridBagLayout());
387361 toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
388
- treePanel.setLayout(new GridBagLayout());
389
- ctrlPanel.setLayout(new GridBagLayout());
362
+// treePanel.setLayout(new GridBagLayout());
363
+ //ctrlPanel.setLayout(new GridBagLayout());
390364 //materialPanel.setLayout(new GridBagLayout());
391365
392366 aConstraints = new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0,
....@@ -426,7 +400,7 @@
426400 static String newline = "\n";
427401 protected static final String buttonString = "JButton";
428402 StyledDocument doc;
429
- JTextArea infoarea;
403
+ JTextPane infoarea;
430404
431405 void ClearInfo()
432406 {
....@@ -449,10 +423,10 @@
449423 e.printStackTrace();
450424 }
451425
452
- String selection = infoarea.getText();
453
- java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection);
454
- java.awt.datatransfer.Clipboard clipboard =
455
- Toolkit.getDefaultToolkit().getSystemClipboard();
426
+// String selection = infoarea.getText();
427
+// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection);
428
+// java.awt.datatransfer.Clipboard clipboard =
429
+// Toolkit.getDefaultToolkit().getSystemClipboard();
456430 //clipboard.setContents(data, data);
457431 }
458432
....@@ -475,13 +449,13 @@
475449 //SendInfo("Name:", "bold");
476450 if (sel.GetTextures() != null || debug)
477451 {
478
- si.SendInfo(sel.toString(), "bold");
452
+ si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold");
479453 //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular");
480454 if (sel.Size() > 0)
481455 {
482456 si.SendInfo("#children = " + sel.Size(), "regular");
483457 }
484
- si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular");
458
+ si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular");
485459 if (debug)
486460 {
487461 try
....@@ -493,7 +467,10 @@
493467 }
494468
495469 if (full)
496
- si.SendInfo(" BBox: " + minima + " - " + maxima, "regular");
470
+ {
471
+ si.SendInfo(" BBox min: " + minima, "regular");
472
+ si.SendInfo(" BBox max: " + maxima, "regular");
473
+ }
497474
498475 if (sel.bRep != null)
499476 {
....@@ -520,7 +497,7 @@
520497 }
521498 if (sel.support != null)
522499 {
523
- si.SendInfo(" support: " + sel.support, "regular");
500
+ si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular");
524501 }
525502 if (sel.scriptnode != null)
526503 {
....@@ -591,6 +568,9 @@
591568 {
592569 CameraPane.pointflow = (PointFlow) sel;
593570 }
571
+
572
+ si.SendInfo("_____________________", "regular");
573
+ si.SendInfo("", "regular");
594574 }
595575 }
596576
....@@ -606,68 +586,138 @@
606586 }
607587 }
608588
589
+static GraphicsDevice device = GraphicsEnvironment
590
+ .getLocalGraphicsEnvironment().getScreenDevices()[0];
591
+
592
+ Rectangle keeprect;
593
+ cRadio radio;
594
+
595
+cButton keepButton;
596
+ cButton twoButton; // Full 3D
597
+ cButton sixButton;
598
+ cButton threeButton;
599
+ cButton sevenButton;
600
+ cButton fourButton; // full panel
601
+ cButton oneButton; // full XYZ
602
+ //cButton currentLayout;
603
+
604
+ boolean maximized;
605
+
606
+ void Minimize()
607
+ {
608
+ frame.setState(Frame.ICONIFIED);
609
+ }
610
+
611
+ void Maximize()
612
+ {
613
+ if (maximized)
614
+ {
615
+ frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height);
616
+ }
617
+ else
618
+ {
619
+ 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);
623
+// frame.setState(Frame.MAXIMIZED_BOTH);
624
+ }
625
+
626
+ maximized ^= true;
627
+ }
628
+
609629 void ToggleFullScreen()
610630 {
611631 if (CameraPane.FULLSCREEN)
612632 {
613
- frame.getContentPane().remove(/*"Center",*/bigThree);
614
- framePanel.add(bigThree);
615
- frame.getContentPane().add(/*"Center",*/framePanel);
633
+ device.setFullScreenWindow(null);
634
+ //frame.setVisible(false);
635
+// frame.removeNotify();
636
+// frame.setUndecorated(false);
637
+// frame.addNotify();
638
+ //frame.setBounds(keeprect.x, keeprect.y, keeprect.width, keeprect.height);
639
+
640
+// X frame.getContentPane().remove(/*"Center",*/bigThree);
641
+// X framePanel.add(bigThree);
642
+// X frame.getContentPane().add(/*"Center",*/framePanel);
643
+ framePanel.setDividerLocation(1);
644
+
645
+ //frame.setVisible(true);
646
+ radio.layout = keepButton;
647
+ //theFrame = null;
648
+ keepButton = null;
649
+ radio.layout.doClick();
650
+
616651 } else
617652 {
618
- frame.getContentPane().remove(/*"Center",*/framePanel);
619
- framePanel.remove(bigThree);
620
- frame.getContentPane().add(/*"Center",*/bigThree);
653
+ keepButton = radio.layout;
654
+ //keeprect = frame.getBounds();
655
+// frame.setBounds(0, 0, frame.getToolkit().getScreenSize().width,
656
+// frame.getToolkit().getScreenSize().height);
657
+ //frame.setVisible(false);
658
+ device.setFullScreenWindow(frame);
659
+// frame.removeNotify();
660
+// frame.setUndecorated(true);
661
+// frame.addNotify();
662
+// X frame.getContentPane().remove(/*"Center",*/framePanel);
663
+// X framePanel.remove(bigThree);
664
+// X frame.getContentPane().add(/*"Center",*/bigThree);
665
+ framePanel.setDividerLocation(0);
666
+
667
+ radio.layout = twoButton;
668
+ radio.layout.doClick();
669
+ //frame.setVisible(true);
621670 }
671
+
622672 cameraView.ToggleFullScreen();
623673 }
624674
625
- private JTextArea createTextPane()
675
+ private JTextPane createTextPane()
626676 {
627
- String[] initString =
628
- {
629
- "This is an editable JTextPane, ", //regular
630
- "another ", //italic
631
- "styled ", //bold
632
- "text ", //small
633
- "component, ", //large
634
- "which supports embedded components..." + newline,//regular
635
- " " + newline, //button
636
- "...and embedded icons..." + newline, //regular
637
- " ", //icon
638
- newline + "JTextPane is a subclass of JEditorPane that "
639
- + "uses a StyledEditorKit and StyledDocument, and provides "
640
- + "cover methods for interacting with those objects."
641
- };
677
+// TEXTAREA String[] initString =
678
+// {
679
+// "This is an editable JTextPane, ", //regular
680
+// "another ", //italic
681
+// "styled ", //bold
682
+// "text ", //small
683
+// "component, ", //large
684
+// "which supports embedded components..." + newline,//regular
685
+// " " + newline, //button
686
+// "...and embedded icons..." + newline, //regular
687
+// " ", //icon
688
+// newline + "JTextPane is a subclass of JEditorPane that "
689
+// + "uses a StyledEditorKit and StyledDocument, and provides "
690
+// + "cover methods for interacting with those objects."
691
+// };
692
+//
693
+// String[] initStyles =
694
+// {
695
+// "regular", "italic", "bold", "small", "large",
696
+// "regular", "button", "regular", "icon",
697
+// "regular"
698
+// };
699
+//
700
+// JTextPane textPane = new JTextPane();
701
+// textPane.setEditable(true);
702
+// /*StyledDocument*/ doc = textPane.getStyledDocument();
703
+// addStylesToDocument(doc);
704
+//
705
+// try
706
+// {
707
+// for (int j = 0; j < 2; j++)
708
+// {
709
+// for (int i = 0; i < initString.length; i++)
710
+// {
711
+// doc.insertString(doc.getLength(), initString[i],
712
+// doc.getStyle(initStyles[i]));
713
+// }
714
+// }
715
+// } catch (BadLocationException ble)
716
+// {
717
+// System.err.println("Couldn't insert initial text into text pane.");
718
+// }
642719
643
- String[] initStyles =
644
- {
645
- "regular", "italic", "bold", "small", "large",
646
- "regular", "button", "regular", "icon",
647
- "regular"
648
- };
649
-
650
- JTextPane textPane = new JTextPane();
651
- textPane.setEditable(true);
652
- /*StyledDocument*/ doc = textPane.getStyledDocument();
653
- addStylesToDocument(doc);
654
-
655
- try
656
- {
657
- for (int j = 0; j < 2; j++)
658
- {
659
- for (int i = 0; i < initString.length; i++)
660
- {
661
- doc.insertString(doc.getLength(), initString[i],
662
- doc.getStyle(initStyles[i]));
663
- }
664
- }
665
- } catch (BadLocationException ble)
666
- {
667
- System.err.println("Couldn't insert initial text into text pane.");
668
- }
669
-
670
- return new JTextArea(); // textPane;
720
+ return new JTextPane(); // textPane;
671721 }
672722
673723 protected void addStylesToDocument(StyledDocument doc)
....@@ -720,7 +770,7 @@
720770 protected static ImageIcon createImageIcon(String path,
721771 String description)
722772 {
723
- java.net.URL imgURL = GrafreeD.class.getResource(path);
773
+ java.net.URL imgURL = Grafreed.class.getResource(path);
724774 if (imgURL != null)
725775 {
726776 return new ImageIcon(imgURL, description);
....@@ -752,6 +802,7 @@
752802 // NumberSlider vDivsField;
753803 // JCheckBox endcaps;
754804 JCheckBox liveCB;
805
+ JCheckBox selectCB;
755806 JCheckBox hideCB;
756807 JCheckBox link2masterCB;
757808 JCheckBox markCB;
....@@ -767,54 +818,45 @@
767818 JButton slowerButton;
768819 JButton fasterButton;
769820 JButton remarkButton;
821
+
822
+ cGridBag namePanel;
823
+ cGridBag setupPanel;
824
+ cGridBag setupPanel2;
825
+ cGridBag commandsPanel;
826
+ cGridBag pushPanel;
827
+ cGridBag fillPanel;
770828
771
- JCheckBox AddCheckBox(ObjEditor oe, String label, boolean on)
829
+ JCheckBox AddCheckBox(cGridBag panel, String label, boolean on)
772830 {
773831 JCheckBox cb;
774832
775
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
776
- oe.aConstraints.gridwidth = 1; // 3;
777
-// oe.aConstraints.weightx = 1;
778
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
779
- oe.ctrlPanel.add(cb = new JCheckBox(label, on), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
833
+ panel.add(cb = new JCheckBox(label, on)); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
780834 cb.addItemListener(this);
781
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
782
- oe.aConstraints.gridwidth = 1;
783
- oe.aConstraints.gridx += 1;
784835
785836 return cb;
786837 }
787838
788
- cButton AddButton(ObjEditor oe, String label)
839
+ cButton AddButton(cGridBag panel, String label)
789840 {
790841 cButton cb;
791842
792
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
793
- oe.aConstraints.gridwidth = 1;
794
-// oe.aConstraints.weightx = 1;
795
-// oe.aConstraints.anchor = GridBagConstraints.WEST;
796
- oe.ctrlPanel.add(cb = new cButton(label), oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
843
+ panel.add(cb = new cButton(label)); //, oe.aConstraints, oe.ctrlPanel.getComponentCount() - 1);
797844 cb.addActionListener(this);
798
-// oe.aConstraints.anchor = GridBagConstraints.EAST;
799
- oe.aConstraints.gridwidth = 1;
800
- oe.aConstraints.gridx += 1;
801845
802846 return cb;
803847 }
804848
805
- JComboBox AddCombo(ObjEditor oe, java.util.Vector list, int item)
849
+ JComboBox AddCombo(cGridBag panel, java.util.Vector list, int item)
806850 {
807851 JComboBox combo;
808852
809
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
810
- oe.ctrlPanel.add(combo = new JComboBox(new cListModel(list, item)), oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
811
- oe.aConstraints.gridx += 1;
853
+ panel.add(combo = new JComboBox(new cListModel(list, item))); //, oe.aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
812854 combo.addActionListener(this);
813855
814856 return combo;
815857 }
816858
817
- cNumberSlider AddSlider(cGridBag ctrlPanel, String label, double min, double max, double current, double pow)
859
+ cGridBag AddSlider(cGridBag panel, String label, double min, double max, double current, double pow)
818860 {
819861 cGridBag control = new cGridBag();
820862
....@@ -826,12 +868,12 @@
826868 control.add(combo = new cNumberSlider(this, min, max, pow)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
827869 combo.setFloat(current);
828870
829
- ctrlPanel.add(control);
871
+ panel.add(control);
830872
831
- return combo;
873
+ return control;
832874 }
833875
834
- cNumberSlider AddSlider(cGridBag ctrlPanel, String label, int min, int max, int current)
876
+ cGridBag AddSlider(cGridBag panel, String label, int min, int max, int current)
835877 {
836878 cGridBag control = new cGridBag();
837879
....@@ -839,25 +881,21 @@
839881
840882 JLabel jlabel = new JLabel(label);
841883 jlabel.setHorizontalAlignment(SwingConstants.TRAILING);
842
- ctrlPanel.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
843
- ctrlPanel.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
884
+ control.add(jlabel); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
885
+ control.add(combo = new cNumberSlider(this, min, max)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
844886 combo.setInteger(current);
845887
846
- ctrlPanel.add(control);
888
+ panel.add(control);
847889
848
- return combo;
890
+ return control;
849891 }
850892
851893 JTextArea AddText(cGridBag ctrlPanel, String name)
852894 {
853895 JTextArea text;
854896
855
- aConstraints.fill = GridBagConstraints.HORIZONTAL;
856
- aConstraints.gridwidth = ObjEditor.GRIDWIDTH;
857897 ctrlPanel.add(text = new JTextArea(name)); //, aConstraints); //, oe.ctrlPanel.getComponentCount()-1);
858898 text.addCaretListener(this);
859
- aConstraints.gridx += 1;
860
- aConstraints.gridwidth = 1;
861899
862900 return text;
863901 }
....@@ -896,7 +934,7 @@
896934
897935 /*
898936 */
899
- void Return() // ObjEditor oe)
937
+ void Return0() // ObjEditor oe)
900938 {
901939 aConstraints.gridy += 1;
902940 aConstraints.gridx = 0;
....@@ -951,37 +989,76 @@
951989
952990 void SetupUI2(ObjEditor oe)
953991 {
954
-// oe.aConstraints.weightx = 0;
955
-// oe.aConstraints.weighty = 0;
956
-// oe.aConstraints.gridx = 0;
957
-// oe.aConstraints.gridy = 0;
958
- SetupName(oe);
992
+ //SetupName(oe);
993
+
994
+ namePanel = new cGridBag();
995
+
996
+ nameField = AddText(namePanel, copy.GetName());
997
+ namePanel.add(nameField);
998
+ oe.ctrlPanel.add(namePanel);
999
+
1000
+ oe.ctrlPanel.Return();
9591001
9601002 if (!GroupEditor.allparams)
9611003 return;
9621004
963
- liveCB = AddCheckBox(oe, "Live", copy.live);
964
- link2masterCB = AddCheckBox(oe, "Supp", copy.link2master);
965
- hideCB = AddCheckBox(oe, "Hide", copy.hide);
1005
+ setupPanel = new cGridBag().setVertical(false);
1006
+
1007
+ liveCB = AddCheckBox(setupPanel, "Live", copy.live);
1008
+ liveCB.setToolTipText("Animate object");
1009
+ selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
1010
+ selectCB.setToolTipText("Make object selectable");
9661011 // Return();
967
- markCB = AddCheckBox(oe, "Mark", copy.marked);
968
- rewindCB = AddCheckBox(oe, "Rew", copy.rewind);
969
- randomCB = AddCheckBox(oe, "Rand", copy.random);
970
- Return();
971
- resetButton = AddButton(oe, "Reset");
972
- stepButton = AddButton(oe, "Step");
1012
+ hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
1013
+ hideCB.setToolTipText("Hide object");
1014
+ markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
1015
+ markCB.setToolTipText("Set the animation target transform");
1016
+
1017
+ setupPanel2 = new cGridBag().setVertical(false);
1018
+
1019
+ rewindCB = AddCheckBox(setupPanel2, "Rewind", copy.rewind);
1020
+ rewindCB.setToolTipText("Rewind animation");
1021
+
1022
+ randomCB = AddCheckBox(setupPanel2, "Rand", copy.random);
1023
+ randomCB.setToolTipText("Randomly Rewind or Go back and forth");
1024
+
1025
+ if (Globals.ADVANCED)
1026
+ {
1027
+ link2masterCB = AddCheckBox(setupPanel2, "Supp", copy.link2master);
1028
+ link2masterCB.setToolTipText("Attach to support");
1029
+ speedupCB = AddCheckBox(setupPanel2, "Speed", copy.speedup);
1030
+ speedupCB.setToolTipText("Option motion capture");
1031
+ }
1032
+
1033
+ oe.ctrlPanel.add(setupPanel);
1034
+ oe.ctrlPanel.Return();
1035
+ oe.ctrlPanel.add(setupPanel2);
1036
+ oe.ctrlPanel.Return();
1037
+
1038
+ commandsPanel = new cGridBag().setVertical(false);
1039
+
1040
+ resetButton = AddButton(commandsPanel, "Reset");
1041
+ resetButton.setToolTipText("Jump to frame zero");
1042
+ stepButton = AddButton(commandsPanel, "Step");
1043
+ stepButton.setToolTipText("Step one frame");
9731044 // resetAllButton = AddButton(oe, "Reset All");
9741045 // stepAllButton = AddButton(oe, "Step All");
975
- speedupCB = AddCheckBox(oe, "Speed", copy.speedup);
9761046 // Return();
977
- slowerButton = AddButton(oe, "Slow");
978
- fasterButton = AddButton(oe, "Fast");
979
- remarkButton = AddButton(oe, "Rem");
1047
+ slowerButton = AddButton(commandsPanel, "Slow");
1048
+ slowerButton.setToolTipText("Decrease animation speed");
1049
+ fasterButton = AddButton(commandsPanel, "Fast");
1050
+ fasterButton.setToolTipText("Increase animation speed");
1051
+ remarkButton = AddButton(commandsPanel, "Remark");
1052
+ remarkButton.setToolTipText("Set the current transform as the target");
9801053
981
- //Return();
1054
+ oe.ctrlPanel.add(commandsPanel);
1055
+ oe.ctrlPanel.Return();
9821056
983
- //normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1);
1057
+ pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons
1058
+ normalpushField = (cNumberSlider)pushPanel.getComponent(1);
9841059 //Return();
1060
+
1061
+ oe.ctrlPanel.Return();
9851062
9861063 // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2);
9871064 // ObjEditor.aConstraints.gridx += 1;
....@@ -1076,7 +1153,7 @@
10761153 oe.aConstraints.gridwidth = 1;
10771154 /**/
10781155 nameField = AddText(oe.ctrlPanel, copy.GetName());
1079
- Return();
1156
+ oe.ctrlPanel.Return();
10801157
10811158 //ctrlPanel.add(textureButton = new Button("Texture..."));
10821159 //textureButton.setEnabled(false);
....@@ -1180,8 +1257,11 @@
11801257 //worldPanel.setName("World");
11811258 centralPanel = new cGridBag();
11821259 centralPanel.preferredWidth = 20;
1183
- timelinePanel = new JPanel(new BorderLayout());
1184
- timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel);
1260
+
1261
+ if (Globals.ADVANCED)
1262
+ {
1263
+ timelinePanel = new JPanel(new BorderLayout());
1264
+ timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel);
11851265
11861266 cameraPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT, cameraView, timelinePanel);
11871267 cameraPanel.setContinuousLayout(true);
....@@ -1190,7 +1270,10 @@
11901270 // cameraPanel.setDividerSize(9);
11911271 cameraPanel.setResizeWeight(1.0);
11921272
1273
+ }
1274
+
11931275 centralPanel.add(cameraView);
1276
+ centralPanel.setFocusable(true);
11941277 //frame.setJMenuBar(timelineMenubar);
11951278 //centralPanel.add(timelinePanel);
11961279
....@@ -1253,10 +1336,11 @@
12531336 //JScrollPane tmp = new JScrollPane(ctrlPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
12541337 //tmp.setName("Edit");
12551338 objectPanel.add(materialPanel);
1256
- JPanel north = new JPanel(new BorderLayout());
1257
- north.setName("Edit");
1258
- north.add(ctrlPanel, BorderLayout.NORTH);
1259
- objectPanel.add(north);
1339
+// JPanel north = new JPanel(new BorderLayout());
1340
+// north.setName("Edit");
1341
+// north.add(ctrlPanel, BorderLayout.NORTH);
1342
+// objectPanel.add(north);
1343
+ objectPanel.add(ctrlPanel);
12601344 objectPanel.add(infoPanel);
12611345
12621346 /*
....@@ -1278,7 +1362,7 @@
12781362 scrollpane.addMouseWheelListener(this); // Default not fast enough
12791363
12801364 /*JTabbedPane*/ scenePanel = new cGridBag();
1281
- scenePanel.preferredWidth = 7;
1365
+ scenePanel.preferredWidth = 6;
12821366
12831367 JTabbedPane tabbedPane = new JTabbedPane();
12841368 tabbedPane.add(scrollpane);
....@@ -1384,9 +1468,11 @@
13841468
13851469 // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc);
13861470
1387
- frame.setSize(1024, 768);
1388
- frame.show();
1471
+ frame.setSize(1280, 860);
1472
+ frame.setVisible(true);
13891473
1474
+ cameraView.requestFocusInWindow();
1475
+
13901476 gridPanel.setDividerLocation(1.0);
13911477
13921478 frame.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
....@@ -1415,7 +1501,7 @@
14151501 ctrlPanel.removeAll();
14161502 }
14171503
1418
- void SetupMaterial(cGridBag ctrlPanel)
1504
+ void SetupMaterial(cGridBag panel)
14191505 {
14201506 /*
14211507 ctrlPanel.add(materialLabel = new JLabel("MATERIAL : "), aConstraints);
....@@ -1424,18 +1510,26 @@
14241510
14251511 cGridBag editBar = new cGridBag().setVertical(false);
14261512
1427
- editBar.add(createMaterialButton = new cButton("Create")); // , aConstraints);
1513
+ editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints);
1514
+ createMaterialButton.setToolTipText("Create material");
14281515
14291516 /*
14301517 ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints);
14311518 */
14321519
1433
- editBar.add(clearMaterialButton = new cButton("Clear")); // , aConstraints);
1434
- editBar.add(resetSlidersButton = new cButton("Reset")); // , aConstraints);
1435
- editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
1436
- editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
1520
+ editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints);
1521
+ clearMaterialButton.setToolTipText("Clear material");
1522
+
1523
+ if (Globals.ADVANCED)
1524
+ {
1525
+ editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints);
1526
+ editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
1527
+ editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
1528
+ }
14371529
1438
- ctrlPanel.add(editBar);
1530
+ editBar.preferredHeight = 15;
1531
+
1532
+ panel.add(editBar);
14391533
14401534 /**/
14411535 //aConstraints.weighty = 0;
....@@ -1484,9 +1578,9 @@
14841578 shadowbias.add(shadowbiasField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
14851579 colorSection.add(shadowbias);
14861580
1487
- ctrlPanel.add(new JSeparator());
1581
+ panel.add(new JSeparator());
14881582
1489
- ctrlPanel.add(colorSection);
1583
+ panel.add(colorSection);
14901584
14911585 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
14921586
....@@ -1534,9 +1628,9 @@
15341628 fakedepth.add(fakedepthField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
15351629 diffuseSection.add(fakedepth);
15361630
1537
- ctrlPanel.add(new JSeparator());
1631
+ panel.add(new JSeparator());
15381632
1539
- ctrlPanel.add(diffuseSection);
1633
+ panel.add(diffuseSection);
15401634
15411635 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
15421636
....@@ -1572,7 +1666,7 @@
15721666 velvet.add(velvetField = new cNumberSlider(this, 0.001, 50, -1)); // , aConstraints);
15731667 specularSection.add(velvet);
15741668
1575
- shiftField = AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1);
1669
+ shiftField = (cNumberSlider)AddSlider(specularSection, "Shift", 0.001, 50, copy.material.shift, -1).getComponent(1);
15761670 //Return();
15771671 // ctrlPanel.add(shiftLabel = new JLabel("Shift"), aConstraints);
15781672 // shiftLabel.setHorizontalAlignment(SwingConstants.TRAILING);
....@@ -1585,9 +1679,9 @@
15851679 // aConstraints.gridwidth = 1;
15861680
15871681
1588
- ctrlPanel.add(new JSeparator());
1682
+ panel.add(new JSeparator());
15891683
1590
- ctrlPanel.add(specularSection);
1684
+ panel.add(specularSection);
15911685
15921686 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
15931687
....@@ -1617,9 +1711,9 @@
16171711 opacity.add(opacityField = new cNumberSlider(this, 0.001, 1, -0.5)); // , aConstraints);
16181712 globalSection.add(opacity);
16191713
1620
- ctrlPanel.add(new JSeparator());
1714
+ panel.add(new JSeparator());
16211715
1622
- ctrlPanel.add(globalSection);
1716
+ panel.add(globalSection);
16231717
16241718 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16251719
....@@ -1661,9 +1755,9 @@
16611755 opacityPower.add(opacityPowerField = new cNumberSlider(this, 0.0, 10 /*10 dec 2013*/)); // , aConstraints);
16621756 textureSection.add(opacityPower);
16631757
1664
- ctrlPanel.add(new JSeparator());
1758
+ panel.add(new JSeparator());
16651759
1666
- ctrlPanel.add(textureSection);
1760
+ panel.add(textureSection);
16671761
16681762 //ctrlPanel.add(new JLabel("----------------------------------")); // , aConstraints);
16691763
....@@ -1700,12 +1794,15 @@
17001794 opacityPowerField.addChangeListener(this);
17011795 /**/
17021796
1703
- resetSlidersButton.addActionListener(this);
17041797 clearMaterialButton.addActionListener(this);
17051798 createMaterialButton.addActionListener(this);
1706
-
1707
- propagateToggle.addItemListener(this);
1708
- multiplyToggle.addItemListener(this);
1799
+
1800
+ if (Globals.ADVANCED)
1801
+ {
1802
+ resetSlidersButton.addActionListener(this);
1803
+ propagateToggle.addItemListener(this);
1804
+ multiplyToggle.addItemListener(this);
1805
+ }
17091806 }
17101807
17111808 void DropFile(java.io.File[] files, boolean textures)
....@@ -1876,7 +1973,7 @@
18761973
18771974 //? flashIt = false;
18781975 CameraPane pane = (CameraPane) cameraView;
1879
- pane.clickStart(location.x, location.y, 0);
1976
+ pane.clickStart(location.x, location.y, 0, 0);
18801977 pane.clickEnd(location.x, location.y, 0, true);
18811978
18821979 if (group.selection.size() == 1)
....@@ -1925,6 +2022,7 @@
19252022 e2.printStackTrace();
19262023 }
19272024 }
2025
+
19282026 LoadJMEThread loadThread;
19292027
19302028 class LoadJMEThread extends Thread
....@@ -1982,6 +2080,7 @@
19822080 //LoadFile0(filename, converter);
19832081 }
19842082 }
2083
+
19852084 LoadOBJThread loadObjThread;
19862085
19872086 class LoadOBJThread extends Thread
....@@ -2060,19 +2159,19 @@
20602159
20612160 void LoadObjFile(String fullname)
20622161 {
2063
- /*
2162
+ System.out.println("Loading " + fullname);
2163
+ /**/
20642164 //lastFilename = fullname;
20652165 if(loadObjThread == null)
20662166 {
2067
- loadObjThread = new LoadOBJThread();
2068
- loadObjThread.start();
2167
+ loadObjThread = new LoadOBJThread();
2168
+ loadObjThread.start();
20692169 }
20702170
20712171 loadObjThread.add(fullname);
2072
- */
2172
+ /**/
20732173
2074
- System.out.println("Loading " + fullname);
2075
- makeSomething(new FileObject(fullname, true), true);
2174
+ //makeSomething(new FileObject(fullname, true), true);
20762175 }
20772176
20782177 void LoadGFDFile(String fullname)
....@@ -2333,11 +2432,11 @@
23332432
23342433 void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName)
23352434 {
2336
- if (GrafreeD.standAlone)
2435
+ if (Grafreed.standAlone)
23372436 {
23382437 /**/
23392438 FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD);
2340
- browser.show();
2439
+ browser.setVisible(true);
23412440 String filename = browser.getFile();
23422441 if (filename != null && filename.length() > 0)
23432442 {
....@@ -2482,6 +2581,7 @@
24822581 }
24832582 if (input == null)
24842583 {
2584
+ new Exception().printStackTrace();
24852585 System.exit(0);
24862586 }
24872587
....@@ -2696,7 +2796,8 @@
26962796 return;
26972797 }
26982798
2699
- multiplyToggle.setSelected(mat.multiply);
2799
+ if (multiplyToggle != null)
2800
+ multiplyToggle.setSelected(mat.multiply);
27002801
27012802 assert (object.projectedVertices != null);
27022803
....@@ -2911,9 +3012,9 @@
29113012 frame.validate();
29123013
29133014 return;
2914
- } else if (event.getSource() == toggleRandomItem)
3015
+ } else if (event.getSource() == toggleSwitchItem)
29153016 {
2916
- cameraView.ToggleRandom();
3017
+ cameraView.ToggleSwitch();
29173018 cameraView.repaint();
29183019 return;
29193020 } else if (event.getSource() == toggleHandleItem)
....@@ -2942,6 +3043,10 @@
29423043 {
29433044 copy.live ^= true;
29443045 return;
3046
+ } else if (event.getSource() == selectCB)
3047
+ {
3048
+ copy.dontselect ^= true;
3049
+ return;
29453050 } else if (event.getSource() == hideCB)
29463051 {
29473052 copy.hide ^= true;
....@@ -2956,6 +3061,7 @@
29563061 if (event.getSource() == randomCB)
29573062 {
29583063 copy.random ^= true;
3064
+ objEditor.refreshContents();
29593065 return;
29603066 }
29613067 if (event.getSource() == speedupCB)
....@@ -2979,8 +3085,9 @@
29793085
29803086 public void actionPerformed(ActionEvent event)
29813087 {
3088
+ Object source = event.getSource();
29823089 // SCRIPT DIALOG
2983
- if (event.getSource() == okbutton)
3090
+ if (source == okbutton)
29843091 {
29853092 textpanel.setVisible(false);
29863093 textpanel.remove(textarea);
....@@ -2992,7 +3099,7 @@
29923099 textarea = null;
29933100 textpanel = null;
29943101 }
2995
- if (event.getSource() == cancelbutton)
3102
+ if (source == cancelbutton)
29963103 {
29973104 textpanel.setVisible(false);
29983105 textpanel.remove(textarea);
....@@ -3004,50 +3111,50 @@
30043111 //applySelf();
30053112 //client.refreshEditWindow();
30063113 //refreshContents();
3007
- if (event.getSource() == nameField)
3114
+ if (source == nameField)
30083115 {
30093116 //System.out.println("ObjEditor " + event);
30103117 applySelf0(true);
30113118 //parent.applySelf();
30123119 objEditor.refreshContents();
3013
- } else if (event.getSource() == resetButton)
3120
+ } else if (source == resetButton)
30143121 {
30153122 CameraPane.fullreset = true;
30163123 copy.Reset(); // ResetMeshes();
30173124 copy.Touch();
30183125 objEditor.refreshContents();
3019
- } else if (event.getSource() == stepItem)
3126
+ } else if (source == stepItem)
30203127 {
30213128 //cameraView.ONESTEP = true;
30223129 Globals.ONESTEP = true;
30233130 cameraView.repaint();
30243131 return;
3025
- } else if (event.getSource() == stepButton)
3132
+ } else if (source == stepButton)
30263133 {
30273134 copy.Step();
30283135 copy.Touch();
30293136 objEditor.refreshContents();
3030
- } else if (event.getSource() == slowerButton)
3137
+ } else if (source == slowerButton)
30313138 {
30323139 copy.Slower();
30333140 copy.Touch();
30343141 objEditor.refreshContents();
3035
- } else if (event.getSource() == fasterButton)
3142
+ } else if (source == fasterButton)
30363143 {
30373144 copy.Faster();
30383145 copy.Touch();
30393146 objEditor.refreshContents();
3040
- } else if (event.getSource() == remarkButton)
3147
+ } else if (source == remarkButton)
30413148 {
30423149 copy.Remark();
30433150 copy.Touch();
30443151 objEditor.refreshContents();
3045
- } else if (event.getSource() == stepAllButton)
3152
+ } else if (source == stepAllButton)
30463153 {
30473154 copy.StepAll();
30483155 copy.Touch();
30493156 objEditor.refreshContents();
3050
- } else if (event.getSource() == resetAllButton)
3157
+ } else if (source == resetAllButton)
30513158 {
30523159 //CameraPane.fullreset = true;
30533160 copy.ResetAll(); // ResetMeshes();
....@@ -3080,53 +3187,75 @@
30803187 // Close();
30813188 // }
30823189 // else
3083
- if (event.getSource() == resetSlidersButton)
3190
+ if (source == resetSlidersButton)
30843191 {
30853192 ResetSliders();
3086
- } else if (event.getSource() == clearMaterialButton)
3193
+ } else if (source == clearMaterialButton)
30873194 {
30883195 ClearMaterial();
3089
- } else if (event.getSource() == createMaterialButton)
3196
+ } else if (source == createMaterialButton)
30903197 {
30913198 CreateMaterial();
3092
- } else if (event.getSource() == clearPanelButton)
3199
+ } else if (source == clearPanelButton)
30933200 {
30943201 copy.ClearUI();
30953202 refreshContents(true);
3096
- } /*
3097
- }
3098
-
3099
- public boolean action(Event event, Object arg)
3100
- {
3101
- */ else if (event.getSource() == closeItem)
3203
+ } else if (source == importGFDItem)
3204
+ {
3205
+ ImportGFD();
3206
+ } else
3207
+ if (source == importVRMLX3DItem)
3208
+ {
3209
+ ImportVRMLX3D();
3210
+ } else
3211
+ if (source == import3DSItem)
3212
+ {
3213
+ objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
3214
+ } else
3215
+ if (source == importOBJItem)
3216
+ {
3217
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
3218
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
3219
+ browser.setVisible(true);
3220
+ String filename = browser.getFile();
3221
+ if (filename != null && filename.length() > 0)
3222
+ {
3223
+ String fullname = browser.getDirectory() + filename;
3224
+ makeSomething(ReadOBJ(fullname), true);
3225
+ }
3226
+ } else
3227
+ if (source == closeItem)
31023228 {
31033229 Close();
31043230 //return true;
3105
- } else if (event.getSource() == loadItem)
3231
+ } else if (source == loadItem)
31063232 {
31073233 load();
31083234 //return true;
3109
- } else if (event.getSource() == saveItem)
3235
+ } else if (source == newItem)
3236
+ {
3237
+ New();
3238
+ } else if (source == saveItem)
31103239 {
31113240 save();
31123241 //return true;
3113
- } else if (event.getSource() == saveAsItem)
3242
+ } else if (source == saveAsItem)
31143243 {
31153244 saveAs();
31163245 //return true;
3117
- } else if (event.getSource() == reexportItem)
3246
+ } else if (source == reexportItem)
31183247 {
31193248 reexport();
31203249 //return true;
3121
- } else if (event.getSource() == exportAsItem)
3250
+ } else if (source == exportAsItem)
31223251 {
31233252 export();
31243253 //return true;
3125
- } else if (event.getSource() == povItem)
3254
+ } else if (source == povItem)
31263255 {
31273256 generatePOV();
31283257 //return true;
3129
- } else if (event.getSource() == zBufferItem)
3258
+ } else if (source == zBufferItem)
31303259 {
31313260 try
31323261 {
....@@ -3148,21 +3277,8 @@
31483277 cameraView.repaint();
31493278 //return true;
31503279 }
3151
- */ else if (event.getSource() == editCameraItem)
3152
- {
3153
- cameraView.ProtectCamera();
3154
- cameraView.repaint();
3155
- return;
3156
- } else if (event.getSource() == revertCameraItem)
3157
- {
3158
- cameraView.RevertCamera();
3159
- cameraView.repaint();
3160
- return;
3161
-// } else if (event.getSource() == textureButton)
3162
-// {
3163
-// return; // true;
3164
- } else // combos...
3165
- if (event.getSource() == texresMenu)
3280
+ */ else // combos...
3281
+ if (source == texresMenu)
31663282 {
31673283 System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex());
31683284 copy.texres = texresMenu.getSelectedIndex();
....@@ -3174,12 +3290,268 @@
31743290 }
31753291 }
31763292
3293
+ void New()
3294
+ {
3295
+ while (copy.Size() > 1)
3296
+ {
3297
+ copy.remove(1);
3298
+ }
3299
+
3300
+ ResetModel();
3301
+ objEditor.refreshContents();
3302
+ }
3303
+
3304
+ static public byte[] Compress(Object3D o)
3305
+ {
3306
+ try
3307
+ {
3308
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
3309
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos);
3310
+ ObjectOutputStream out = new ObjectOutputStream(zstream);
3311
+
3312
+ Object3D parent = o.parent;
3313
+ o.parent = null;
3314
+
3315
+ out.writeObject(o);
3316
+
3317
+ o.parent = parent;
3318
+
3319
+ out.flush();
3320
+
3321
+ zstream.close();
3322
+ out.close();
3323
+
3324
+ return baos.toByteArray();
3325
+ } catch (Exception e)
3326
+ {
3327
+ System.err.println(e);
3328
+ return null;
3329
+ }
3330
+ }
3331
+
3332
+ static public Object Uncompress(byte[] bytes)
3333
+ {
3334
+ System.out.println("#bytes = " + bytes.length);
3335
+ try
3336
+ {
3337
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
3338
+ java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais);
3339
+ ObjectInputStream in = new ObjectInputStream(istream);
3340
+ Object obj = in.readObject();
3341
+ in.close();
3342
+
3343
+ return obj;
3344
+ } catch (Exception e)
3345
+ {
3346
+ System.err.println(e);
3347
+ return null;
3348
+ }
3349
+ }
3350
+
3351
+ static public Object clone(Object o)
3352
+ {
3353
+ try
3354
+ {
3355
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
3356
+ ObjectOutputStream out = new ObjectOutputStream(baos);
3357
+
3358
+ out.writeObject(o);
3359
+
3360
+ out.flush();
3361
+ out.close();
3362
+
3363
+ byte[] bytes = baos.toByteArray();
3364
+
3365
+ System.out.println("clone = " + bytes.length);
3366
+
3367
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
3368
+ ObjectInputStream in = new ObjectInputStream(bais);
3369
+ Object obj = in.readObject();
3370
+ in.close();
3371
+
3372
+ return obj;
3373
+ } catch (Exception e)
3374
+ {
3375
+ System.err.println(e);
3376
+ return null;
3377
+ }
3378
+ }
3379
+
3380
+ cRadio GetCurrentTab()
3381
+ {
3382
+ cRadio ab;
3383
+ for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
3384
+ {
3385
+ ab = (cRadio)e.nextElement();
3386
+ if(ab.GetObject() == copy)
3387
+ {
3388
+ return ab;
3389
+ }
3390
+ }
3391
+
3392
+ return null;
3393
+ }
3394
+
3395
+ java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>();
3396
+
3397
+ public void Save()
3398
+ {
3399
+ cRadio tab = GetCurrentTab();
3400
+
3401
+ boolean temp = CameraPane.SWITCH;
3402
+ CameraPane.SWITCH = false;
3403
+
3404
+ copy.ExtractBigData(hashtable);
3405
+
3406
+ //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++)
3416
+ {
3417
+ tab.graphs[i] = null;
3418
+ }
3419
+
3420
+ // test save
3421
+ if (false)
3422
+ {
3423
+ try
3424
+ {
3425
+ FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex);
3426
+ ObjectOutputStream p = new ObjectOutputStream(ostream);
3427
+
3428
+ p.writeObject(copy);
3429
+
3430
+ p.flush();
3431
+
3432
+ ostream.close();
3433
+ } catch (Exception e)
3434
+ {
3435
+ e.printStackTrace();
3436
+ }
3437
+ }
3438
+ }
3439
+
3440
+ void CopyChanged(Object3D obj)
3441
+ {
3442
+ boolean temp = CameraPane.SWITCH;
3443
+ CameraPane.SWITCH = false;
3444
+
3445
+ copy.ExtractBigData(hashtable);
3446
+
3447
+ copy.clear();
3448
+
3449
+ for (int i=0; i<obj.Size(); i++)
3450
+ {
3451
+ copy.add(obj.get(i));
3452
+ }
3453
+
3454
+ copy.RestoreBigData(hashtable);
3455
+
3456
+ CameraPane.SWITCH = temp;
3457
+
3458
+ //assert(hashtable.isEmpty());
3459
+
3460
+ copy.Touch();
3461
+
3462
+ ResetModel();
3463
+ copy.HardTouch(); // recompile?
3464
+
3465
+ cRadio ab;
3466
+ for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
3467
+ {
3468
+ ab = (cRadio)e.nextElement();
3469
+ Object3D test = copy.GetObject(ab.object.GetUUID());
3470
+ //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID());
3471
+ if (test != null)
3472
+ {
3473
+ test.editWindow = ab.object.editWindow;
3474
+ ab.object = test;
3475
+ }
3476
+ }
3477
+
3478
+ refreshContents();
3479
+ }
3480
+
3481
+ public void Undo()
3482
+ {
3483
+ cRadio tab = GetCurrentTab();
3484
+
3485
+ if (tab.undoindex == 0)
3486
+ {
3487
+ java.awt.Toolkit.getDefaultToolkit().beep();
3488
+ return;
3489
+ }
3490
+
3491
+ if (tab.graphs[tab.undoindex] == null)
3492
+ {
3493
+ Save();
3494
+ tab.undoindex -= 1;
3495
+ }
3496
+
3497
+ tab.undoindex -= 1;
3498
+
3499
+ CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
3500
+ }
3501
+
3502
+ public void Redo()
3503
+ {
3504
+ cRadio tab = GetCurrentTab();
3505
+
3506
+ if (tab.graphs[tab.undoindex + 1] == null)
3507
+ {
3508
+ java.awt.Toolkit.getDefaultToolkit().beep();
3509
+ return;
3510
+ }
3511
+
3512
+ tab.undoindex += 1;
3513
+
3514
+ CopyChanged((Object3D)Uncompress(tab.graphs[tab.undoindex]));
3515
+ }
3516
+
3517
+ void ImportGFD()
3518
+ {
3519
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
3520
+ browser.show();
3521
+ String filename = browser.getFile();
3522
+ if (filename != null && filename.length() > 0)
3523
+ {
3524
+ String fullname = browser.getDirectory() + filename;
3525
+
3526
+ //Object3D readobj =
3527
+ objEditor.ReadGFD(fullname, objEditor);
3528
+ //makeSomething(readobj);
3529
+ }
3530
+ }
3531
+
3532
+ void ImportVRMLX3D()
3533
+ {
3534
+ if (Grafreed.standAlone)
3535
+ {
3536
+ /**/
3537
+ FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
3538
+ browser.show();
3539
+ String filename = browser.getFile();
3540
+ if (filename != null && filename.length() > 0)
3541
+ {
3542
+ String fullname = browser.getDirectory() + filename;
3543
+ LoadVRMLX3D(fullname);
3544
+ }
3545
+ /**/
3546
+ }
3547
+ }
3548
+
31773549 void ToggleAnimation()
31783550 {
31793551 if (!Globals.ANIMATION)
31803552 {
31813553 FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE);
3182
- browser.show();
3554
+ browser.setVisible(true);
31833555 String filename = browser.getFile();
31843556 if (filename != null && filename.length() > 0)
31853557 {
....@@ -3189,8 +3561,8 @@
31893561
31903562 Globals.ANIMATION ^= true;
31913563
3192
- GrafreeD.wav.cursor = 0;
3193
- GrafreeD.wav.loop = 0;
3564
+ Grafreed.wav.cursor = 0;
3565
+ Grafreed.wav.loop = 0;
31943566 }
31953567 } else
31963568 {
....@@ -3240,7 +3612,7 @@
32403612 void CreateMaterial()
32413613 {
32423614 //copy.ClearMaterial(); // PATCH
3243
- copy.CreateMaterialS(multiplyToggle.isSelected());
3615
+ copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected());
32443616 if (copy.selection.size() > 0)
32453617 //SetMaterial(copy);
32463618 {
....@@ -3299,11 +3671,11 @@
32993671 {
33003672 copy.ResetBlockLoop(); // temporary problem
33013673
3302
- boolean random = CameraPane.RANDOM;
3303
- CameraPane.RANDOM = false; // parse everything
3674
+ boolean random = CameraPane.SWITCH;
3675
+ CameraPane.SWITCH = false; // parse everything
33043676 copy.ResetDisplayList();
33053677 copy.HardTouch();
3306
- CameraPane.RANDOM = random;
3678
+ CameraPane.SWITCH = random;
33073679 }
33083680
33093681 // public void applySelf()
....@@ -3377,6 +3749,36 @@
33773749 {
33783750 //System.out.println("Propagate = " + propagate);
33793751 copy.UpdateMaterial(anchor, current, propagate);
3752
+
3753
+ if (copy.material != null)
3754
+ {
3755
+ cMaterial mat = copy.material;
3756
+
3757
+ colorField.SetToolTipValue((mat.color));
3758
+ modulationField.SetToolTipValue((mat.modulation));
3759
+ metalnessField.SetToolTipValue((mat.metalness));
3760
+ diffuseField.SetToolTipValue((mat.diffuse));
3761
+ specularField.SetToolTipValue((mat.specular));
3762
+ shininessField.SetToolTipValue((mat.shininess));
3763
+ shiftField.SetToolTipValue((mat.shift));
3764
+ ambientField.SetToolTipValue((mat.ambient));
3765
+ lightareaField.SetToolTipValue((mat.lightarea));
3766
+ diffusenessField.SetToolTipValue((mat.factor));
3767
+ velvetField.SetToolTipValue((mat.velvet));
3768
+ sheenField.SetToolTipValue((mat.sheen));
3769
+ subsurfaceField.SetToolTipValue((mat.subsurface));
3770
+ backlitField.SetToolTipValue((mat.bump));
3771
+ anisoField.SetToolTipValue((mat.aniso));
3772
+ anisoVField.SetToolTipValue((mat.anisoV));
3773
+ cameraField.SetToolTipValue((mat.cameralight));
3774
+ selfshadowField.SetToolTipValue((mat.diffuseness));
3775
+ shadowField.SetToolTipValue((mat.shadow));
3776
+ textureField.SetToolTipValue((mat.texture));
3777
+ opacityField.SetToolTipValue((mat.opacity));
3778
+ fakedepthField.SetToolTipValue((mat.fakedepth));
3779
+ shadowbiasField.SetToolTipValue((mat.shadowbias));
3780
+ }
3781
+
33803782 if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null)
33813783 {
33823784 copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000);
....@@ -3421,6 +3823,7 @@
34213823 || e.getSource() == apertureField
34223824 || e.getSource() == shadowblurField)
34233825 {
3826
+ new Exception().printStackTrace();
34243827 System.exit(0);
34253828 cameraView.options1[0] = (float) focusField.getFloat() * 10;
34263829 cameraView.options1[1] = (float) apertureField.getFloat() / 1000;
....@@ -3491,7 +3894,7 @@
34913894 }
34923895
34933896 if (normalpushField != null)
3494
- copy.NORMALPUSH = (float)normalpushField.getFloat()/1000;
3897
+ copy.NORMALPUSH = (float)normalpushField.getFloat()/100;
34953898 }
34963899
34973900 void SnapObject()
....@@ -3755,6 +4158,7 @@
37554158
37564159 void makeSomething(Object3D thing, boolean resetmodel) // deselect)
37574160 {
4161
+ Save();
37584162 //Tween.set(thing, 0).target(1).start(tweenManager);
37594163 //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager);
37604164 // if (thing instanceof GenericJointDemo)
....@@ -3958,6 +4362,7 @@
39584362 }
39594363 }
39604364 }
4365
+
39614366 LoadGFDThread loadGFDThread;
39624367
39634368 void ReadGFD(String fullname, iCallBack cb)
....@@ -3977,8 +4382,10 @@
39774382
39784383 try
39794384 {
4385
+ // Try compressed version first.
39804386 java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
3981
- java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream);
4387
+ java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream);
4388
+ java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream);
39824389
39834390 readobj = (Object3D) p.readObject();
39844391 istream.close();
....@@ -3986,7 +4393,20 @@
39864393 readobj.ResetDisplayList();
39874394 } catch (Exception e)
39884395 {
3989
- e.printStackTrace();
4396
+ //e.printStackTrace();
4397
+ try
4398
+ {
4399
+ java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
4400
+ java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream);
4401
+
4402
+ readobj = (Object3D) p.readObject();
4403
+ istream.close();
4404
+
4405
+ readobj.ResetDisplayList();
4406
+ } catch (Exception e2)
4407
+ {
4408
+ e2.printStackTrace();
4409
+ }
39904410 }
39914411 // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); }
39924412 // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); }
....@@ -4032,6 +4452,12 @@
40324452
40334453 void LoadIt(Object obj)
40344454 {
4455
+ if (obj == null)
4456
+ {
4457
+ // Invalid file
4458
+ return;
4459
+ }
4460
+
40354461 System.out.println("Loaded " + obj);
40364462 //new Exception().printStackTrace();
40374463 Object3D readobj = (Object3D) obj;
....@@ -4041,6 +4467,7 @@
40414467
40424468 if (readobj != null)
40434469 {
4470
+ Save();
40444471 try
40454472 {
40464473 //readobj.deepCopySelf(copy);
....@@ -4103,7 +4530,7 @@
41034530
41044531 void load() // throws ClassNotFoundException
41054532 {
4106
- if (GrafreeD.standAlone)
4533
+ if (Grafreed.standAlone)
41074534 {
41084535 FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD);
41094536 browser.show();
....@@ -4190,11 +4617,13 @@
41904617 try
41914618 {
41924619 FileOutputStream ostream = new FileOutputStream(lastname);
4193
- ObjectOutputStream p = new ObjectOutputStream(ostream);
4620
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4621
+ ObjectOutputStream p = new ObjectOutputStream(zstream);
41944622
41954623 p.writeObject(copy);
41964624 p.flush();
41974625
4626
+ zstream.close();
41984627 ostream.close();
41994628
42004629 //FileOutputStream fos = new FileOutputStream(fullname);
....@@ -4204,11 +4633,12 @@
42044633 {
42054634 }
42064635 }
4636
+
42074637 String lastname;
42084638
42094639 void saveAs()
42104640 {
4211
- if (GrafreeD.standAlone)
4641
+ if (Grafreed.standAlone)
42124642 {
42134643 FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE);
42144644 browser.setVisible(true);
....@@ -4313,13 +4743,13 @@
43134743 try
43144744 {
43154745 FileOutputStream ostream = new FileOutputStream(filename);
4316
- // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4317
- ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream);
4746
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4747
+ ObjectOutputStream p = new ObjectOutputStream(zstream);
43184748
43194749 Object3D objectparent = obj.parent;
43204750 obj.parent = null;
43214751
4322
- Object3D object = (Object3D) GrafreeD.clone(obj);
4752
+ Object3D object = (Object3D) Grafreed.clone(obj);
43234753
43244754 obj.parent = objectparent;
43254755
....@@ -4331,8 +4761,8 @@
43314761 p.writeObject(object);
43324762 p.flush();
43334763
4764
+ zstream.close();
43344765 ostream.close();
4335
- // zstream.close();
43364766
43374767 // group.selection.get(0).parent = parent;
43384768 //FileOutputStream fos = new FileOutputStream(fullname);
....@@ -4353,7 +4783,7 @@
43534783 buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n");
43544784 cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height);
43554785 copy.generatePOV(buffer);
4356
- if (GrafreeD.standAlone)
4786
+ if (Grafreed.standAlone)
43574787 {
43584788 FileDialog browser = new FileDialog(frame, "Export POV", 1);
43594789 browser.show();
....@@ -4379,7 +4809,8 @@
43794809 Object3D client;
43804810 Object3D copy;
43814811 MenuBar menuBar;
4382
- Menu windowMenu;
4812
+ Menu fileMenu;
4813
+ MenuItem newItem;
43834814 MenuItem loadItem;
43844815 MenuItem saveItem;
43854816 MenuItem saveAsItem;
....@@ -4387,13 +4818,11 @@
43874818 MenuItem reexportItem;
43884819 MenuItem povItem;
43894820 MenuItem closeItem;
4390
- Menu cameraMenu;
4821
+
43914822 CheckboxMenuItem zBufferItem;
43924823 //MenuItem normalLensItem;
4393
- MenuItem editCameraItem;
4394
- MenuItem revertCameraItem;
4395
- CheckboxMenuItem toggleLiveItem;
43964824 MenuItem stepItem;
4825
+ CheckboxMenuItem toggleLiveItem;
43974826 CheckboxMenuItem toggleFullScreenItem;
43984827 CheckboxMenuItem toggleTimelineItem;
43994828 CheckboxMenuItem toggleRenderItem;
....@@ -4402,7 +4831,7 @@
44024831 CheckboxMenuItem toggleFootContactItem;
44034832 CheckboxMenuItem toggleDLItem;
44044833 CheckboxMenuItem toggleTextureItem;
4405
- CheckboxMenuItem toggleRandomItem;
4834
+ CheckboxMenuItem toggleSwitchItem;
44064835 CheckboxMenuItem toggleRootItem;
44074836 CheckboxMenuItem animationItem;
44084837 CheckboxMenuItem toggleHandleItem;
....@@ -4410,7 +4839,7 @@
44104839 JSplitPane mainPanel;
44114840 JScrollPane scrollpane;
44124841 JPanel toolbarPanel;
4413
- JPanel treePanel;
4842
+ cGridBag treePanel;
44144843 JPanel radioPanel;
44154844 ButtonGroup buttonGroup;
44164845 cGridBag ctrlPanel;
....@@ -4539,4 +4968,9 @@
45394968 //ObjectUI parent;
45404969
45414970 cNumberSlider normalpushField;
4971
+
4972
+ private MenuItem importGFDItem;
4973
+ private MenuItem importVRMLX3DItem;
4974
+ private MenuItem import3DSItem;
4975
+ private MenuItem importOBJItem;
45424976 }