Normand Briere
2019-06-11 d0dc7ff35d71919d503ae35592478b173cf3cfd3
ObjEditor.java
....@@ -143,6 +143,8 @@
143143 //nameField.removeActionListener(this);
144144 // objEditor.ctrlPanel.remove(nameField);
145145
146
+ objEditor.ctrlPanel.remove(namePanel);
147
+
146148 if (!GroupEditor.allparams)
147149 return;
148150
....@@ -165,7 +167,6 @@
165167 // objEditor.ctrlPanel.remove(fasterButton);
166168 // objEditor.ctrlPanel.remove(remarkButton);
167169
168
- objEditor.ctrlPanel.remove(namePanel);
169170 objEditor.ctrlPanel.remove(setupPanel);
170171 objEditor.ctrlPanel.remove(commandsPanel);
171172 objEditor.ctrlPanel.remove(pushPanel);
....@@ -275,24 +276,40 @@
275276 void SetupMenu()
276277 {
277278 frame.setMenuBar(menuBar = new MenuBar());
278
- menuBar.add(windowMenu = new Menu("File"));
279
- windowMenu.add(loadItem = new MenuItem("Load..."));
280
- windowMenu.add("-");
281
- windowMenu.add(saveItem = new MenuItem("Save"));
282
- windowMenu.add(saveAsItem = new MenuItem("Save As..."));
279
+ menuBar.add(fileMenu = new Menu("File"));
280
+ fileMenu.add(newItem = new MenuItem("New"));
281
+ fileMenu.add(loadItem = new MenuItem("Load..."));
282
+
283
+ //oe.menuBar.add(menu = new Menu("Include"));
284
+ Menu menu = new Menu("Import");
285
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
286
+ importOBJItem.addActionListener(this);
287
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
288
+ import3DSItem.addActionListener(this);
289
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
290
+ importVRMLX3DItem.addActionListener(this);
291
+ menu.add("-");
292
+ importGFDItem = menu.add(new MenuItem("Grafreed file..."));
293
+ importGFDItem.addActionListener(this);
294
+ fileMenu.add(menu);
295
+ fileMenu.add("-");
296
+
297
+ fileMenu.add(saveItem = new MenuItem("Save"));
298
+ fileMenu.add(saveAsItem = new MenuItem("Save As..."));
283299 //windowMenu.add(povItem = new MenuItem("Emit POV-Ray..."));
284
- windowMenu.add("-");
285
- windowMenu.add(exportAsItem = new MenuItem("Export Selection..."));
286
- windowMenu.add(reexportItem = new MenuItem("Re-export"));
287
- windowMenu.add("-");
300
+ fileMenu.add("-");
301
+ fileMenu.add(exportAsItem = new MenuItem("Export Selection..."));
302
+ fileMenu.add(reexportItem = new MenuItem("Re-export"));
303
+ fileMenu.add("-");
288304 if (client.parent != null)
289305 {
290
- windowMenu.add(closeItem = new MenuItem("Close"));
306
+ fileMenu.add(closeItem = new MenuItem("Close"));
291307 } else
292308 {
293
- windowMenu.add(closeItem = new MenuItem("Exit"));
309
+ fileMenu.add(closeItem = new MenuItem("Exit"));
294310 }
295311
312
+ newItem.addActionListener(this);
296313 loadItem.addActionListener(this);
297314 saveItem.addActionListener(this);
298315 saveAsItem.addActionListener(this);
....@@ -301,65 +318,10 @@
301318 //povItem.addActionListener(this);
302319 closeItem.addActionListener(this);
303320
304
- menuBar.add(cameraMenu = new Menu("View"));
305
- //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
306
- //zBufferItem.addActionListener(this);
307
- //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
308
- //normalLensItem.addActionListener(this);
309
- cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
310
- revertCameraItem.addActionListener(this);
311
- cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
312
- toggleTimelineItem.addItemListener(this);
313
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
314
- toggleFullScreenItem.addItemListener(this);
315
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
316
- cameraMenu.add("-");
317
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
318
- toggleTextureItem.addItemListener(this);
319
- toggleTextureItem.setState(CameraPane.textureon);
320
- cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
321
- toggleLiveItem.addItemListener(this);
322
- toggleLiveItem.setState(Globals.isLIVE());
323
- cameraMenu.add(stepItem = new MenuItem("Step"));
324
- stepItem.addActionListener(this);
325
-// cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
326
-// toggleDLItem.addItemListener(this);
327
-// toggleDLItem.setState(false);
328
- cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
329
- toggleRenderItem.addItemListener(this);
330
- toggleRenderItem.setState(!CameraPane.frozen);
331
- cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
332
- toggleDebugItem.addItemListener(this);
333
- toggleDebugItem.setState(CameraPane.DEBUG);
334
- cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
335
- toggleFrustumItem.addItemListener(this);
336
- toggleFrustumItem.setState(CameraPane.FRUSTUM);
337
- cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
338
- toggleFootContactItem.addItemListener(this);
339
- toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
340
- cameraMenu.add(toggleRandomItem = new CheckboxMenuItem("Random"));
341
- toggleRandomItem.addItemListener(this);
342
- toggleRandomItem.setState(CameraPane.RANDOM);
343
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
344
- toggleHandleItem.addItemListener(this);
345
- toggleHandleItem.setState(CameraPane.HANDLES);
346
- cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
347
- togglePaintItem.addItemListener(this);
348
- togglePaintItem.setState(CameraPane.PAINTMODE);
349
-// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
350
-// toggleRootItem.addItemListener(this);
351
-// toggleRootItem.setState(false);
352
-// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
353
-// animationItem.addItemListener(this);
354
-// animationItem.setState(CameraPane.ANIMATION);
355
- cameraMenu.add("-");
356
- cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera"));
357
- editCameraItem.addActionListener(this);
358
-
359321 objectPanel = new JTabbedPane();
360322 toolbarPanel = new JPanel();
361323 toolbarPanel.setName("Toolbar");
362
- treePanel = new JPanel();
324
+ treePanel = new cGridBag();
363325 treePanel.setName("Tree");
364326 ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout());
365327 ctrlPanel.setName("Edit");
....@@ -367,13 +329,15 @@
367329 materialPanel.setName("Material");
368330 /*JTextPane*/
369331 infoarea = createTextPane();
332
+ doc = infoarea.getStyledDocument();
333
+
370334 infoarea.setEditable(true);
371335 SetText();
372336 // infoarea.setFont(infoarea.getFont().deriveFont(10, 14f));
373337 // infoarea.setOpaque(false);
374338 // //infoarea.setForeground(textcolor);
375
- infoarea.setLineWrap(true);
376
- infoarea.setWrapStyleWord(true);
339
+// TEXTAREA infoarea.setLineWrap(true);
340
+// TEXTAREA infoarea.setWrapStyleWord(true);
377341 infoPanel = new JScrollPane(infoarea, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); //AS_NEEDED);
378342 infoPanel.setPreferredSize(new Dimension(50, 200));
379343 infoPanel.setName("Info");
....@@ -384,14 +348,14 @@
384348 mainPanel.setName("Main");
385349 mainPanel.setContinuousLayout(true);
386350 mainPanel.setOneTouchExpandable(true);
387
- mainPanel.setDividerLocation(1.0);
388351 mainPanel.setDividerSize(9);
389
- mainPanel.setResizeWeight(0);
352
+ mainPanel.setDividerLocation(0.5); //1.0);
353
+ mainPanel.setResizeWeight(0.5);
390354
391355 //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5));
392356 //mainPanel.setLayout(new GridBagLayout());
393357 toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
394
- treePanel.setLayout(new GridBagLayout());
358
+// treePanel.setLayout(new GridBagLayout());
395359 //ctrlPanel.setLayout(new GridBagLayout());
396360 //materialPanel.setLayout(new GridBagLayout());
397361
....@@ -432,7 +396,7 @@
432396 static String newline = "\n";
433397 protected static final String buttonString = "JButton";
434398 StyledDocument doc;
435
- JTextArea infoarea;
399
+ JTextPane infoarea;
436400
437401 void ClearInfo()
438402 {
....@@ -481,13 +445,13 @@
481445 //SendInfo("Name:", "bold");
482446 if (sel.GetTextures() != null || debug)
483447 {
484
- si.SendInfo(sel.toString(), "bold");
448
+ si.SendInfo(sel.toString() + (Globals.ADVANCED?"":" " + System.identityHashCode(sel)), "bold");
485449 //SendInfo("#children virtual = " + sel.size() + "; real = " + sel.Size() + newline, "regular");
486450 if (sel.Size() > 0)
487451 {
488452 si.SendInfo("#children = " + sel.Size(), "regular");
489453 }
490
- si.SendInfo((debug ? " Parent: " : " ") + sel.parent, "regular");
454
+ si.SendInfo((debug ? " Parent: " : " ") + sel.parent + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.parent)), "regular");
491455 if (debug)
492456 {
493457 try
....@@ -499,7 +463,10 @@
499463 }
500464
501465 if (full)
502
- si.SendInfo(" BBox: " + minima + " - " + maxima, "regular");
466
+ {
467
+ si.SendInfo(" BBox min: " + minima, "regular");
468
+ si.SendInfo(" BBox max: " + maxima, "regular");
469
+ }
503470
504471 if (sel.bRep != null)
505472 {
....@@ -526,7 +493,7 @@
526493 }
527494 if (sel.support != null)
528495 {
529
- si.SendInfo(" support: " + sel.support, "regular");
496
+ si.SendInfo(" support: " + sel.support + (Globals.ADVANCED?"":" " + System.identityHashCode(sel.support)), "regular");
530497 }
531498 if (sel.scriptnode != null)
532499 {
....@@ -597,6 +564,9 @@
597564 {
598565 CameraPane.pointflow = (PointFlow) sel;
599566 }
567
+
568
+ si.SendInfo("_____________________", "regular");
569
+ si.SendInfo("", "regular");
600570 }
601571 }
602572
....@@ -628,52 +598,52 @@
628598 cameraView.ToggleFullScreen();
629599 }
630600
631
- private JTextArea createTextPane()
601
+ private JTextPane createTextPane()
632602 {
633
- String[] initString =
634
- {
635
- "This is an editable JTextPane, ", //regular
636
- "another ", //italic
637
- "styled ", //bold
638
- "text ", //small
639
- "component, ", //large
640
- "which supports embedded components..." + newline,//regular
641
- " " + newline, //button
642
- "...and embedded icons..." + newline, //regular
643
- " ", //icon
644
- newline + "JTextPane is a subclass of JEditorPane that "
645
- + "uses a StyledEditorKit and StyledDocument, and provides "
646
- + "cover methods for interacting with those objects."
647
- };
603
+// TEXTAREA String[] initString =
604
+// {
605
+// "This is an editable JTextPane, ", //regular
606
+// "another ", //italic
607
+// "styled ", //bold
608
+// "text ", //small
609
+// "component, ", //large
610
+// "which supports embedded components..." + newline,//regular
611
+// " " + newline, //button
612
+// "...and embedded icons..." + newline, //regular
613
+// " ", //icon
614
+// newline + "JTextPane is a subclass of JEditorPane that "
615
+// + "uses a StyledEditorKit and StyledDocument, and provides "
616
+// + "cover methods for interacting with those objects."
617
+// };
618
+//
619
+// String[] initStyles =
620
+// {
621
+// "regular", "italic", "bold", "small", "large",
622
+// "regular", "button", "regular", "icon",
623
+// "regular"
624
+// };
625
+//
626
+// JTextPane textPane = new JTextPane();
627
+// textPane.setEditable(true);
628
+// /*StyledDocument*/ doc = textPane.getStyledDocument();
629
+// addStylesToDocument(doc);
630
+//
631
+// try
632
+// {
633
+// for (int j = 0; j < 2; j++)
634
+// {
635
+// for (int i = 0; i < initString.length; i++)
636
+// {
637
+// doc.insertString(doc.getLength(), initString[i],
638
+// doc.getStyle(initStyles[i]));
639
+// }
640
+// }
641
+// } catch (BadLocationException ble)
642
+// {
643
+// System.err.println("Couldn't insert initial text into text pane.");
644
+// }
648645
649
- String[] initStyles =
650
- {
651
- "regular", "italic", "bold", "small", "large",
652
- "regular", "button", "regular", "icon",
653
- "regular"
654
- };
655
-
656
- JTextPane textPane = new JTextPane();
657
- textPane.setEditable(true);
658
- /*StyledDocument*/ doc = textPane.getStyledDocument();
659
- addStylesToDocument(doc);
660
-
661
- try
662
- {
663
- for (int j = 0; j < 2; j++)
664
- {
665
- for (int i = 0; i < initString.length; i++)
666
- {
667
- doc.insertString(doc.getLength(), initString[i],
668
- doc.getStyle(initStyles[i]));
669
- }
670
- }
671
- } catch (BadLocationException ble)
672
- {
673
- System.err.println("Couldn't insert initial text into text pane.");
674
- }
675
-
676
- return new JTextArea(); // textPane;
646
+ return new JTextPane(); // textPane;
677647 }
678648
679649 protected void addStylesToDocument(StyledDocument doc)
....@@ -726,7 +696,7 @@
726696 protected static ImageIcon createImageIcon(String path,
727697 String description)
728698 {
729
- java.net.URL imgURL = GrafreeD.class.getResource(path);
699
+ java.net.URL imgURL = Grafreed.class.getResource(path);
730700 if (imgURL != null)
731701 {
732702 return new ImageIcon(imgURL, description);
....@@ -758,6 +728,7 @@
758728 // NumberSlider vDivsField;
759729 // JCheckBox endcaps;
760730 JCheckBox liveCB;
731
+ JCheckBox selectCB;
761732 JCheckBox hideCB;
762733 JCheckBox link2masterCB;
763734 JCheckBox markCB;
....@@ -943,10 +914,6 @@
943914
944915 void SetupUI2(ObjEditor oe)
945916 {
946
-// oe.aConstraints.weightx = 0;
947
-// oe.aConstraints.weighty = 0;
948
-// oe.aConstraints.gridx = 0;
949
-// oe.aConstraints.gridy = 0;
950917 //SetupName(oe);
951918
952919 namePanel = new cGridBag();
....@@ -963,32 +930,52 @@
963930 setupPanel = new cGridBag().setVertical(false);
964931
965932 liveCB = AddCheckBox(setupPanel, "Live", copy.live);
966
- link2masterCB = AddCheckBox(setupPanel, "Supp", copy.link2master);
967
- hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
933
+ liveCB.setToolTipText("Animate object");
934
+ selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect);
935
+ selectCB.setToolTipText("Make object selectable");
968936 // Return();
937
+ hideCB = AddCheckBox(setupPanel, "Hide", copy.hide);
938
+ hideCB.setToolTipText("Hide object");
969939 markCB = AddCheckBox(setupPanel, "Mark", copy.marked);
970
- rewindCB = AddCheckBox(setupPanel, "Rew", copy.rewind);
971
- randomCB = AddCheckBox(setupPanel, "Rand", copy.random);
940
+ markCB.setToolTipText("Set the animation target transform");
941
+
942
+ rewindCB = AddCheckBox(setupPanel, "Rewind", copy.rewind);
943
+ rewindCB.setToolTipText("Rewind animation");
944
+
945
+ randomCB = AddCheckBox(setupPanel, "Random", copy.random);
946
+ randomCB.setToolTipText("Option for switch node");
972947
948
+ if (Globals.ADVANCED)
949
+ {
950
+ link2masterCB = AddCheckBox(setupPanel, "Support", copy.link2master);
951
+ link2masterCB.setToolTipText("Attach to support");
952
+ speedupCB = AddCheckBox(setupPanel, "Speed", copy.speedup);
953
+ speedupCB.setToolTipText("Option motion capture");
954
+ }
955
+
973956 oe.ctrlPanel.add(setupPanel);
974957 oe.ctrlPanel.Return();
975958
976959 commandsPanel = new cGridBag().setVertical(false);
977960
978961 resetButton = AddButton(commandsPanel, "Reset");
962
+ resetButton.setToolTipText("Jump to frame zero");
979963 stepButton = AddButton(commandsPanel, "Step");
964
+ stepButton.setToolTipText("Step one frame");
980965 // resetAllButton = AddButton(oe, "Reset All");
981966 // stepAllButton = AddButton(oe, "Step All");
982
- speedupCB = AddCheckBox(commandsPanel, "Speed", copy.speedup);
983967 // Return();
984968 slowerButton = AddButton(commandsPanel, "Slow");
969
+ slowerButton.setToolTipText("Decrease animation speed");
985970 fasterButton = AddButton(commandsPanel, "Fast");
971
+ fasterButton.setToolTipText("Increase animation speed");
986972 remarkButton = AddButton(commandsPanel, "Remark");
973
+ remarkButton.setToolTipText("Set the current transform as the target");
987974
988975 oe.ctrlPanel.add(commandsPanel);
989976 oe.ctrlPanel.Return();
990977
991
- pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1);
978
+ pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons
992979 normalpushField = (cNumberSlider)pushPanel.getComponent(1);
993980 //Return();
994981
....@@ -1290,7 +1277,7 @@
12901277 scrollpane.addMouseWheelListener(this); // Default not fast enough
12911278
12921279 /*JTabbedPane*/ scenePanel = new cGridBag();
1293
- scenePanel.preferredWidth = 7;
1280
+ scenePanel.preferredWidth = 6;
12941281
12951282 JTabbedPane tabbedPane = new JTabbedPane();
12961283 tabbedPane.add(scrollpane);
....@@ -1396,8 +1383,8 @@
13961383
13971384 // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc);
13981385
1399
- frame.setSize(1024, 768);
1400
- frame.show();
1386
+ frame.setSize(1280, 860);
1387
+ frame.setVisible(true);
14011388
14021389 gridPanel.setDividerLocation(1.0);
14031390
....@@ -1436,17 +1423,25 @@
14361423
14371424 cGridBag editBar = new cGridBag().setVertical(false);
14381425
1439
- editBar.add(createMaterialButton = new cButton("Create")); // , aConstraints);
1426
+ editBar.add(createMaterialButton = new cButton("Create", !Grafreed.NIMBUSLAF)); // , aConstraints);
1427
+ createMaterialButton.setToolTipText("Create material");
14401428
14411429 /*
14421430 ctrlPanel.add(resetSlidersButton = new cButton("Reset All"), aConstraints);
14431431 */
14441432
1445
- editBar.add(clearMaterialButton = new cButton("Clear")); // , aConstraints);
1446
- editBar.add(resetSlidersButton = new cButton("Reset")); // , aConstraints);
1447
- editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
1448
- editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
1433
+ editBar.add(clearMaterialButton = new cButton("Clear", !Grafreed.NIMBUSLAF)); // , aConstraints);
1434
+ clearMaterialButton.setToolTipText("Clear material");
1435
+
1436
+ if (Globals.ADVANCED)
1437
+ {
1438
+ editBar.add(resetSlidersButton = new cButton("Reset", !Grafreed.NIMBUSLAF)); // , aConstraints);
1439
+ editBar.add(propagateToggle = new cCheckBox("Prop", propagate)); // , aConstraints);
1440
+ editBar.add(multiplyToggle = new cCheckBox("Mult", false)); // , aConstraints);
1441
+ }
14491442
1443
+ editBar.preferredHeight = 15;
1444
+
14501445 panel.add(editBar);
14511446
14521447 /**/
....@@ -1712,12 +1707,15 @@
17121707 opacityPowerField.addChangeListener(this);
17131708 /**/
17141709
1715
- resetSlidersButton.addActionListener(this);
17161710 clearMaterialButton.addActionListener(this);
17171711 createMaterialButton.addActionListener(this);
1718
-
1719
- propagateToggle.addItemListener(this);
1720
- multiplyToggle.addItemListener(this);
1712
+
1713
+ if (Globals.ADVANCED)
1714
+ {
1715
+ resetSlidersButton.addActionListener(this);
1716
+ propagateToggle.addItemListener(this);
1717
+ multiplyToggle.addItemListener(this);
1718
+ }
17211719 }
17221720
17231721 void DropFile(java.io.File[] files, boolean textures)
....@@ -1888,7 +1886,7 @@
18881886
18891887 //? flashIt = false;
18901888 CameraPane pane = (CameraPane) cameraView;
1891
- pane.clickStart(location.x, location.y, 0);
1889
+ pane.clickStart(location.x, location.y, 0, 0);
18921890 pane.clickEnd(location.x, location.y, 0, true);
18931891
18941892 if (group.selection.size() == 1)
....@@ -1937,6 +1935,7 @@
19371935 e2.printStackTrace();
19381936 }
19391937 }
1938
+
19401939 LoadJMEThread loadThread;
19411940
19421941 class LoadJMEThread extends Thread
....@@ -1994,6 +1993,7 @@
19941993 //LoadFile0(filename, converter);
19951994 }
19961995 }
1996
+
19971997 LoadOBJThread loadObjThread;
19981998
19991999 class LoadOBJThread extends Thread
....@@ -2345,11 +2345,11 @@
23452345
23462346 void ImportJME(com.jmex.model.converters.FormatConverter converter, String ext, String dialogName)
23472347 {
2348
- if (GrafreeD.standAlone)
2348
+ if (Grafreed.standAlone)
23492349 {
23502350 /**/
23512351 FileDialog browser = new FileDialog(frame, dialogName, FileDialog.LOAD);
2352
- browser.show();
2352
+ browser.setVisible(true);
23532353 String filename = browser.getFile();
23542354 if (filename != null && filename.length() > 0)
23552355 {
....@@ -2709,7 +2709,8 @@
27092709 return;
27102710 }
27112711
2712
- multiplyToggle.setSelected(mat.multiply);
2712
+ if (multiplyToggle != null)
2713
+ multiplyToggle.setSelected(mat.multiply);
27132714
27142715 assert (object.projectedVertices != null);
27152716
....@@ -2924,7 +2925,7 @@
29242925 frame.validate();
29252926
29262927 return;
2927
- } else if (event.getSource() == toggleRandomItem)
2928
+ } else if (event.getSource() == toggleSwitchItem)
29282929 {
29292930 cameraView.ToggleRandom();
29302931 cameraView.repaint();
....@@ -2955,6 +2956,10 @@
29552956 {
29562957 copy.live ^= true;
29572958 return;
2959
+ } else if (event.getSource() == selectCB)
2960
+ {
2961
+ copy.dontselect ^= true;
2962
+ return;
29582963 } else if (event.getSource() == hideCB)
29592964 {
29602965 copy.hide ^= true;
....@@ -2969,6 +2974,7 @@
29692974 if (event.getSource() == randomCB)
29702975 {
29712976 copy.random ^= true;
2977
+ objEditor.refreshContents();
29722978 return;
29732979 }
29742980 if (event.getSource() == speedupCB)
....@@ -2992,8 +2998,9 @@
29922998
29932999 public void actionPerformed(ActionEvent event)
29943000 {
3001
+ Object source = event.getSource();
29953002 // SCRIPT DIALOG
2996
- if (event.getSource() == okbutton)
3003
+ if (source == okbutton)
29973004 {
29983005 textpanel.setVisible(false);
29993006 textpanel.remove(textarea);
....@@ -3005,7 +3012,7 @@
30053012 textarea = null;
30063013 textpanel = null;
30073014 }
3008
- if (event.getSource() == cancelbutton)
3015
+ if (source == cancelbutton)
30093016 {
30103017 textpanel.setVisible(false);
30113018 textpanel.remove(textarea);
....@@ -3017,50 +3024,50 @@
30173024 //applySelf();
30183025 //client.refreshEditWindow();
30193026 //refreshContents();
3020
- if (event.getSource() == nameField)
3027
+ if (source == nameField)
30213028 {
30223029 //System.out.println("ObjEditor " + event);
30233030 applySelf0(true);
30243031 //parent.applySelf();
30253032 objEditor.refreshContents();
3026
- } else if (event.getSource() == resetButton)
3033
+ } else if (source == resetButton)
30273034 {
30283035 CameraPane.fullreset = true;
30293036 copy.Reset(); // ResetMeshes();
30303037 copy.Touch();
30313038 objEditor.refreshContents();
3032
- } else if (event.getSource() == stepItem)
3039
+ } else if (source == stepItem)
30333040 {
30343041 //cameraView.ONESTEP = true;
30353042 Globals.ONESTEP = true;
30363043 cameraView.repaint();
30373044 return;
3038
- } else if (event.getSource() == stepButton)
3045
+ } else if (source == stepButton)
30393046 {
30403047 copy.Step();
30413048 copy.Touch();
30423049 objEditor.refreshContents();
3043
- } else if (event.getSource() == slowerButton)
3050
+ } else if (source == slowerButton)
30443051 {
30453052 copy.Slower();
30463053 copy.Touch();
30473054 objEditor.refreshContents();
3048
- } else if (event.getSource() == fasterButton)
3055
+ } else if (source == fasterButton)
30493056 {
30503057 copy.Faster();
30513058 copy.Touch();
30523059 objEditor.refreshContents();
3053
- } else if (event.getSource() == remarkButton)
3060
+ } else if (source == remarkButton)
30543061 {
30553062 copy.Remark();
30563063 copy.Touch();
30573064 objEditor.refreshContents();
3058
- } else if (event.getSource() == stepAllButton)
3065
+ } else if (source == stepAllButton)
30593066 {
30603067 copy.StepAll();
30613068 copy.Touch();
30623069 objEditor.refreshContents();
3063
- } else if (event.getSource() == resetAllButton)
3070
+ } else if (source == resetAllButton)
30643071 {
30653072 //CameraPane.fullreset = true;
30663073 copy.ResetAll(); // ResetMeshes();
....@@ -3093,53 +3100,75 @@
30933100 // Close();
30943101 // }
30953102 // else
3096
- if (event.getSource() == resetSlidersButton)
3103
+ if (source == resetSlidersButton)
30973104 {
30983105 ResetSliders();
3099
- } else if (event.getSource() == clearMaterialButton)
3106
+ } else if (source == clearMaterialButton)
31003107 {
31013108 ClearMaterial();
3102
- } else if (event.getSource() == createMaterialButton)
3109
+ } else if (source == createMaterialButton)
31033110 {
31043111 CreateMaterial();
3105
- } else if (event.getSource() == clearPanelButton)
3112
+ } else if (source == clearPanelButton)
31063113 {
31073114 copy.ClearUI();
31083115 refreshContents(true);
3109
- } /*
3110
- }
3111
-
3112
- public boolean action(Event event, Object arg)
3113
- {
3114
- */ else if (event.getSource() == closeItem)
3116
+ } else if (source == importGFDItem)
3117
+ {
3118
+ ImportGFD();
3119
+ } else
3120
+ if (source == importVRMLX3DItem)
3121
+ {
3122
+ ImportVRMLX3D();
3123
+ } else
3124
+ if (source == import3DSItem)
3125
+ {
3126
+ objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
3127
+ } else
3128
+ if (source == importOBJItem)
3129
+ {
3130
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
3131
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
3132
+ browser.setVisible(true);
3133
+ String filename = browser.getFile();
3134
+ if (filename != null && filename.length() > 0)
3135
+ {
3136
+ String fullname = browser.getDirectory() + filename;
3137
+ makeSomething(ReadOBJ(fullname), true);
3138
+ }
3139
+ } else
3140
+ if (source == closeItem)
31153141 {
31163142 Close();
31173143 //return true;
3118
- } else if (event.getSource() == loadItem)
3144
+ } else if (source == loadItem)
31193145 {
31203146 load();
31213147 //return true;
3122
- } else if (event.getSource() == saveItem)
3148
+ } else if (source == newItem)
3149
+ {
3150
+ New();
3151
+ } else if (source == saveItem)
31233152 {
31243153 save();
31253154 //return true;
3126
- } else if (event.getSource() == saveAsItem)
3155
+ } else if (source == saveAsItem)
31273156 {
31283157 saveAs();
31293158 //return true;
3130
- } else if (event.getSource() == reexportItem)
3159
+ } else if (source == reexportItem)
31313160 {
31323161 reexport();
31333162 //return true;
3134
- } else if (event.getSource() == exportAsItem)
3163
+ } else if (source == exportAsItem)
31353164 {
31363165 export();
31373166 //return true;
3138
- } else if (event.getSource() == povItem)
3167
+ } else if (source == povItem)
31393168 {
31403169 generatePOV();
31413170 //return true;
3142
- } else if (event.getSource() == zBufferItem)
3171
+ } else if (source == zBufferItem)
31433172 {
31443173 try
31453174 {
....@@ -3161,21 +3190,8 @@
31613190 cameraView.repaint();
31623191 //return true;
31633192 }
3164
- */ else if (event.getSource() == editCameraItem)
3165
- {
3166
- cameraView.ProtectCamera();
3167
- cameraView.repaint();
3168
- return;
3169
- } else if (event.getSource() == revertCameraItem)
3170
- {
3171
- cameraView.RevertCamera();
3172
- cameraView.repaint();
3173
- return;
3174
-// } else if (event.getSource() == textureButton)
3175
-// {
3176
-// return; // true;
3177
- } else // combos...
3178
- if (event.getSource() == texresMenu)
3193
+ */ else // combos...
3194
+ if (source == texresMenu)
31793195 {
31803196 System.err.println("Object = " + copy + "; change value " + copy.texres + " to " + texresMenu.getSelectedIndex());
31813197 copy.texres = texresMenu.getSelectedIndex();
....@@ -3187,12 +3203,252 @@
31873203 }
31883204 }
31893205
3206
+ void New()
3207
+ {
3208
+ while (copy.Size() > 1)
3209
+ {
3210
+ copy.remove(1);
3211
+ }
3212
+
3213
+ ResetModel();
3214
+ objEditor.refreshContents();
3215
+ }
3216
+
3217
+ static public byte[] Compress(Object o)
3218
+ {
3219
+ try
3220
+ {
3221
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
3222
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(baos);
3223
+ ObjectOutputStream out = new ObjectOutputStream(zstream);
3224
+
3225
+ out.writeObject(o);
3226
+
3227
+ out.flush();
3228
+
3229
+ zstream.close();
3230
+ out.close();
3231
+
3232
+ return baos.toByteArray();
3233
+ } catch (Exception e)
3234
+ {
3235
+ System.err.println(e);
3236
+ return null;
3237
+ }
3238
+ }
3239
+
3240
+ static public Object Uncompress(byte[] bytes)
3241
+ {
3242
+ try
3243
+ {
3244
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
3245
+ java.util.zip.GZIPInputStream istream = new java.util.zip.GZIPInputStream(bais);
3246
+ ObjectInputStream in = new ObjectInputStream(istream);
3247
+ Object obj = in.readObject();
3248
+ in.close();
3249
+
3250
+ return obj;
3251
+ } catch (Exception e)
3252
+ {
3253
+ System.err.println(e);
3254
+ return null;
3255
+ }
3256
+ }
3257
+
3258
+ static public Object clone(Object o)
3259
+ {
3260
+ try
3261
+ {
3262
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
3263
+ ObjectOutputStream out = new ObjectOutputStream(baos);
3264
+
3265
+ out.writeObject(o);
3266
+
3267
+ out.flush();
3268
+ out.close();
3269
+
3270
+ byte[] bytes = baos.toByteArray();
3271
+
3272
+ System.out.println("clone = " + bytes.length);
3273
+
3274
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
3275
+ ObjectInputStream in = new ObjectInputStream(bais);
3276
+ Object obj = in.readObject();
3277
+ in.close();
3278
+
3279
+ return obj;
3280
+ } catch (Exception e)
3281
+ {
3282
+ System.err.println(e);
3283
+ return null;
3284
+ }
3285
+ }
3286
+
3287
+ cRadio GetCurrentTab()
3288
+ {
3289
+ cRadio ab;
3290
+ for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
3291
+ {
3292
+ ab = (cRadio)e.nextElement();
3293
+ if(ab.GetObject() == copy)
3294
+ {
3295
+ return ab;
3296
+ }
3297
+ }
3298
+
3299
+ return null;
3300
+ }
3301
+
3302
+ java.util.Hashtable<java.util.UUID, Object3D> hashtable = new java.util.Hashtable<java.util.UUID, Object3D>();
3303
+
3304
+ public void Save()
3305
+ {
3306
+ cRadio tab = GetCurrentTab();
3307
+
3308
+ copy.ExtractBigData(hashtable);
3309
+
3310
+ //EditorFrame.m_MainFrame.requestFocusInWindow();
3311
+ tab.graphs[tab.undoindex++] = (Object3D)clone(copy);
3312
+
3313
+ copy.RestoreBigData(hashtable);
3314
+
3315
+ //assert(hashtable.isEmpty());
3316
+
3317
+ for (int i = tab.undoindex; i < tab.graphs.length; i++)
3318
+ {
3319
+ tab.graphs[i] = null;
3320
+ }
3321
+
3322
+ // test save
3323
+ if (false)
3324
+ {
3325
+ try
3326
+ {
3327
+ FileOutputStream ostream = new FileOutputStream("save" + tab.undoindex);
3328
+ ObjectOutputStream p = new ObjectOutputStream(ostream);
3329
+
3330
+ p.writeObject(copy);
3331
+
3332
+ p.flush();
3333
+
3334
+ ostream.close();
3335
+ } catch (Exception e)
3336
+ {
3337
+ e.printStackTrace();
3338
+ }
3339
+ }
3340
+ }
3341
+
3342
+ void CopyChanged(Object3D obj)
3343
+ {
3344
+ copy.ExtractBigData(hashtable);
3345
+
3346
+ copy.clear();
3347
+
3348
+ for (int i=0; i<obj.Size(); i++)
3349
+ {
3350
+ copy.add(obj.get(i));
3351
+ }
3352
+
3353
+ copy.RestoreBigData(hashtable);
3354
+
3355
+ //assert(hashtable.isEmpty());
3356
+
3357
+ copy.Touch();
3358
+
3359
+ ResetModel();
3360
+ copy.HardTouch(); // recompile?
3361
+
3362
+ cRadio ab;
3363
+ for (java.util.Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
3364
+ {
3365
+ ab = (cRadio)e.nextElement();
3366
+ Object3D test = copy.GetObject(ab.object.GetUUID());
3367
+ //ab.camera = (Camera)copy.GetObject(ab.camera.GetUUID());
3368
+ if (test != null)
3369
+ {
3370
+ test.editWindow = ab.object.editWindow;
3371
+ ab.object = test;
3372
+ }
3373
+ }
3374
+
3375
+ refreshContents();
3376
+ }
3377
+
3378
+ public void Undo()
3379
+ {
3380
+ cRadio tab = GetCurrentTab();
3381
+
3382
+ if (tab.undoindex == 0)
3383
+ {
3384
+ java.awt.Toolkit.getDefaultToolkit().beep();
3385
+ return;
3386
+ }
3387
+
3388
+ if (tab.graphs[tab.undoindex] == null)
3389
+ {
3390
+ Save();
3391
+ tab.undoindex -= 1;
3392
+ }
3393
+
3394
+ tab.undoindex -= 1;
3395
+
3396
+ CopyChanged(tab.graphs[tab.undoindex]);
3397
+ }
3398
+
3399
+ public void Redo()
3400
+ {
3401
+ cRadio tab = GetCurrentTab();
3402
+
3403
+ if (tab.graphs[tab.undoindex + 1] == null)
3404
+ {
3405
+ java.awt.Toolkit.getDefaultToolkit().beep();
3406
+ return;
3407
+ }
3408
+
3409
+ tab.undoindex += 1;
3410
+
3411
+ CopyChanged(tab.graphs[tab.undoindex]);
3412
+ }
3413
+
3414
+ void ImportGFD()
3415
+ {
3416
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
3417
+ browser.show();
3418
+ String filename = browser.getFile();
3419
+ if (filename != null && filename.length() > 0)
3420
+ {
3421
+ String fullname = browser.getDirectory() + filename;
3422
+
3423
+ //Object3D readobj =
3424
+ objEditor.ReadGFD(fullname, objEditor);
3425
+ //makeSomething(readobj);
3426
+ }
3427
+ }
3428
+
3429
+ void ImportVRMLX3D()
3430
+ {
3431
+ if (Grafreed.standAlone)
3432
+ {
3433
+ /**/
3434
+ FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
3435
+ browser.show();
3436
+ String filename = browser.getFile();
3437
+ if (filename != null && filename.length() > 0)
3438
+ {
3439
+ String fullname = browser.getDirectory() + filename;
3440
+ LoadVRMLX3D(fullname);
3441
+ }
3442
+ /**/
3443
+ }
3444
+ }
3445
+
31903446 void ToggleAnimation()
31913447 {
31923448 if (!Globals.ANIMATION)
31933449 {
31943450 FileDialog browser = new FileDialog(frame, "Save Animation As...", FileDialog.SAVE);
3195
- browser.show();
3451
+ browser.setVisible(true);
31963452 String filename = browser.getFile();
31973453 if (filename != null && filename.length() > 0)
31983454 {
....@@ -3202,8 +3458,8 @@
32023458
32033459 Globals.ANIMATION ^= true;
32043460
3205
- GrafreeD.wav.cursor = 0;
3206
- GrafreeD.wav.loop = 0;
3461
+ Grafreed.wav.cursor = 0;
3462
+ Grafreed.wav.loop = 0;
32073463 }
32083464 } else
32093465 {
....@@ -3224,7 +3480,6 @@
32243480 callee.refreshContents();
32253481 } else
32263482 {
3227
- new Exception().printStackTrace();
32283483 System.exit(0);
32293484 }
32303485 }
....@@ -3254,7 +3509,7 @@
32543509 void CreateMaterial()
32553510 {
32563511 //copy.ClearMaterial(); // PATCH
3257
- copy.CreateMaterialS(multiplyToggle.isSelected());
3512
+ copy.CreateMaterialS(multiplyToggle != null && multiplyToggle.isSelected());
32583513 if (copy.selection.size() > 0)
32593514 //SetMaterial(copy);
32603515 {
....@@ -3313,11 +3568,11 @@
33133568 {
33143569 copy.ResetBlockLoop(); // temporary problem
33153570
3316
- boolean random = CameraPane.RANDOM;
3317
- CameraPane.RANDOM = false; // parse everything
3571
+ boolean random = CameraPane.SWITCH;
3572
+ CameraPane.SWITCH = false; // parse everything
33183573 copy.ResetDisplayList();
33193574 copy.HardTouch();
3320
- CameraPane.RANDOM = random;
3575
+ CameraPane.SWITCH = random;
33213576 }
33223577
33233578 // public void applySelf()
....@@ -3391,6 +3646,36 @@
33913646 {
33923647 //System.out.println("Propagate = " + propagate);
33933648 copy.UpdateMaterial(anchor, current, propagate);
3649
+
3650
+ if (copy.material != null)
3651
+ {
3652
+ cMaterial mat = copy.material;
3653
+
3654
+ colorField.SetToolTipValue((mat.color));
3655
+ modulationField.SetToolTipValue((mat.modulation));
3656
+ metalnessField.SetToolTipValue((mat.metalness));
3657
+ diffuseField.SetToolTipValue((mat.diffuse));
3658
+ specularField.SetToolTipValue((mat.specular));
3659
+ shininessField.SetToolTipValue((mat.shininess));
3660
+ shiftField.SetToolTipValue((mat.shift));
3661
+ ambientField.SetToolTipValue((mat.ambient));
3662
+ lightareaField.SetToolTipValue((mat.lightarea));
3663
+ diffusenessField.SetToolTipValue((mat.factor));
3664
+ velvetField.SetToolTipValue((mat.velvet));
3665
+ sheenField.SetToolTipValue((mat.sheen));
3666
+ subsurfaceField.SetToolTipValue((mat.subsurface));
3667
+ backlitField.SetToolTipValue((mat.bump));
3668
+ anisoField.SetToolTipValue((mat.aniso));
3669
+ anisoVField.SetToolTipValue((mat.anisoV));
3670
+ cameraField.SetToolTipValue((mat.cameralight));
3671
+ selfshadowField.SetToolTipValue((mat.diffuseness));
3672
+ shadowField.SetToolTipValue((mat.shadow));
3673
+ textureField.SetToolTipValue((mat.texture));
3674
+ opacityField.SetToolTipValue((mat.opacity));
3675
+ fakedepthField.SetToolTipValue((mat.fakedepth));
3676
+ shadowbiasField.SetToolTipValue((mat.shadowbias));
3677
+ }
3678
+
33943679 if (copy.material != null && copy.projectedVertices.length > 0 && copy.projectedVertices[0] != null)
33953680 {
33963681 copy.projectedVertices[0].x = (int) (bumpField.getFloat() * 1000);
....@@ -3506,7 +3791,7 @@
35063791 }
35073792
35083793 if (normalpushField != null)
3509
- copy.NORMALPUSH = (float)normalpushField.getFloat()/1000;
3794
+ copy.NORMALPUSH = (float)normalpushField.getFloat()/100;
35103795 }
35113796
35123797 void SnapObject()
....@@ -3770,6 +4055,7 @@
37704055
37714056 void makeSomething(Object3D thing, boolean resetmodel) // deselect)
37724057 {
4058
+ Save();
37734059 //Tween.set(thing, 0).target(1).start(tweenManager);
37744060 //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager);
37754061 // if (thing instanceof GenericJointDemo)
....@@ -3973,6 +4259,7 @@
39734259 }
39744260 }
39754261 }
4262
+
39764263 LoadGFDThread loadGFDThread;
39774264
39784265 void ReadGFD(String fullname, iCallBack cb)
....@@ -3993,7 +4280,8 @@
39934280 try
39944281 {
39954282 java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
3996
- java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream);
4283
+ java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream);
4284
+ java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream);
39974285
39984286 readobj = (Object3D) p.readObject();
39994287 istream.close();
....@@ -4001,7 +4289,20 @@
40014289 readobj.ResetDisplayList();
40024290 } catch (Exception e)
40034291 {
4004
- e.printStackTrace();
4292
+ //e.printStackTrace();
4293
+ try
4294
+ {
4295
+ java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
4296
+ java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream);
4297
+
4298
+ readobj = (Object3D) p.readObject();
4299
+ istream.close();
4300
+
4301
+ readobj.ResetDisplayList();
4302
+ } catch (Exception e2)
4303
+ {
4304
+ e2.printStackTrace();
4305
+ }
40054306 }
40064307 // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); }
40074308 // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); }
....@@ -4056,6 +4357,7 @@
40564357
40574358 if (readobj != null)
40584359 {
4360
+ Save();
40594361 try
40604362 {
40614363 //readobj.deepCopySelf(copy);
....@@ -4118,7 +4420,7 @@
41184420
41194421 void load() // throws ClassNotFoundException
41204422 {
4121
- if (GrafreeD.standAlone)
4423
+ if (Grafreed.standAlone)
41224424 {
41234425 FileDialog browser = new FileDialog(frame, "Load", FileDialog.LOAD);
41244426 browser.show();
....@@ -4205,11 +4507,13 @@
42054507 try
42064508 {
42074509 FileOutputStream ostream = new FileOutputStream(lastname);
4208
- ObjectOutputStream p = new ObjectOutputStream(ostream);
4510
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4511
+ ObjectOutputStream p = new ObjectOutputStream(zstream);
42094512
42104513 p.writeObject(copy);
42114514 p.flush();
42124515
4516
+ zstream.close();
42134517 ostream.close();
42144518
42154519 //FileOutputStream fos = new FileOutputStream(fullname);
....@@ -4219,11 +4523,12 @@
42194523 {
42204524 }
42214525 }
4526
+
42224527 String lastname;
42234528
42244529 void saveAs()
42254530 {
4226
- if (GrafreeD.standAlone)
4531
+ if (Grafreed.standAlone)
42274532 {
42284533 FileDialog browser = new FileDialog(frame, "Save As", FileDialog.SAVE);
42294534 browser.setVisible(true);
....@@ -4328,13 +4633,13 @@
43284633 try
43294634 {
43304635 FileOutputStream ostream = new FileOutputStream(filename);
4331
- // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4332
- ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream);
4636
+ java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream);
4637
+ ObjectOutputStream p = new ObjectOutputStream(zstream);
43334638
43344639 Object3D objectparent = obj.parent;
43354640 obj.parent = null;
43364641
4337
- Object3D object = (Object3D) GrafreeD.clone(obj);
4642
+ Object3D object = (Object3D) Grafreed.clone(obj);
43384643
43394644 obj.parent = objectparent;
43404645
....@@ -4346,8 +4651,8 @@
43464651 p.writeObject(object);
43474652 p.flush();
43484653
4654
+ zstream.close();
43494655 ostream.close();
4350
- // zstream.close();
43514656
43524657 // group.selection.get(0).parent = parent;
43534658 //FileOutputStream fos = new FileOutputStream(fullname);
....@@ -4368,7 +4673,7 @@
43684673 buffer.append("background { color rgb <0.8,0.8,0.8> }\n\n");
43694674 cameraView.renderCamera.generatePOV(buffer, bnds.width, bnds.height);
43704675 copy.generatePOV(buffer);
4371
- if (GrafreeD.standAlone)
4676
+ if (Grafreed.standAlone)
43724677 {
43734678 FileDialog browser = new FileDialog(frame, "Export POV", 1);
43744679 browser.show();
....@@ -4394,7 +4699,8 @@
43944699 Object3D client;
43954700 Object3D copy;
43964701 MenuBar menuBar;
4397
- Menu windowMenu;
4702
+ Menu fileMenu;
4703
+ MenuItem newItem;
43984704 MenuItem loadItem;
43994705 MenuItem saveItem;
44004706 MenuItem saveAsItem;
....@@ -4402,11 +4708,9 @@
44024708 MenuItem reexportItem;
44034709 MenuItem povItem;
44044710 MenuItem closeItem;
4405
- Menu cameraMenu;
4711
+
44064712 CheckboxMenuItem zBufferItem;
44074713 //MenuItem normalLensItem;
4408
- MenuItem editCameraItem;
4409
- MenuItem revertCameraItem;
44104714 MenuItem stepItem;
44114715 CheckboxMenuItem toggleLiveItem;
44124716 CheckboxMenuItem toggleFullScreenItem;
....@@ -4417,7 +4721,7 @@
44174721 CheckboxMenuItem toggleFootContactItem;
44184722 CheckboxMenuItem toggleDLItem;
44194723 CheckboxMenuItem toggleTextureItem;
4420
- CheckboxMenuItem toggleRandomItem;
4724
+ CheckboxMenuItem toggleSwitchItem;
44214725 CheckboxMenuItem toggleRootItem;
44224726 CheckboxMenuItem animationItem;
44234727 CheckboxMenuItem toggleHandleItem;
....@@ -4425,7 +4729,7 @@
44254729 JSplitPane mainPanel;
44264730 JScrollPane scrollpane;
44274731 JPanel toolbarPanel;
4428
- JPanel treePanel;
4732
+ cGridBag treePanel;
44294733 JPanel radioPanel;
44304734 ButtonGroup buttonGroup;
44314735 cGridBag ctrlPanel;
....@@ -4554,4 +4858,9 @@
45544858 //ObjectUI parent;
45554859
45564860 cNumberSlider normalpushField;
4861
+
4862
+ private MenuItem importGFDItem;
4863
+ private MenuItem importVRMLX3DItem;
4864
+ private MenuItem import3DSItem;
4865
+ private MenuItem importOBJItem;
45574866 }