Normand Briere
2019-07-19 e79247ef52a0bbb3864d46bb1e2c716005b3ecf3
GroupEditor.java
....@@ -60,6 +60,12 @@
6060 this.copy = this.group = group;
6161 //selectees = this.group.selectees;
6262
63
+ if (copy.versions == null)
64
+ {
65
+ copy.versions = new byte[100][];
66
+ copy.versionindex = -1;
67
+ }
68
+
6369 if(ui)
6470 SetupUI(objEditor);
6571 }
....@@ -74,6 +80,12 @@
7480 this.copy = this.group = copy;
7581 //selectees = this.group.selectees;
7682
83
+ if (copy.versions == null)
84
+ {
85
+ copy.versions = new byte[100][];
86
+ copy.versionindex = -1;
87
+ }
88
+
7789 SetupMenu2(this); //objEditor);
7890 SetupUI2(objEditor);
7991 objEditor.SetupUI(true);
....@@ -84,6 +96,10 @@
8496
8597 void CloneSelection(boolean supports)
8698 {
99
+ if (Globals.REPLACEONMAKE)
100
+ Save();
101
+ boolean keep = Globals.REPLACEONMAKE;
102
+ Globals.REPLACEONMAKE = false;
87103 // Object3D keep = GrafreeD.clipboard;
88104 //Object3D obj;
89105 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +110,7 @@
94110
95111 makeSomething(clone, i==group.selection.size()-1);
96112 }
113
+ Globals.REPLACEONMAKE = keep;
97114 }
98115
99116 void CloneClipboard(boolean supports)
....@@ -150,6 +167,8 @@
150167
151168 void SetupMenu2(GroupEditor oe)
152169 {
170
+ oe.jTree = new cTree();
171
+
153172 Menu menu;
154173 oe.menuBar.add(menu = new Menu("Edit"));
155174 //editItem = menu.add(new MenuItem("Edit"));
....@@ -160,7 +179,7 @@
160179 // redoItem = menu.add(new MenuItem("Redo"));
161180 // redoItem.addActionListener(this);
162181 // menu.add("-");
163
- duplicateItem = menu.add(new MenuItem("Duplicate"));
182
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
164183 duplicateItem.addActionListener(this);
165184 cloneItem = menu.add(new MenuItem("Clone"));
166185 cloneItem.addActionListener(this);
....@@ -176,7 +195,6 @@
176195 copyItem.addActionListener(this);
177196 pasteItem = menu.add(new MenuItem("Paste"));
178197 pasteItem.addActionListener(this);
179
- menu.add("-");
180198
181199 menu.add("-");
182200 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -188,8 +206,8 @@
188206 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
189207 // pasteExpandItem.addActionListener(this);
190208 menu.add("-");
191
- clearItem = menu.add(new MenuItem("Clear"));
192
- clearItem.addActionListener(this);
209
+ deleteItem = menu.add(new MenuItem("Delete"));
210
+ deleteItem.addActionListener(this);
193211
194212 if (Globals.ADVANCED)
195213 {
....@@ -203,23 +221,23 @@
203221 //zBufferItem.addActionListener(this);
204222 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
205223 //normalLensItem.addActionListener(this);
206
- cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
207
- revertCameraItem.addActionListener(this);
224
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
225
+ restoreCameraItem.addActionListener(this);
208226
209
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
210
- toggleFullScreenItem.addItemListener(this);
211
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
212
- cameraMenu.add("-");
227
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
228
+// toggleFullScreenItem.addItemListener(this);
229
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
230
+// cameraMenu.add("-");
231
+//
232
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
233
+// toggleTextureItem.addItemListener(this);
234
+// toggleTextureItem.setState(CameraPane.textureon);
235
+//
236
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
237
+// toggleSwitchItem.addItemListener(this);
238
+// toggleSwitchItem.setState(CameraPane.SWITCH);
213239
214
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
215
- toggleTextureItem.addItemListener(this);
216
- toggleTextureItem.setState(CameraPane.textureon);
217
-
218
- cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
219
- toggleSwitchItem.addItemListener(this);
220
- toggleSwitchItem.setState(CameraPane.SWITCH);
221
-
222
- cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
240
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
223241 toggleHandleItem.addItemListener(this);
224242 toggleHandleItem.setState(CameraPane.HANDLES);
225243
....@@ -246,7 +264,7 @@
246264
247265 cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
248266 toggleDebugItem.addItemListener(this);
249
- toggleDebugItem.setState(CameraPane.DEBUG);
267
+ toggleDebugItem.setState(Globals.DEBUG);
250268
251269 cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
252270 toggleFrustumItem.addItemListener(this);
....@@ -274,7 +292,7 @@
274292 {
275293 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
276294 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
277
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
295
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
278296 editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
279297 oe.cameraMenu.add("-");
280298 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
....@@ -282,7 +300,7 @@
282300 editLeafItem.addActionListener(this);
283301 lookAtItem.addActionListener(this);
284302 //lookFromItem.addActinoListener(this);
285
- //switchItem.addActionListener(this);
303
+ //switchViewItem.addActionListener(this);
286304 }
287305
288306 oe.menuBar.add(menu = new Menu("Setting"));
....@@ -327,21 +345,29 @@
327345 }
328346
329347 oe.menuBar.add(menu = new Menu("Group"));
330
- grabItem = menu.add(new MenuItem("Grab"));
331
- grabItem.addActionListener(this);
348
+// grabItem = menu.add(new MenuItem("Grab"));
349
+// grabItem.addActionListener(this);
332350 backItem = menu.add(new MenuItem("Back"));
333351 backItem.addActionListener(this);
334352 frontItem = menu.add(new MenuItem("Front"));
335353 frontItem.addActionListener(this);
336
- compositeItem = menu.add(new MenuItem("Composite"));
337
- compositeItem.addActionListener(this);
354
+// compositeItem = menu.add(new MenuItem("Composite"));
355
+// compositeItem.addActionListener(this);
356
+
357
+ if (Globals.ADVANCED)
358
+ {
338359 hideItem = menu.add(new MenuItem("Hidden Group"));
339360 hideItem.addActionListener(this);
361
+ }
340362 ungroupItem = menu.add(new MenuItem("Ungroup"));
341363 ungroupItem.addActionListener(this);
342
- menu.add("-");
343
- randomItem = menu.add(new MenuItem("Switch node"));
344
- randomItem.addActionListener(this);
364
+
365
+// menu.add("-");
366
+//
367
+// switchItem = menu.add(new MenuItem("Switch node"));
368
+// switchItem.addActionListener(this);
369
+ if (Globals.ADVANCED)
370
+ {
345371 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
346372 switchGeoItem.addActionListener(this);
347373 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
....@@ -349,8 +375,6 @@
349375 morphItem = menu.add(new MenuItem("Morph Group"));
350376 morphItem.addActionListener(this);
351377
352
- if (Globals.ADVANCED)
353
- {
354378 menu.add("-");
355379 physicsItem = menu.add(new MenuItem("Physics"));
356380 physicsItem.addActionListener(this);
....@@ -358,30 +382,29 @@
358382 frameselectorItem.addActionListener(this);
359383 scriptNodeItem = menu.add(new MenuItem("Script Node"));
360384 scriptNodeItem.addActionListener(this);
361
- cameraItem = menu.add(new MenuItem("Camera"));
362
- cameraItem.addActionListener(this);
363385 }
364386
365387 oe.menuBar.add(menu = new Menu("Object"));
366
- textureItem = menu.add(new MenuItem("Texture"));
367
- textureItem.addActionListener(this);
388
+// textureItem = menu.add(new MenuItem("Texture"));
389
+// textureItem.addActionListener(this);
368390 billboardItem = menu.add(new MenuItem("Billboard"));
369391 billboardItem.addActionListener(this);
370392 csgItem = menu.add(new MenuItem("CSG"));
371393 csgItem.addActionListener(this);
372
- shadowXItem = menu.add(new MenuItem("Shadow X"));
394
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
373395 shadowXItem.addActionListener(this);
374
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
396
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
375397 shadowYItem.addActionListener(this);
376
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
398
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
377399 shadowZItem.addActionListener(this);
400
+ attributeItem = menu.add(new MenuItem("Attribute"));
401
+ attributeItem.addActionListener(this);
402
+
378403 if (Globals.ADVANCED)
379404 {
380405 menu.add("-");
381406 linkerItem = menu.add(new MenuItem("Linker"));
382407 linkerItem.addActionListener(this);
383
- attributeItem = menu.add(new MenuItem("Attribute"));
384
- attributeItem.addActionListener(this);
385408 templateItem = menu.add(new MenuItem("Template"));
386409 templateItem.addActionListener(this);
387410 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -410,7 +433,7 @@
410433 genNormalsMESHItem.addActionListener(this);
411434 if (Globals.ADVANCED)
412435 {
413
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
436
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
414437 genNormalsMINEItem.addActionListener(this);
415438 }
416439 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -533,8 +556,21 @@
533556 buildToolsMenu(menu);
534557 }
535558
559
+
536560 void SetupUI2(ObjEditor oe)
537561 {
562
+ // June 2019
563
+ if (oe == null)
564
+ {
565
+ //super.SetupUI2(this);
566
+ //return;
567
+ }
568
+
569
+ if (copy != group)
570
+ {
571
+ //super.SetupUI2(this);
572
+ }
573
+
538574 //new Exception().printStackTrace();
539575
540576 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -563,39 +599,79 @@
563599 oe.radioPanel.add(dummyButton);
564600 oe.buttonGroup.add(dummyButton);
565601 */
602
+ cGridBag copyOptionsPanel = new cGridBag();
603
+
604
+ copyOptionsPanel.preferredHeight = 1;
605
+
566606 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
567607
568
- oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569
- undoButton.setToolTipText("Undo changes");
570
- undoButton.addActionListener(this);
608
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
609
+ //minButton.setToolTipText("Minimize window");
610
+ //minButton.addActionListener(this);
571611
572
- oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
573
- redoButton.setToolTipText("Redo changes");
574
- redoButton.addActionListener(this);
612
+ if (Globals.ADVANCED)
613
+ {
614
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
615
+ maxButton.setToolTipText("Maximize window");
616
+ maxButton.addActionListener(this);
617
+ }
575618
576
- oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577
- saveButton.setToolTipText("Save changes");
619
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620
+ fullButton.setToolTipText("Full-screen window");
621
+ fullButton.addActionListener(this);
622
+
623
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
624
+ screenfitButton.setToolTipText("Screen fit");
625
+ screenfitButton.addActionListener(this);
626
+
627
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
628
+ restoreCameraButton.setToolTipText("Restore viewpoint");
629
+ restoreCameraButton.addActionListener(this);
630
+
631
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
632
+ saveButton.setToolTipText("New version");
578633 saveButton.addActionListener(this);
634
+
635
+ copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
636
+ undoButton.setToolTipText("Previous version");
637
+ undoButton.addActionListener(this);
638
+ undoButton.setEnabled(false);
579639
580
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
640
+ cGridBag updown = new cGridBag().setVertical(true);
641
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
642
+ restoreButton.setToolTipText("Restore current");
643
+ restoreButton.addActionListener(this);
644
+ restoreButton.setEnabled(false);
645
+
646
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
647
+ replaceButton.setToolTipText("Replace current");
648
+ replaceButton.addActionListener(this);
649
+ replaceButton.setEnabled(false);
650
+
651
+ copyOptionsPanel.add(updown);
652
+
653
+ copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
654
+ redoButton.setToolTipText("Next version");
655
+ redoButton.addActionListener(this);
656
+ redoButton.setEnabled(false);
657
+
658
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
581659 liveCB.setToolTipText("Enable animation");
582660 liveCB.addItemListener(this);
583661
584
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
662
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585663 oneStepButton.setToolTipText("Animate one step forward");
586664 oneStepButton.addActionListener(this);
587665
588
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
666
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
589667 fastCB.setToolTipText("Fast mode");
590668 fastCB.addItemListener(this);
591669
592
- oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
593
- trackCB.setToolTipText("Enable tracking");
594
- trackCB.addItemListener(this);
595
-
596
- oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
597
- screenfitButton.setToolTipText("Screen fit");
598
- screenfitButton.addActionListener(this);
670
+ //oe.toolboxPanel.Return();
671
+
672
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
673
+// trackCB.setToolTipText("Enable tracking");
674
+// trackCB.addItemListener(this);
599675
600676 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
601677 // screenfitpointButton.addActionListener(this);
....@@ -607,65 +683,146 @@
607683 snapobjectButton.setToolTipText("Snap Object");
608684 }
609685
610
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
611
- flashSelectionButton.setToolTipText("Show selection");
612
- flashSelectionButton.addActionListener(this);
686
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
613687
614
- oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
615
-
616
- oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
617
- twoButton.setToolTipText("Show center view only");
618
- twoButton.addActionListener(this);
619
- oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
688
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620689 fourButton.addActionListener(this);
621690 fourButton.setToolTipText("Show left panel only");
622
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
623
- sixButton.setToolTipText("2-column layout left");
691
+
692
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
693
+ twoButton.setToolTipText("Show right view only");
694
+ twoButton.addActionListener(this);
695
+ this.fullscreenLayout = twoButton;
696
+
697
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
698
+ sixButton.setToolTipText("Show left and right");
624699 sixButton.addActionListener(this);
625
- oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
626
- threeButton.setToolTipText("2-column layout right");
627
- threeButton.addActionListener(this);
628
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
629
- sevenButton.setToolTipText("3-column layout");
630
- sevenButton.addActionListener(this);
700
+// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
701
+// threeButton.setToolTipText("2-column layout right");
702
+// threeButton.addActionListener(this);
703
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
704
+// sevenButton.setToolTipText("3-column layout");
705
+// sevenButton.addActionListener(this);
631706 //
632707
633
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
- rootButton.setToolTipText("Edit selection in new tab");
708
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
709
+ rootButton.setToolTipText("Open selection in new tab");
635710 rootButton.addActionListener(this);
636711
637
- oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
712
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
638713 closeButton.setToolTipText("Close tab");
639714 closeButton.addActionListener(this);
640715 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
641716 //clearButton.addActionListener(this);
642
-
643
- cGridBag commandsPanel = new cGridBag();
717
+
718
+ // INSERT
719
+ oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
720
+ gridButton.setToolTipText("Create grid");
721
+ gridButton.addActionListener(this);
722
+
723
+ oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
724
+ boxButton.setToolTipText("Create box");
725
+ boxButton.addActionListener(this);
726
+
727
+ oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
728
+ sphereButton.setToolTipText("Create sphere");
729
+ sphereButton.addActionListener(this);
730
+
731
+ oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
732
+ coneButton.setToolTipText("Create cone");
733
+ coneButton.addActionListener(this);
734
+
735
+ oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
736
+ torusButton.setToolTipText("Create torus");
737
+ torusButton.addActionListener(this);
738
+
739
+ oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
740
+ superButton.setToolTipText("Create superellipsoid");
741
+ superButton.addActionListener(this);
742
+
743
+ if (Globals.ADVANCED)
744
+ {
745
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
746
+ kleinButton.setToolTipText("Create Klein bottle");
747
+ kleinButton.addActionListener(this);
748
+ }
644749
645
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
646
- editButton.setToolTipText("Edit selection");
750
+ oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
751
+ particlesButton.setToolTipText("Create particle system");
752
+ particlesButton.addActionListener(this);
753
+
754
+ oe.toolboxPanel.Return();
755
+
756
+ oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
757
+ groupButton.setToolTipText("Create group");
758
+ groupButton.addActionListener(this);
759
+
760
+ oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
761
+ compositeButton.setToolTipText("Create composite");
762
+ compositeButton.addActionListener(this);
763
+
764
+ oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
765
+ switchButton.setToolTipText("Create item switcher");
766
+ switchButton.addActionListener(this);
767
+
768
+ oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
769
+ loopButton.setToolTipText("Create loop");
770
+ loopButton.addActionListener(this);
771
+
772
+ oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
773
+ textureButton.setToolTipText("Create texture");
774
+ textureButton.addActionListener(this);
775
+
776
+ oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
777
+ overlayButton.setToolTipText("Create overlay");
778
+ overlayButton.addActionListener(this);
779
+
780
+ oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
781
+ lightButton.setToolTipText("Create light");
782
+ lightButton.addActionListener(this);
783
+
784
+ for (int i=6; --i>=0;)
785
+ {
786
+ oe.toolboxPanel.Return();
787
+ oe.toolboxPanel.add(new cGridBag());
788
+ oe.toolboxPanel.add(new cGridBag());
789
+ oe.toolboxPanel.add(new cGridBag());
790
+ oe.toolboxPanel.add(new cGridBag());
791
+ oe.toolboxPanel.add(new cGridBag());
792
+ oe.toolboxPanel.add(new cGridBag());
793
+ oe.toolboxPanel.add(new cGridBag());
794
+ }
795
+
796
+ // EDIT panel
797
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
798
+ editButton.setToolTipText("Pin selection controls");
647799 editButton.addActionListener(this);
648800
649
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650
- uneditButton.setToolTipText("Unedit selection");
801
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
802
+ uneditButton.setToolTipText("Remove selection controls");
651803 uneditButton.addActionListener(this);
652804
653
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
654
- allParamsButton.setToolTipText("Edit all params");
805
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
806
+ allParamsButton.setToolTipText("Show all controle");
655807 allParamsButton.addActionListener(this);
656808
657
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
809
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
658810 clearPanelButton.setToolTipText("Clear edit panel");
659811 clearPanelButton.addActionListener(this);
660812
661
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
813
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
662814 unselectButton.setToolTipText("Unselect");
663815 unselectButton.addActionListener(this);
664816
665
- commandsPanel.preferredHeight = 1;
817
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
818
+ flashSelectionButton.setToolTipText("Highlight selection");
819
+ flashSelectionButton.addActionListener(this);
666820
667
- oe.treePanel.add(commandsPanel);
668
- oe.treePanel.Return();
821
+ editCommandsPanel.preferredHeight = 1;
822
+
823
+ SetPinStates(false);
824
+// oe.treePanel.add(commandsPanel);
825
+// oe.treePanel.Return();
669826
670827 // oe.aConstraints.gridx += 1;
671828 // oe.aConstraints.weighty = 0;
....@@ -682,29 +839,17 @@
682839
683840 JScrollPane jSP;
684841 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
685
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
842
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
686843 ResetModel();
687844
688845 oe.treePanel.add(jSPPanel);
689846 oe.treePanel.Return();
690847
691
- cGridBag copyOptionsPanel = new cGridBag();
692
-
693
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
694
- colorCB.setToolTipText("Copy color when dropped");
695
- colorCB.addItemListener(this);
696
-
697
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
698
- materialCB.setToolTipText("Copy material when dropped");
699
- materialCB.addItemListener(this);
700
-
701
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
702
- textureCB.setToolTipText("Copy texture when dropped");
703
- textureCB.addItemListener(this);
704
-
705
- copyOptionsPanel.preferredHeight = 1;
706848 oe.treePanel.add(copyOptionsPanel);
707849 oe.treePanel.Return();
850
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
851
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
852
+ sliderPane.preferredHeight = 1;
708853
709854 // mainPanel.setDividerLocation(0.5); //1.0);
710855 // mainPanel.setResizeWeight(0.5);
....@@ -727,29 +872,49 @@
727872 dgr.addDragGestureListener(this);
728873 }catch(Exception e) {}
729874 */
730
- radio.layout = sevenButton;
875
+ radio.layout = sixButton; // sevenButton;
731876 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
732877 }
733878
734879 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
735880 {
881
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
882
+ colorCB.setToolTipText("Copy color when dropped");
883
+ colorCB.addItemListener(this);
884
+
885
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
886
+ materialCB.setToolTipText("Copy material when dropped");
887
+ materialCB.addItemListener(this);
888
+
889
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
890
+ textureCB.setToolTipText("Copy texture when dropped");
891
+ textureCB.addItemListener(this);
892
+
893
+ panel.Return();
894
+
736895 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
737896 boxCB.setToolTipText("Display bounding boxes");
738897 boxCB.addItemListener(this);
739898
740899 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
741
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
900
+ zoomBoxCB.setToolTipText("Display only for wheel");
742901 zoomBoxCB.addItemListener(this);
743902
744903 if (true) // Globals.ADVANCED)
745904 {
746
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
747
- supportCB.setToolTipText("Enable rigging");
748
- supportCB.addItemListener(this);
905
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
906
+// supportCB.setToolTipText("Enable rigging");
907
+// supportCB.addItemListener(this);
908
+
909
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
910
+ freezeCB.setToolTipText("Fast moving camera");
911
+ freezeCB.addItemListener(this);
749912
750913 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
751914 // localCB.addItemListener(this);
752915
916
+ panel.Return();
917
+
753918 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
754919 crowdCB.setToolTipText("Used for crowds");
755920 crowdCB.addItemListener(this);
....@@ -766,6 +931,8 @@
766931 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
767932 // speakerMocapCB.addItemListener(this);
768933
934
+ panel.Return();
935
+
769936 if (false)
770937 {
771938 // handled in scripts
....@@ -780,34 +947,74 @@
780947 //constraints.gridy += 1;
781948 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
782949 smoothfocusCB.addItemListener(this);
950
+ panel.Return();
783951 }
784952
785953 //constraints.gridx += 1;
786954 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
787955 // debugCB.addItemListener(this);
788956
957
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
958
+ trackCB.setToolTipText("Enable tracking target");
959
+ trackCB.addItemListener(this);
960
+
789961 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
962
+ oeilCB.setToolTipText("Move camera when tracking");
790963 oeilCB.addItemListener(this);
791964
965
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
966
+ shadowCB.setToolTipText("When live compute shadows");
967
+ shadowCB.addItemListener(this);
968
+
969
+ panel.Return();
970
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
971
+ toggleTextureCB.setToolTipText("Load textures");
972
+ toggleTextureCB.addItemListener(this);
973
+
974
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
975
+ toggleSwitchCB.setToolTipText("Choose a single item");
976
+ toggleSwitchCB.addItemListener(this);
977
+
978
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
979
+ autokeepCB.setToolTipText("On structure change");
980
+ autokeepCB.addItemListener(this);
981
+
982
+ panel.Return();
983
+ if (Globals.ADVANCED)
984
+ {
792985 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
793986 lookAtCB.setToolTipText("Look-at target");
794987 lookAtCB.addItemListener(this);
988
+ }
795989
796990 }
797991
798992 cGridBag fill = new cGridBag();
799
-
800993 fill.preferredHeight = 200;
994
+ cGridBag fill2 = new cGridBag();
995
+ fill2.preferredHeight = 200;
996
+ cGridBag fill3 = new cGridBag();
997
+ fill3.preferredHeight = 200;
801998
802999 panel.add(fill);
1000
+ panel.add(fill2);
1001
+ panel.add(fill3);
8031002
8041003 }
8051004
8061005 void EditObject(Object3D obj)
8071006 {
8081007 cRadio radioButton = new cRadio(obj.name);
1008
+
1009
+ // June 2019. Patch to avoid bug with transparency.
1010
+ radioButton.hadMaterial = obj.material != null;
1011
+ if (!radioButton.hadMaterial)
1012
+ {
1013
+ obj.material = new cMaterial();
1014
+ }
1015
+
8091016 radioButton.SetObject(obj);
810
- radioButton.layout = sevenButton;
1017
+ radioButton.layout = sixButton; // sevenButton;
8111018 radioButton.SetCamera(cameraView.renderCamera, false);
8121019 radioButton.addActionListener(this);
8131020 radioPanel.add(radioButton);
....@@ -817,6 +1024,8 @@
8171024
8181025 void SetupViews(ObjEditor oe)
8191026 {
1027
+ theFrame = this;
1028
+
8201029 oe.SetupViews();
8211030
8221031 System.out.println("SetupViews");
....@@ -825,23 +1034,28 @@
8251034 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
8261035 }
8271036
828
- JCheckBox liveCB;
829
- JCheckBox supportCB;
830
- JCheckBox localCB;
831
- JCheckBox crowdCB;
832
- JCheckBox smoothCB;
833
- JCheckBox fastCB;
834
- JCheckBox slowCB;
835
- JCheckBox boxCB;
836
- JCheckBox zoomBoxCB;
837
- JCheckBox trackCB;
838
- JCheckBox smoothfocusCB;
1037
+ cToggleButton liveCB;
1038
+ cCheckBox supportCB;
1039
+ cCheckBox localCB;
1040
+ cCheckBox crowdCB;
1041
+ cCheckBox smoothCB;
1042
+ cToggleButton fastCB;
1043
+ cCheckBox slowCB;
1044
+ cCheckBox boxCB;
1045
+ cCheckBox zoomBoxCB;
1046
+ cCheckBox freezeCB;
1047
+ //cToggleButton trackCB;
1048
+ cCheckBox trackCB;
1049
+ cCheckBox smoothfocusCB;
8391050 // JCheckBox speakerMocapCB;
840
- JCheckBox speakerCameraCB;
841
- JCheckBox speakerFocusCB;
842
- JCheckBox debugCB;
843
- JCheckBox oeilCB;
844
- JCheckBox lookAtCB;
1051
+ cCheckBox speakerCameraCB;
1052
+ cCheckBox speakerFocusCB;
1053
+ cCheckBox debugCB;
1054
+
1055
+ cCheckBox oeilCB;
1056
+ cCheckBox shadowCB;
1057
+ cCheckBox autokeepCB;
1058
+ cCheckBox lookAtCB;
8451059
8461060 // static int COLOR = 1;
8471061 // static int MATERIAL = 2;
....@@ -849,9 +1063,9 @@
8491063
8501064 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
8511065
852
- JCheckBox colorCB;
853
- JCheckBox materialCB;
854
- JCheckBox textureCB;
1066
+ cCheckBox colorCB;
1067
+ cCheckBox materialCB;
1068
+ cCheckBox textureCB;
8551069
8561070 public void itemStateChanged(ItemEvent e)
8571071 {
....@@ -944,6 +1158,18 @@
9441158 {
9451159 cameraView.ToggleOeil();
9461160 }
1161
+ else if(e.getSource() == shadowCB)
1162
+ {
1163
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1164
+ }
1165
+ else if(e.getSource() == freezeCB)
1166
+ {
1167
+ Globals.FREEZEONMOVE ^= true;
1168
+ }
1169
+ else if(e.getSource() == autokeepCB)
1170
+ {
1171
+ Globals.REPLACEONMAKE ^= true;
1172
+ }
9471173 else if(e.getSource() == lookAtCB)
9481174 {
9491175 cameraView.ToggleLookAt();
....@@ -960,7 +1186,8 @@
9601186
9611187 /**/
9621188 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
963
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1189
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1190
+ TreePath path = objEditor.jTree.getSelectionPath();
9641191 if ((path == null) || (path.getPathCount() <= 1)) {
9651192 // We can't move the root node or an empty selection
9661193 return;
....@@ -1023,8 +1250,6 @@
10231250 }
10241251 }
10251252
1026
- String string = (String) object;
1027
-
10281253 System.out.println("Transfer = " + object + "; drop : " + target);
10291254 // if( object instanceof java.io.File[])
10301255 // {
....@@ -1032,6 +1257,8 @@
10321257 // objEditor.DropFile((java.io.File[]) object, true);
10331258 // return;
10341259 // }
1260
+
1261
+ String string = object.toString();
10351262
10361263 // File path for Mac and Windows
10371264 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1077,23 +1304,33 @@
10771304
10781305 assert target == objEditor.jTree;
10791306 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1307
+ Object3D destinationLeaf;
10801308 try {
1081
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1309
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
10821310 } catch (Exception e) {
10831311 System.out.println("destinationPath : " + destinationPath);
10841312 return;
10851313 }
10861314
1087
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1315
+ for (int i=group.selection.size(); --i>=0;)
10881316 {
1317
+ Object3D child = (Object3D)group.selection.elementAt(i);
1318
+
1319
+ // Cannot move into itself
1320
+ if (child == destinationLeaf)
1321
+ return;
1322
+ }
1323
+
1324
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1325
+// {
10891326 loadClipboard(true);
10901327 objEditor.jTree.setSelectionPath(destinationPath);
10911328 pasteInto(false, false);
1092
- } else {
1093
- loadClipboard(false);
1094
- objEditor.jTree.setSelectionPath(destinationPath);
1095
- pasteInto(false, false); // true); // ???
1096
- }
1329
+// } else {
1330
+// loadClipboard(false);
1331
+// objEditor.jTree.setSelectionPath(destinationPath);
1332
+// pasteInto(false, false); // true); // ???
1333
+// }
10971334 }
10981335 public void dropActionChanged(DropTargetDragEvent dtde)
10991336 // Called if the user has modified the current drop gesture
....@@ -1198,22 +1435,30 @@
11981435 {
11991436 //heightFieldItem = menu.add(new MenuItem("Height Field"));
12001437 //heightFieldItem.addActionListener(this);
1201
- gridItem = menu.add(new MenuItem("Grid"));
1202
- gridItem.addActionListener(this);
1203
- rectoidItem = menu.add(new MenuItem("Box"));
1204
- rectoidItem.addActionListener(this);
1205
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1206
- ellipsoidItem.addActionListener(this);
1207
- coneItem = menu.add(new MenuItem("Cone"));
1208
- coneItem.addActionListener(this);
1209
- torusItem = menu.add(new MenuItem("Torus"));
1210
- torusItem.addActionListener(this);
1211
- superItem = menu.add(new MenuItem("Superellipsoid"));
1212
- superItem.addActionListener(this);
1438
+// gridItem = menu.add(new MenuItem("Grid"));
1439
+// gridItem.addActionListener(this);
1440
+// rectoidItem = menu.add(new MenuItem("Box"));
1441
+// rectoidItem.addActionListener(this);
1442
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1443
+// ellipsoidItem.addActionListener(this);
1444
+// coneItem = menu.add(new MenuItem("Cone"));
1445
+// coneItem.addActionListener(this);
1446
+// torusItem = menu.add(new MenuItem("Torus"));
1447
+// torusItem.addActionListener(this);
1448
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1449
+// superItem.addActionListener(this);
1450
+
1451
+ cameraItem = menu.add(new MenuItem("Camera"));
1452
+ cameraItem.addActionListener(this);
1453
+
1454
+ if (!Globals.ADVANCED)
1455
+ {
12131456 kleinItem = menu.add(new MenuItem("Klein Bottle"));
12141457 kleinItem.addActionListener(this);
1215
- particleItem = menu.add(new MenuItem("Particle system"));
1216
- particleItem.addActionListener(this);
1458
+ }
1459
+
1460
+// particleItem = menu.add(new MenuItem("Particle system"));
1461
+// particleItem.addActionListener(this);
12171462 if (Globals.ADVANCED)
12181463 {
12191464 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1239,15 +1484,15 @@
12391484 }
12401485 bezierItem = menu.add(new MenuItem("Bezier Patch"));
12411486 bezierItem.addActionListener(this);
1242
- overlayItem = menu.add(new MenuItem("Overlay"));
1243
- overlayItem.addActionListener(this);
1244
- lightItem = menu.add(new MenuItem("Light"));
1245
- lightItem.addActionListener(this);
1487
+// overlayItem = menu.add(new MenuItem("Overlay"));
1488
+// overlayItem.addActionListener(this);
1489
+// lightItem = menu.add(new MenuItem("Light"));
1490
+// lightItem.addActionListener(this);
12461491 menu.add("-");
12471492 //superLoopItem = menu.add(new MenuItem("Super Loop"));
12481493 //superLoopItem.addActionListener(this);
1249
- loopItem = menu.add(new MenuItem("Loop"));
1250
- loopItem.addActionListener(this);
1494
+// loopItem = menu.add(new MenuItem("Loop"));
1495
+// loopItem.addActionListener(this);
12511496 doubleItem = menu.add(new MenuItem("Fork"));
12521497 doubleItem.addActionListener(this);
12531498 if (Globals.ADVANCED)
....@@ -1263,6 +1508,9 @@
12631508 animationItem.addItemListener(this);
12641509 animationItem.setState(Globals.ANIMATION);
12651510
1511
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1512
+ archiveItem.addActionListener(this);
1513
+
12661514 menu.add("-");
12671515 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
12681516 parseverticesItem.addActionListener(this);
....@@ -1275,6 +1523,8 @@
12751523 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
12761524 reduce34MorphItem.addActionListener(this);
12771525 menu.add("-");
1526
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1527
+ memoryItem.addActionListener(this);
12781528 menu.add(computeAOItem = new MenuItem("Compute AO"));
12791529 computeAOItem.addActionListener(this);
12801530
....@@ -1283,8 +1533,6 @@
12831533 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
12841534 mirrorItem.addActionListener(this);
12851535 menu.add("-");
1286
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1287
- memoryItem.addActionListener(this);
12881536 menu.add(analyzeItem = new MenuItem("Analyze"));
12891537 analyzeItem.addActionListener(this);
12901538 menu.add(dumpItem = new MenuItem("Print"));
....@@ -1428,9 +1676,34 @@
14281676 shadow.material = new cMaterial(obj.material);
14291677 shadow.material.diffuse = 0.0001f;
14301678 shadow.material.specular = 0.0001f;
1679
+ //shadow.projectedVertices[1].x = 300;
14311680
14321681 makeSomething(shadow);
14331682 }
1683
+
1684
+ private void ClearUnpinned()
1685
+ {
1686
+ //for (Object3D obj : listUI)
1687
+ for (int i=listUI.size(); --i>=0;)
1688
+ {
1689
+ Object3D obj = listUI.elementAt(i);
1690
+ if (!obj.pinned)
1691
+ {
1692
+ obj.CloseUI();
1693
+ listUI.remove(i);
1694
+ }
1695
+ }
1696
+ }
1697
+
1698
+ private void EditElement(Object3D elem, boolean newWindow)
1699
+ {
1700
+ // if (!(elem instanceof Composite))
1701
+ // newWindow = false;
1702
+ listUI.add(elem);
1703
+ elem.openEditWindow(this, newWindow); //, false);
1704
+ System.out.println("edit : " + elem);
1705
+ elem.editWindow.refreshContents(true); // ? new
1706
+ }
14341707
14351708 /**
14361709 * applyExample
....@@ -1675,7 +1948,7 @@
16751948 {
16761949 ScreenFit();
16771950 } else
1678
- if (source == switchItem)
1951
+ if (source == switchViewItem)
16791952 {
16801953 cVector v1 = new cVector();
16811954 cVector v2 = new cVector();
....@@ -1684,11 +1957,11 @@
16841957 objEditor.cameraView.renderCamera.setAim(v2, v1);
16851958 objEditor.cameraView.repaint();
16861959 } else
1687
- if (source == rectoidItem)
1960
+ if (source == rectoidItem || source == boxButton)
16881961 {
16891962 makeSomething(new Box());
16901963 } else
1691
- if (source == particleItem)
1964
+ if (source == particleItem || source == particlesButton)
16921965 {
16931966 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
16941967 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1767,27 +2040,27 @@
17672040
17682041 makeSomething(obj);
17692042 } else
1770
- if (source == gridItem)
2043
+ if (source == gridItem || source == gridButton)
17712044 {
17722045 makeSomething(new Grid());
17732046 } else
1774
- if (source == ellipsoidItem)
2047
+ if (source == ellipsoidItem || source == sphereButton)
17752048 {
17762049 makeSomething(new Sphere());
17772050 } else
1778
- if (source == coneItem)
2051
+ if (source == coneItem || source == coneButton)
17792052 {
17802053 makeSomething(new Cone());
17812054 } else
1782
- if (source == torusItem)
2055
+ if (source == torusItem || source == torusButton)
17832056 {
17842057 makeSomething(new Torus());
17852058 } else
1786
- if (source == superItem)
2059
+ if (source == superItem || source == superButton)
17872060 {
17882061 makeSomething(new Superellipsoid());
17892062 } else
1790
- if (source == kleinItem)
2063
+ if (source == kleinItem || source == kleinButton)
17912064 {
17922065 makeSomething(new Klein());
17932066 } else
....@@ -1807,7 +2080,7 @@
18072080 {
18082081 makeSomething(new BezierSurface());
18092082 } else
1810
- if (source == overlayItem)
2083
+ if (source == overlayItem || source == overlayButton)
18112084 {
18122085 /*
18132086 Object3D obj = new BezierSurface(5,8);
....@@ -1855,7 +2128,7 @@
18552128 s.setup();
18562129 makeSomething(s);
18572130 } else
1858
- if (source == lightItem)
2131
+ if (source == lightItem || source == lightButton)
18592132 {
18602133 makeSomething(new Light());
18612134 } else
....@@ -1905,30 +2178,30 @@
19052178
19062179 group(g);
19072180 } else
1908
- if (source == loopItem)
2181
+ if (source == loopItem || source == loopButton)
19092182 {
19102183 Composite csg = new GroupLeaf();
19112184 csg.count = 5;
19122185 group(csg);
1913
- Composite child = new cGroup();
2186
+ Composite child = new cGroup("Branch");
19142187 csg.addChild(child);
19152188 child.addChild(csg);
19162189 } else
19172190 if (source == doubleItem)
19182191 {
1919
- Composite csg = new GroupLeaf();
2192
+ Composite csg = new GroupLeaf("Fork");
19202193 csg.count = 5;
19212194 group(csg);
1922
- Composite child = new cGroup();
2195
+ Composite child = new cGroup("Branch A");
19232196 csg.addChild(child);
19242197 child.addChild(csg);
1925
- child = new cGroup();
2198
+ child = new cGroup("Branch B");
19262199 csg.addChild(child);
19272200 child.addChild(csg);
19282201 } else
19292202 if (source == tripleItem)
19302203 {
1931
- Composite csg = new GroupLeaf();
2204
+ Composite csg = new GroupLeaf("Trident");
19322205 csg.count = 4;
19332206 group(csg);
19342207 Composite child = new cGroup();
....@@ -1978,17 +2251,45 @@
19782251 {
19792252 DumpObject();
19802253 } else
2254
+ if (source == minButton)
2255
+ {
2256
+ Minimize();
2257
+ } else
2258
+ if (source == maxButton)
2259
+ {
2260
+ Maximize();
2261
+ } else
2262
+ if (source == fullButton)
2263
+ {
2264
+ ToggleFullScreen();
2265
+ } else
19812266 if (source == undoButton)
19822267 {
2268
+ // Go to previous version
2269
+ //if (!Undo())
2270
+ //java.awt.Toolkit.getDefaultToolkit().beep();
19832271 Undo();
2272
+ } else
2273
+ if (source == restoreButton)
2274
+ {
2275
+ // Restore current version
2276
+ Restore();
2277
+ } else
2278
+ if (source == replaceButton)
2279
+ {
2280
+ // Overwrite current version
2281
+ Replace();
19842282 } else
19852283 if (source == redoButton)
19862284 {
2285
+ // Go to next version
19872286 Redo();
19882287 } else
19892288 if (source == saveButton)
19902289 {
1991
- Save();
2290
+ // Save a new version
2291
+ if (!Save(true))
2292
+ java.awt.Toolkit.getDefaultToolkit().beep();
19922293 } else
19932294 if (source == oneStepButton)
19942295 {
....@@ -1997,17 +2298,14 @@
19972298 } else
19982299 if (source == screenfitButton)
19992300 {
2000
- //Reload(lastConverter, lastFilename, true);
20012301 ScreenFit();
20022302 } else
20032303 if (source == screenfitpointButton)
20042304 {
2005
- //Reload(lastConverter, lastFilename, true);
20062305 ScreenFitPoint();
20072306 } else
20082307 if (source == snapobjectButton)
20092308 {
2010
- //Reload(lastConverter, lastFilename, true);
20112309 SnapObject();
20122310 } else
20132311 // if (event.getSource() == recompileButton)
....@@ -2371,7 +2669,7 @@
23712669 {
23722670 StepAll();
23732671 } else
2374
- if (source == clearItem) // || event.getSource() == clearButton)
2672
+ if (source == deleteItem) // || event.getSource() == clearButton)
23752673 {
23762674 //int indices[] = jList.getSelectedIndices();
23772675 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2383,9 +2681,9 @@
23832681 {
23842682 ClearSelection(true);
23852683 } else
2386
- if (source == grabItem)
2684
+ if (source == grabItem || source == groupButton)
23872685 {
2388
- group(new cGroup(), true);
2686
+ group(new cGroup(), false); // true);
23892687 } else
23902688 if (source == hideItem)
23912689 {
....@@ -2403,11 +2701,11 @@
24032701 {
24042702 makeSomething(new Camera());
24052703 } else
2406
- if (source == compositeItem)
2704
+ if (source == compositeItem || source == compositeButton)
24072705 {
24082706 group(new Composite());
24092707 } else
2410
- if (source == randomItem)
2708
+ if (source == switchItem || source == switchButton)
24112709 {
24122710 RandomNode random = new RandomNode();
24132711 group(random);
....@@ -2509,7 +2807,7 @@
25092807 {
25102808 group(new cLinker());
25112809 } else
2512
- if (source == textureItem)
2810
+ if (source == textureItem || source == textureButton)
25132811 {
25142812 group(new TextureNode());
25152813 } else
....@@ -2529,17 +2827,30 @@
25292827 {
25302828 CastShadow(2);
25312829 } else
2532
- if (source == ungroupItem)
2830
+ if (source == ungroupItem || source == ungroupButton)
25332831 {
2534
- //ungroup();
2832
+ boolean hasRoot = false;
2833
+
25352834 for (int i=0; i<group.selection.size(); i++)
25362835 {
2537
- Ungroup(group.selection.get(i));
2836
+ if (group.selection.get(i) == group)
2837
+ {
2838
+ hasRoot = true;
2839
+ break;
2840
+ }
25382841 }
25392842
2540
- ClearSelection(false);
2541
-
2542
- refreshContents();
2843
+ if (!hasRoot)
2844
+ {
2845
+ for (int i=0; i<group.selection.size(); i++)
2846
+ {
2847
+ Ungroup(group.selection.get(i));
2848
+ }
2849
+
2850
+ ClearSelection(false);
2851
+
2852
+ refreshContents();
2853
+ }
25432854 } else
25442855 if (source == genUVItem)
25452856 {
....@@ -2867,6 +3178,10 @@
28673178 if (source == twoButton)
28683179 {
28693180 radio.layout = twoButton;
3181
+
3182
+ if (CameraPane.FULLSCREEN)
3183
+ fullscreenLayout = radio.layout;
3184
+
28703185 // bug
28713186 //gridPanel.setDividerLocation(1.0);
28723187 //bigPanel.setDividerLocation(0.0);
....@@ -2899,10 +3214,31 @@
28993214 bigThree.ClearUI();
29003215 bigThree.add(centralPanel);
29013216 bigThree.FlushUI();
3217
+
3218
+ cameraView.requestFocusInWindow();
3219
+
3220
+// refreshContents(true);
3221
+//
3222
+// try
3223
+// {
3224
+// java.awt.Robot bot = new java.awt.Robot();
3225
+// int mask = InputEvent.BUTTON1_MASK;
3226
+// bot.mouseMove(100, 100);
3227
+// bot.mousePress(mask);
3228
+// bot.mouseRelease(mask);
3229
+// }
3230
+// catch (Exception e)
3231
+// {
3232
+//
3233
+// }
3234
+
29023235 } else
29033236 if (source == threeButton)
29043237 {
29053238 radio.layout = threeButton;
3239
+
3240
+ if (CameraPane.FULLSCREEN)
3241
+ fullscreenLayout = radio.layout;
29063242
29073243 // bigThree.remove(scenePanel);
29083244 // bigThree.remove(centralPanel);
....@@ -2935,10 +3271,15 @@
29353271 bigThree.add(centralPanel);
29363272 bigThree.add(XYZPanel);
29373273 bigThree.FlushUI();
3274
+
3275
+ cameraView.requestFocusInWindow();
29383276 } else
29393277 if (source == fourButton)
29403278 {
29413279 radio.layout = fourButton;
3280
+
3281
+ if (CameraPane.FULLSCREEN)
3282
+ fullscreenLayout = radio.layout;
29423283
29433284 // bigThree.remove(scenePanel);
29443285 // bigThree.remove(centralPanel);
....@@ -2970,10 +3311,15 @@
29703311 bigThree.ClearUI();
29713312 bigThree.add(scenePanel);
29723313 bigThree.FlushUI();
3314
+
3315
+ cameraView.requestFocusInWindow();
29733316 } else
29743317 if (source == sixButton)
29753318 {
29763319 radio.layout = sixButton;
3320
+
3321
+ if (CameraPane.FULLSCREEN)
3322
+ fullscreenLayout = radio.layout;
29773323
29783324 // bigThree.remove(scenePanel);
29793325 // bigThree.remove(centralPanel);
....@@ -3006,10 +3352,15 @@
30063352 bigThree.add(scenePanel);
30073353 bigThree.add(centralPanel);
30083354 bigThree.FlushUI();
3355
+
3356
+ cameraView.requestFocusInWindow();
30093357 } else
30103358 if (source == sevenButton)
30113359 {
30123360 radio.layout = sevenButton;
3361
+
3362
+ if (CameraPane.FULLSCREEN)
3363
+ fullscreenLayout = radio.layout;
30133364
30143365 // bigThree.remove(scenePanel);
30153366 // bigThree.remove(centralPanel);
....@@ -3043,6 +3394,8 @@
30433394 bigThree.add(centralPanel);
30443395 bigThree.add(XYZPanel);
30453396 bigThree.FlushUI();
3397
+
3398
+ cameraView.requestFocusInWindow();
30463399 } else
30473400 if (source == rootButton)
30483401 {
....@@ -3054,6 +3407,7 @@
30543407 EditObject(obj);
30553408 }
30563409
3410
+ cameraView.requestFocusInWindow();
30573411 refreshContents(true);
30583412 } else
30593413 if (source == closeButton)
....@@ -3063,22 +3417,37 @@
30633417 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
30643418 {
30653419 ab = (cRadio)e.nextElement();
3066
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3420
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
30673421 {
3422
+ // Patch to avoid bug with transparency.
3423
+ if (!ab.hadMaterial)
3424
+ {
3425
+ ab.object.material = null;
3426
+ }
3427
+
30683428 buttonGroup.remove(ab);
30693429 radioPanel.remove(ab);
30703430
3071
- ab.GetObject().editWindow = null;
3431
+ //ab.GetObject().editWindow = null;
3432
+ ab.GetObject().manipWindow = null;
30723433 // ab.GetObject().objectUI = null; // ?????????
30733434
30743435 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
30753436 break;
30763437 }
30773438 }
3439
+
3440
+ cameraView.requestFocusInWindow();
30783441 refreshContents(true);
30793442 } else
30803443 if (source == editItem || source == editButton)
30813444 {
3445
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3446
+ {
3447
+ Object3D child = (Object3D)e.nextElement();
3448
+ child.pinned = true;
3449
+ }
3450
+
30823451 EditSelection(false);
30833452 } else
30843453 if (source == uneditButton)
....@@ -3088,6 +3457,7 @@
30883457 Object3D child = (Object3D)e.nextElement();
30893458 if(child.editWindow != null)
30903459 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3460
+ child.pinned = false;
30913461 child.CloseUI();
30923462 listUI.remove(child);
30933463
....@@ -3104,6 +3474,7 @@
31043474 //copy.ClearUI();
31053475 for (Object3D obj : listUI)
31063476 {
3477
+ obj.pinned = false;
31073478 obj.CloseUI();
31083479 }
31093480 listUI.clear();
....@@ -3113,7 +3484,7 @@
31133484 {
31143485 assert(copy == group);
31153486
3116
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3487
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
31173488
31183489 for (Object3D obj : listUI)
31193490 {
....@@ -3162,6 +3533,9 @@
31623533 }
31633534
31643535 copy = group;
3536
+
3537
+ SetUndoStates();
3538
+
31653539 //Globals.theRenderer.object = group;
31663540 if(!useclient)
31673541 {
....@@ -3179,7 +3553,8 @@
31793553 }
31803554
31813555 // fix "+" issue
3182
- group.editWindow = this;
3556
+ //group.editWindow = this;
3557
+ group.manipWindow = this;
31833558
31843559 /*
31853560 currentLayout = radio.layout;
....@@ -3187,18 +3562,27 @@
31873562 currentLayout = sevenButton;
31883563 */
31893564 radio.layout.doClick();
3565
+
3566
+ ClearUnpinned();
3567
+ //Grafreed.Assert(group != null);
3568
+ //Grafreed.Assert(group.selection != null);
3569
+ SetPinStates(group.selection == null || group.selection.size() > 0);
3570
+ if (group.selection == null || group.selection.size() == 1)
3571
+ EditSelection(false);
31903572 keepparent = group.parent;
31913573 // PARENT = NULL or not???
31923574 //group.parent = null; // ROOT
31933575 //group.attributes = -1;
31943576 ResetModel();
3577
+
3578
+ cameraView.requestFocusInWindow();
31953579 refreshContents(true);
31963580 } else if (event.getSource() == editCameraItem)
31973581 {
31983582 cameraView.ProtectCamera();
31993583 cameraView.repaint();
32003584 return;
3201
- } else if (event.getSource() == revertCameraItem)
3585
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
32023586 {
32033587 cameraView.RevertCamera();
32043588 cameraView.repaint();
....@@ -3215,7 +3599,6 @@
32153599 }
32163600
32173601 boolean useclient = false;
3218
- cRadio radio;
32193602
32203603 void ToggleRoot()
32213604 {
....@@ -4253,28 +4636,25 @@
42534636 // }
42544637 // }
42554638
4256
- static boolean allparams = true;
4257
-
4258
- static Vector<Object3D> listUI = new Vector<Object3D>();
4259
-
42604639 void EditSelection(boolean newWindow)
42614640 {
4641
+ if (group.selection == null)
4642
+ {
4643
+ EditElement(group, newWindow); // ? new
4644
+ return;
4645
+ }
4646
+
42624647 // aConstraints.gridy = 0;
42634648 for (int i=0; i<group.selection.size(); i++)
42644649 {
42654650 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
42664651 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4267
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4652
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
42684653
42694654 Object3D elem = (Object3D)group.selection.elementAt(i);
42704655 if(elem != group || !newWindow)
42714656 {
4272
- // if (!(elem instanceof Composite))
4273
- // newWindow = false;
4274
- listUI.add(elem);
4275
- elem.openEditWindow(this, newWindow); //, false);
4276
- System.out.println("edit : " + elem);
4277
- elem.editWindow.refreshContents(true); // ? new
4657
+ EditElement(elem, newWindow); // ? new
42784658 }
42794659 }
42804660 }
....@@ -4349,7 +4729,8 @@
43494729 //new Exception().printStackTrace();
43504730
43514731 freezemodel = true;
4352
-
4732
+ ClearUnpinned();
4733
+
43534734 /**/
43544735 //switch (event.id)
43554736 {
....@@ -4382,7 +4763,7 @@
43824763 if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
43834764 // a camera
43844765 {
4385
- if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4766
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
43864767 {
43874768 CameraPane.camerachangeframe = 0; // don't refuse it
43884769 Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
....@@ -4391,6 +4772,13 @@
43914772 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
43924773 }
43934774
4775
+ if (tps != null && tps.length == 1)
4776
+ {
4777
+ EditSelection(false);
4778
+ }
4779
+
4780
+ SetPinStates(tps != null && tps.length > 0);
4781
+
43944782 refreshContents();
43954783 //return true;
43964784 }
....@@ -4400,9 +4788,18 @@
44004788 freezemodel = false;
44014789 }
44024790
4791
+ void SetPinStates(boolean enabled)
4792
+ {
4793
+ editButton.setEnabled(enabled);
4794
+ uneditButton.setEnabled(enabled);
4795
+ unselectButton.setEnabled(enabled);
4796
+ flashSelectionButton.setEnabled(enabled);
4797
+ }
4798
+
44034799 void refreshContents(boolean cp)
44044800 {
4405
- if (!Globals.MOUSEDRAGGED)
4801
+ if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4802
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
44064803 {
44074804 objEditor.ClearInfo(); // .GetMaterial());
44084805
....@@ -4501,7 +4898,8 @@
45014898
45024899 if (cut)
45034900 {
4504
- Save();
4901
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
4902
+// Save();
45054903 //int indices[] = jList.getSelectedIndices();
45064904 //for (int i = indices.length - 1; i >= 0; i--)
45074905 //jList.remove(indices[i]);
....@@ -4604,6 +5002,10 @@
46045002
46055003 void paste(boolean expand)
46065004 {
5005
+ if (Globals.REPLACEONMAKE)
5006
+ Save();
5007
+ boolean keep = Globals.REPLACEONMAKE;
5008
+ Globals.REPLACEONMAKE = false;
46075009 // if (GrafreeD.clipboard == null)
46085010 // return;
46095011 boolean first = true;
....@@ -4663,6 +5065,7 @@
46635065 Grafreed.clipboard.get(0).parent = keepparent;
46645066 }
46655067
5068
+ Globals.REPLACEONMAKE = keep;
46665069 ResetModel();
46675070 refreshContents();
46685071 }
....@@ -4798,6 +5201,10 @@
47985201
47995202 void group(Object3D csg, boolean grab)
48005203 {
5204
+ if (Globals.REPLACEONMAKE)
5205
+ Save();
5206
+ boolean keep = Globals.REPLACEONMAKE;
5207
+ Globals.REPLACEONMAKE = false;
48015208 if (//false) // why??
48025209 !group.selection.isEmpty())
48035210 {
....@@ -4911,10 +5318,15 @@
49115318 //node.add(csg);
49125319 //makeSomething(node);
49135320 makeSomething(csg);
5321
+ Globals.REPLACEONMAKE = keep;
49145322 }
49155323
49165324 void Ungroup(Object3D g)
49175325 {
5326
+ if (Globals.REPLACEONMAKE)
5327
+ Save();
5328
+ boolean keep = Globals.REPLACEONMAKE;
5329
+ Globals.REPLACEONMAKE = false;
49185330 if (g instanceof HiddenObject)
49195331 {
49205332 HiddenObject h = (HiddenObject) g;
....@@ -4931,6 +5343,7 @@
49315343 objEditor.makeSomething(g.get(i), false);
49325344 }
49335345 }
5346
+ Globals.REPLACEONMAKE = keep;
49345347 }
49355348
49365349 void ungroup()
....@@ -5219,10 +5632,28 @@
52195632 cButton clearpanelButton;
52205633 cButton unselectButton;
52215634
5635
+ cButton restoreCameraButton;
5636
+
52225637 cButton saveButton;
5223
- cButton undoButton;
5224
- cButton redoButton;
52255638 cButton oneStepButton;
5639
+
5640
+ cButton groupButton;
5641
+ cButton ungroupButton;
5642
+ cButton compositeButton;
5643
+ cButton switchButton;
5644
+ cButton loopButton;
5645
+ cButton textureButton;
5646
+
5647
+ cButton gridButton;
5648
+ cButton boxButton;
5649
+ cButton sphereButton;
5650
+ cButton coneButton;
5651
+ cButton torusButton;
5652
+ cButton superButton;
5653
+ cButton kleinButton;
5654
+ cButton particlesButton;
5655
+ cButton overlayButton;
5656
+ cButton lightButton;
52265657
52275658 cButton screenfitButton;
52285659 cButton screenfitpointButton;
....@@ -5235,14 +5666,6 @@
52355666
52365667 cButton setsupportButton;
52375668
5238
- cButton twoButton;
5239
- cButton sixButton;
5240
- cButton threeButton;
5241
- cButton sevenButton;
5242
- cButton fourButton; // full panel
5243
- cButton oneButton; // full XYZ
5244
- //cButton currentLayout;
5245
-
52465669 //
52475670 //Composite
52485671 Object3D // to do !!
....@@ -5252,11 +5675,11 @@
52525675 //JTree jTree;
52535676 private MenuItem lookAtItem;
52545677 private MenuItem lookFromItem;
5255
- private MenuItem switchItem;
5678
+ private MenuItem switchViewItem;
52565679 private MenuItem cutItem;
52575680 private MenuItem undoItem;
52585681 private MenuItem redoItem;
5259
- private MenuItem duplicateItem;
5682
+ private JMenuItem duplicateItem;
52605683 private MenuItem cloneItem;
52615684 private MenuItem cloneSupportItem;
52625685 private MenuItem overwriteGeoItem;
....@@ -5284,7 +5707,7 @@
52845707 private MenuItem pasteLinkItem;
52855708 private MenuItem pasteCloneItem;
52865709 private MenuItem pasteExpandItem;
5287
- private MenuItem clearItem;
5710
+ private MenuItem deleteItem;
52885711 private MenuItem clearAllItem;
52895712 private MenuItem genUVItem;
52905713 private MenuItem genNormalsMESHItem;
....@@ -5344,7 +5767,7 @@
53445767 private MenuItem frontItem;
53455768 private MenuItem cameraItem;
53465769 private MenuItem compositeItem;
5347
- private MenuItem randomItem;
5770
+ private MenuItem switchItem;
53485771 private MenuItem physicsItem;
53495772 private MenuItem frameselectorItem;
53505773 private MenuItem scriptNodeItem;
....@@ -5418,5 +5841,5 @@
54185841
54195842 Menu cameraMenu;
54205843 MenuItem editCameraItem;
5421
- MenuItem revertCameraItem;
5844
+ MenuItem restoreCameraItem;
54225845 }