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,16 +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
- undoItem = menu.add(new MenuItem("Undo"));
158
- undoItem.addActionListener(this);
159
- redoItem = menu.add(new MenuItem("Redo"));
160
- redoItem.addActionListener(this);
161
- menu.add("-");
162
- 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"));
163171 duplicateItem.addActionListener(this);
164172 cloneItem = menu.add(new MenuItem("Clone"));
165173 cloneItem.addActionListener(this);
....@@ -175,7 +183,6 @@
175183 copyItem.addActionListener(this);
176184 pasteItem = menu.add(new MenuItem("Paste"));
177185 pasteItem.addActionListener(this);
178
- menu.add("-");
179186
180187 menu.add("-");
181188 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -202,23 +209,23 @@
202209 //zBufferItem.addActionListener(this);
203210 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
204211 //normalLensItem.addActionListener(this);
205
- cameraMenu.add(revertCameraItem = new MenuItem("Restore Camera"));
206
- revertCameraItem.addActionListener(this);
212
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
213
+ restoreCameraItem.addActionListener(this);
207214
208
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
209
- toggleFullScreenItem.addItemListener(this);
210
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
211
- 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);
212227
213
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
214
- toggleTextureItem.addItemListener(this);
215
- toggleTextureItem.setState(CameraPane.textureon);
216
-
217
- cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
218
- toggleSwitchItem.addItemListener(this);
219
- toggleSwitchItem.setState(CameraPane.SWITCH);
220
-
221
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
228
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
222229 toggleHandleItem.addItemListener(this);
223230 toggleHandleItem.setState(CameraPane.HANDLES);
224231
....@@ -245,7 +252,7 @@
245252
246253 cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
247254 toggleDebugItem.addItemListener(this);
248
- toggleDebugItem.setState(CameraPane.DEBUG);
255
+ toggleDebugItem.setState(Globals.DEBUG);
249256
250257 cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
251258 toggleFrustumItem.addItemListener(this);
....@@ -266,14 +273,14 @@
266273 // animationItem.addItemListener(this);
267274 // animationItem.setState(CameraPane.ANIMATION);
268275 cameraMenu.add("-");
269
- cameraMenu.add(editCameraItem = new MenuItem("Save Camera"));
276
+ cameraMenu.add(editCameraItem = new MenuItem("Save Viewpoint"));
270277 editCameraItem.addActionListener(this);
271278
272279 if (Globals.ADVANCED)
273280 {
274281 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
275282 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
276
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
283
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
277284 editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
278285 oe.cameraMenu.add("-");
279286 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
....@@ -281,7 +288,7 @@
281288 editLeafItem.addActionListener(this);
282289 lookAtItem.addActionListener(this);
283290 //lookFromItem.addActinoListener(this);
284
- //switchItem.addActionListener(this);
291
+ //switchViewItem.addActionListener(this);
285292 }
286293
287294 oe.menuBar.add(menu = new Menu("Setting"));
....@@ -326,21 +333,29 @@
326333 }
327334
328335 oe.menuBar.add(menu = new Menu("Group"));
329
- grabItem = menu.add(new MenuItem("Grab"));
330
- grabItem.addActionListener(this);
336
+// grabItem = menu.add(new MenuItem("Grab"));
337
+// grabItem.addActionListener(this);
331338 backItem = menu.add(new MenuItem("Back"));
332339 backItem.addActionListener(this);
333340 frontItem = menu.add(new MenuItem("Front"));
334341 frontItem.addActionListener(this);
335
- compositeItem = menu.add(new MenuItem("Composite"));
336
- compositeItem.addActionListener(this);
342
+// compositeItem = menu.add(new MenuItem("Composite"));
343
+// compositeItem.addActionListener(this);
344
+
345
+ if (Globals.ADVANCED)
346
+ {
337347 hideItem = menu.add(new MenuItem("Hidden Group"));
338348 hideItem.addActionListener(this);
349
+ }
339350 ungroupItem = menu.add(new MenuItem("Ungroup"));
340351 ungroupItem.addActionListener(this);
341
- menu.add("-");
342
- randomItem = menu.add(new MenuItem("Switch node"));
343
- 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
+ {
344359 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
345360 switchGeoItem.addActionListener(this);
346361 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
....@@ -348,8 +363,6 @@
348363 morphItem = menu.add(new MenuItem("Morph Group"));
349364 morphItem.addActionListener(this);
350365
351
- if (Globals.ADVANCED)
352
- {
353366 menu.add("-");
354367 physicsItem = menu.add(new MenuItem("Physics"));
355368 physicsItem.addActionListener(this);
....@@ -357,30 +370,29 @@
357370 frameselectorItem.addActionListener(this);
358371 scriptNodeItem = menu.add(new MenuItem("Script Node"));
359372 scriptNodeItem.addActionListener(this);
360
- cameraItem = menu.add(new MenuItem("Camera"));
361
- cameraItem.addActionListener(this);
362373 }
363374
364375 oe.menuBar.add(menu = new Menu("Object"));
365
- textureItem = menu.add(new MenuItem("Texture"));
366
- textureItem.addActionListener(this);
376
+// textureItem = menu.add(new MenuItem("Texture"));
377
+// textureItem.addActionListener(this);
367378 billboardItem = menu.add(new MenuItem("Billboard"));
368379 billboardItem.addActionListener(this);
369380 csgItem = menu.add(new MenuItem("CSG"));
370381 csgItem.addActionListener(this);
371
- shadowXItem = menu.add(new MenuItem("Shadow X"));
382
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
372383 shadowXItem.addActionListener(this);
373
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
384
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
374385 shadowYItem.addActionListener(this);
375
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
386
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
376387 shadowZItem.addActionListener(this);
388
+ attributeItem = menu.add(new MenuItem("Attribute"));
389
+ attributeItem.addActionListener(this);
390
+
377391 if (Globals.ADVANCED)
378392 {
379393 menu.add("-");
380394 linkerItem = menu.add(new MenuItem("Linker"));
381395 linkerItem.addActionListener(this);
382
- attributeItem = menu.add(new MenuItem("Attribute"));
383
- attributeItem.addActionListener(this);
384396 templateItem = menu.add(new MenuItem("Template"));
385397 templateItem.addActionListener(this);
386398 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -469,6 +481,14 @@
469481 markleavesItem.addActionListener(this);
470482 unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
471483 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);
472492 menu.add("-");
473493 flipVItem = menu.add(new MenuItem("Flip V"));
474494 flipVItem.addActionListener(this);
....@@ -526,6 +546,18 @@
526546
527547 void SetupUI2(ObjEditor oe)
528548 {
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
+
529561 //new Exception().printStackTrace();
530562
531563 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -554,27 +586,66 @@
554586 oe.radioPanel.add(dummyButton);
555587 oe.buttonGroup.add(dummyButton);
556588 */
589
+ cGridBag copyOptionsPanel = new cGridBag();
590
+
591
+ copyOptionsPanel.preferredHeight = 1;
592
+
557593 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
558594
559
- 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);
560633 liveCB.setToolTipText("Enable animation");
561634 liveCB.addItemListener(this);
562635
563
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
636
+ copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
564637 oneStepButton.setToolTipText("Animate one step forward");
565638 oneStepButton.addActionListener(this);
566639
567
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
640
+ copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
568641 fastCB.setToolTipText("Fast mode");
569642 fastCB.addItemListener(this);
570643
571
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
572
- trackCB.setToolTipText("Enable tracking");
573
- trackCB.addItemListener(this);
574
-
575
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
576
- screenfitButton.setToolTipText("Screen fit");
577
- 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);
578649
579650 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
580651 // screenfitpointButton.addActionListener(this);
....@@ -586,65 +657,145 @@
586657 snapobjectButton.setToolTipText("Snap Object");
587658 }
588659
589
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
590
- flashSelectionButton.setToolTipText("Show selection");
591
- flashSelectionButton.addActionListener(this);
660
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
592661
593
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
594
-
595
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
662
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
596663 twoButton.setToolTipText("Show center view only");
597664 twoButton.addActionListener(this);
598
- 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);
599668 fourButton.addActionListener(this);
600669 fourButton.setToolTipText("Show left panel only");
601
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
670
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
602671 sixButton.setToolTipText("2-column layout left");
603672 sixButton.addActionListener(this);
604
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
673
+ oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
605674 threeButton.setToolTipText("2-column layout right");
606675 threeButton.addActionListener(this);
607
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
676
+ oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608677 sevenButton.setToolTipText("3-column layout");
609678 sevenButton.addActionListener(this);
610679 //
611680
612
- 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);
613682 rootButton.setToolTipText("Edit selection in new tab");
614683 rootButton.addActionListener(this);
615684
616
- 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);
617686 closeButton.setToolTipText("Close tab");
618687 closeButton.addActionListener(this);
619688 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
620689 //clearButton.addActionListener(this);
621
-
622
- 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
+ }
623722
624
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
625
- 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");
626772 editButton.addActionListener(this);
627773
628
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
629
- uneditButton.setToolTipText("Unedit selection");
774
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
775
+ uneditButton.setToolTipText("Remove selection controls");
630776 uneditButton.addActionListener(this);
631777
632
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
633
- allParamsButton.setToolTipText("Edit all params");
778
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
779
+ allParamsButton.setToolTipText("Show all controle");
634780 allParamsButton.addActionListener(this);
635781
636
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
782
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
637783 clearPanelButton.setToolTipText("Clear edit panel");
638784 clearPanelButton.addActionListener(this);
639785
640
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
786
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
641787 unselectButton.setToolTipText("Unselect");
642788 unselectButton.addActionListener(this);
643789
644
- 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);
645793
646
- oe.treePanel.add(commandsPanel);
647
- oe.treePanel.Return();
794
+ editCommandsPanel.preferredHeight = 1;
795
+
796
+ SetPinStates(false);
797
+// oe.treePanel.add(commandsPanel);
798
+// oe.treePanel.Return();
648799
649800 // oe.aConstraints.gridx += 1;
650801 // oe.aConstraints.weighty = 0;
....@@ -661,27 +812,12 @@
661812
662813 JScrollPane jSP;
663814 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
664
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
815
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
665816 ResetModel();
666817
667818 oe.treePanel.add(jSPPanel);
668819 oe.treePanel.Return();
669820
670
- cGridBag copyOptionsPanel = new cGridBag();
671
-
672
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
673
- colorCB.setToolTipText("Copy color when dropped");
674
- colorCB.addItemListener(this);
675
-
676
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
677
- materialCB.setToolTipText("Copy material when dropped");
678
- materialCB.addItemListener(this);
679
-
680
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
681
- textureCB.setToolTipText("Copy texture when dropped");
682
- textureCB.addItemListener(this);
683
-
684
- copyOptionsPanel.preferredHeight = 1;
685821 oe.treePanel.add(copyOptionsPanel);
686822 oe.treePanel.Return();
687823
....@@ -712,23 +848,43 @@
712848
713849 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
714850 {
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
+
715865 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
716866 boxCB.setToolTipText("Display bounding boxes");
717867 boxCB.addItemListener(this);
718868
719869 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
720
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
870
+ zoomBoxCB.setToolTipText("Display only for wheel");
721871 zoomBoxCB.addItemListener(this);
722872
723873 if (true) // Globals.ADVANCED)
724874 {
725
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
726
- supportCB.setToolTipText("Enable rigging");
727
- 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);
728882
729883 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
730884 // localCB.addItemListener(this);
731885
886
+ panel.Return();
887
+
732888 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
733889 crowdCB.setToolTipText("Used for crowds");
734890 crowdCB.addItemListener(this);
....@@ -745,6 +901,8 @@
745901 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
746902 // speakerMocapCB.addItemListener(this);
747903
904
+ panel.Return();
905
+
748906 if (false)
749907 {
750908 // handled in scripts
....@@ -759,32 +917,72 @@
759917 //constraints.gridy += 1;
760918 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
761919 smoothfocusCB.addItemListener(this);
920
+ panel.Return();
762921 }
763922
764923 //constraints.gridx += 1;
765924 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
766925 // debugCB.addItemListener(this);
767926
927
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
928
+ trackCB.setToolTipText("Enable tracking target");
929
+ trackCB.addItemListener(this);
930
+
768931 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
932
+ oeilCB.setToolTipText("Move camera when tracking");
769933 oeilCB.addItemListener(this);
770934
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
+ {
771955 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
772956 lookAtCB.setToolTipText("Look-at target");
773957 lookAtCB.addItemListener(this);
958
+ }
774959
775960 }
776961
777962 cGridBag fill = new cGridBag();
778
-
779963 fill.preferredHeight = 200;
964
+ cGridBag fill2 = new cGridBag();
965
+ fill2.preferredHeight = 200;
966
+ cGridBag fill3 = new cGridBag();
967
+ fill3.preferredHeight = 200;
780968
781969 panel.add(fill);
970
+ panel.add(fill2);
971
+ panel.add(fill3);
782972
783973 }
784974
785975 void EditObject(Object3D obj)
786976 {
787977 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
+
788986 radioButton.SetObject(obj);
789987 radioButton.layout = sevenButton;
790988 radioButton.SetCamera(cameraView.renderCamera, false);
....@@ -796,6 +994,8 @@
796994
797995 void SetupViews(ObjEditor oe)
798996 {
997
+ theFrame = this;
998
+
799999 oe.SetupViews();
8001000
8011001 System.out.println("SetupViews");
....@@ -804,23 +1004,28 @@
8041004 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
8051005 }
8061006
807
- JCheckBox liveCB;
808
- JCheckBox supportCB;
809
- JCheckBox localCB;
810
- JCheckBox crowdCB;
811
- JCheckBox smoothCB;
812
- JCheckBox fastCB;
813
- JCheckBox slowCB;
814
- JCheckBox boxCB;
815
- JCheckBox zoomBoxCB;
816
- JCheckBox trackCB;
817
- 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;
8181020 // JCheckBox speakerMocapCB;
819
- JCheckBox speakerCameraCB;
820
- JCheckBox speakerFocusCB;
821
- JCheckBox debugCB;
822
- JCheckBox oeilCB;
823
- JCheckBox lookAtCB;
1021
+ cCheckBox speakerCameraCB;
1022
+ cCheckBox speakerFocusCB;
1023
+ cCheckBox debugCB;
1024
+
1025
+ cCheckBox oeilCB;
1026
+ cCheckBox shadowCB;
1027
+ cCheckBox autosaveCB;
1028
+ cCheckBox lookAtCB;
8241029
8251030 // static int COLOR = 1;
8261031 // static int MATERIAL = 2;
....@@ -828,9 +1033,9 @@
8281033
8291034 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
8301035
831
- JCheckBox colorCB;
832
- JCheckBox materialCB;
833
- JCheckBox textureCB;
1036
+ cCheckBox colorCB;
1037
+ cCheckBox materialCB;
1038
+ cCheckBox textureCB;
8341039
8351040 public void itemStateChanged(ItemEvent e)
8361041 {
....@@ -858,6 +1063,7 @@
8581063 } else if(e.getSource() == liveCB)
8591064 {
8601065 cameraView.ToggleLive();
1066
+ refreshContents(false);
8611067 }
8621068 else if(e.getSource() == supportCB)
8631069 {
....@@ -922,6 +1128,18 @@
9221128 {
9231129 cameraView.ToggleOeil();
9241130 }
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
+ }
9251143 else if(e.getSource() == lookAtCB)
9261144 {
9271145 cameraView.ToggleLookAt();
....@@ -938,7 +1156,8 @@
9381156
9391157 /**/
9401158 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
941
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1159
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1160
+ TreePath path = objEditor.jTree.getSelectionPath();
9421161 if ((path == null) || (path.getPathCount() <= 1)) {
9431162 // We can't move the root node or an empty selection
9441163 return;
....@@ -1001,8 +1220,6 @@
10011220 }
10021221 }
10031222
1004
- String string = (String) object;
1005
-
10061223 System.out.println("Transfer = " + object + "; drop : " + target);
10071224 // if( object instanceof java.io.File[])
10081225 // {
....@@ -1010,6 +1227,8 @@
10101227 // objEditor.DropFile((java.io.File[]) object, true);
10111228 // return;
10121229 // }
1230
+
1231
+ String string = object.toString();
10131232
10141233 // File path for Mac and Windows
10151234 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1055,23 +1274,33 @@
10551274
10561275 assert target == objEditor.jTree;
10571276 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1277
+ Object3D destinationLeaf;
10581278 try {
1059
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1279
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
10601280 } catch (Exception e) {
10611281 System.out.println("destinationPath : " + destinationPath);
10621282 return;
10631283 }
10641284
1065
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1285
+ for (int i=group.selection.size(); --i>=0;)
10661286 {
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
+// {
10671296 loadClipboard(true);
10681297 objEditor.jTree.setSelectionPath(destinationPath);
10691298 pasteInto(false, false);
1070
- } else {
1071
- loadClipboard(false);
1072
- objEditor.jTree.setSelectionPath(destinationPath);
1073
- pasteInto(false, false); // true); // ???
1074
- }
1299
+// } else {
1300
+// loadClipboard(false);
1301
+// objEditor.jTree.setSelectionPath(destinationPath);
1302
+// pasteInto(false, false); // true); // ???
1303
+// }
10751304 }
10761305 public void dropActionChanged(DropTargetDragEvent dtde)
10771306 // Called if the user has modified the current drop gesture
....@@ -1176,22 +1405,30 @@
11761405 {
11771406 //heightFieldItem = menu.add(new MenuItem("Height Field"));
11781407 //heightFieldItem.addActionListener(this);
1179
- gridItem = menu.add(new MenuItem("Grid"));
1180
- gridItem.addActionListener(this);
1181
- rectoidItem = menu.add(new MenuItem("Box"));
1182
- rectoidItem.addActionListener(this);
1183
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1184
- ellipsoidItem.addActionListener(this);
1185
- coneItem = menu.add(new MenuItem("Cone"));
1186
- coneItem.addActionListener(this);
1187
- torusItem = menu.add(new MenuItem("Torus"));
1188
- torusItem.addActionListener(this);
1189
- superItem = menu.add(new MenuItem("Superellipsoid"));
1190
- 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
+ {
11911426 kleinItem = menu.add(new MenuItem("Klein Bottle"));
11921427 kleinItem.addActionListener(this);
1193
- particleItem = menu.add(new MenuItem("Particle system"));
1194
- particleItem.addActionListener(this);
1428
+ }
1429
+
1430
+// particleItem = menu.add(new MenuItem("Particle system"));
1431
+// particleItem.addActionListener(this);
11951432 if (Globals.ADVANCED)
11961433 {
11971434 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1217,15 +1454,15 @@
12171454 }
12181455 bezierItem = menu.add(new MenuItem("Bezier Patch"));
12191456 bezierItem.addActionListener(this);
1220
- overlayItem = menu.add(new MenuItem("Overlay"));
1221
- overlayItem.addActionListener(this);
1222
- lightItem = menu.add(new MenuItem("Light"));
1223
- 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);
12241461 menu.add("-");
12251462 //superLoopItem = menu.add(new MenuItem("Super Loop"));
12261463 //superLoopItem.addActionListener(this);
1227
- loopItem = menu.add(new MenuItem("Loop"));
1228
- loopItem.addActionListener(this);
1464
+// loopItem = menu.add(new MenuItem("Loop"));
1465
+// loopItem.addActionListener(this);
12291466 doubleItem = menu.add(new MenuItem("Fork"));
12301467 doubleItem.addActionListener(this);
12311468 if (Globals.ADVANCED)
....@@ -1241,6 +1478,9 @@
12411478 animationItem.addItemListener(this);
12421479 animationItem.setState(Globals.ANIMATION);
12431480
1481
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1482
+ archiveItem.addActionListener(this);
1483
+
12441484 menu.add("-");
12451485 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
12461486 parseverticesItem.addActionListener(this);
....@@ -1253,6 +1493,8 @@
12531493 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
12541494 reduce34MorphItem.addActionListener(this);
12551495 menu.add("-");
1496
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1497
+ memoryItem.addActionListener(this);
12561498 menu.add(computeAOItem = new MenuItem("Compute AO"));
12571499 computeAOItem.addActionListener(this);
12581500
....@@ -1261,11 +1503,9 @@
12611503 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
12621504 mirrorItem.addActionListener(this);
12631505 menu.add("-");
1264
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1265
- memoryItem.addActionListener(this);
12661506 menu.add(analyzeItem = new MenuItem("Analyze"));
12671507 analyzeItem.addActionListener(this);
1268
- menu.add(dumpItem = new MenuItem("Dump"));
1508
+ menu.add(dumpItem = new MenuItem("Print"));
12691509 dumpItem.addActionListener(this);
12701510 // menu.add(pathItem = new MenuItem("From-to path"));
12711511 // pathItem.addActionListener(this);
....@@ -1406,9 +1646,24 @@
14061646 shadow.material = new cMaterial(obj.material);
14071647 shadow.material.diffuse = 0.0001f;
14081648 shadow.material.specular = 0.0001f;
1649
+ //shadow.projectedVertices[1].x = 300;
14091650
14101651 makeSomething(shadow);
14111652 }
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
+ }
14121667
14131668 /**
14141669 * applyExample
....@@ -1653,7 +1908,7 @@
16531908 {
16541909 ScreenFit();
16551910 } else
1656
- if (source == switchItem)
1911
+ if (source == switchViewItem)
16571912 {
16581913 cVector v1 = new cVector();
16591914 cVector v2 = new cVector();
....@@ -1662,11 +1917,11 @@
16621917 objEditor.cameraView.renderCamera.setAim(v2, v1);
16631918 objEditor.cameraView.repaint();
16641919 } else
1665
- if (source == rectoidItem)
1920
+ if (source == rectoidItem || source == boxButton)
16661921 {
16671922 makeSomething(new Box());
16681923 } else
1669
- if (source == particleItem)
1924
+ if (source == particleItem || source == particlesButton)
16701925 {
16711926 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
16721927 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1745,27 +2000,27 @@
17452000
17462001 makeSomething(obj);
17472002 } else
1748
- if (source == gridItem)
2003
+ if (source == gridItem || source == gridButton)
17492004 {
17502005 makeSomething(new Grid());
17512006 } else
1752
- if (source == ellipsoidItem)
2007
+ if (source == ellipsoidItem || source == sphereButton)
17532008 {
17542009 makeSomething(new Sphere());
17552010 } else
1756
- if (source == coneItem)
2011
+ if (source == coneItem || source == coneButton)
17572012 {
17582013 makeSomething(new Cone());
17592014 } else
1760
- if (source == torusItem)
2015
+ if (source == torusItem || source == torusButton)
17612016 {
17622017 makeSomething(new Torus());
17632018 } else
1764
- if (source == superItem)
2019
+ if (source == superItem || source == superButton)
17652020 {
17662021 makeSomething(new Superellipsoid());
17672022 } else
1768
- if (source == kleinItem)
2023
+ if (source == kleinItem || source == kleinButton)
17692024 {
17702025 makeSomething(new Klein());
17712026 } else
....@@ -1785,7 +2040,7 @@
17852040 {
17862041 makeSomething(new BezierSurface());
17872042 } else
1788
- if (source == overlayItem)
2043
+ if (source == overlayItem || source == overlayButton)
17892044 {
17902045 /*
17912046 Object3D obj = new BezierSurface(5,8);
....@@ -1833,7 +2088,7 @@
18332088 s.setup();
18342089 makeSomething(s);
18352090 } else
1836
- if (source == lightItem)
2091
+ if (source == lightItem || source == lightButton)
18372092 {
18382093 makeSomething(new Light());
18392094 } else
....@@ -1883,30 +2138,30 @@
18832138
18842139 group(g);
18852140 } else
1886
- if (source == loopItem)
2141
+ if (source == loopItem || source == loopButton)
18872142 {
18882143 Composite csg = new GroupLeaf();
18892144 csg.count = 5;
18902145 group(csg);
1891
- Composite child = new cGroup();
2146
+ Composite child = new cGroup("Branch");
18922147 csg.addChild(child);
18932148 child.addChild(csg);
18942149 } else
18952150 if (source == doubleItem)
18962151 {
1897
- Composite csg = new GroupLeaf();
2152
+ Composite csg = new GroupLeaf("Fork");
18982153 csg.count = 5;
18992154 group(csg);
1900
- Composite child = new cGroup();
2155
+ Composite child = new cGroup("Branch A");
19012156 csg.addChild(child);
19022157 child.addChild(csg);
1903
- child = new cGroup();
2158
+ child = new cGroup("Branch B");
19042159 csg.addChild(child);
19052160 child.addChild(csg);
19062161 } else
19072162 if (source == tripleItem)
19082163 {
1909
- Composite csg = new GroupLeaf();
2164
+ Composite csg = new GroupLeaf("Trident");
19102165 csg.count = 4;
19112166 group(csg);
19122167 Composite child = new cGroup();
....@@ -1956,6 +2211,32 @@
19562211 {
19572212 DumpObject();
19582213 } 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
19592240 if (source == oneStepButton)
19602241 {
19612242 Globals.ONESTEP = true;
....@@ -1963,17 +2244,14 @@
19632244 } else
19642245 if (source == screenfitButton)
19652246 {
1966
- //Reload(lastConverter, lastFilename, true);
19672247 ScreenFit();
19682248 } else
19692249 if (source == screenfitpointButton)
19702250 {
1971
- //Reload(lastConverter, lastFilename, true);
19722251 ScreenFitPoint();
19732252 } else
19742253 if (source == snapobjectButton)
19752254 {
1976
- //Reload(lastConverter, lastFilename, true);
19772255 SnapObject();
19782256 } else
19792257 // if (event.getSource() == recompileButton)
....@@ -2349,9 +2627,9 @@
23492627 {
23502628 ClearSelection(true);
23512629 } else
2352
- if (source == grabItem)
2630
+ if (source == grabItem || source == groupButton)
23532631 {
2354
- group(new cGroup(), true);
2632
+ group(new cGroup(), false); // true);
23552633 } else
23562634 if (source == hideItem)
23572635 {
....@@ -2369,11 +2647,11 @@
23692647 {
23702648 makeSomething(new Camera());
23712649 } else
2372
- if (source == compositeItem)
2650
+ if (source == compositeItem || source == compositeButton)
23732651 {
23742652 group(new Composite());
23752653 } else
2376
- if (source == randomItem)
2654
+ if (source == switchItem || source == switchButton)
23772655 {
23782656 RandomNode random = new RandomNode();
23792657 group(random);
....@@ -2475,7 +2753,7 @@
24752753 {
24762754 group(new cLinker());
24772755 } else
2478
- if (source == textureItem)
2756
+ if (source == textureItem || source == textureButton)
24792757 {
24802758 group(new TextureNode());
24812759 } else
....@@ -2495,17 +2773,30 @@
24952773 {
24962774 CastShadow(2);
24972775 } else
2498
- if (source == ungroupItem)
2776
+ if (source == ungroupItem || source == ungroupButton)
24992777 {
2500
- //ungroup();
2778
+ boolean hasRoot = false;
2779
+
25012780 for (int i=0; i<group.selection.size(); i++)
25022781 {
2503
- Ungroup(group.selection.get(i));
2782
+ if (group.selection.get(i) == group)
2783
+ {
2784
+ hasRoot = true;
2785
+ break;
2786
+ }
25042787 }
25052788
2506
- ClearSelection(false);
2507
-
2508
- 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
+ }
25092800 } else
25102801 if (source == genUVItem)
25112802 {
....@@ -2517,7 +2808,7 @@
25172808 } else
25182809 if (source == genNormalsMESHItem)
25192810 {
2520
- GenNormals(true); // TODO
2811
+ GenNormalsMESH();
25212812 } else
25222813 if (source == genNormalsORGANItem)
25232814 {
....@@ -2582,6 +2873,22 @@
25822873 if (source == unmarkleavesItem)
25832874 {
25842875 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);
25852892 } else
25862893 if (source == flipVItem)
25872894 {
....@@ -2817,6 +3124,10 @@
28173124 if (source == twoButton)
28183125 {
28193126 radio.layout = twoButton;
3127
+
3128
+ if (CameraPane.FULLSCREEN)
3129
+ fullscreenLayout = radio.layout;
3130
+
28203131 // bug
28213132 //gridPanel.setDividerLocation(1.0);
28223133 //bigPanel.setDividerLocation(0.0);
....@@ -2849,10 +3160,31 @@
28493160 bigThree.ClearUI();
28503161 bigThree.add(centralPanel);
28513162 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
+
28523181 } else
28533182 if (source == threeButton)
28543183 {
28553184 radio.layout = threeButton;
3185
+
3186
+ if (CameraPane.FULLSCREEN)
3187
+ fullscreenLayout = radio.layout;
28563188
28573189 // bigThree.remove(scenePanel);
28583190 // bigThree.remove(centralPanel);
....@@ -2885,10 +3217,15 @@
28853217 bigThree.add(centralPanel);
28863218 bigThree.add(XYZPanel);
28873219 bigThree.FlushUI();
3220
+
3221
+ cameraView.requestFocusInWindow();
28883222 } else
28893223 if (source == fourButton)
28903224 {
28913225 radio.layout = fourButton;
3226
+
3227
+ if (CameraPane.FULLSCREEN)
3228
+ fullscreenLayout = radio.layout;
28923229
28933230 // bigThree.remove(scenePanel);
28943231 // bigThree.remove(centralPanel);
....@@ -2920,10 +3257,15 @@
29203257 bigThree.ClearUI();
29213258 bigThree.add(scenePanel);
29223259 bigThree.FlushUI();
3260
+
3261
+ cameraView.requestFocusInWindow();
29233262 } else
29243263 if (source == sixButton)
29253264 {
29263265 radio.layout = sixButton;
3266
+
3267
+ if (CameraPane.FULLSCREEN)
3268
+ fullscreenLayout = radio.layout;
29273269
29283270 // bigThree.remove(scenePanel);
29293271 // bigThree.remove(centralPanel);
....@@ -2956,10 +3298,15 @@
29563298 bigThree.add(scenePanel);
29573299 bigThree.add(centralPanel);
29583300 bigThree.FlushUI();
3301
+
3302
+ cameraView.requestFocusInWindow();
29593303 } else
29603304 if (source == sevenButton)
29613305 {
29623306 radio.layout = sevenButton;
3307
+
3308
+ if (CameraPane.FULLSCREEN)
3309
+ fullscreenLayout = radio.layout;
29633310
29643311 // bigThree.remove(scenePanel);
29653312 // bigThree.remove(centralPanel);
....@@ -2993,6 +3340,8 @@
29933340 bigThree.add(centralPanel);
29943341 bigThree.add(XYZPanel);
29953342 bigThree.FlushUI();
3343
+
3344
+ cameraView.requestFocusInWindow();
29963345 } else
29973346 if (source == rootButton)
29983347 {
....@@ -3004,6 +3353,7 @@
30043353 EditObject(obj);
30053354 }
30063355
3356
+ cameraView.requestFocusInWindow();
30073357 refreshContents(true);
30083358 } else
30093359 if (source == closeButton)
....@@ -3013,22 +3363,37 @@
30133363 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
30143364 {
30153365 ab = (cRadio)e.nextElement();
3016
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3366
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
30173367 {
3368
+ // Patch to avoid bug with transparency.
3369
+ if (!ab.hadMaterial)
3370
+ {
3371
+ ab.object.material = null;
3372
+ }
3373
+
30183374 buttonGroup.remove(ab);
30193375 radioPanel.remove(ab);
30203376
3021
- ab.GetObject().editWindow = null;
3377
+ //ab.GetObject().editWindow = null;
3378
+ ab.GetObject().manipWindow = null;
30223379 // ab.GetObject().objectUI = null; // ?????????
30233380
30243381 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
30253382 break;
30263383 }
30273384 }
3385
+
3386
+ cameraView.requestFocusInWindow();
30283387 refreshContents(true);
30293388 } else
30303389 if (source == editItem || source == editButton)
30313390 {
3391
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3392
+ {
3393
+ Object3D child = (Object3D)e.nextElement();
3394
+ child.pinned = true;
3395
+ }
3396
+
30323397 EditSelection(false);
30333398 } else
30343399 if (source == uneditButton)
....@@ -3038,10 +3403,11 @@
30383403 Object3D child = (Object3D)e.nextElement();
30393404 if(child.editWindow != null)
30403405 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3406
+ child.pinned = false;
30413407 child.CloseUI();
30423408 listUI.remove(child);
30433409
3044
- child.editWindow = null; // ???????????
3410
+ //child.editWindow = null; // ???????????
30453411 }
30463412 objEditor.ctrlPanel.FlushUI();
30473413 //objEditor.jTree.clearSelection();
....@@ -3054,6 +3420,7 @@
30543420 //copy.ClearUI();
30553421 for (Object3D obj : listUI)
30563422 {
3423
+ obj.pinned = false;
30573424 obj.CloseUI();
30583425 }
30593426 listUI.clear();
....@@ -3063,7 +3430,7 @@
30633430 {
30643431 assert(copy == group);
30653432
3066
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3433
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
30673434
30683435 for (Object3D obj : listUI)
30693436 {
....@@ -3128,7 +3495,9 @@
31283495 sideView.object = group;
31293496 }
31303497
3131
-// fix "+" issue group.editWindow = this;
3498
+// fix "+" issue
3499
+ //group.editWindow = this;
3500
+ group.manipWindow = this;
31323501
31333502 /*
31343503 currentLayout = radio.layout;
....@@ -3136,18 +3505,25 @@
31363505 currentLayout = sevenButton;
31373506 */
31383507 radio.layout.doClick();
3508
+
3509
+ ClearUnpinned();
3510
+ SetPinStates(group.selection.size() > 0);
3511
+ if (group.selection.size() == 1)
3512
+ EditSelection(false);
31393513 keepparent = group.parent;
31403514 // PARENT = NULL or not???
31413515 //group.parent = null; // ROOT
31423516 //group.attributes = -1;
31433517 ResetModel();
3518
+
3519
+ cameraView.requestFocusInWindow();
31443520 refreshContents(true);
31453521 } else if (event.getSource() == editCameraItem)
31463522 {
31473523 cameraView.ProtectCamera();
31483524 cameraView.repaint();
31493525 return;
3150
- } else if (event.getSource() == revertCameraItem)
3526
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
31513527 {
31523528 cameraView.RevertCamera();
31533529 cameraView.repaint();
....@@ -3164,7 +3540,6 @@
31643540 }
31653541
31663542 boolean useclient = false;
3167
- cRadio radio;
31683543
31693544 void ToggleRoot()
31703545 {
....@@ -3403,7 +3778,8 @@
34033778
34043779 int size = obj.MemorySize();
34053780
3406
- 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)");
34073783 }
34083784 }
34093785 catch (Exception e)
....@@ -3484,6 +3860,13 @@
34843860 void GenNormals(boolean crease)
34853861 {
34863862 group.GenNormalsS(crease);
3863
+
3864
+ refreshContents();
3865
+ }
3866
+
3867
+ void GenNormalsMESH()
3868
+ {
3869
+ group.GenNormalsMeshS();
34873870
34883871 refreshContents();
34893872 }
....@@ -4111,6 +4494,18 @@
41114494 refreshContents();
41124495 }
41134496
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
+
41144509 void SetTexRes(int tr)
41154510 {
41164511 group.selection.SetTexRes(tr);
....@@ -4182,10 +4577,6 @@
41824577 // }
41834578 // }
41844579
4185
- static boolean allparams = true;
4186
-
4187
- static Vector<Object3D> listUI = new Vector<Object3D>();
4188
-
41894580 void EditSelection(boolean newWindow)
41904581 {
41914582 // aConstraints.gridy = 0;
....@@ -4193,7 +4584,7 @@
41934584 {
41944585 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
41954586 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4196
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4587
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
41974588
41984589 Object3D elem = (Object3D)group.selection.elementAt(i);
41994590 if(elem != group || !newWindow)
....@@ -4278,7 +4669,8 @@
42784669 //new Exception().printStackTrace();
42794670
42804671 freezemodel = true;
4281
-
4672
+ ClearUnpinned();
4673
+
42824674 /**/
42834675 //switch (event.id)
42844676 {
....@@ -4286,7 +4678,6 @@
42864678 //case 702: // Event.LIST_DESELECT
42874679 group.deselectAll();
42884680 TreePath tps[] = objEditor.jTree.getSelectionPaths();
4289
- objEditor.ClearInfo(); // .GetMaterial());
42904681 if (tps != null)
42914682 {
42924683 for (int i=0; i < tps.length; i++)
....@@ -4295,10 +4686,8 @@
42954686
42964687 //if (child.parent != null)
42974688 //child.parent.addSelectee(child);
4689
+ objEditor.SetMaterial(child);
42984690 group.addSelectee(child);
4299
- objEditor.SetMaterial(child); // .GetMaterial());
4300
- objEditor.AddInfo(child, this, true); // .GetMaterial());
4301
- System.err.println("info : " + child.GetPath());
43024691 }
43034692 }
43044693 // else
....@@ -4308,17 +4697,13 @@
43084697 // System.err.println("info : " + group.GetPath());
43094698 // }
43104699
4311
- objEditor.SetText(); // jan 2014
4312
-
4313
- Object3D object = (Object3D) tps[0].getLastPathComponent();
4314
-
4315
- if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(object instanceof Camera))
4700
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(tps[0].getLastPathComponent() instanceof Camera))
43164701 CameraPane.flash = true;
43174702
4318
- if (tps != null && tps.length > 0 && object instanceof Camera)
4703
+ if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
43194704 // a camera
43204705 {
4321
- if (object != Globals.theRenderer.LightCamera())
4706
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
43224707 {
43234708 CameraPane.camerachangeframe = 0; // don't refuse it
43244709 Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
....@@ -4327,6 +4712,13 @@
43274712 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
43284713 }
43294714
4715
+ if (tps != null && tps.length == 1)
4716
+ {
4717
+ EditSelection(false);
4718
+ }
4719
+
4720
+ SetPinStates(tps != null && tps.length > 0);
4721
+
43304722 refreshContents();
43314723 //return true;
43324724 }
....@@ -4335,6 +4727,35 @@
43354727
43364728 freezemodel = false;
43374729 }
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
+ }
43384759
43394760 void linkSomething(Object3D thing)
43404761 {
....@@ -4406,6 +4827,7 @@
44064827 {
44074828 if (group.selection.isEmpty())
44084829 return;
4830
+
44094831 Grafreed.clipboardIsTempGroup = false;
44104832 Composite tGroup = null;
44114833 if (group.selection.size() > 0) // 1)
....@@ -4416,6 +4838,8 @@
44164838
44174839 if (cut)
44184840 {
4841
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
4842
+// Save();
44194843 //int indices[] = jList.getSelectedIndices();
44204844 //for (int i = indices.length - 1; i >= 0; i--)
44214845 //jList.remove(indices[i]);
....@@ -4505,8 +4929,10 @@
45054929 }
45064930
45074931 }
4932
+
45084933 if (Grafreed.clipboardIsTempGroup)
45094934 Grafreed.clipboard = tGroup;
4935
+
45104936 if (cut)
45114937 {
45124938 ResetModel();
....@@ -4516,6 +4942,10 @@
45164942
45174943 void paste(boolean expand)
45184944 {
4945
+ if (Globals.SAVEONMAKE)
4946
+ Save();
4947
+ boolean keep = Globals.SAVEONMAKE;
4948
+ Globals.SAVEONMAKE = false;
45194949 // if (GrafreeD.clipboard == null)
45204950 // return;
45214951 boolean first = true;
....@@ -4575,6 +5005,7 @@
45755005 Grafreed.clipboard.get(0).parent = keepparent;
45765006 }
45775007
5008
+ Globals.SAVEONMAKE = keep;
45785009 ResetModel();
45795010 refreshContents();
45805011 }
....@@ -4710,6 +5141,10 @@
47105141
47115142 void group(Object3D csg, boolean grab)
47125143 {
5144
+ if (Globals.SAVEONMAKE)
5145
+ Save();
5146
+ boolean keep = Globals.SAVEONMAKE;
5147
+ Globals.SAVEONMAKE = false;
47135148 if (//false) // why??
47145149 !group.selection.isEmpty())
47155150 {
....@@ -4823,10 +5258,15 @@
48235258 //node.add(csg);
48245259 //makeSomething(node);
48255260 makeSomething(csg);
5261
+ Globals.SAVEONMAKE = keep;
48265262 }
48275263
48285264 void Ungroup(Object3D g)
48295265 {
5266
+ if (Globals.SAVEONMAKE)
5267
+ Save();
5268
+ boolean keep = Globals.SAVEONMAKE;
5269
+ Globals.SAVEONMAKE = false;
48305270 if (g instanceof HiddenObject)
48315271 {
48325272 HiddenObject h = (HiddenObject) g;
....@@ -4843,6 +5283,7 @@
48435283 objEditor.makeSomething(g.get(i), false);
48445284 }
48455285 }
5286
+ Globals.SAVEONMAKE = keep;
48465287 }
48475288
48485289 void ungroup()
....@@ -5131,7 +5572,28 @@
51315572 cButton clearpanelButton;
51325573 cButton unselectButton;
51335574
5575
+ cButton restoreCameraButton;
5576
+
5577
+ cButton saveButton;
51345578 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;
51355597
51365598 cButton screenfitButton;
51375599 cButton screenfitpointButton;
....@@ -5144,14 +5606,6 @@
51445606
51455607 cButton setsupportButton;
51465608
5147
- cButton twoButton;
5148
- cButton sixButton;
5149
- cButton threeButton;
5150
- cButton sevenButton;
5151
- cButton fourButton; // full panel
5152
- cButton oneButton; // full XYZ
5153
- //cButton currentLayout;
5154
-
51555609 //
51565610 //Composite
51575611 Object3D // to do !!
....@@ -5161,11 +5615,11 @@
51615615 //JTree jTree;
51625616 private MenuItem lookAtItem;
51635617 private MenuItem lookFromItem;
5164
- private MenuItem switchItem;
5618
+ private MenuItem switchViewItem;
51655619 private MenuItem cutItem;
51665620 private MenuItem undoItem;
51675621 private MenuItem redoItem;
5168
- private MenuItem duplicateItem;
5622
+ private JMenuItem duplicateItem;
51695623 private MenuItem cloneItem;
51705624 private MenuItem cloneSupportItem;
51715625 private MenuItem overwriteGeoItem;
....@@ -5228,6 +5682,10 @@
52285682 private MenuItem showleavesItem;
52295683 private MenuItem markleavesItem;
52305684 private MenuItem unmarkleavesItem;
5685
+ private MenuItem rewindleavesItem;
5686
+ private MenuItem unrewindleavesItem;
5687
+ private MenuItem randomleavesItem;
5688
+ private MenuItem unrandomleavesItem;
52315689
52325690 private MenuItem flipVItem;
52335691 private MenuItem unflipVItem;
....@@ -5249,7 +5707,7 @@
52495707 private MenuItem frontItem;
52505708 private MenuItem cameraItem;
52515709 private MenuItem compositeItem;
5252
- private MenuItem randomItem;
5710
+ private MenuItem switchItem;
52535711 private MenuItem physicsItem;
52545712 private MenuItem frameselectorItem;
52555713 private MenuItem scriptNodeItem;
....@@ -5323,5 +5781,5 @@
53235781
53245782 Menu cameraMenu;
53255783 MenuItem editCameraItem;
5326
- MenuItem revertCameraItem;
5784
+ MenuItem restoreCameraItem;
53275785 }