Normand Briere
2019-07-14 bc829f47837b5a001f911542140b0b8e63c2bb0c
GroupEditor.java
....@@ -84,6 +84,10 @@
8484
8585 void CloneSelection(boolean supports)
8686 {
87
+ if (Globals.SAVEONMAKE)
88
+ Save();
89
+ boolean keep = Globals.SAVEONMAKE;
90
+ Globals.SAVEONMAKE = false;
8791 // Object3D keep = GrafreeD.clipboard;
8892 //Object3D obj;
8993 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +98,7 @@
9498
9599 makeSomething(clone, i==group.selection.size()-1);
96100 }
101
+ Globals.SAVEONMAKE = keep;
97102 }
98103
99104 void CloneClipboard(boolean supports)
....@@ -150,11 +155,19 @@
150155
151156 void SetupMenu2(GroupEditor oe)
152157 {
158
+ oe.jTree = new cTree();
159
+
153160 Menu menu;
154161 oe.menuBar.add(menu = new Menu("Edit"));
155162 //editItem = menu.add(new MenuItem("Edit"));
156163 //editItem.addActionListener(this);
157
- duplicateItem = menu.add(new MenuItem("Duplicate"));
164
+
165
+// undoItem = menu.add(new MenuItem("Undo"));
166
+// undoItem.addActionListener(this);
167
+// redoItem = menu.add(new MenuItem("Redo"));
168
+// redoItem.addActionListener(this);
169
+// menu.add("-");
170
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
158171 duplicateItem.addActionListener(this);
159172 cloneItem = menu.add(new MenuItem("Clone"));
160173 cloneItem.addActionListener(this);
....@@ -170,7 +183,6 @@
170183 copyItem.addActionListener(this);
171184 pasteItem = menu.add(new MenuItem("Paste"));
172185 pasteItem.addActionListener(this);
173
- menu.add("-");
174186
175187 menu.add("-");
176188 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -197,23 +209,23 @@
197209 //zBufferItem.addActionListener(this);
198210 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
199211 //normalLensItem.addActionListener(this);
200
- cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera"));
201
- revertCameraItem.addActionListener(this);
212
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
213
+ restoreCameraItem.addActionListener(this);
202214
203
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
204
- toggleFullScreenItem.addItemListener(this);
205
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
206
- cameraMenu.add("-");
215
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
216
+// toggleFullScreenItem.addItemListener(this);
217
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
218
+// cameraMenu.add("-");
219
+//
220
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
221
+// toggleTextureItem.addItemListener(this);
222
+// toggleTextureItem.setState(CameraPane.textureon);
223
+//
224
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
225
+// toggleSwitchItem.addItemListener(this);
226
+// toggleSwitchItem.setState(CameraPane.SWITCH);
207227
208
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
209
- toggleTextureItem.addItemListener(this);
210
- toggleTextureItem.setState(CameraPane.textureon);
211
-
212
- cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
213
- toggleSwitchItem.addItemListener(this);
214
- toggleSwitchItem.setState(CameraPane.SWITCH);
215
-
216
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
228
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
217229 toggleHandleItem.addItemListener(this);
218230 toggleHandleItem.setState(CameraPane.HANDLES);
219231
....@@ -240,7 +252,7 @@
240252
241253 cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
242254 toggleDebugItem.addItemListener(this);
243
- toggleDebugItem.setState(CameraPane.DEBUG);
255
+ toggleDebugItem.setState(Globals.DEBUG);
244256
245257 cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
246258 toggleFrustumItem.addItemListener(this);
....@@ -261,14 +273,14 @@
261273 // animationItem.addItemListener(this);
262274 // animationItem.setState(CameraPane.ANIMATION);
263275 cameraMenu.add("-");
264
- cameraMenu.add(editCameraItem = new MenuItem("Freeze Camera"));
276
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
265277 editCameraItem.addActionListener(this);
266278
267279 if (Globals.ADVANCED)
268280 {
269281 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
270282 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
271
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
283
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
272284 editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
273285 oe.cameraMenu.add("-");
274286 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
....@@ -276,7 +288,7 @@
276288 editLeafItem.addActionListener(this);
277289 lookAtItem.addActionListener(this);
278290 //lookFromItem.addActinoListener(this);
279
- //switchItem.addActionListener(this);
291
+ //switchViewItem.addActionListener(this);
280292 }
281293
282294 oe.menuBar.add(menu = new Menu("Setting"));
....@@ -321,21 +333,29 @@
321333 }
322334
323335 oe.menuBar.add(menu = new Menu("Group"));
324
- grabItem = menu.add(new MenuItem("Grab"));
325
- grabItem.addActionListener(this);
336
+// grabItem = menu.add(new MenuItem("Grab"));
337
+// grabItem.addActionListener(this);
326338 backItem = menu.add(new MenuItem("Back"));
327339 backItem.addActionListener(this);
328340 frontItem = menu.add(new MenuItem("Front"));
329341 frontItem.addActionListener(this);
330
- compositeItem = menu.add(new MenuItem("Composite"));
331
- compositeItem.addActionListener(this);
342
+// compositeItem = menu.add(new MenuItem("Composite"));
343
+// compositeItem.addActionListener(this);
344
+
345
+ if (Globals.ADVANCED)
346
+ {
332347 hideItem = menu.add(new MenuItem("Hidden Group"));
333348 hideItem.addActionListener(this);
349
+ }
334350 ungroupItem = menu.add(new MenuItem("Ungroup"));
335351 ungroupItem.addActionListener(this);
336
- menu.add("-");
337
- randomItem = menu.add(new MenuItem("Switch node"));
338
- randomItem.addActionListener(this);
352
+
353
+// menu.add("-");
354
+//
355
+// switchItem = menu.add(new MenuItem("Switch node"));
356
+// switchItem.addActionListener(this);
357
+ if (Globals.ADVANCED)
358
+ {
339359 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
340360 switchGeoItem.addActionListener(this);
341361 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
....@@ -343,8 +363,6 @@
343363 morphItem = menu.add(new MenuItem("Morph Group"));
344364 morphItem.addActionListener(this);
345365
346
- if (Globals.ADVANCED)
347
- {
348366 menu.add("-");
349367 physicsItem = menu.add(new MenuItem("Physics"));
350368 physicsItem.addActionListener(this);
....@@ -352,30 +370,29 @@
352370 frameselectorItem.addActionListener(this);
353371 scriptNodeItem = menu.add(new MenuItem("Script Node"));
354372 scriptNodeItem.addActionListener(this);
355
- cameraItem = menu.add(new MenuItem("Camera"));
356
- cameraItem.addActionListener(this);
357373 }
358374
359375 oe.menuBar.add(menu = new Menu("Object"));
360
- textureItem = menu.add(new MenuItem("Texture"));
361
- textureItem.addActionListener(this);
376
+// textureItem = menu.add(new MenuItem("Texture"));
377
+// textureItem.addActionListener(this);
362378 billboardItem = menu.add(new MenuItem("Billboard"));
363379 billboardItem.addActionListener(this);
364380 csgItem = menu.add(new MenuItem("CSG"));
365381 csgItem.addActionListener(this);
366
- shadowXItem = menu.add(new MenuItem("Shadow X"));
382
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
367383 shadowXItem.addActionListener(this);
368
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
384
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
369385 shadowYItem.addActionListener(this);
370
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
386
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
371387 shadowZItem.addActionListener(this);
388
+ attributeItem = menu.add(new MenuItem("Attribute"));
389
+ attributeItem.addActionListener(this);
390
+
372391 if (Globals.ADVANCED)
373392 {
374393 menu.add("-");
375394 linkerItem = menu.add(new MenuItem("Linker"));
376395 linkerItem.addActionListener(this);
377
- attributeItem = menu.add(new MenuItem("Attribute"));
378
- attributeItem.addActionListener(this);
379396 templateItem = menu.add(new MenuItem("Template"));
380397 templateItem.addActionListener(this);
381398 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -464,6 +481,14 @@
464481 markleavesItem.addActionListener(this);
465482 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
466483 unmarkleavesItem.addActionListener(this);
484
+ rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
485
+ rewindleavesItem.addActionListener(this);
486
+ unrewindleavesItem = menu.add(new MenuItem("Unrewind Leaves"));
487
+ unrewindleavesItem.addActionListener(this);
488
+ randomleavesItem = menu.add(new MenuItem("Random Leaves"));
489
+ randomleavesItem.addActionListener(this);
490
+ unrandomleavesItem = menu.add(new MenuItem("Unrandom Leaves"));
491
+ unrandomleavesItem.addActionListener(this);
467492 menu.add("-");
468493 flipVItem = menu.add(new MenuItem("Flip V"));
469494 flipVItem.addActionListener(this);
....@@ -521,6 +546,18 @@
521546
522547 void SetupUI2(ObjEditor oe)
523548 {
549
+ // June 2019
550
+ if (oe == null)
551
+ {
552
+ //super.SetupUI2(this);
553
+ //return;
554
+ }
555
+
556
+ if (copy != group)
557
+ {
558
+ //super.SetupUI2(this);
559
+ }
560
+
524561 //new Exception().printStackTrace();
525562
526563 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -549,27 +586,66 @@
549586 oe.radioPanel.add(dummyButton);
550587 oe.buttonGroup.add(dummyButton);
551588 */
589
+ cGridBag copyOptionsPanel = new cGridBag();
590
+
591
+ copyOptionsPanel.preferredHeight = 1;
592
+
552593 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
553594
554
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
595
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
596
+ //minButton.setToolTipText("Minimize window");
597
+ //minButton.addActionListener(this);
598
+
599
+ if (Globals.ADVANCED)
600
+ {
601
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
602
+ maxButton.setToolTipText("Maximize window");
603
+ maxButton.addActionListener(this);
604
+ }
605
+
606
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
607
+ fullButton.setToolTipText("Full-screen window");
608
+ fullButton.addActionListener(this);
609
+
610
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
611
+ screenfitButton.setToolTipText("Screen fit");
612
+ screenfitButton.addActionListener(this);
613
+
614
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
615
+ restoreCameraButton.setToolTipText("Restore viewpoint");
616
+ restoreCameraButton.addActionListener(this);
617
+
618
+ copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
619
+ undoButton.setToolTipText("Undo changes");
620
+ undoButton.addActionListener(this);
621
+ undoButton.setEnabled(false);
622
+
623
+ copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
624
+ redoButton.setToolTipText("Redo changes");
625
+ redoButton.addActionListener(this);
626
+ redoButton.setEnabled(false);
627
+
628
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
629
+ saveButton.setToolTipText("Save changes");
630
+ saveButton.addActionListener(this);
631
+
632
+ copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
555633 liveCB.setToolTipText("Enable animation");
556634 liveCB.addItemListener(this);
557635
558
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
636
+ copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
559637 oneStepButton.setToolTipText("Animate one step forward");
560638 oneStepButton.addActionListener(this);
561639
562
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
640
+ copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
563641 fastCB.setToolTipText("Fast mode");
564642 fastCB.addItemListener(this);
565643
566
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
567
- trackCB.setToolTipText("Enable tracking");
568
- trackCB.addItemListener(this);
569
-
570
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
571
- screenfitButton.setToolTipText("Screen fit");
572
- screenfitButton.addActionListener(this);
644
+ //oe.toolboxPanel.Return();
645
+
646
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
647
+// trackCB.setToolTipText("Enable tracking");
648
+// trackCB.addItemListener(this);
573649
574650 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
575651 // screenfitpointButton.addActionListener(this);
....@@ -581,65 +657,145 @@
581657 snapobjectButton.setToolTipText("Snap Object");
582658 }
583659
584
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585
- flashSelectionButton.setToolTipText("Show selection");
586
- flashSelectionButton.addActionListener(this);
660
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
587661
588
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
589
-
590
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
662
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
591663 twoButton.setToolTipText("Show center view only");
592664 twoButton.addActionListener(this);
593
- oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
665
+ this.fullscreenLayout = twoButton;
666
+
667
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
594668 fourButton.addActionListener(this);
595669 fourButton.setToolTipText("Show left panel only");
596
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
670
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
597671 sixButton.setToolTipText("2-column layout left");
598672 sixButton.addActionListener(this);
599
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
673
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600674 threeButton.setToolTipText("2-column layout right");
601675 threeButton.addActionListener(this);
602
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
676
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
603677 sevenButton.setToolTipText("3-column layout");
604678 sevenButton.addActionListener(this);
605679 //
606680
607
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
681
+ oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608682 rootButton.setToolTipText("Edit selection in new tab");
609683 rootButton.addActionListener(this);
610684
611
- oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
685
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
612686 closeButton.setToolTipText("Close tab");
613687 closeButton.addActionListener(this);
614688 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
615689 //clearButton.addActionListener(this);
616
-
617
- cGridBag commandsPanel = new cGridBag();
690
+
691
+ // INSERT
692
+ oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
693
+ gridButton.setToolTipText("Create grid");
694
+ gridButton.addActionListener(this);
695
+
696
+ oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
697
+ boxButton.setToolTipText("Create box");
698
+ boxButton.addActionListener(this);
699
+
700
+ oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
701
+ sphereButton.setToolTipText("Create sphere");
702
+ sphereButton.addActionListener(this);
703
+
704
+ oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
705
+ coneButton.setToolTipText("Create cone");
706
+ coneButton.addActionListener(this);
707
+
708
+ oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
709
+ torusButton.setToolTipText("Create torus");
710
+ torusButton.addActionListener(this);
711
+
712
+ oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
713
+ superButton.setToolTipText("Create superellipsoid");
714
+ superButton.addActionListener(this);
715
+
716
+ if (Globals.ADVANCED)
717
+ {
718
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
719
+ kleinButton.setToolTipText("Create Klein bottle");
720
+ kleinButton.addActionListener(this);
721
+ }
618722
619
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620
- editButton.setToolTipText("Edit selection");
723
+ oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
724
+ particlesButton.setToolTipText("Create particle system");
725
+ particlesButton.addActionListener(this);
726
+
727
+ oe.toolboxPanel.Return();
728
+
729
+ oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
730
+ groupButton.setToolTipText("Create group");
731
+ groupButton.addActionListener(this);
732
+
733
+ oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
734
+ compositeButton.setToolTipText("Create composite");
735
+ compositeButton.addActionListener(this);
736
+
737
+ oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
738
+ switchButton.setToolTipText("Create item switcher");
739
+ switchButton.addActionListener(this);
740
+
741
+ oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
742
+ loopButton.setToolTipText("Create loop");
743
+ loopButton.addActionListener(this);
744
+
745
+ oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
746
+ textureButton.setToolTipText("Create texture");
747
+ textureButton.addActionListener(this);
748
+
749
+ oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
750
+ overlayButton.setToolTipText("Create overlay");
751
+ overlayButton.addActionListener(this);
752
+
753
+ oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
754
+ lightButton.setToolTipText("Create light");
755
+ lightButton.addActionListener(this);
756
+
757
+ for (int i=6; --i>=0;)
758
+ {
759
+ oe.toolboxPanel.Return();
760
+ oe.toolboxPanel.add(new cGridBag());
761
+ oe.toolboxPanel.add(new cGridBag());
762
+ oe.toolboxPanel.add(new cGridBag());
763
+ oe.toolboxPanel.add(new cGridBag());
764
+ oe.toolboxPanel.add(new cGridBag());
765
+ oe.toolboxPanel.add(new cGridBag());
766
+ oe.toolboxPanel.add(new cGridBag());
767
+ }
768
+
769
+ // EDIT panel
770
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
771
+ editButton.setToolTipText("Pin selection controls");
621772 editButton.addActionListener(this);
622773
623
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
624
- uneditButton.setToolTipText("Unedit selection");
774
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
775
+ uneditButton.setToolTipText("Remove selection controls");
625776 uneditButton.addActionListener(this);
626777
627
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
628
- allParamsButton.setToolTipText("Edit all params");
778
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
779
+ allParamsButton.setToolTipText("Show all controle");
629780 allParamsButton.addActionListener(this);
630781
631
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
782
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
632783 clearPanelButton.setToolTipText("Clear edit panel");
633784 clearPanelButton.addActionListener(this);
634785
635
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
786
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
636787 unselectButton.setToolTipText("Unselect");
637788 unselectButton.addActionListener(this);
638789
639
- commandsPanel.preferredHeight = 1;
790
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
791
+ flashSelectionButton.setToolTipText("Highlight selection");
792
+ flashSelectionButton.addActionListener(this);
640793
641
- oe.treePanel.add(commandsPanel);
642
- oe.treePanel.Return();
794
+ editCommandsPanel.preferredHeight = 1;
795
+
796
+ SetPinStates(false);
797
+// oe.treePanel.add(commandsPanel);
798
+// oe.treePanel.Return();
643799
644800 // oe.aConstraints.gridx += 1;
645801 // oe.aConstraints.weighty = 0;
....@@ -656,27 +812,12 @@
656812
657813 JScrollPane jSP;
658814 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
659
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
815
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
660816 ResetModel();
661817
662818 oe.treePanel.add(jSPPanel);
663819 oe.treePanel.Return();
664820
665
- cGridBag copyOptionsPanel = new cGridBag();
666
-
667
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
668
- colorCB.setToolTipText("Copy color when dropped");
669
- colorCB.addItemListener(this);
670
-
671
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
672
- materialCB.setToolTipText("Copy material when dropped");
673
- materialCB.addItemListener(this);
674
-
675
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
676
- textureCB.setToolTipText("Copy texture when dropped");
677
- textureCB.addItemListener(this);
678
-
679
- copyOptionsPanel.preferredHeight = 1;
680821 oe.treePanel.add(copyOptionsPanel);
681822 oe.treePanel.Return();
682823
....@@ -707,23 +848,43 @@
707848
708849 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
709850 {
851
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
852
+ colorCB.setToolTipText("Copy color when dropped");
853
+ colorCB.addItemListener(this);
854
+
855
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
856
+ materialCB.setToolTipText("Copy material when dropped");
857
+ materialCB.addItemListener(this);
858
+
859
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
860
+ textureCB.setToolTipText("Copy texture when dropped");
861
+ textureCB.addItemListener(this);
862
+
863
+ panel.Return();
864
+
710865 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
711866 boxCB.setToolTipText("Display bounding boxes");
712867 boxCB.addItemListener(this);
713868
714869 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
715
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
870
+ zoomBoxCB.setToolTipText("Display only for wheel");
716871 zoomBoxCB.addItemListener(this);
717872
718873 if (true) // Globals.ADVANCED)
719874 {
720
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
721
- supportCB.setToolTipText("Enable rigging");
722
- supportCB.addItemListener(this);
875
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
876
+// supportCB.setToolTipText("Enable rigging");
877
+// supportCB.addItemListener(this);
878
+
879
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
880
+ freezeCB.setToolTipText("Fast moving camera");
881
+ freezeCB.addItemListener(this);
723882
724883 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
725884 // localCB.addItemListener(this);
726885
886
+ panel.Return();
887
+
727888 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
728889 crowdCB.setToolTipText("Used for crowds");
729890 crowdCB.addItemListener(this);
....@@ -740,6 +901,8 @@
740901 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
741902 // speakerMocapCB.addItemListener(this);
742903
904
+ panel.Return();
905
+
743906 if (false)
744907 {
745908 // handled in scripts
....@@ -754,32 +917,72 @@
754917 //constraints.gridy += 1;
755918 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
756919 smoothfocusCB.addItemListener(this);
920
+ panel.Return();
757921 }
758922
759923 //constraints.gridx += 1;
760924 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
761925 // debugCB.addItemListener(this);
762926
927
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
928
+ trackCB.setToolTipText("Enable tracking target");
929
+ trackCB.addItemListener(this);
930
+
763931 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
932
+ oeilCB.setToolTipText("Move camera when tracking");
764933 oeilCB.addItemListener(this);
765934
935
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
936
+ shadowCB.setToolTipText("When live compute shadows");
937
+ shadowCB.addItemListener(this);
938
+
939
+ panel.Return();
940
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
941
+ toggleTextureCB.setToolTipText("Load textures");
942
+ toggleTextureCB.addItemListener(this);
943
+
944
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
945
+ toggleSwitchCB.setToolTipText("Choose a single item");
946
+ toggleSwitchCB.addItemListener(this);
947
+
948
+ panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
949
+ autosaveCB.setToolTipText("On structure change");
950
+ autosaveCB.addItemListener(this);
951
+
952
+ panel.Return();
953
+ if (Globals.ADVANCED)
954
+ {
766955 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
767956 lookAtCB.setToolTipText("Look-at target");
768957 lookAtCB.addItemListener(this);
958
+ }
769959
770960 }
771961
772962 cGridBag fill = new cGridBag();
773
-
774963 fill.preferredHeight = 200;
964
+ cGridBag fill2 = new cGridBag();
965
+ fill2.preferredHeight = 200;
966
+ cGridBag fill3 = new cGridBag();
967
+ fill3.preferredHeight = 200;
775968
776969 panel.add(fill);
970
+ panel.add(fill2);
971
+ panel.add(fill3);
777972
778973 }
779974
780975 void EditObject(Object3D obj)
781976 {
782977 cRadio radioButton = new cRadio(obj.name);
978
+
979
+ // June 2019. Patch to avoid bug with transparency.
980
+ radioButton.hadMaterial = obj.material != null;
981
+ if (!radioButton.hadMaterial)
982
+ {
983
+ obj.material = new cMaterial();
984
+ }
985
+
783986 radioButton.SetObject(obj);
784987 radioButton.layout = sevenButton;
785988 radioButton.SetCamera(cameraView.renderCamera, false);
....@@ -791,6 +994,8 @@
791994
792995 void SetupViews(ObjEditor oe)
793996 {
997
+ theFrame = this;
998
+
794999 oe.SetupViews();
7951000
7961001 System.out.println("SetupViews");
....@@ -799,23 +1004,28 @@
7991004 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
8001005 }
8011006
802
- JCheckBox liveCB;
803
- JCheckBox supportCB;
804
- JCheckBox localCB;
805
- JCheckBox crowdCB;
806
- JCheckBox smoothCB;
807
- JCheckBox fastCB;
808
- JCheckBox slowCB;
809
- JCheckBox boxCB;
810
- JCheckBox zoomBoxCB;
811
- JCheckBox trackCB;
812
- JCheckBox smoothfocusCB;
1007
+ cToggleButton liveCB;
1008
+ cCheckBox supportCB;
1009
+ cCheckBox localCB;
1010
+ cCheckBox crowdCB;
1011
+ cCheckBox smoothCB;
1012
+ cToggleButton fastCB;
1013
+ cCheckBox slowCB;
1014
+ cCheckBox boxCB;
1015
+ cCheckBox zoomBoxCB;
1016
+ cCheckBox freezeCB;
1017
+ //cToggleButton trackCB;
1018
+ cCheckBox trackCB;
1019
+ cCheckBox smoothfocusCB;
8131020 // JCheckBox speakerMocapCB;
814
- JCheckBox speakerCameraCB;
815
- JCheckBox speakerFocusCB;
816
- JCheckBox debugCB;
817
- JCheckBox oeilCB;
818
- JCheckBox lookAtCB;
1021
+ cCheckBox speakerCameraCB;
1022
+ cCheckBox speakerFocusCB;
1023
+ cCheckBox debugCB;
1024
+
1025
+ cCheckBox oeilCB;
1026
+ cCheckBox shadowCB;
1027
+ cCheckBox autosaveCB;
1028
+ cCheckBox lookAtCB;
8191029
8201030 // static int COLOR = 1;
8211031 // static int MATERIAL = 2;
....@@ -823,9 +1033,9 @@
8231033
8241034 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
8251035
826
- JCheckBox colorCB;
827
- JCheckBox materialCB;
828
- JCheckBox textureCB;
1036
+ cCheckBox colorCB;
1037
+ cCheckBox materialCB;
1038
+ cCheckBox textureCB;
8291039
8301040 public void itemStateChanged(ItemEvent e)
8311041 {
....@@ -853,6 +1063,7 @@
8531063 } else if(e.getSource() == liveCB)
8541064 {
8551065 cameraView.ToggleLive();
1066
+ refreshContents(false);
8561067 }
8571068 else if(e.getSource() == supportCB)
8581069 {
....@@ -917,6 +1128,18 @@
9171128 {
9181129 cameraView.ToggleOeil();
9191130 }
1131
+ else if(e.getSource() == shadowCB)
1132
+ {
1133
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1134
+ }
1135
+ else if(e.getSource() == freezeCB)
1136
+ {
1137
+ Globals.FREEZEONMOVE ^= true;
1138
+ }
1139
+ else if(e.getSource() == autosaveCB)
1140
+ {
1141
+ Globals.SAVEONMAKE ^= true;
1142
+ }
9201143 else if(e.getSource() == lookAtCB)
9211144 {
9221145 cameraView.ToggleLookAt();
....@@ -933,7 +1156,8 @@
9331156
9341157 /**/
9351158 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
936
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1159
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1160
+ TreePath path = objEditor.jTree.getSelectionPath();
9371161 if ((path == null) || (path.getPathCount() <= 1)) {
9381162 // We can't move the root node or an empty selection
9391163 return;
....@@ -996,8 +1220,6 @@
9961220 }
9971221 }
9981222
999
- String string = (String) object;
1000
-
10011223 System.out.println("Transfer = " + object + "; drop : " + target);
10021224 // if( object instanceof java.io.File[])
10031225 // {
....@@ -1005,6 +1227,8 @@
10051227 // objEditor.DropFile((java.io.File[]) object, true);
10061228 // return;
10071229 // }
1230
+
1231
+ String string = object.toString();
10081232
10091233 // File path for Mac and Windows
10101234 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1050,23 +1274,33 @@
10501274
10511275 assert target == objEditor.jTree;
10521276 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1277
+ Object3D destinationLeaf;
10531278 try {
1054
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1279
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
10551280 } catch (Exception e) {
10561281 System.out.println("destinationPath : " + destinationPath);
10571282 return;
10581283 }
10591284
1060
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1285
+ for (int i=group.selection.size(); --i>=0;)
10611286 {
1287
+ Object3D child = (Object3D)group.selection.elementAt(i);
1288
+
1289
+ // Cannot move into itself
1290
+ if (child == destinationLeaf)
1291
+ return;
1292
+ }
1293
+
1294
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1295
+// {
10621296 loadClipboard(true);
10631297 objEditor.jTree.setSelectionPath(destinationPath);
10641298 pasteInto(false, false);
1065
- } else {
1066
- loadClipboard(false);
1067
- objEditor.jTree.setSelectionPath(destinationPath);
1068
- pasteInto(false, false); // true); // ???
1069
- }
1299
+// } else {
1300
+// loadClipboard(false);
1301
+// objEditor.jTree.setSelectionPath(destinationPath);
1302
+// pasteInto(false, false); // true); // ???
1303
+// }
10701304 }
10711305 public void dropActionChanged(DropTargetDragEvent dtde)
10721306 // Called if the user has modified the current drop gesture
....@@ -1171,22 +1405,30 @@
11711405 {
11721406 //heightFieldItem = menu.add(new MenuItem("Height Field"));
11731407 //heightFieldItem.addActionListener(this);
1174
- gridItem = menu.add(new MenuItem("Grid"));
1175
- gridItem.addActionListener(this);
1176
- rectoidItem = menu.add(new MenuItem("Box"));
1177
- rectoidItem.addActionListener(this);
1178
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1179
- ellipsoidItem.addActionListener(this);
1180
- coneItem = menu.add(new MenuItem("Cone"));
1181
- coneItem.addActionListener(this);
1182
- torusItem = menu.add(new MenuItem("Torus"));
1183
- torusItem.addActionListener(this);
1184
- superItem = menu.add(new MenuItem("Superellipsoid"));
1185
- superItem.addActionListener(this);
1408
+// gridItem = menu.add(new MenuItem("Grid"));
1409
+// gridItem.addActionListener(this);
1410
+// rectoidItem = menu.add(new MenuItem("Box"));
1411
+// rectoidItem.addActionListener(this);
1412
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1413
+// ellipsoidItem.addActionListener(this);
1414
+// coneItem = menu.add(new MenuItem("Cone"));
1415
+// coneItem.addActionListener(this);
1416
+// torusItem = menu.add(new MenuItem("Torus"));
1417
+// torusItem.addActionListener(this);
1418
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1419
+// superItem.addActionListener(this);
1420
+
1421
+ cameraItem = menu.add(new MenuItem("Camera"));
1422
+ cameraItem.addActionListener(this);
1423
+
1424
+ if (!Globals.ADVANCED)
1425
+ {
11861426 kleinItem = menu.add(new MenuItem("Klein Bottle"));
11871427 kleinItem.addActionListener(this);
1188
- particleItem = menu.add(new MenuItem("Particle system"));
1189
- particleItem.addActionListener(this);
1428
+ }
1429
+
1430
+// particleItem = menu.add(new MenuItem("Particle system"));
1431
+// particleItem.addActionListener(this);
11901432 if (Globals.ADVANCED)
11911433 {
11921434 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1212,15 +1454,15 @@
12121454 }
12131455 bezierItem = menu.add(new MenuItem("Bezier Patch"));
12141456 bezierItem.addActionListener(this);
1215
- overlayItem = menu.add(new MenuItem("Overlay"));
1216
- overlayItem.addActionListener(this);
1217
- lightItem = menu.add(new MenuItem("Light"));
1218
- lightItem.addActionListener(this);
1457
+// overlayItem = menu.add(new MenuItem("Overlay"));
1458
+// overlayItem.addActionListener(this);
1459
+// lightItem = menu.add(new MenuItem("Light"));
1460
+// lightItem.addActionListener(this);
12191461 menu.add("-");
12201462 //superLoopItem = menu.add(new MenuItem("Super Loop"));
12211463 //superLoopItem.addActionListener(this);
1222
- loopItem = menu.add(new MenuItem("Loop"));
1223
- loopItem.addActionListener(this);
1464
+// loopItem = menu.add(new MenuItem("Loop"));
1465
+// loopItem.addActionListener(this);
12241466 doubleItem = menu.add(new MenuItem("Fork"));
12251467 doubleItem.addActionListener(this);
12261468 if (Globals.ADVANCED)
....@@ -1236,6 +1478,9 @@
12361478 animationItem.addItemListener(this);
12371479 animationItem.setState(Globals.ANIMATION);
12381480
1481
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1482
+ archiveItem.addActionListener(this);
1483
+
12391484 menu.add("-");
12401485 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
12411486 parseverticesItem.addActionListener(this);
....@@ -1248,6 +1493,8 @@
12481493 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
12491494 reduce34MorphItem.addActionListener(this);
12501495 menu.add("-");
1496
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1497
+ memoryItem.addActionListener(this);
12511498 menu.add(computeAOItem = new MenuItem("Compute AO"));
12521499 computeAOItem.addActionListener(this);
12531500
....@@ -1256,11 +1503,9 @@
12561503 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
12571504 mirrorItem.addActionListener(this);
12581505 menu.add("-");
1259
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1260
- memoryItem.addActionListener(this);
12611506 menu.add(analyzeItem = new MenuItem("Analyze"));
12621507 analyzeItem.addActionListener(this);
1263
- menu.add(dumpItem = new MenuItem("Dump"));
1508
+ menu.add(dumpItem = new MenuItem("Print"));
12641509 dumpItem.addActionListener(this);
12651510 // menu.add(pathItem = new MenuItem("From-to path"));
12661511 // pathItem.addActionListener(this);
....@@ -1401,9 +1646,24 @@
14011646 shadow.material = new cMaterial(obj.material);
14021647 shadow.material.diffuse = 0.0001f;
14031648 shadow.material.specular = 0.0001f;
1649
+ //shadow.projectedVertices[1].x = 300;
14041650
14051651 makeSomething(shadow);
14061652 }
1653
+
1654
+ private void ClearUnpinned()
1655
+ {
1656
+ //for (Object3D obj : listUI)
1657
+ for (int i=listUI.size(); --i>=0;)
1658
+ {
1659
+ Object3D obj = listUI.elementAt(i);
1660
+ if (!obj.pinned)
1661
+ {
1662
+ obj.CloseUI();
1663
+ listUI.remove(i);
1664
+ }
1665
+ }
1666
+ }
14071667
14081668 /**
14091669 * applyExample
....@@ -1648,7 +1908,7 @@
16481908 {
16491909 ScreenFit();
16501910 } else
1651
- if (source == switchItem)
1911
+ if (source == switchViewItem)
16521912 {
16531913 cVector v1 = new cVector();
16541914 cVector v2 = new cVector();
....@@ -1657,11 +1917,11 @@
16571917 objEditor.cameraView.renderCamera.setAim(v2, v1);
16581918 objEditor.cameraView.repaint();
16591919 } else
1660
- if (source == rectoidItem)
1920
+ if (source == rectoidItem || source == boxButton)
16611921 {
16621922 makeSomething(new Box());
16631923 } else
1664
- if (source == particleItem)
1924
+ if (source == particleItem || source == particlesButton)
16651925 {
16661926 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
16671927 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1740,27 +2000,27 @@
17402000
17412001 makeSomething(obj);
17422002 } else
1743
- if (source == gridItem)
2003
+ if (source == gridItem || source == gridButton)
17442004 {
17452005 makeSomething(new Grid());
17462006 } else
1747
- if (source == ellipsoidItem)
2007
+ if (source == ellipsoidItem || source == sphereButton)
17482008 {
17492009 makeSomething(new Sphere());
17502010 } else
1751
- if (source == coneItem)
2011
+ if (source == coneItem || source == coneButton)
17522012 {
17532013 makeSomething(new Cone());
17542014 } else
1755
- if (source == torusItem)
2015
+ if (source == torusItem || source == torusButton)
17562016 {
17572017 makeSomething(new Torus());
17582018 } else
1759
- if (source == superItem)
2019
+ if (source == superItem || source == superButton)
17602020 {
17612021 makeSomething(new Superellipsoid());
17622022 } else
1763
- if (source == kleinItem)
2023
+ if (source == kleinItem || source == kleinButton)
17642024 {
17652025 makeSomething(new Klein());
17662026 } else
....@@ -1780,7 +2040,7 @@
17802040 {
17812041 makeSomething(new BezierSurface());
17822042 } else
1783
- if (source == overlayItem)
2043
+ if (source == overlayItem || source == overlayButton)
17842044 {
17852045 /*
17862046 Object3D obj = new BezierSurface(5,8);
....@@ -1828,7 +2088,7 @@
18282088 s.setup();
18292089 makeSomething(s);
18302090 } else
1831
- if (source == lightItem)
2091
+ if (source == lightItem || source == lightButton)
18322092 {
18332093 makeSomething(new Light());
18342094 } else
....@@ -1878,30 +2138,30 @@
18782138
18792139 group(g);
18802140 } else
1881
- if (source == loopItem)
2141
+ if (source == loopItem || source == loopButton)
18822142 {
18832143 Composite csg = new GroupLeaf();
18842144 csg.count = 5;
18852145 group(csg);
1886
- Composite child = new cGroup();
2146
+ Composite child = new cGroup("Branch");
18872147 csg.addChild(child);
18882148 child.addChild(csg);
18892149 } else
18902150 if (source == doubleItem)
18912151 {
1892
- Composite csg = new GroupLeaf();
2152
+ Composite csg = new GroupLeaf("Fork");
18932153 csg.count = 5;
18942154 group(csg);
1895
- Composite child = new cGroup();
2155
+ Composite child = new cGroup("Branch A");
18962156 csg.addChild(child);
18972157 child.addChild(csg);
1898
- child = new cGroup();
2158
+ child = new cGroup("Branch B");
18992159 csg.addChild(child);
19002160 child.addChild(csg);
19012161 } else
19022162 if (source == tripleItem)
19032163 {
1904
- Composite csg = new GroupLeaf();
2164
+ Composite csg = new GroupLeaf("Trident");
19052165 csg.count = 4;
19062166 group(csg);
19072167 Composite child = new cGroup();
....@@ -1951,6 +2211,32 @@
19512211 {
19522212 DumpObject();
19532213 } else
2214
+ if (source == minButton)
2215
+ {
2216
+ Minimize();
2217
+ } else
2218
+ if (source == maxButton)
2219
+ {
2220
+ Maximize();
2221
+ } else
2222
+ if (source == fullButton)
2223
+ {
2224
+ ToggleFullScreen();
2225
+ } else
2226
+ if (source == undoButton)
2227
+ {
2228
+ if (!Undo())
2229
+ java.awt.Toolkit.getDefaultToolkit().beep();
2230
+ } else
2231
+ if (source == redoButton)
2232
+ {
2233
+ Redo();
2234
+ } else
2235
+ if (source == saveButton)
2236
+ {
2237
+ if (!Save(true))
2238
+ java.awt.Toolkit.getDefaultToolkit().beep();
2239
+ } else
19542240 if (source == oneStepButton)
19552241 {
19562242 Globals.ONESTEP = true;
....@@ -1958,17 +2244,14 @@
19582244 } else
19592245 if (source == screenfitButton)
19602246 {
1961
- //Reload(lastConverter, lastFilename, true);
19622247 ScreenFit();
19632248 } else
19642249 if (source == screenfitpointButton)
19652250 {
1966
- //Reload(lastConverter, lastFilename, true);
19672251 ScreenFitPoint();
19682252 } else
19692253 if (source == snapobjectButton)
19702254 {
1971
- //Reload(lastConverter, lastFilename, true);
19722255 SnapObject();
19732256 } else
19742257 // if (event.getSource() == recompileButton)
....@@ -2004,6 +2287,14 @@
20042287 if (source == cutItem || source == clearButton)
20052288 {
20062289 loadClipboard(true);
2290
+ } else
2291
+ if (source == undoItem)
2292
+ {
2293
+ Undo();
2294
+ } else
2295
+ if (source == redoItem)
2296
+ {
2297
+ Redo();
20072298 } else
20082299 if (source == duplicateItem)
20092300 {
....@@ -2336,9 +2627,9 @@
23362627 {
23372628 ClearSelection(true);
23382629 } else
2339
- if (source == grabItem)
2630
+ if (source == grabItem || source == groupButton)
23402631 {
2341
- group(new cGroup(), true);
2632
+ group(new cGroup(), false); // true);
23422633 } else
23432634 if (source == hideItem)
23442635 {
....@@ -2356,11 +2647,11 @@
23562647 {
23572648 makeSomething(new Camera());
23582649 } else
2359
- if (source == compositeItem)
2650
+ if (source == compositeItem || source == compositeButton)
23602651 {
23612652 group(new Composite());
23622653 } else
2363
- if (source == randomItem)
2654
+ if (source == switchItem || source == switchButton)
23642655 {
23652656 RandomNode random = new RandomNode();
23662657 group(random);
....@@ -2462,7 +2753,7 @@
24622753 {
24632754 group(new cLinker());
24642755 } else
2465
- if (source == textureItem)
2756
+ if (source == textureItem || source == textureButton)
24662757 {
24672758 group(new TextureNode());
24682759 } else
....@@ -2482,17 +2773,30 @@
24822773 {
24832774 CastShadow(2);
24842775 } else
2485
- if (source == ungroupItem)
2776
+ if (source == ungroupItem || source == ungroupButton)
24862777 {
2487
- //ungroup();
2778
+ boolean hasRoot = false;
2779
+
24882780 for (int i=0; i<group.selection.size(); i++)
24892781 {
2490
- Ungroup(group.selection.get(i));
2782
+ if (group.selection.get(i) == group)
2783
+ {
2784
+ hasRoot = true;
2785
+ break;
2786
+ }
24912787 }
24922788
2493
- ClearSelection(false);
2494
-
2495
- refreshContents();
2789
+ if (!hasRoot)
2790
+ {
2791
+ for (int i=0; i<group.selection.size(); i++)
2792
+ {
2793
+ Ungroup(group.selection.get(i));
2794
+ }
2795
+
2796
+ ClearSelection(false);
2797
+
2798
+ refreshContents();
2799
+ }
24962800 } else
24972801 if (source == genUVItem)
24982802 {
....@@ -2504,7 +2808,7 @@
25042808 } else
25052809 if (source == genNormalsMESHItem)
25062810 {
2507
- GenNormals(true); // TODO
2811
+ GenNormalsMESH();
25082812 } else
25092813 if (source == genNormalsORGANItem)
25102814 {
....@@ -2569,6 +2873,22 @@
25692873 if (source == unmarkleavesItem)
25702874 {
25712875 MarkLeaves(false);
2876
+ } else
2877
+ if (source == rewindleavesItem)
2878
+ {
2879
+ RewindLeaves(true);
2880
+ } else
2881
+ if (source == unrewindleavesItem)
2882
+ {
2883
+ RewindLeaves(false);
2884
+ } else
2885
+ if (source == randomleavesItem)
2886
+ {
2887
+ RandomLeaves(true);
2888
+ } else
2889
+ if (source == unrandomleavesItem)
2890
+ {
2891
+ RandomLeaves(false);
25722892 } else
25732893 if (source == flipVItem)
25742894 {
....@@ -2804,6 +3124,10 @@
28043124 if (source == twoButton)
28053125 {
28063126 radio.layout = twoButton;
3127
+
3128
+ if (CameraPane.FULLSCREEN)
3129
+ fullscreenLayout = radio.layout;
3130
+
28073131 // bug
28083132 //gridPanel.setDividerLocation(1.0);
28093133 //bigPanel.setDividerLocation(0.0);
....@@ -2836,10 +3160,31 @@
28363160 bigThree.ClearUI();
28373161 bigThree.add(centralPanel);
28383162 bigThree.FlushUI();
3163
+
3164
+ cameraView.requestFocusInWindow();
3165
+
3166
+// refreshContents(true);
3167
+//
3168
+// try
3169
+// {
3170
+// java.awt.Robot bot = new java.awt.Robot();
3171
+// int mask = InputEvent.BUTTON1_MASK;
3172
+// bot.mouseMove(100, 100);
3173
+// bot.mousePress(mask);
3174
+// bot.mouseRelease(mask);
3175
+// }
3176
+// catch (Exception e)
3177
+// {
3178
+//
3179
+// }
3180
+
28393181 } else
28403182 if (source == threeButton)
28413183 {
28423184 radio.layout = threeButton;
3185
+
3186
+ if (CameraPane.FULLSCREEN)
3187
+ fullscreenLayout = radio.layout;
28433188
28443189 // bigThree.remove(scenePanel);
28453190 // bigThree.remove(centralPanel);
....@@ -2872,10 +3217,15 @@
28723217 bigThree.add(centralPanel);
28733218 bigThree.add(XYZPanel);
28743219 bigThree.FlushUI();
3220
+
3221
+ cameraView.requestFocusInWindow();
28753222 } else
28763223 if (source == fourButton)
28773224 {
28783225 radio.layout = fourButton;
3226
+
3227
+ if (CameraPane.FULLSCREEN)
3228
+ fullscreenLayout = radio.layout;
28793229
28803230 // bigThree.remove(scenePanel);
28813231 // bigThree.remove(centralPanel);
....@@ -2907,10 +3257,15 @@
29073257 bigThree.ClearUI();
29083258 bigThree.add(scenePanel);
29093259 bigThree.FlushUI();
3260
+
3261
+ cameraView.requestFocusInWindow();
29103262 } else
29113263 if (source == sixButton)
29123264 {
29133265 radio.layout = sixButton;
3266
+
3267
+ if (CameraPane.FULLSCREEN)
3268
+ fullscreenLayout = radio.layout;
29143269
29153270 // bigThree.remove(scenePanel);
29163271 // bigThree.remove(centralPanel);
....@@ -2943,10 +3298,15 @@
29433298 bigThree.add(scenePanel);
29443299 bigThree.add(centralPanel);
29453300 bigThree.FlushUI();
3301
+
3302
+ cameraView.requestFocusInWindow();
29463303 } else
29473304 if (source == sevenButton)
29483305 {
29493306 radio.layout = sevenButton;
3307
+
3308
+ if (CameraPane.FULLSCREEN)
3309
+ fullscreenLayout = radio.layout;
29503310
29513311 // bigThree.remove(scenePanel);
29523312 // bigThree.remove(centralPanel);
....@@ -2980,6 +3340,8 @@
29803340 bigThree.add(centralPanel);
29813341 bigThree.add(XYZPanel);
29823342 bigThree.FlushUI();
3343
+
3344
+ cameraView.requestFocusInWindow();
29833345 } else
29843346 if (source == rootButton)
29853347 {
....@@ -2991,6 +3353,7 @@
29913353 EditObject(obj);
29923354 }
29933355
3356
+ cameraView.requestFocusInWindow();
29943357 refreshContents(true);
29953358 } else
29963359 if (source == closeButton)
....@@ -3000,22 +3363,37 @@
30003363 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
30013364 {
30023365 ab = (cRadio)e.nextElement();
3003
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3366
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
30043367 {
3368
+ // Patch to avoid bug with transparency.
3369
+ if (!ab.hadMaterial)
3370
+ {
3371
+ ab.object.material = null;
3372
+ }
3373
+
30053374 buttonGroup.remove(ab);
30063375 radioPanel.remove(ab);
30073376
3008
- ab.GetObject().editWindow = null;
3377
+ //ab.GetObject().editWindow = null;
3378
+ ab.GetObject().manipWindow = null;
30093379 // ab.GetObject().objectUI = null; // ?????????
30103380
30113381 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
30123382 break;
30133383 }
30143384 }
3385
+
3386
+ cameraView.requestFocusInWindow();
30153387 refreshContents(true);
30163388 } else
30173389 if (source == editItem || source == editButton)
30183390 {
3391
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3392
+ {
3393
+ Object3D child = (Object3D)e.nextElement();
3394
+ child.pinned = true;
3395
+ }
3396
+
30193397 EditSelection(false);
30203398 } else
30213399 if (source == uneditButton)
....@@ -3025,10 +3403,11 @@
30253403 Object3D child = (Object3D)e.nextElement();
30263404 if(child.editWindow != null)
30273405 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3406
+ child.pinned = false;
30283407 child.CloseUI();
30293408 listUI.remove(child);
30303409
3031
- child.editWindow = null; // ???????????
3410
+ //child.editWindow = null; // ???????????
30323411 }
30333412 objEditor.ctrlPanel.FlushUI();
30343413 //objEditor.jTree.clearSelection();
....@@ -3041,6 +3420,7 @@
30413420 //copy.ClearUI();
30423421 for (Object3D obj : listUI)
30433422 {
3423
+ obj.pinned = false;
30443424 obj.CloseUI();
30453425 }
30463426 listUI.clear();
....@@ -3050,7 +3430,7 @@
30503430 {
30513431 assert(copy == group);
30523432
3053
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3433
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
30543434
30553435 for (Object3D obj : listUI)
30563436 {
....@@ -3115,7 +3495,9 @@
31153495 sideView.object = group;
31163496 }
31173497
3118
-// fix "+" issue group.editWindow = this;
3498
+// fix "+" issue
3499
+ //group.editWindow = this;
3500
+ group.manipWindow = this;
31193501
31203502 /*
31213503 currentLayout = radio.layout;
....@@ -3123,18 +3505,25 @@
31233505 currentLayout = sevenButton;
31243506 */
31253507 radio.layout.doClick();
3508
+
3509
+ ClearUnpinned();
3510
+ SetPinStates(group.selection.size() > 0);
3511
+ if (group.selection.size() == 1)
3512
+ EditSelection(false);
31263513 keepparent = group.parent;
31273514 // PARENT = NULL or not???
31283515 //group.parent = null; // ROOT
31293516 //group.attributes = -1;
31303517 ResetModel();
3518
+
3519
+ cameraView.requestFocusInWindow();
31313520 refreshContents(true);
31323521 } else if (event.getSource() == editCameraItem)
31333522 {
31343523 cameraView.ProtectCamera();
31353524 cameraView.repaint();
31363525 return;
3137
- } else if (event.getSource() == revertCameraItem)
3526
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
31383527 {
31393528 cameraView.RevertCamera();
31403529 cameraView.repaint();
....@@ -3151,7 +3540,6 @@
31513540 }
31523541
31533542 boolean useclient = false;
3154
- cRadio radio;
31553543
31563544 void ToggleRoot()
31573545 {
....@@ -3390,7 +3778,8 @@
33903778
33913779 int size = obj.MemorySize();
33923780
3393
- System.err.println((size/1024) + " KB is the size of " + obj);
3781
+ //System.err.println((size/1024) + " KB is the size of " + obj);
3782
+ System.err.println("the size of " + obj + " is " + size + " (" + (size/1024) + "KB)");
33943783 }
33953784 }
33963785 catch (Exception e)
....@@ -3471,6 +3860,13 @@
34713860 void GenNormals(boolean crease)
34723861 {
34733862 group.GenNormalsS(crease);
3863
+
3864
+ refreshContents();
3865
+ }
3866
+
3867
+ void GenNormalsMESH()
3868
+ {
3869
+ group.GenNormalsMeshS();
34743870
34753871 refreshContents();
34763872 }
....@@ -4098,6 +4494,18 @@
40984494 refreshContents();
40994495 }
41004496
4497
+ void RewindLeaves(boolean hide)
4498
+ {
4499
+ group.selection.RewindLeaves(hide);
4500
+ refreshContents();
4501
+ }
4502
+
4503
+ void RandomLeaves(boolean hide)
4504
+ {
4505
+ group.selection.RandomLeaves(hide);
4506
+ refreshContents();
4507
+ }
4508
+
41014509 void SetTexRes(int tr)
41024510 {
41034511 group.selection.SetTexRes(tr);
....@@ -4169,10 +4577,6 @@
41694577 // }
41704578 // }
41714579
4172
- static boolean allparams = true;
4173
-
4174
- static Vector<Object3D> listUI = new Vector<Object3D>();
4175
-
41764580 void EditSelection(boolean newWindow)
41774581 {
41784582 // aConstraints.gridy = 0;
....@@ -4180,7 +4584,7 @@
41804584 {
41814585 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
41824586 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4183
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4587
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
41844588
41854589 Object3D elem = (Object3D)group.selection.elementAt(i);
41864590 if(elem != group || !newWindow)
....@@ -4265,7 +4669,8 @@
42654669 //new Exception().printStackTrace();
42664670
42674671 freezemodel = true;
4268
-
4672
+ ClearUnpinned();
4673
+
42694674 /**/
42704675 //switch (event.id)
42714676 {
....@@ -4273,7 +4678,6 @@
42734678 //case 702: // Event.LIST_DESELECT
42744679 group.deselectAll();
42754680 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4276
- objEditor.ClearInfo(); // .GetMaterial());
42774681 if (tps != null)
42784682 {
42794683 for (int i=0; i < tps.length; i++)
....@@ -4282,10 +4686,8 @@
42824686
42834687 //if (child.parent != null)
42844688 //child.parent.addSelectee(child);
4689
+ objEditor.SetMaterial(child);
42854690 group.addSelectee(child);
4286
- objEditor.SetMaterial(child); // .GetMaterial());
4287
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4288
- System.err.println("info : " + child.GetPath());
42894691 }
42904692 }
42914693 // else
....@@ -4295,20 +4697,28 @@
42954697 // System.err.println("info : " + group.GetPath());
42964698 // }
42974699
4298
- objEditor.SetText(); // jan 2014
4299
-
4300
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4700
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
43014701 CameraPane.flash = true;
43024702
4303
- if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
4703
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
43044704 // a camera
43054705 {
4306
- CameraPane.camerachangeframe = 0; // don't refuse it
4307
- Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4706
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
4707
+ {
4708
+ CameraPane.camerachangeframe = 0; // don't refuse it
4709
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4710
+ }
43084711 // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
43094712 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
43104713 }
43114714
4715
+ if (tps != null && tps.length == 1)
4716
+ {
4717
+ EditSelection(false);
4718
+ }
4719
+
4720
+ SetPinStates(tps != null && tps.length > 0);
4721
+
43124722 refreshContents();
43134723 //return true;
43144724 }
....@@ -4317,6 +4727,35 @@
43174727
43184728 freezemodel = false;
43194729 }
4730
+
4731
+ void SetPinStates(boolean enabled)
4732
+ {
4733
+ editButton.setEnabled(enabled);
4734
+ uneditButton.setEnabled(enabled);
4735
+ unselectButton.setEnabled(enabled);
4736
+ flashSelectionButton.setEnabled(enabled);
4737
+ }
4738
+
4739
+ void refreshContents(boolean cp)
4740
+ {
4741
+ if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4742
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
4743
+ {
4744
+ objEditor.ClearInfo(); // .GetMaterial());
4745
+
4746
+ for (int i=0; i < group.selection.Size(); i++)
4747
+ {
4748
+ Object3D child = (Object3D) group.selection.get(i);
4749
+
4750
+ objEditor.AddInfo(child, this, true);
4751
+ System.err.println("info : " + child.GetPath());
4752
+ }
4753
+
4754
+ objEditor.SetText(); // jan 2014
4755
+ }
4756
+
4757
+ super.refreshContents(cp);
4758
+ }
43204759
43214760 void linkSomething(Object3D thing)
43224761 {
....@@ -4388,6 +4827,7 @@
43884827 {
43894828 if (group.selection.isEmpty())
43904829 return;
4830
+
43914831 Grafreed.clipboardIsTempGroup = false;
43924832 Composite tGroup = null;
43934833 if (group.selection.size() > 0) // 1)
....@@ -4398,6 +4838,8 @@
43984838
43994839 if (cut)
44004840 {
4841
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
4842
+// Save();
44014843 //int indices[] = jList.getSelectedIndices();
44024844 //for (int i = indices.length - 1; i >= 0; i--)
44034845 //jList.remove(indices[i]);
....@@ -4487,8 +4929,10 @@
44874929 }
44884930
44894931 }
4932
+
44904933 if (Grafreed.clipboardIsTempGroup)
44914934 Grafreed.clipboard = tGroup;
4935
+
44924936 if (cut)
44934937 {
44944938 ResetModel();
....@@ -4498,6 +4942,10 @@
44984942
44994943 void paste(boolean expand)
45004944 {
4945
+ if (Globals.SAVEONMAKE)
4946
+ Save();
4947
+ boolean keep = Globals.SAVEONMAKE;
4948
+ Globals.SAVEONMAKE = false;
45014949 // if (GrafreeD.clipboard == null)
45024950 // return;
45034951 boolean first = true;
....@@ -4557,6 +5005,7 @@
45575005 Grafreed.clipboard.get(0).parent = keepparent;
45585006 }
45595007
5008
+ Globals.SAVEONMAKE = keep;
45605009 ResetModel();
45615010 refreshContents();
45625011 }
....@@ -4692,6 +5141,10 @@
46925141
46935142 void group(Object3D csg, boolean grab)
46945143 {
5144
+ if (Globals.SAVEONMAKE)
5145
+ Save();
5146
+ boolean keep = Globals.SAVEONMAKE;
5147
+ Globals.SAVEONMAKE = false;
46955148 if (//false) // why??
46965149 !group.selection.isEmpty())
46975150 {
....@@ -4805,10 +5258,15 @@
48055258 //node.add(csg);
48065259 //makeSomething(node);
48075260 makeSomething(csg);
5261
+ Globals.SAVEONMAKE = keep;
48085262 }
48095263
48105264 void Ungroup(Object3D g)
48115265 {
5266
+ if (Globals.SAVEONMAKE)
5267
+ Save();
5268
+ boolean keep = Globals.SAVEONMAKE;
5269
+ Globals.SAVEONMAKE = false;
48125270 if (g instanceof HiddenObject)
48135271 {
48145272 HiddenObject h = (HiddenObject) g;
....@@ -4825,6 +5283,7 @@
48255283 objEditor.makeSomething(g.get(i), false);
48265284 }
48275285 }
5286
+ Globals.SAVEONMAKE = keep;
48285287 }
48295288
48305289 void ungroup()
....@@ -5113,7 +5572,28 @@
51135572 cButton clearpanelButton;
51145573 cButton unselectButton;
51155574
5575
+ cButton restoreCameraButton;
5576
+
5577
+ cButton saveButton;
51165578 cButton oneStepButton;
5579
+
5580
+ cButton groupButton;
5581
+ cButton ungroupButton;
5582
+ cButton compositeButton;
5583
+ cButton switchButton;
5584
+ cButton loopButton;
5585
+ cButton textureButton;
5586
+
5587
+ cButton gridButton;
5588
+ cButton boxButton;
5589
+ cButton sphereButton;
5590
+ cButton coneButton;
5591
+ cButton torusButton;
5592
+ cButton superButton;
5593
+ cButton kleinButton;
5594
+ cButton particlesButton;
5595
+ cButton overlayButton;
5596
+ cButton lightButton;
51175597
51185598 cButton screenfitButton;
51195599 cButton screenfitpointButton;
....@@ -5126,14 +5606,6 @@
51265606
51275607 cButton setsupportButton;
51285608
5129
- cButton twoButton;
5130
- cButton sixButton;
5131
- cButton threeButton;
5132
- cButton sevenButton;
5133
- cButton fourButton; // full panel
5134
- cButton oneButton; // full XYZ
5135
- //cButton currentLayout;
5136
-
51375609 //
51385610 //Composite
51395611 Object3D // to do !!
....@@ -5143,9 +5615,11 @@
51435615 //JTree jTree;
51445616 private MenuItem lookAtItem;
51455617 private MenuItem lookFromItem;
5146
- private MenuItem switchItem;
5618
+ private MenuItem switchViewItem;
51475619 private MenuItem cutItem;
5148
- private MenuItem duplicateItem;
5620
+ private MenuItem undoItem;
5621
+ private MenuItem redoItem;
5622
+ private JMenuItem duplicateItem;
51495623 private MenuItem cloneItem;
51505624 private MenuItem cloneSupportItem;
51515625 private MenuItem overwriteGeoItem;
....@@ -5208,6 +5682,10 @@
52085682 private MenuItem showleavesItem;
52095683 private MenuItem markleavesItem;
52105684 private MenuItem unmarkleavesItem;
5685
+ private MenuItem rewindleavesItem;
5686
+ private MenuItem unrewindleavesItem;
5687
+ private MenuItem randomleavesItem;
5688
+ private MenuItem unrandomleavesItem;
52115689
52125690 private MenuItem flipVItem;
52135691 private MenuItem unflipVItem;
....@@ -5229,7 +5707,7 @@
52295707 private MenuItem frontItem;
52305708 private MenuItem cameraItem;
52315709 private MenuItem compositeItem;
5232
- private MenuItem randomItem;
5710
+ private MenuItem switchItem;
52335711 private MenuItem physicsItem;
52345712 private MenuItem frameselectorItem;
52355713 private MenuItem scriptNodeItem;
....@@ -5303,5 +5781,5 @@
53035781
53045782 Menu cameraMenu;
53055783 MenuItem editCameraItem;
5306
- MenuItem revertCameraItem;
5784
+ MenuItem restoreCameraItem;
53075785 }