Normand Briere
2019-06-21 15123b19e7bc8da2869429b07f0fbaa0598e945e
GroupEditor.java
....@@ -74,7 +74,7 @@
7474 this.copy = this.group = copy;
7575 //selectees = this.group.selectees;
7676
77
- SetupMenu2(objEditor);
77
+ SetupMenu2(this); //objEditor);
7878 SetupUI2(objEditor);
7979 objEditor.SetupUI(true);
8080 SetupViews(objEditor);
....@@ -98,14 +98,14 @@
9898
9999 void CloneClipboard(boolean supports)
100100 {
101
- assert(GrafreeD.clipboard.parent == null);
102
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
103
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
104
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
105
- makeSomething(CloneObject(GrafreeD.clipboard.get(0), false));
101
+ assert(Grafreed.clipboard.parent == null);
102
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
103
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
104
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
105
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
106106 else
107
- makeSomething(CloneObject(GrafreeD.clipboard, false));
108
- GrafreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
109109 }
110110
111111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -119,7 +119,7 @@
119119 // obj.support = null;
120120 if (!supports)
121121 obj.SaveSupports();
122
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
123123 obj.parent = parent;
124124 // obj.support = support;
125125 // clone.support = support; // aout 2013
....@@ -148,27 +148,18 @@
148148
149149 //JTextField nameField;
150150
151
- void SetupMenu2(ObjEditor oe)
151
+ void SetupMenu2(GroupEditor oe)
152152 {
153
- if (Globals.ADVANCED)
154
- {
155
- oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
156
- //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
157
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
158
- editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
159
- oe.cameraMenu.add("-");
160
- openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
161
- openWindowItem.addActionListener(this);
162
- editLeafItem.addActionListener(this);
163
- lookAtItem.addActionListener(this);
164
- //lookFromItem.addActinoListener(this);
165
- //switchItem.addActionListener(this);
166
- }
167
-
168153 Menu menu;
169154 oe.menuBar.add(menu = new Menu("Edit"));
170155 //editItem = menu.add(new MenuItem("Edit"));
171156 //editItem.addActionListener(this);
157
+
158
+// undoItem = menu.add(new MenuItem("Undo"));
159
+// undoItem.addActionListener(this);
160
+// redoItem = menu.add(new MenuItem("Redo"));
161
+// redoItem.addActionListener(this);
162
+// menu.add("-");
172163 duplicateItem = menu.add(new MenuItem("Duplicate"));
173164 duplicateItem.addActionListener(this);
174165 cloneItem = menu.add(new MenuItem("Clone"));
....@@ -206,14 +197,97 @@
206197 clearAllItem = menu.add(new MenuItem("Clear All"));
207198 clearAllItem.addActionListener(this);
208199 }
200
+
201
+ menuBar.add(cameraMenu = new Menu("View"));
202
+ //cameraMenu.add(zBufferItem = new CheckboxMenuItem("Z Buffer"));
203
+ //zBufferItem.addActionListener(this);
204
+ //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
205
+ //normalLensItem.addActionListener(this);
206
+ cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
207
+ revertCameraItem.addActionListener(this);
208
+
209
+ cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
210
+ toggleFullScreenItem.addItemListener(this);
211
+ toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
212
+ cameraMenu.add("-");
213
+
214
+ cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
215
+ toggleTextureItem.addItemListener(this);
216
+ toggleTextureItem.setState(CameraPane.textureon);
217
+
218
+ cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
219
+ toggleSwitchItem.addItemListener(this);
220
+ toggleSwitchItem.setState(CameraPane.SWITCH);
221
+
222
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
223
+ toggleHandleItem.addItemListener(this);
224
+ toggleHandleItem.setState(CameraPane.HANDLES);
225
+
226
+ cameraMenu.add(togglePaintItem = new CheckboxMenuItem("Paint mode"));
227
+ togglePaintItem.addItemListener(this);
228
+ togglePaintItem.setState(CameraPane.PAINTMODE);
229
+
230
+ if (Globals.ADVANCED)
231
+ {
232
+ cameraMenu.add("-");
233
+ cameraMenu.add(toggleLiveItem = new CheckboxMenuItem("Live"));
234
+ toggleLiveItem.addItemListener(this);
235
+ toggleLiveItem.setState(Globals.isLIVE());
209236
237
+ cameraMenu.add(stepItem = new MenuItem("Step"));
238
+ stepItem.addActionListener(this);
239
+ // cameraMenu.add(toggleDLItem = new CheckboxMenuItem("Display List"));
240
+ // toggleDLItem.addItemListener(this);
241
+ // toggleDLItem.setState(false);
242
+
243
+ cameraMenu.add(toggleRenderItem = new CheckboxMenuItem("Render"));
244
+ toggleRenderItem.addItemListener(this);
245
+ toggleRenderItem.setState(!CameraPane.frozen);
246
+
247
+ cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
248
+ toggleDebugItem.addItemListener(this);
249
+ toggleDebugItem.setState(CameraPane.DEBUG);
250
+
251
+ cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
252
+ toggleFrustumItem.addItemListener(this);
253
+ toggleFrustumItem.setState(CameraPane.FRUSTUM);
254
+
255
+ cameraMenu.add(toggleFootContactItem = new CheckboxMenuItem("Foot contact"));
256
+ toggleFootContactItem.addItemListener(this);
257
+ toggleFootContactItem.setState(CameraPane.FOOTCONTACT);
258
+
259
+ cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline"));
260
+ toggleTimelineItem.addItemListener(this);
261
+ }
262
+
263
+// cameraMenu.add(toggleRootItem = new CheckboxMenuItem("Alternate Root"));
264
+// toggleRootItem.addItemListener(this);
265
+// toggleRootItem.setState(false);
266
+// cameraMenu.add(animationItem = new CheckboxMenuItem("Animation"));
267
+// animationItem.addItemListener(this);
268
+// animationItem.setState(CameraPane.ANIMATION);
269
+ cameraMenu.add("-");
270
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
271
+ editCameraItem.addActionListener(this);
272
+
273
+ if (Globals.ADVANCED)
274
+ {
275
+ oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
276
+ //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
277
+ //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
278
+ editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
279
+ oe.cameraMenu.add("-");
280
+ openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
281
+ openWindowItem.addActionListener(this);
282
+ editLeafItem.addActionListener(this);
283
+ lookAtItem.addActionListener(this);
284
+ //lookFromItem.addActinoListener(this);
285
+ //switchItem.addActionListener(this);
286
+ }
287
+
210288 oe.menuBar.add(menu = new Menu("Setting"));
211289 if (Globals.ADVANCED)
212290 {
213
- resetMeshItem = menu.add(new MenuItem("Reset All"));
214
- resetMeshItem.addActionListener(this);
215
- stepAllItem = menu.add(new MenuItem("Step All"));
216
- stepAllItem.addActionListener(this);
217291 revertMeshItem = menu.add(new MenuItem("Revert Meshes"));
218292 revertMeshItem.addActionListener(this);
219293 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
....@@ -318,8 +392,12 @@
318392 resetTransformItem.addActionListener(this);
319393 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
320394 resetCentroidItem.addActionListener(this);
321
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
322
- transformgeometryItem.addActionListener(this);
395
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
396
+ resetCentroidXZItem.addActionListener(this);
397
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
398
+ transformGeometryItem.addActionListener(this);
399
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
400
+ transformChildrenItem.addActionListener(this);
323401
324402 oe.menuBar.add(menu = new Menu("Geometry"));
325403 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -368,6 +446,10 @@
368446 oe.menuBar.add(menu = new Menu("Attributes"));
369447 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
370448 clearMaterialsItem.addActionListener(this);
449
+ resetAllItem = menu.add(new MenuItem("Reset All"));
450
+ resetAllItem.addActionListener(this);
451
+ stepAllItem = menu.add(new MenuItem("Step All"));
452
+ stepAllItem.addActionListener(this);
371453 menu.add("-");
372454 liveleavesItem = menu.add(new MenuItem("Live Leaves"));
373455 liveleavesItem.addActionListener(this);
....@@ -388,6 +470,14 @@
388470 markleavesItem.addActionListener(this);
389471 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
390472 unmarkleavesItem.addActionListener(this);
473
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
474
+ rewindleavesItem.addActionListener(this);
475
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
476
+ unrewindleavesItem.addActionListener(this);
477
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
478
+ randomleavesItem.addActionListener(this);
479
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
480
+ unrandomleavesItem.addActionListener(this);
391481 menu.add("-");
392482 flipVItem = menu.add(new MenuItem("Flip V"));
393483 flipVItem.addActionListener(this);
....@@ -422,32 +512,23 @@
422512 sortbysizeItem.addActionListener(this);
423513 sortbynameItem = menu.add(new MenuItem("Sort by name"));
424514 sortbynameItem.addActionListener(this);
515
+ menu.add("-");
516
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
517
+ shareGeometriesItem.addActionListener(this);
518
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
519
+ mergeGeometriesItem.addActionListener(this);
425520 if (Globals.ADVANCED)
426521 {
427
- menu.add("-");
522
+ // Pretty much the same as duplicate and clone.
428523 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
429524 extractGeometriesItem.addActionListener(this);
430525 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
431526 cloneGeometriesItem.addActionListener(this);
432
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
433
- shareGeometriesItem.addActionListener(this);
434
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
435
- mergeGeometriesItem.addActionListener(this);
436527 }
437528
438529 oe.menuBar.add(menu = new Menu("Insert"));
439530 buildCreateMenu(menu);
440531
441
- oe.menuBar.add(menu = new Menu("Include"));
442
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
443
- importGFDItem.addActionListener(this);
444
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
445
- importVRMLX3DItem.addActionListener(this);
446
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
447
- importOBJItem.addActionListener(this);
448
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
449
- import3DSItem.addActionListener(this);
450
-
451532 oe.menuBar.add(menu = new Menu("Tools"));
452533 buildToolsMenu(menu);
453534 }
....@@ -484,11 +565,23 @@
484565 */
485566 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
486567
568
+ oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569
+ undoButton.setToolTipText("Undo changes");
570
+ undoButton.addActionListener(this);
571
+
572
+ oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
573
+ redoButton.setToolTipText("Redo changes");
574
+ redoButton.addActionListener(this);
575
+
576
+ oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577
+ saveButton.setToolTipText("Save changes");
578
+ saveButton.addActionListener(this);
579
+
487580 oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
488
- liveCB.setToolTipText("Enabled animation");
581
+ liveCB.setToolTipText("Enable animation");
489582 liveCB.addItemListener(this);
490583
491
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
584
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
492585 oneStepButton.setToolTipText("Animate one step forward");
493586 oneStepButton.addActionListener(this);
494587
....@@ -500,7 +593,7 @@
500593 trackCB.setToolTipText("Enable tracking");
501594 trackCB.addItemListener(this);
502595
503
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
596
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
504597 screenfitButton.setToolTipText("Screen fit");
505598 screenfitButton.addActionListener(this);
506599
....@@ -509,39 +602,39 @@
509602
510603 if (Globals.ADVANCED)
511604 {
512
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
605
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
513606 snapobjectButton.addActionListener(this);
514607 snapobjectButton.setToolTipText("Snap Object");
515608 }
516609
517
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
610
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
518611 flashSelectionButton.setToolTipText("Show selection");
519612 flashSelectionButton.addActionListener(this);
520613
521614 oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
522615
523
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
616
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
524617 twoButton.setToolTipText("Show center view only");
525618 twoButton.addActionListener(this);
526
- oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
619
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
527620 fourButton.addActionListener(this);
528621 fourButton.setToolTipText("Show left panel only");
529
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
622
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
530623 sixButton.setToolTipText("2-column layout left");
531624 sixButton.addActionListener(this);
532
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
625
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
533626 threeButton.setToolTipText("2-column layout right");
534627 threeButton.addActionListener(this);
535
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
628
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
536629 sevenButton.setToolTipText("3-column layout");
537630 sevenButton.addActionListener(this);
538631 //
539632
540
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
633
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
541634 rootButton.setToolTipText("Edit selection in new tab");
542635 rootButton.addActionListener(this);
543636
544
- oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
637
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
545638 closeButton.setToolTipText("Close tab");
546639 closeButton.addActionListener(this);
547640 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -549,11 +642,11 @@
549642
550643 cGridBag commandsPanel = new cGridBag();
551644
552
- commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
645
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
553646 editButton.setToolTipText("Edit selection");
554647 editButton.addActionListener(this);
555648
556
- commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
649
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
557650 uneditButton.setToolTipText("Unedit selection");
558651 uneditButton.addActionListener(this);
559652
....@@ -561,11 +654,11 @@
561654 allParamsButton.setToolTipText("Edit all params");
562655 allParamsButton.addActionListener(this);
563656
564
- commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
657
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565658 clearPanelButton.setToolTipText("Clear edit panel");
566659 clearPanelButton.addActionListener(this);
567660
568
- commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
661
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569662 unselectButton.setToolTipText("Unselect");
570663 unselectButton.addActionListener(this);
571664
....@@ -648,7 +741,7 @@
648741 zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
649742 zoomBoxCB.addItemListener(this);
650743
651
- if (Globals.ADVANCED)
744
+ if (true) // Globals.ADVANCED)
652745 {
653746 panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
654747 supportCB.setToolTipText("Enable rigging");
....@@ -721,6 +814,7 @@
721814 buttonGroup.add(radioButton);
722815 radioButton.doClick();
723816 }
817
+
724818 void SetupViews(ObjEditor oe)
725819 {
726820 oe.SetupViews();
....@@ -785,6 +879,7 @@
785879 } else if(e.getSource() == liveCB)
786880 {
787881 cameraView.ToggleLive();
882
+ refreshContents(false);
788883 }
789884 else if(e.getSource() == supportCB)
790885 {
....@@ -937,7 +1032,9 @@
9371032 // objEditor.DropFile((java.io.File[]) object, true);
9381033 // return;
9391034 // }
940
- if (string.charAt(0) == '/')
1035
+
1036
+ // File path for Mac and Windows
1037
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
9411038 {
9421039 // file(s)
9431040 String[] names = string.split("\n");
....@@ -964,7 +1061,7 @@
9641061
9651062 flashIt = false;
9661063 CameraPane pane = (CameraPane) target;
967
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
1064
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
9681065 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
9691066
9701067 if (group.selection.size() == 1)
....@@ -1190,7 +1287,7 @@
11901287 memoryItem.addActionListener(this);
11911288 menu.add(analyzeItem = new MenuItem("Analyze"));
11921289 analyzeItem.addActionListener(this);
1193
- menu.add(dumpItem = new MenuItem("Dump"));
1290
+ menu.add(dumpItem = new MenuItem("Print"));
11941291 dumpItem.addActionListener(this);
11951292 // menu.add(pathItem = new MenuItem("From-to path"));
11961293 // pathItem.addActionListener(this);
....@@ -1537,9 +1634,9 @@
15371634
15381635 void Overwrite(int mask)
15391636 {
1540
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1637
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
15411638 {
1542
- Object3D content = GrafreeD.clipboard.get(0);
1639
+ Object3D content = Grafreed.clipboard.get(0);
15431640
15441641 if (content instanceof cGroup && ((cGroup)content).transientlink )
15451642 content = ((cGroup)content).get(0);
....@@ -1844,23 +1941,6 @@
18441941 csg.addChild(child);
18451942 child.addChild(csg);
18461943 } else
1847
-
1848
- if (source == importGFDItem)
1849
- {
1850
- ImportGFD();
1851
- } else
1852
- if (source == importVRMLX3DItem)
1853
- {
1854
- ImportVRMLX3D();
1855
- } else
1856
- if (source == import3DSItem)
1857
- {
1858
- objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
1859
- } else
1860
- if (source == importOBJItem)
1861
- {
1862
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1863
- } else
18641944 if (source == computeAOItem)
18651945 {
18661946 Globals.drawMode = CameraPane.OCCLUSION;
....@@ -1879,7 +1959,7 @@
18791959 if (source == invariantsItem)
18801960 {
18811961 System.out.println("Invariants:");
1882
- GrafreeD.grafreeD.universe.invariants();
1962
+ Grafreed.grafreeD.universe.invariants();
18831963 } else
18841964 if (source == memoryItem)
18851965 {
....@@ -1897,6 +1977,18 @@
18971977 if (source == dumpItem)
18981978 {
18991979 DumpObject();
1980
+ } else
1981
+ if (source == undoButton)
1982
+ {
1983
+ Undo();
1984
+ } else
1985
+ if (source == redoButton)
1986
+ {
1987
+ Redo();
1988
+ } else
1989
+ if (source == saveButton)
1990
+ {
1991
+ Save();
19001992 } else
19011993 if (source == oneStepButton)
19021994 {
....@@ -1952,12 +2044,20 @@
19522044 {
19532045 loadClipboard(true);
19542046 } else
2047
+ if (source == undoItem)
2048
+ {
2049
+ Undo();
2050
+ } else
2051
+ if (source == redoItem)
2052
+ {
2053
+ Redo();
2054
+ } else
19552055 if (source == duplicateItem)
19562056 {
1957
- Object3D keep = GrafreeD.clipboard;
2057
+ Object3D keep = Grafreed.clipboard;
19582058 loadClipboard(false);
19592059 paste(false);
1960
- GrafreeD.clipboard = keep;
2060
+ Grafreed.clipboard = keep;
19612061 } else
19622062 if (source == cloneItem)
19632063 {
....@@ -2177,9 +2277,9 @@
21772277 // group.selection.get(0).setMasterThis(content); // should be identity
21782278 // refreshContents();
21792279 // }
2180
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2280
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
21812281 {
2182
- Object3D content = GrafreeD.clipboard.get(0);
2282
+ Object3D content = Grafreed.clipboard.get(0);
21832283
21842284 if (content instanceof cGroup && ((cGroup)content).transientlink )
21852285 content = ((cGroup)content).get(0);
....@@ -2229,9 +2329,9 @@
22292329 } else
22302330 if (source == setMasterItem)
22312331 {
2232
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2332
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
22332333 {
2234
- Object3D content = GrafreeD.clipboard.get(0);
2334
+ Object3D content = Grafreed.clipboard.get(0);
22352335
22362336 if (content instanceof cGroup && ((cGroup)content).transientlink )
22372337 content = ((cGroup)content).get(0);
....@@ -2244,9 +2344,9 @@
22442344 {
22452345 if (group.selection.size() == 1)
22462346 {
2247
- if (GrafreeD.clipboard.size() == 1)
2347
+ if (Grafreed.clipboard.size() == 1)
22482348 {
2249
- Object3D content = GrafreeD.clipboard.get(0);
2349
+ Object3D content = Grafreed.clipboard.get(0);
22502350
22512351 if (content instanceof cGroup && ((cGroup)content).transientlink )
22522352 content = ((cGroup)content).get(0);
....@@ -2263,7 +2363,7 @@
22632363 {
22642364 RevertMeshes();
22652365 } else
2266
- if (source == resetMeshItem)
2366
+ if (source == resetAllItem)
22672367 {
22682368 ResetAll();
22692369 } else
....@@ -2451,7 +2551,7 @@
24512551 } else
24522552 if (source == genNormalsMESHItem)
24532553 {
2454
- GenNormals(true); // TODO
2554
+ GenNormalsMESH();
24552555 } else
24562556 if (source == genNormalsORGANItem)
24572557 {
....@@ -2516,6 +2616,22 @@
25162616 if (source == unmarkleavesItem)
25172617 {
25182618 MarkLeaves(false);
2619
+ } else
2620
+ if (source == rewindleavesItem)
2621
+ {
2622
+ RewindLeaves(true);
2623
+ } else
2624
+ if (source == unrewindleavesItem)
2625
+ {
2626
+ RewindLeaves(false);
2627
+ } else
2628
+ if (source == randomleavesItem)
2629
+ {
2630
+ RandomLeaves(true);
2631
+ } else
2632
+ if (source == unrandomleavesItem)
2633
+ {
2634
+ RandomLeaves(false);
25192635 } else
25202636 if (source == flipVItem)
25212637 {
....@@ -2601,9 +2717,13 @@
26012717 {
26022718 SmoothMesh();
26032719 } else
2604
- if (source == transformgeometryItem)
2720
+ if (source == transformGeometryItem)
26052721 {
26062722 TransformGeometry();
2723
+ } else
2724
+ if (source == transformChildrenItem)
2725
+ {
2726
+ TransformChildren();
26072727 } else
26082728 if (source == resetTransformItem)
26092729 {
....@@ -2611,7 +2731,11 @@
26112731 } else
26122732 if (source == resetCentroidItem)
26132733 {
2614
- ResetCentroid();
2734
+ ResetCentroid(true);
2735
+ } else
2736
+ if (source == resetCentroidXZItem)
2737
+ {
2738
+ ResetCentroid(false);
26152739 } else
26162740 if (source == resetParentItem)
26172741 {
....@@ -2967,7 +3091,7 @@
29673091 child.CloseUI();
29683092 listUI.remove(child);
29693093
2970
- child.editWindow = null; // ???????????
3094
+ //child.editWindow = null; // ???????????
29713095 }
29723096 objEditor.ctrlPanel.FlushUI();
29733097 //objEditor.jTree.clearSelection();
....@@ -3053,7 +3177,10 @@
30533177 frontView.object = group;
30543178 sideView.object = group;
30553179 }
3180
+
3181
+// fix "+" issue
30563182 group.editWindow = this;
3183
+
30573184 /*
30583185 currentLayout = radio.layout;
30593186 if (currentLayout == null)
....@@ -3066,7 +3193,20 @@
30663193 //group.attributes = -1;
30673194 ResetModel();
30683195 refreshContents(true);
3069
- }
3196
+ } else if (event.getSource() == editCameraItem)
3197
+ {
3198
+ cameraView.ProtectCamera();
3199
+ cameraView.repaint();
3200
+ return;
3201
+ } else if (event.getSource() == revertCameraItem)
3202
+ {
3203
+ cameraView.RevertCamera();
3204
+ cameraView.repaint();
3205
+ return;
3206
+ // } else if (event.getSource() == textureButton)
3207
+ // {
3208
+ // return; // true;
3209
+ }
30703210 else
30713211 {
30723212 //return super.action(event, arg);
....@@ -3127,6 +3267,28 @@
31273267 refreshContents();
31283268 }
31293269
3270
+ void TransformChildren()
3271
+ {
3272
+ Object3D obj;
3273
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3274
+ {
3275
+ obj = (Object3D)e.nextElement();
3276
+ obj.KeepTextureMatrices();
3277
+ obj.TransformChildren();
3278
+ obj.RestoreTextureMatrices();
3279
+
3280
+// if (obj.parent == null)
3281
+// {
3282
+// System.out.println("NULL PARENT!");
3283
+// new Exception().printStackTrace();
3284
+// }
3285
+// else
3286
+// TouchTransform(obj);
3287
+// //obj.parent.Touch();
3288
+ }
3289
+
3290
+ refreshContents();
3291
+ }
31303292
31313293 void ResetTransform()
31323294 {
....@@ -3239,7 +3401,7 @@
32393401 refreshContents();
32403402 }
32413403
3242
- void ResetCentroid()
3404
+ void ResetCentroid(boolean full)
32433405 {
32443406 Object3D obj;
32453407 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3254,12 +3416,16 @@
32543416 LA.matIdentity(Object3D.mat);
32553417 obj.getBounds(minima, maxima, false);
32563418 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3257
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3419
+ if (full)
3420
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
32583421 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
32593422 obj.TransformMesh(Object3D.mat);
3423
+
32603424 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3261
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3425
+ if (full)
3426
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
32623427 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3428
+
32633429 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
32643430 //Object3D.mat[3][0] = -Object3D.mat[3][0];
32653431 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3288,7 +3454,8 @@
32883454
32893455 int size = obj.MemorySize();
32903456
3291
- System.err.println((size/1024) + " KB is the size of " + obj);
3457
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3458
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
32923459 }
32933460 }
32943461 catch (Exception e)
....@@ -3325,9 +3492,9 @@
33253492 obj = (Object3D)e.nextElement();
33263493
33273494 System.out.println("Object is: " + obj);
3328
- GrafreeD.AnalyzeObject(obj);
3495
+ Grafreed.AnalyzeObject(obj);
33293496 System.out.println("Boundary rep: " + obj.bRep);
3330
- GrafreeD.AnalyzeObject(obj.bRep);
3497
+ Grafreed.AnalyzeObject(obj.bRep);
33313498
33323499 // System.err.println((size/1024) + " KB is the size of " + obj);
33333500 }
....@@ -3369,6 +3536,13 @@
33693536 void GenNormals(boolean crease)
33703537 {
33713538 group.GenNormalsS(crease);
3539
+
3540
+ refreshContents();
3541
+ }
3542
+
3543
+ void GenNormalsMESH()
3544
+ {
3545
+ group.GenNormalsMeshS();
33723546
33733547 refreshContents();
33743548 }
....@@ -3541,8 +3715,8 @@
35413715
35423716 void ParseVertices()
35433717 {
3544
- boolean epsequal = GrafreeD.epsequal;
3545
- GrafreeD.epsequal = true;
3718
+ boolean epsequal = Grafreed.epsequal;
3719
+ Grafreed.epsequal = true;
35463720
35473721 for (int i=0; i<group.selection.size(); i++)
35483722 {
....@@ -3567,7 +3741,7 @@
35673741 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
35683742 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
35693743
3570
- g.add(GrafreeD.clipboard);
3744
+ g.add(Grafreed.clipboard);
35713745
35723746 buffer.add(g);
35733747 }
....@@ -3582,7 +3756,7 @@
35823756 makeSomething(buffer, i==group.selection.size()-1);
35833757 }
35843758
3585
- GrafreeD.epsequal = epsequal;
3759
+ Grafreed.epsequal = epsequal;
35863760
35873761 refreshContents();
35883762 }
....@@ -3600,7 +3774,16 @@
36003774 String pigment = Object3D.GetPigment(tex);
36013775 //String bump = Object3D.GetBump(tex);
36023776
3603
- com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3777
+ com.sun.opengl.util.texture.TextureData texturedata = null;
3778
+
3779
+ try
3780
+ {
3781
+ texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
3782
+ }
3783
+ catch (Exception e)
3784
+ {
3785
+ System.err.println("FAIL: " + node);
3786
+ }
36043787
36053788 double s = v.s;
36063789
....@@ -3732,7 +3915,7 @@
37323915 return;
37333916
37343917 Object3D poses = group.selection.get(0);
3735
- Object3D ref = GrafreeD.clipboard.get(0);
3918
+ Object3D ref = Grafreed.clipboard.get(0);
37363919
37373920 Object3D newgroup = new Object3D("Po:" + poses.name);
37383921
....@@ -3926,9 +4109,9 @@
39264109
39274110 void ClipMesh()
39284111 {
3929
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
4112
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
39304113 {
3931
- Object3D content = GrafreeD.clipboard.get(0);
4114
+ Object3D content = Grafreed.clipboard.get(0);
39324115
39334116 if (content instanceof cGroup && ((cGroup)content).transientlink )
39344117 content = ((cGroup)content).get(0);
....@@ -3937,7 +4120,7 @@
39374120 // {
39384121 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
39394122 // }
3940
- group.selection.ClipMesh(GrafreeD.clipboard);
4123
+ group.selection.ClipMesh(Grafreed.clipboard);
39414124 }
39424125 // group.selection.ClipMesh(GrafreeD.clipboard);
39434126 System.out.println("DONE.");
....@@ -3984,6 +4167,18 @@
39844167 void MarkLeaves(boolean hide)
39854168 {
39864169 group.selection.MarkLeaves(hide);
4170
+ refreshContents();
4171
+ }
4172
+
4173
+ void RewindLeaves(boolean hide)
4174
+ {
4175
+ group.selection.RewindLeaves(hide);
4176
+ refreshContents();
4177
+ }
4178
+
4179
+ void RandomLeaves(boolean hide)
4180
+ {
4181
+ group.selection.RandomLeaves(hide);
39874182 refreshContents();
39884183 }
39894184
....@@ -4072,7 +4267,7 @@
40724267 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
40734268
40744269 Object3D elem = (Object3D)group.selection.elementAt(i);
4075
- if(elem != group)
4270
+ if(elem != group || !newWindow)
40764271 {
40774272 // if (!(elem instanceof Composite))
40784273 // newWindow = false;
....@@ -4162,7 +4357,6 @@
41624357 //case 702: // Event.LIST_DESELECT
41634358 group.deselectAll();
41644359 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4165
- objEditor.ClearInfo(); // .GetMaterial());
41664360 if (tps != null)
41674361 {
41684362 for (int i=0; i < tps.length; i++)
....@@ -4171,10 +4365,8 @@
41714365
41724366 //if (child.parent != null)
41734367 //child.parent.addSelectee(child);
4368
+ objEditor.SetMaterial(child);
41744369 group.addSelectee(child);
4175
- objEditor.SetMaterial(child); // .GetMaterial());
4176
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4177
- System.err.println("info : " + child.GetPath());
41784370 }
41794371 }
41804372 // else
....@@ -4184,16 +4376,17 @@
41844376 // System.err.println("info : " + group.GetPath());
41854377 // }
41864378
4187
- objEditor.SetText(); // jan 2014
4188
-
4189
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4379
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
41904380 CameraPane.flash = true;
41914381
4192
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4382
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
41934383 // a camera
41944384 {
4195
- CameraPane.camerachangeframe = 0; // don't refuse it
4196
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4385
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4386
+ {
4387
+ CameraPane.camerachangeframe = 0; // don't refuse it
4388
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4389
+ }
41974390 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
41984391 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
41994392 }
....@@ -4206,6 +4399,26 @@
42064399
42074400 freezemodel = false;
42084401 }
4402
+
4403
+ void refreshContents(boolean cp)
4404
+ {
4405
+ if (!Globals.MOUSEDRAGGED)
4406
+ {
4407
+ objEditor.ClearInfo(); // .GetMaterial());
4408
+
4409
+ for (int i=0; i < group.selection.Size(); i++)
4410
+ {
4411
+ Object3D child = (Object3D) group.selection.get(i);
4412
+
4413
+ objEditor.AddInfo(child, this, true);
4414
+ System.err.println("info : " + child.GetPath());
4415
+ }
4416
+
4417
+ objEditor.SetText(); // jan 2014
4418
+ }
4419
+
4420
+ super.refreshContents(cp);
4421
+ }
42094422
42104423 void linkSomething(Object3D thing)
42114424 {
....@@ -4277,16 +4490,18 @@
42774490 {
42784491 if (group.selection.isEmpty())
42794492 return;
4280
- GrafreeD.clipboardIsTempGroup = false;
4493
+
4494
+ Grafreed.clipboardIsTempGroup = false;
42814495 Composite tGroup = null;
42824496 if (group.selection.size() > 0) // 1)
42834497 {
42844498 tGroup = new cGroup();
4285
- GrafreeD.clipboardIsTempGroup = true;
4499
+ Grafreed.clipboardIsTempGroup = true;
42864500 }
42874501
42884502 if (cut)
42894503 {
4504
+ Save();
42904505 //int indices[] = jList.getSelectedIndices();
42914506 //for (int i = indices.length - 1; i >= 0; i--)
42924507 //jList.remove(indices[i]);
....@@ -4322,16 +4537,16 @@
43224537 //System.out.println("cut " + child);
43234538 //System.out.println("parent = " + child.parent);
43244539 // tmp.addChild(child);
4325
- if (GrafreeD.clipboardIsTempGroup)
4540
+ if (Grafreed.clipboardIsTempGroup)
43264541 tGroup.add/*Child*/(tmp);
43274542 else
4328
- GrafreeD.clipboard = tmp;
4543
+ Grafreed.clipboard = tmp;
43294544 }
43304545 else
4331
- if (GrafreeD.clipboardIsTempGroup)
4546
+ if (Grafreed.clipboardIsTempGroup)
43324547 tGroup.add/*Child*/(child);
43334548 else
4334
- GrafreeD.clipboard = child;
4549
+ Grafreed.clipboard = child;
43354550 }
43364551
43374552 //ResetModel();
....@@ -4363,21 +4578,23 @@
43634578 //System.out.println("cut " + elem);
43644579 //System.out.println("parent = " + elem.parent);
43654580 // tmp.addChild(elem);
4366
- if (GrafreeD.clipboardIsTempGroup)
4581
+ if (Grafreed.clipboardIsTempGroup)
43674582 tGroup.add/*Child*/(tmp);
43684583 else
4369
- GrafreeD.clipboard = tmp;
4584
+ Grafreed.clipboard = tmp;
43704585 }
43714586 else
4372
- if (GrafreeD.clipboardIsTempGroup)
4587
+ if (Grafreed.clipboardIsTempGroup)
43734588 tGroup.add/*Child*/(child);
43744589 else
4375
- GrafreeD.clipboard = child;
4590
+ Grafreed.clipboard = child;
43764591 }
43774592
43784593 }
4379
- if (GrafreeD.clipboardIsTempGroup)
4380
- GrafreeD.clipboard = tGroup;
4594
+
4595
+ if (Grafreed.clipboardIsTempGroup)
4596
+ Grafreed.clipboard = tGroup;
4597
+
43814598 if (cut)
43824599 {
43834600 ResetModel();
....@@ -4391,7 +4608,7 @@
43914608 // return;
43924609 boolean first = true;
43934610
4394
- if (GrafreeD.clipboardIsTempGroup)
4611
+ if (Grafreed.clipboardIsTempGroup)
43954612 {
43964613 Composite temp;
43974614
....@@ -4402,7 +4619,7 @@
44024619 temp = (Composite)Applet3D.clipboard.deepCopy();
44034620 */
44044621 Object3D elem;
4405
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4622
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
44064623 {
44074624 Object3D child = (Object3D)e.nextElement();
44084625
....@@ -4436,14 +4653,14 @@
44364653 //Object3D cb = Applet3D.clipboard;
44374654 //temp.addChild(cb);
44384655 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4439
- assert(GrafreeD.clipboard.parent == null);
4440
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4441
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4442
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4443
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4656
+ assert(Grafreed.clipboard.parent == null);
4657
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4658
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4659
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4660
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
44444661 else
4445
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4446
- GrafreeD.clipboard.get(0).parent = keepparent;
4662
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4663
+ Grafreed.clipboard.get(0).parent = keepparent;
44474664 }
44484665
44494666 ResetModel();
....@@ -4492,9 +4709,9 @@
44924709 {
44934710 boolean first = true;
44944711
4495
- if (GrafreeD.clipboardIsTempGroup)
4712
+ if (Grafreed.clipboardIsTempGroup)
44964713 {
4497
- Composite temp = (Composite)GrafreeD.clipboard;
4714
+ Composite temp = (Composite)Grafreed.clipboard;
44984715 Object3D copy;
44994716 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
45004717 {
....@@ -4504,7 +4721,7 @@
45044721 }
45054722 } else
45064723 {
4507
- linkSomething(GrafreeD.clipboard); //.get(0));
4724
+ linkSomething(Grafreed.clipboard); //.get(0));
45084725 }
45094726 }
45104727 }
....@@ -4909,21 +5126,6 @@
49095126 }
49105127 */
49115128
4912
- void ImportGFD()
4913
- {
4914
- FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
4915
- browser.show();
4916
- String filename = browser.getFile();
4917
- if (filename != null && filename.length() > 0)
4918
- {
4919
- String fullname = browser.getDirectory() + filename;
4920
-
4921
- //Object3D readobj =
4922
- objEditor.ReadGFD(fullname, objEditor);
4923
- //makeSomething(readobj);
4924
- }
4925
- }
4926
-
49275129 /*
49285130 public void Callback(Object obj)
49295131 {
....@@ -4947,26 +5149,9 @@
49475149 }
49485150 */
49495151
4950
- void ImportVRMLX3D()
4951
- {
4952
- if (GrafreeD.standAlone)
4953
- {
4954
- /**/
4955
- FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
4956
- browser.show();
4957
- String filename = browser.getFile();
4958
- if (filename != null && filename.length() > 0)
4959
- {
4960
- String fullname = browser.getDirectory() + filename;
4961
- LoadVRMLX3D(fullname);
4962
- }
4963
- /**/
4964
- }
4965
- }
4966
-
49675152 String GetFile(String dialogName)
49685153 {
4969
- if (GrafreeD.standAlone)
5154
+ if (Grafreed.standAlone)
49705155 {
49715156 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
49725157 browser.show();
....@@ -5034,6 +5219,9 @@
50345219 cButton clearpanelButton;
50355220 cButton unselectButton;
50365221
5222
+ cButton saveButton;
5223
+ cButton undoButton;
5224
+ cButton redoButton;
50375225 cButton oneStepButton;
50385226
50395227 cButton screenfitButton;
....@@ -5066,6 +5254,8 @@
50665254 private MenuItem lookFromItem;
50675255 private MenuItem switchItem;
50685256 private MenuItem cutItem;
5257
+ private MenuItem undoItem;
5258
+ private MenuItem redoItem;
50695259 private MenuItem duplicateItem;
50705260 private MenuItem cloneItem;
50715261 private MenuItem cloneSupportItem;
....@@ -5079,7 +5269,7 @@
50795269 private MenuItem linkverticesItem;
50805270 private MenuItem relinkverticesItem;
50815271 private MenuItem setMasterItem;
5082
- private MenuItem resetMeshItem;
5272
+ private MenuItem resetAllItem;
50835273 private MenuItem stepAllItem;
50845274 private MenuItem revertMeshItem;
50855275 private MenuItem poseMeshItem;
....@@ -5129,6 +5319,10 @@
51295319 private MenuItem showleavesItem;
51305320 private MenuItem markleavesItem;
51315321 private MenuItem unmarkleavesItem;
5322
+ private MenuItem rewindleavesItem;
5323
+ private MenuItem unrewindleavesItem;
5324
+ private MenuItem randomleavesItem;
5325
+ private MenuItem unrandomleavesItem;
51325326
51335327 private MenuItem flipVItem;
51345328 private MenuItem unflipVItem;
....@@ -5140,8 +5334,10 @@
51405334 private MenuItem panoTexturesItem;
51415335
51425336 private MenuItem resetCentroidItem;
5143
- private MenuItem transformgeometryItem;
5337
+ private MenuItem resetCentroidXZItem;
51445338 private MenuItem resetTransformItem;
5339
+ private MenuItem transformGeometryItem;
5340
+ private MenuItem transformChildrenItem;
51455341 private MenuItem hideItem;
51465342 private MenuItem grabItem;
51475343 private MenuItem backItem;
....@@ -5210,11 +5406,6 @@
52105406 private MenuItem doubleItem;
52115407 private MenuItem tripleItem;
52125408
5213
- private MenuItem importGFDItem;
5214
- private MenuItem importVRMLX3DItem;
5215
- private MenuItem import3DSItem;
5216
- private MenuItem importOBJItem;
5217
-
52185409 private MenuItem computeAOItem;
52195410 private MenuItem recompileItem;
52205411 private MenuItem editScriptItem;
....@@ -5224,4 +5415,8 @@
52245415 private MenuItem analyzeItem;
52255416 private MenuItem dumpItem;
52265417 //boolean freezemodel = false;
5418
+
5419
+ Menu cameraMenu;
5420
+ MenuItem editCameraItem;
5421
+ MenuItem revertCameraItem;
52275422 }