Normand Briere
2019-07-21 5a546232b84ce65d8779d29e9171e7e2df013614
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 }
....@@ -80,10 +86,22 @@
8086 SetupViews(objEditor);
8187
8288 ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true);
89
+
90
+ if (copy.versions == null)
91
+ {
92
+ copy.versions = new byte[100][];
93
+ copy.versionindex = -1;
94
+
95
+ Save(true);
96
+ }
8397 }
8498
8599 void CloneSelection(boolean supports)
86100 {
101
+ if (Globals.REPLACEONMAKE)
102
+ Save();
103
+ boolean keep = Globals.REPLACEONMAKE;
104
+ Globals.REPLACEONMAKE = false;
87105 // Object3D keep = GrafreeD.clipboard;
88106 //Object3D obj;
89107 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -94,6 +112,7 @@
94112
95113 makeSomething(clone, i==group.selection.size()-1);
96114 }
115
+ Globals.REPLACEONMAKE = keep;
97116 }
98117
99118 void CloneClipboard(boolean supports)
....@@ -150,6 +169,8 @@
150169
151170 void SetupMenu2(GroupEditor oe)
152171 {
172
+ oe.jTree = new cTree();
173
+
153174 Menu menu;
154175 oe.menuBar.add(menu = new Menu("Edit"));
155176 //editItem = menu.add(new MenuItem("Edit"));
....@@ -160,7 +181,7 @@
160181 // redoItem = menu.add(new MenuItem("Redo"));
161182 // redoItem.addActionListener(this);
162183 // menu.add("-");
163
- duplicateItem = menu.add(new MenuItem("Duplicate"));
184
+ duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate"));
164185 duplicateItem.addActionListener(this);
165186 cloneItem = menu.add(new MenuItem("Clone"));
166187 cloneItem.addActionListener(this);
....@@ -176,7 +197,6 @@
176197 copyItem.addActionListener(this);
177198 pasteItem = menu.add(new MenuItem("Paste"));
178199 pasteItem.addActionListener(this);
179
- menu.add("-");
180200
181201 menu.add("-");
182202 pasteIntoItem = menu.add(new MenuItem("Paste into"));
....@@ -188,8 +208,8 @@
188208 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
189209 // pasteExpandItem.addActionListener(this);
190210 menu.add("-");
191
- clearItem = menu.add(new MenuItem("Clear"));
192
- clearItem.addActionListener(this);
211
+ deleteItem = menu.add(new MenuItem("Delete"));
212
+ deleteItem.addActionListener(this);
193213
194214 if (Globals.ADVANCED)
195215 {
....@@ -203,23 +223,23 @@
203223 //zBufferItem.addActionListener(this);
204224 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
205225 //normalLensItem.addActionListener(this);
206
- cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
207
- revertCameraItem.addActionListener(this);
226
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
227
+ restoreCameraItem.addActionListener(this);
208228
209
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
210
- toggleFullScreenItem.addItemListener(this);
211
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
212
- cameraMenu.add("-");
229
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
230
+// toggleFullScreenItem.addItemListener(this);
231
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
232
+// cameraMenu.add("-");
233
+//
234
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
235
+// toggleTextureItem.addItemListener(this);
236
+// toggleTextureItem.setState(CameraPane.textureon);
237
+//
238
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
239
+// toggleSwitchItem.addItemListener(this);
240
+// toggleSwitchItem.setState(CameraPane.SWITCH);
213241
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"));
242
+ cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Show Handles"));
223243 toggleHandleItem.addItemListener(this);
224244 toggleHandleItem.setState(CameraPane.HANDLES);
225245
....@@ -246,7 +266,7 @@
246266
247267 cameraMenu.add(toggleDebugItem = new CheckboxMenuItem("Debug"));
248268 toggleDebugItem.addItemListener(this);
249
- toggleDebugItem.setState(CameraPane.DEBUG);
269
+ toggleDebugItem.setState(Globals.DEBUG);
250270
251271 cameraMenu.add(toggleFrustumItem = new CheckboxMenuItem("Frustum"));
252272 toggleFrustumItem.addItemListener(this);
....@@ -274,7 +294,7 @@
274294 {
275295 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
276296 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
277
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
297
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
278298 editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
279299 oe.cameraMenu.add("-");
280300 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
....@@ -282,7 +302,7 @@
282302 editLeafItem.addActionListener(this);
283303 lookAtItem.addActionListener(this);
284304 //lookFromItem.addActinoListener(this);
285
- //switchItem.addActionListener(this);
305
+ //switchViewItem.addActionListener(this);
286306 }
287307
288308 oe.menuBar.add(menu = new Menu("Setting"));
....@@ -327,21 +347,29 @@
327347 }
328348
329349 oe.menuBar.add(menu = new Menu("Group"));
330
- grabItem = menu.add(new MenuItem("Grab"));
331
- grabItem.addActionListener(this);
350
+// grabItem = menu.add(new MenuItem("Grab"));
351
+// grabItem.addActionListener(this);
332352 backItem = menu.add(new MenuItem("Back"));
333353 backItem.addActionListener(this);
334354 frontItem = menu.add(new MenuItem("Front"));
335355 frontItem.addActionListener(this);
336
- compositeItem = menu.add(new MenuItem("Composite"));
337
- compositeItem.addActionListener(this);
356
+// compositeItem = menu.add(new MenuItem("Composite"));
357
+// compositeItem.addActionListener(this);
358
+
359
+ if (Globals.ADVANCED)
360
+ {
338361 hideItem = menu.add(new MenuItem("Hidden Group"));
339362 hideItem.addActionListener(this);
363
+ }
340364 ungroupItem = menu.add(new MenuItem("Ungroup"));
341365 ungroupItem.addActionListener(this);
342
- menu.add("-");
343
- randomItem = menu.add(new MenuItem("Switch node"));
344
- randomItem.addActionListener(this);
366
+
367
+// menu.add("-");
368
+//
369
+// switchItem = menu.add(new MenuItem("Switch node"));
370
+// switchItem.addActionListener(this);
371
+ if (Globals.ADVANCED)
372
+ {
345373 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
346374 switchGeoItem.addActionListener(this);
347375 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
....@@ -349,8 +377,6 @@
349377 morphItem = menu.add(new MenuItem("Morph Group"));
350378 morphItem.addActionListener(this);
351379
352
- if (Globals.ADVANCED)
353
- {
354380 menu.add("-");
355381 physicsItem = menu.add(new MenuItem("Physics"));
356382 physicsItem.addActionListener(this);
....@@ -358,30 +384,29 @@
358384 frameselectorItem.addActionListener(this);
359385 scriptNodeItem = menu.add(new MenuItem("Script Node"));
360386 scriptNodeItem.addActionListener(this);
361
- cameraItem = menu.add(new MenuItem("Camera"));
362
- cameraItem.addActionListener(this);
363387 }
364388
365389 oe.menuBar.add(menu = new Menu("Object"));
366
- textureItem = menu.add(new MenuItem("Texture"));
367
- textureItem.addActionListener(this);
390
+// textureItem = menu.add(new MenuItem("Texture"));
391
+// textureItem.addActionListener(this);
368392 billboardItem = menu.add(new MenuItem("Billboard"));
369393 billboardItem.addActionListener(this);
370394 csgItem = menu.add(new MenuItem("CSG"));
371395 csgItem.addActionListener(this);
372
- shadowXItem = menu.add(new MenuItem("Shadow X"));
396
+ shadowXItem = menu.add(new MenuItem("Shadow Red"));
373397 shadowXItem.addActionListener(this);
374
- shadowYItem = menu.add(new MenuItem("Shadow Y"));
398
+ shadowYItem = menu.add(new MenuItem("Shadow Green"));
375399 shadowYItem.addActionListener(this);
376
- shadowZItem = menu.add(new MenuItem("Shadow Z"));
400
+ shadowZItem = menu.add(new MenuItem("Shadow Blue"));
377401 shadowZItem.addActionListener(this);
402
+ attributeItem = menu.add(new MenuItem("Attribute"));
403
+ attributeItem.addActionListener(this);
404
+
378405 if (Globals.ADVANCED)
379406 {
380407 menu.add("-");
381408 linkerItem = menu.add(new MenuItem("Linker"));
382409 linkerItem.addActionListener(this);
383
- attributeItem = menu.add(new MenuItem("Attribute"));
384
- attributeItem.addActionListener(this);
385410 templateItem = menu.add(new MenuItem("Template"));
386411 templateItem.addActionListener(this);
387412 pointflowItem = menu.add(new MenuItem("Point Flow"));
....@@ -410,7 +435,7 @@
410435 genNormalsMESHItem.addActionListener(this);
411436 if (Globals.ADVANCED)
412437 {
413
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
438
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
414439 genNormalsMINEItem.addActionListener(this);
415440 }
416441 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -533,8 +558,21 @@
533558 buildToolsMenu(menu);
534559 }
535560
561
+
536562 void SetupUI2(ObjEditor oe)
537563 {
564
+ // June 2019
565
+ if (oe == null)
566
+ {
567
+ //super.SetupUI2(this);
568
+ //return;
569
+ }
570
+
571
+ if (copy != group)
572
+ {
573
+ //super.SetupUI2(this);
574
+ }
575
+
538576 //new Exception().printStackTrace();
539577
540578 oe.radioPanel = new JPanel(new GridBagLayout());
....@@ -563,39 +601,79 @@
563601 oe.radioPanel.add(dummyButton);
564602 oe.buttonGroup.add(dummyButton);
565603 */
604
+ cGridBag copyOptionsPanel = new cGridBag();
605
+
606
+ copyOptionsPanel.preferredHeight = 1;
607
+
566608 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
567609
568
- oe.toolbarPanel.add(undoButton = new cButton("Undo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
569
- undoButton.setToolTipText("Undo changes");
570
- undoButton.addActionListener(this);
610
+ //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
611
+ //minButton.setToolTipText("Minimize window");
612
+ //minButton.addActionListener(this);
571613
572
- oe.toolbarPanel.add(redoButton = new cButton("Redo", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
573
- redoButton.setToolTipText("Redo changes");
574
- redoButton.addActionListener(this);
614
+ if (Globals.ADVANCED)
615
+ {
616
+ oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
617
+ maxButton.setToolTipText("Maximize window");
618
+ maxButton.addActionListener(this);
619
+ }
575620
576
- oe.toolbarPanel.add(saveButton = new cButton("Save", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577
- saveButton.setToolTipText("Save changes");
621
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
622
+ fullButton.setToolTipText("Full-screen window");
623
+ fullButton.addActionListener(this);
624
+
625
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
626
+ screenfitButton.setToolTipText("Screen fit");
627
+ screenfitButton.addActionListener(this);
628
+
629
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
630
+ restoreCameraButton.setToolTipText("Restore viewpoint");
631
+ restoreCameraButton.addActionListener(this);
632
+
633
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
+ saveButton.setToolTipText("New version");
578635 saveButton.addActionListener(this);
636
+
637
+ copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
638
+ undoButton.setToolTipText("Previous version");
639
+ undoButton.addActionListener(this);
640
+ undoButton.setEnabled(false);
579641
580
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
642
+ cGridBag updown = new cGridBag().setVertical(true);
643
+ updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
644
+ restoreButton.setToolTipText("Restore current");
645
+ restoreButton.addActionListener(this);
646
+ restoreButton.setEnabled(false);
647
+
648
+ updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
649
+ replaceButton.setToolTipText("Replace current");
650
+ replaceButton.addActionListener(this);
651
+ replaceButton.setEnabled(false);
652
+
653
+ copyOptionsPanel.add(updown);
654
+
655
+ copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
656
+ redoButton.setToolTipText("Next version");
657
+ redoButton.addActionListener(this);
658
+ redoButton.setEnabled(false);
659
+
660
+ oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
581661 liveCB.setToolTipText("Enable animation");
582662 liveCB.addItemListener(this);
583663
584
- oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
664
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
585665 oneStepButton.setToolTipText("Animate one step forward");
586666 oneStepButton.addActionListener(this);
587667
588
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
668
+ oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
589669 fastCB.setToolTipText("Fast mode");
590670 fastCB.addItemListener(this);
591671
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);
672
+ //oe.toolboxPanel.Return();
673
+
674
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
675
+// trackCB.setToolTipText("Enable tracking");
676
+// trackCB.addItemListener(this);
599677
600678 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
601679 // screenfitpointButton.addActionListener(this);
....@@ -607,65 +685,146 @@
607685 snapobjectButton.setToolTipText("Snap Object");
608686 }
609687
610
- oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
611
- flashSelectionButton.setToolTipText("Show selection");
612
- flashSelectionButton.addActionListener(this);
688
+ //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
613689
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);
690
+ oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
620691 fourButton.addActionListener(this);
621692 fourButton.setToolTipText("Show left panel only");
622
- oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
623
- sixButton.setToolTipText("2-column layout left");
693
+
694
+ oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
695
+ twoButton.setToolTipText("Show right view only");
696
+ twoButton.addActionListener(this);
697
+ this.fullscreenLayout = twoButton;
698
+
699
+ oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
700
+ sixButton.setToolTipText("Show left and right");
624701 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);
702
+// oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
703
+// threeButton.setToolTipText("2-column layout right");
704
+// threeButton.addActionListener(this);
705
+// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
706
+// sevenButton.setToolTipText("3-column layout");
707
+// sevenButton.addActionListener(this);
631708 //
632709
633
- oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
634
- rootButton.setToolTipText("Edit selection in new tab");
710
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
711
+ rootButton.setToolTipText("Open selection in new tab");
635712 rootButton.addActionListener(this);
636713
637
- oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
714
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
638715 closeButton.setToolTipText("Close tab");
639716 closeButton.addActionListener(this);
640717 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
641718 //clearButton.addActionListener(this);
642
-
643
- cGridBag commandsPanel = new cGridBag();
719
+
720
+ // INSERT
721
+ oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
722
+ gridButton.setToolTipText("Create grid");
723
+ gridButton.addActionListener(this);
724
+
725
+ oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
726
+ boxButton.setToolTipText("Create box");
727
+ boxButton.addActionListener(this);
728
+
729
+ oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
730
+ sphereButton.setToolTipText("Create sphere");
731
+ sphereButton.addActionListener(this);
732
+
733
+ oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
734
+ coneButton.setToolTipText("Create cone");
735
+ coneButton.addActionListener(this);
736
+
737
+ oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
738
+ torusButton.setToolTipText("Create torus");
739
+ torusButton.addActionListener(this);
740
+
741
+ oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
742
+ superButton.setToolTipText("Create superellipsoid");
743
+ superButton.addActionListener(this);
744
+
745
+ if (Globals.ADVANCED)
746
+ {
747
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
748
+ kleinButton.setToolTipText("Create Klein bottle");
749
+ kleinButton.addActionListener(this);
750
+ }
644751
645
- commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
646
- editButton.setToolTipText("Edit selection");
752
+ oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
753
+ particlesButton.setToolTipText("Create particle system");
754
+ particlesButton.addActionListener(this);
755
+
756
+ oe.toolboxPanel.Return();
757
+
758
+ oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
759
+ groupButton.setToolTipText("Create group");
760
+ groupButton.addActionListener(this);
761
+
762
+ oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
763
+ compositeButton.setToolTipText("Create composite");
764
+ compositeButton.addActionListener(this);
765
+
766
+ oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
767
+ switchButton.setToolTipText("Create item switcher");
768
+ switchButton.addActionListener(this);
769
+
770
+ oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
771
+ loopButton.setToolTipText("Create loop");
772
+ loopButton.addActionListener(this);
773
+
774
+ oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
775
+ textureButton.setToolTipText("Create texture");
776
+ textureButton.addActionListener(this);
777
+
778
+ oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
779
+ overlayButton.setToolTipText("Create overlay");
780
+ overlayButton.addActionListener(this);
781
+
782
+ oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
783
+ lightButton.setToolTipText("Create light");
784
+ lightButton.addActionListener(this);
785
+
786
+ for (int i=6; --i>=0;)
787
+ {
788
+ oe.toolboxPanel.Return();
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
+ oe.toolboxPanel.add(new cGridBag());
795
+ oe.toolboxPanel.add(new cGridBag());
796
+ }
797
+
798
+ // EDIT panel
799
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
800
+ editButton.setToolTipText("Pin selection controls");
647801 editButton.addActionListener(this);
648802
649
- commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
650
- uneditButton.setToolTipText("Unedit selection");
803
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
804
+ uneditButton.setToolTipText("Remove selection controls");
651805 uneditButton.addActionListener(this);
652806
653
- commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
654
- allParamsButton.setToolTipText("Edit all params");
807
+ editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
808
+ allParamsButton.setToolTipText("Show all controle");
655809 allParamsButton.addActionListener(this);
656810
657
- commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
811
+ editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
658812 clearPanelButton.setToolTipText("Clear edit panel");
659813 clearPanelButton.addActionListener(this);
660814
661
- commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
815
+ editCommandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
662816 unselectButton.setToolTipText("Unselect");
663817 unselectButton.addActionListener(this);
664818
665
- commandsPanel.preferredHeight = 1;
819
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
820
+ flashSelectionButton.setToolTipText("Highlight selection");
821
+ flashSelectionButton.addActionListener(this);
666822
667
- oe.treePanel.add(commandsPanel);
668
- oe.treePanel.Return();
823
+ editCommandsPanel.preferredHeight = 1;
824
+
825
+ SetPinStates(false);
826
+// oe.treePanel.add(commandsPanel);
827
+// oe.treePanel.Return();
669828
670829 // oe.aConstraints.gridx += 1;
671830 // oe.aConstraints.weighty = 0;
....@@ -682,29 +841,17 @@
682841
683842 JScrollPane jSP;
684843 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
685
- jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
844
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
686845 ResetModel();
687846
688847 oe.treePanel.add(jSPPanel);
689848 oe.treePanel.Return();
690849
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;
706850 oe.treePanel.add(copyOptionsPanel);
707851 oe.treePanel.Return();
852
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
853
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
854
+ sliderPane.preferredHeight = 1;
708855
709856 // mainPanel.setDividerLocation(0.5); //1.0);
710857 // mainPanel.setResizeWeight(0.5);
....@@ -727,29 +874,49 @@
727874 dgr.addDragGestureListener(this);
728875 }catch(Exception e) {}
729876 */
730
- radio.layout = sevenButton;
877
+ radio.layout = sixButton; // sevenButton;
731878 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
732879 }
733880
734881 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
735882 {
883
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
884
+ colorCB.setToolTipText("Copy color when dropped");
885
+ colorCB.addItemListener(this);
886
+
887
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
888
+ materialCB.setToolTipText("Copy material when dropped");
889
+ materialCB.addItemListener(this);
890
+
891
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
892
+ textureCB.setToolTipText("Copy texture when dropped");
893
+ textureCB.addItemListener(this);
894
+
895
+ panel.Return();
896
+
736897 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
737898 boxCB.setToolTipText("Display bounding boxes");
738899 boxCB.addItemListener(this);
739900
740901 panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
741
- zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
902
+ zoomBoxCB.setToolTipText("Display only for wheel");
742903 zoomBoxCB.addItemListener(this);
743904
744905 if (true) // Globals.ADVANCED)
745906 {
746
- panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
747
- supportCB.setToolTipText("Enable rigging");
748
- supportCB.addItemListener(this);
907
+// panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
908
+// supportCB.setToolTipText("Enable rigging");
909
+// supportCB.addItemListener(this);
910
+
911
+ panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints);
912
+ freezeCB.setToolTipText("Fast moving camera");
913
+ freezeCB.addItemListener(this);
749914
750915 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
751916 // localCB.addItemListener(this);
752917
918
+ panel.Return();
919
+
753920 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
754921 crowdCB.setToolTipText("Used for crowds");
755922 crowdCB.addItemListener(this);
....@@ -766,6 +933,8 @@
766933 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
767934 // speakerMocapCB.addItemListener(this);
768935
936
+ panel.Return();
937
+
769938 if (false)
770939 {
771940 // handled in scripts
....@@ -780,34 +949,74 @@
780949 //constraints.gridy += 1;
781950 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
782951 smoothfocusCB.addItemListener(this);
952
+ panel.Return();
783953 }
784954
785955 //constraints.gridx += 1;
786956 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
787957 // debugCB.addItemListener(this);
788958
959
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
960
+ trackCB.setToolTipText("Enable tracking target");
961
+ trackCB.addItemListener(this);
962
+
789963 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
964
+ oeilCB.setToolTipText("Move camera when tracking");
790965 oeilCB.addItemListener(this);
791966
967
+ panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
968
+ shadowCB.setToolTipText("When live compute shadows");
969
+ shadowCB.addItemListener(this);
970
+
971
+ panel.Return();
972
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
973
+ toggleTextureCB.setToolTipText("Load textures");
974
+ toggleTextureCB.addItemListener(this);
975
+
976
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
977
+ toggleSwitchCB.setToolTipText("Choose a single item");
978
+ toggleSwitchCB.addItemListener(this);
979
+
980
+ panel.add(autokeepCB = new cCheckBox("Auto-replace", Globals.REPLACEONMAKE)); //, constraints);
981
+ autokeepCB.setToolTipText("On structure change");
982
+ autokeepCB.addItemListener(this);
983
+
984
+ panel.Return();
985
+ if (Globals.ADVANCED)
986
+ {
792987 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
793988 lookAtCB.setToolTipText("Look-at target");
794989 lookAtCB.addItemListener(this);
990
+ }
795991
796992 }
797993
798994 cGridBag fill = new cGridBag();
799
-
800995 fill.preferredHeight = 200;
996
+ cGridBag fill2 = new cGridBag();
997
+ fill2.preferredHeight = 200;
998
+ cGridBag fill3 = new cGridBag();
999
+ fill3.preferredHeight = 200;
8011000
8021001 panel.add(fill);
1002
+ panel.add(fill2);
1003
+ panel.add(fill3);
8031004
8041005 }
8051006
8061007 void EditObject(Object3D obj)
8071008 {
8081009 cRadio radioButton = new cRadio(obj.name);
1010
+
1011
+ // June 2019. Patch to avoid bug with transparency.
1012
+ radioButton.hadMaterial = obj.material != null;
1013
+ if (!radioButton.hadMaterial)
1014
+ {
1015
+ obj.material = new cMaterial();
1016
+ }
1017
+
8091018 radioButton.SetObject(obj);
810
- radioButton.layout = sevenButton;
1019
+ radioButton.layout = sixButton; // sevenButton;
8111020 radioButton.SetCamera(cameraView.renderCamera, false);
8121021 radioButton.addActionListener(this);
8131022 radioPanel.add(radioButton);
....@@ -817,6 +1026,8 @@
8171026
8181027 void SetupViews(ObjEditor oe)
8191028 {
1029
+ theFrame = this;
1030
+
8201031 oe.SetupViews();
8211032
8221033 System.out.println("SetupViews");
....@@ -825,23 +1036,28 @@
8251036 /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this);
8261037 }
8271038
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;
1039
+ cToggleButton liveCB;
1040
+ cCheckBox supportCB;
1041
+ cCheckBox localCB;
1042
+ cCheckBox crowdCB;
1043
+ cCheckBox smoothCB;
1044
+ cToggleButton fastCB;
1045
+ cCheckBox slowCB;
1046
+ cCheckBox boxCB;
1047
+ cCheckBox zoomBoxCB;
1048
+ cCheckBox freezeCB;
1049
+ //cToggleButton trackCB;
1050
+ cCheckBox trackCB;
1051
+ cCheckBox smoothfocusCB;
8391052 // JCheckBox speakerMocapCB;
840
- JCheckBox speakerCameraCB;
841
- JCheckBox speakerFocusCB;
842
- JCheckBox debugCB;
843
- JCheckBox oeilCB;
844
- JCheckBox lookAtCB;
1053
+ cCheckBox speakerCameraCB;
1054
+ cCheckBox speakerFocusCB;
1055
+ cCheckBox debugCB;
1056
+
1057
+ cCheckBox oeilCB;
1058
+ cCheckBox shadowCB;
1059
+ cCheckBox autokeepCB;
1060
+ cCheckBox lookAtCB;
8451061
8461062 // static int COLOR = 1;
8471063 // static int MATERIAL = 2;
....@@ -849,9 +1065,9 @@
8491065
8501066 int dropAttributes = Object3D.COLOR | Object3D.MATERIAL;
8511067
852
- JCheckBox colorCB;
853
- JCheckBox materialCB;
854
- JCheckBox textureCB;
1068
+ cCheckBox colorCB;
1069
+ cCheckBox materialCB;
1070
+ cCheckBox textureCB;
8551071
8561072 public void itemStateChanged(ItemEvent e)
8571073 {
....@@ -944,6 +1160,18 @@
9441160 {
9451161 cameraView.ToggleOeil();
9461162 }
1163
+ else if(e.getSource() == shadowCB)
1164
+ {
1165
+ Globals.COMPUTESHADOWWHENLIVE ^= true;
1166
+ }
1167
+ else if(e.getSource() == freezeCB)
1168
+ {
1169
+ Globals.FREEZEONMOVE ^= true;
1170
+ }
1171
+ else if(e.getSource() == autokeepCB)
1172
+ {
1173
+ Globals.REPLACEONMAKE ^= true;
1174
+ }
9471175 else if(e.getSource() == lookAtCB)
9481176 {
9491177 cameraView.ToggleLookAt();
....@@ -960,7 +1188,8 @@
9601188
9611189 /**/
9621190 //DragSource.getDefaultDragSource().startDrag(dge, DragSource.DefaultMoveNoDrop, new StringSelection("Allo"), this);
963
- TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1191
+ //TreePath path = new TreePath(objEditor.jTree.getSelectionPath().getLastPathComponent());
1192
+ TreePath path = objEditor.jTree.getSelectionPath();
9641193 if ((path == null) || (path.getPathCount() <= 1)) {
9651194 // We can't move the root node or an empty selection
9661195 return;
....@@ -1023,8 +1252,6 @@
10231252 }
10241253 }
10251254
1026
- String string = (String) object;
1027
-
10281255 System.out.println("Transfer = " + object + "; drop : " + target);
10291256 // if( object instanceof java.io.File[])
10301257 // {
....@@ -1032,6 +1259,8 @@
10321259 // objEditor.DropFile((java.io.File[]) object, true);
10331260 // return;
10341261 // }
1262
+
1263
+ String string = object.toString();
10351264
10361265 // File path for Mac and Windows
10371266 if (string.charAt(0) == '/' || string.charAt(1) == ':')
....@@ -1077,23 +1306,33 @@
10771306
10781307 assert target == objEditor.jTree;
10791308 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1309
+ Object3D destinationLeaf;
10801310 try {
1081
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1311
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
10821312 } catch (Exception e) {
10831313 System.out.println("destinationPath : " + destinationPath);
10841314 return;
10851315 }
10861316
1087
- if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1317
+ for (int i=group.selection.size(); --i>=0;)
10881318 {
1319
+ Object3D child = (Object3D)group.selection.elementAt(i);
1320
+
1321
+ // Cannot move into itself
1322
+ if (child == destinationLeaf)
1323
+ return;
1324
+ }
1325
+
1326
+// june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
1327
+// {
10891328 loadClipboard(true);
10901329 objEditor.jTree.setSelectionPath(destinationPath);
10911330 pasteInto(false, false);
1092
- } else {
1093
- loadClipboard(false);
1094
- objEditor.jTree.setSelectionPath(destinationPath);
1095
- pasteInto(false, false); // true); // ???
1096
- }
1331
+// } else {
1332
+// loadClipboard(false);
1333
+// objEditor.jTree.setSelectionPath(destinationPath);
1334
+// pasteInto(false, false); // true); // ???
1335
+// }
10971336 }
10981337 public void dropActionChanged(DropTargetDragEvent dtde)
10991338 // Called if the user has modified the current drop gesture
....@@ -1198,22 +1437,30 @@
11981437 {
11991438 //heightFieldItem = menu.add(new MenuItem("Height Field"));
12001439 //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);
1440
+// gridItem = menu.add(new MenuItem("Grid"));
1441
+// gridItem.addActionListener(this);
1442
+// rectoidItem = menu.add(new MenuItem("Box"));
1443
+// rectoidItem.addActionListener(this);
1444
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1445
+// ellipsoidItem.addActionListener(this);
1446
+// coneItem = menu.add(new MenuItem("Cone"));
1447
+// coneItem.addActionListener(this);
1448
+// torusItem = menu.add(new MenuItem("Torus"));
1449
+// torusItem.addActionListener(this);
1450
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1451
+// superItem.addActionListener(this);
1452
+
1453
+ cameraItem = menu.add(new MenuItem("Camera"));
1454
+ cameraItem.addActionListener(this);
1455
+
1456
+ if (!Globals.ADVANCED)
1457
+ {
12131458 kleinItem = menu.add(new MenuItem("Klein Bottle"));
12141459 kleinItem.addActionListener(this);
1215
- particleItem = menu.add(new MenuItem("Particle system"));
1216
- particleItem.addActionListener(this);
1460
+ }
1461
+
1462
+// particleItem = menu.add(new MenuItem("Particle system"));
1463
+// particleItem.addActionListener(this);
12171464 if (Globals.ADVANCED)
12181465 {
12191466 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1239,15 +1486,15 @@
12391486 }
12401487 bezierItem = menu.add(new MenuItem("Bezier Patch"));
12411488 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);
1489
+// overlayItem = menu.add(new MenuItem("Overlay"));
1490
+// overlayItem.addActionListener(this);
1491
+// lightItem = menu.add(new MenuItem("Light"));
1492
+// lightItem.addActionListener(this);
12461493 menu.add("-");
12471494 //superLoopItem = menu.add(new MenuItem("Super Loop"));
12481495 //superLoopItem.addActionListener(this);
1249
- loopItem = menu.add(new MenuItem("Loop"));
1250
- loopItem.addActionListener(this);
1496
+// loopItem = menu.add(new MenuItem("Loop"));
1497
+// loopItem.addActionListener(this);
12511498 doubleItem = menu.add(new MenuItem("Fork"));
12521499 doubleItem.addActionListener(this);
12531500 if (Globals.ADVANCED)
....@@ -1263,6 +1510,9 @@
12631510 animationItem.addItemListener(this);
12641511 animationItem.setState(Globals.ANIMATION);
12651512
1513
+ menu.add(archiveItem = new MenuItem("Archive3D..."));
1514
+ archiveItem.addActionListener(this);
1515
+
12661516 menu.add("-");
12671517 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
12681518 parseverticesItem.addActionListener(this);
....@@ -1275,6 +1525,8 @@
12751525 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
12761526 reduce34MorphItem.addActionListener(this);
12771527 menu.add("-");
1528
+ menu.add(memoryItem = new MenuItem("Memory Usage"));
1529
+ memoryItem.addActionListener(this);
12781530 menu.add(computeAOItem = new MenuItem("Compute AO"));
12791531 computeAOItem.addActionListener(this);
12801532
....@@ -1283,8 +1535,6 @@
12831535 mirrorItem = menu.add(new MenuItem("Mirror Poses"));
12841536 mirrorItem.addActionListener(this);
12851537 menu.add("-");
1286
- menu.add(memoryItem = new MenuItem("Memory Usage"));
1287
- memoryItem.addActionListener(this);
12881538 menu.add(analyzeItem = new MenuItem("Analyze"));
12891539 analyzeItem.addActionListener(this);
12901540 menu.add(dumpItem = new MenuItem("Print"));
....@@ -1428,9 +1678,34 @@
14281678 shadow.material = new cMaterial(obj.material);
14291679 shadow.material.diffuse = 0.0001f;
14301680 shadow.material.specular = 0.0001f;
1681
+ //shadow.projectedVertices[1].x = 300;
14311682
14321683 makeSomething(shadow);
14331684 }
1685
+
1686
+ private void ClearUnpinned()
1687
+ {
1688
+ //for (Object3D obj : listUI)
1689
+ for (int i=listUI.size(); --i>=0;)
1690
+ {
1691
+ Object3D obj = listUI.elementAt(i);
1692
+ if (!obj.pinned)
1693
+ {
1694
+ obj.CloseUI();
1695
+ listUI.remove(i);
1696
+ }
1697
+ }
1698
+ }
1699
+
1700
+ private void EditElement(Object3D elem, boolean newWindow)
1701
+ {
1702
+ // if (!(elem instanceof Composite))
1703
+ // newWindow = false;
1704
+ listUI.add(elem);
1705
+ elem.openEditWindow(this, newWindow); //, false);
1706
+ System.out.println("edit : " + elem);
1707
+ elem.editWindow.refreshContents(true); // ? new
1708
+ }
14341709
14351710 /**
14361711 * applyExample
....@@ -1675,7 +1950,7 @@
16751950 {
16761951 ScreenFit();
16771952 } else
1678
- if (source == switchItem)
1953
+ if (source == switchViewItem)
16791954 {
16801955 cVector v1 = new cVector();
16811956 cVector v2 = new cVector();
....@@ -1684,11 +1959,11 @@
16841959 objEditor.cameraView.renderCamera.setAim(v2, v1);
16851960 objEditor.cameraView.repaint();
16861961 } else
1687
- if (source == rectoidItem)
1962
+ if (source == rectoidItem || source == boxButton)
16881963 {
16891964 makeSomething(new Box());
16901965 } else
1691
- if (source == particleItem)
1966
+ if (source == particleItem || source == particlesButton)
16921967 {
16931968 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
16941969 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1767,27 +2042,27 @@
17672042
17682043 makeSomething(obj);
17692044 } else
1770
- if (source == gridItem)
2045
+ if (source == gridItem || source == gridButton)
17712046 {
17722047 makeSomething(new Grid());
17732048 } else
1774
- if (source == ellipsoidItem)
2049
+ if (source == ellipsoidItem || source == sphereButton)
17752050 {
17762051 makeSomething(new Sphere());
17772052 } else
1778
- if (source == coneItem)
2053
+ if (source == coneItem || source == coneButton)
17792054 {
17802055 makeSomething(new Cone());
17812056 } else
1782
- if (source == torusItem)
2057
+ if (source == torusItem || source == torusButton)
17832058 {
17842059 makeSomething(new Torus());
17852060 } else
1786
- if (source == superItem)
2061
+ if (source == superItem || source == superButton)
17872062 {
17882063 makeSomething(new Superellipsoid());
17892064 } else
1790
- if (source == kleinItem)
2065
+ if (source == kleinItem || source == kleinButton)
17912066 {
17922067 makeSomething(new Klein());
17932068 } else
....@@ -1807,7 +2082,7 @@
18072082 {
18082083 makeSomething(new BezierSurface());
18092084 } else
1810
- if (source == overlayItem)
2085
+ if (source == overlayItem || source == overlayButton)
18112086 {
18122087 /*
18132088 Object3D obj = new BezierSurface(5,8);
....@@ -1855,7 +2130,7 @@
18552130 s.setup();
18562131 makeSomething(s);
18572132 } else
1858
- if (source == lightItem)
2133
+ if (source == lightItem || source == lightButton)
18592134 {
18602135 makeSomething(new Light());
18612136 } else
....@@ -1905,30 +2180,30 @@
19052180
19062181 group(g);
19072182 } else
1908
- if (source == loopItem)
2183
+ if (source == loopItem || source == loopButton)
19092184 {
19102185 Composite csg = new GroupLeaf();
19112186 csg.count = 5;
19122187 group(csg);
1913
- Composite child = new cGroup();
2188
+ Composite child = new cGroup("Branch");
19142189 csg.addChild(child);
19152190 child.addChild(csg);
19162191 } else
19172192 if (source == doubleItem)
19182193 {
1919
- Composite csg = new GroupLeaf();
2194
+ Composite csg = new GroupLeaf("Fork");
19202195 csg.count = 5;
19212196 group(csg);
1922
- Composite child = new cGroup();
2197
+ Composite child = new cGroup("Branch A");
19232198 csg.addChild(child);
19242199 child.addChild(csg);
1925
- child = new cGroup();
2200
+ child = new cGroup("Branch B");
19262201 csg.addChild(child);
19272202 child.addChild(csg);
19282203 } else
19292204 if (source == tripleItem)
19302205 {
1931
- Composite csg = new GroupLeaf();
2206
+ Composite csg = new GroupLeaf("Trident");
19322207 csg.count = 4;
19332208 group(csg);
19342209 Composite child = new cGroup();
....@@ -1978,17 +2253,45 @@
19782253 {
19792254 DumpObject();
19802255 } else
2256
+ if (source == minButton)
2257
+ {
2258
+ Minimize();
2259
+ } else
2260
+ if (source == maxButton)
2261
+ {
2262
+ Maximize();
2263
+ } else
2264
+ if (source == fullButton)
2265
+ {
2266
+ ToggleFullScreen();
2267
+ } else
19812268 if (source == undoButton)
19822269 {
2270
+ // Go to previous version
2271
+ //if (!Undo())
2272
+ //java.awt.Toolkit.getDefaultToolkit().beep();
19832273 Undo();
2274
+ } else
2275
+ if (source == restoreButton)
2276
+ {
2277
+ // Restore current version
2278
+ Restore();
2279
+ } else
2280
+ if (source == replaceButton)
2281
+ {
2282
+ // Overwrite current version
2283
+ Replace();
19842284 } else
19852285 if (source == redoButton)
19862286 {
2287
+ // Go to next version
19872288 Redo();
19882289 } else
19892290 if (source == saveButton)
19902291 {
1991
- Save();
2292
+ // Save a new version
2293
+ if (!Save(true))
2294
+ java.awt.Toolkit.getDefaultToolkit().beep();
19922295 } else
19932296 if (source == oneStepButton)
19942297 {
....@@ -1997,17 +2300,14 @@
19972300 } else
19982301 if (source == screenfitButton)
19992302 {
2000
- //Reload(lastConverter, lastFilename, true);
20012303 ScreenFit();
20022304 } else
20032305 if (source == screenfitpointButton)
20042306 {
2005
- //Reload(lastConverter, lastFilename, true);
20062307 ScreenFitPoint();
20072308 } else
20082309 if (source == snapobjectButton)
20092310 {
2010
- //Reload(lastConverter, lastFilename, true);
20112311 SnapObject();
20122312 } else
20132313 // if (event.getSource() == recompileButton)
....@@ -2371,7 +2671,7 @@
23712671 {
23722672 StepAll();
23732673 } else
2374
- if (source == clearItem) // || event.getSource() == clearButton)
2674
+ if (source == deleteItem) // || event.getSource() == clearButton)
23752675 {
23762676 //int indices[] = jList.getSelectedIndices();
23772677 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2383,9 +2683,9 @@
23832683 {
23842684 ClearSelection(true);
23852685 } else
2386
- if (source == grabItem)
2686
+ if (source == grabItem || source == groupButton)
23872687 {
2388
- group(new cGroup(), true);
2688
+ group(new cGroup(), false); // true);
23892689 } else
23902690 if (source == hideItem)
23912691 {
....@@ -2403,11 +2703,11 @@
24032703 {
24042704 makeSomething(new Camera());
24052705 } else
2406
- if (source == compositeItem)
2706
+ if (source == compositeItem || source == compositeButton)
24072707 {
24082708 group(new Composite());
24092709 } else
2410
- if (source == randomItem)
2710
+ if (source == switchItem || source == switchButton)
24112711 {
24122712 RandomNode random = new RandomNode();
24132713 group(random);
....@@ -2509,7 +2809,7 @@
25092809 {
25102810 group(new cLinker());
25112811 } else
2512
- if (source == textureItem)
2812
+ if (source == textureItem || source == textureButton)
25132813 {
25142814 group(new TextureNode());
25152815 } else
....@@ -2529,17 +2829,30 @@
25292829 {
25302830 CastShadow(2);
25312831 } else
2532
- if (source == ungroupItem)
2832
+ if (source == ungroupItem || source == ungroupButton)
25332833 {
2534
- //ungroup();
2834
+ boolean hasRoot = false;
2835
+
25352836 for (int i=0; i<group.selection.size(); i++)
25362837 {
2537
- Ungroup(group.selection.get(i));
2838
+ if (group.selection.get(i) == group)
2839
+ {
2840
+ hasRoot = true;
2841
+ break;
2842
+ }
25382843 }
25392844
2540
- ClearSelection(false);
2541
-
2542
- refreshContents();
2845
+ if (!hasRoot)
2846
+ {
2847
+ for (int i=0; i<group.selection.size(); i++)
2848
+ {
2849
+ Ungroup(group.selection.get(i));
2850
+ }
2851
+
2852
+ ClearSelection(false);
2853
+
2854
+ refreshContents();
2855
+ }
25432856 } else
25442857 if (source == genUVItem)
25452858 {
....@@ -2867,6 +3180,10 @@
28673180 if (source == twoButton)
28683181 {
28693182 radio.layout = twoButton;
3183
+
3184
+ if (CameraPane.FULLSCREEN)
3185
+ fullscreenLayout = radio.layout;
3186
+
28703187 // bug
28713188 //gridPanel.setDividerLocation(1.0);
28723189 //bigPanel.setDividerLocation(0.0);
....@@ -2899,10 +3216,31 @@
28993216 bigThree.ClearUI();
29003217 bigThree.add(centralPanel);
29013218 bigThree.FlushUI();
3219
+
3220
+ cameraView.requestFocusInWindow();
3221
+
3222
+// refreshContents(true);
3223
+//
3224
+// try
3225
+// {
3226
+// java.awt.Robot bot = new java.awt.Robot();
3227
+// int mask = InputEvent.BUTTON1_MASK;
3228
+// bot.mouseMove(100, 100);
3229
+// bot.mousePress(mask);
3230
+// bot.mouseRelease(mask);
3231
+// }
3232
+// catch (Exception e)
3233
+// {
3234
+//
3235
+// }
3236
+
29023237 } else
29033238 if (source == threeButton)
29043239 {
29053240 radio.layout = threeButton;
3241
+
3242
+ if (CameraPane.FULLSCREEN)
3243
+ fullscreenLayout = radio.layout;
29063244
29073245 // bigThree.remove(scenePanel);
29083246 // bigThree.remove(centralPanel);
....@@ -2935,10 +3273,15 @@
29353273 bigThree.add(centralPanel);
29363274 bigThree.add(XYZPanel);
29373275 bigThree.FlushUI();
3276
+
3277
+ cameraView.requestFocusInWindow();
29383278 } else
29393279 if (source == fourButton)
29403280 {
29413281 radio.layout = fourButton;
3282
+
3283
+ if (CameraPane.FULLSCREEN)
3284
+ fullscreenLayout = radio.layout;
29423285
29433286 // bigThree.remove(scenePanel);
29443287 // bigThree.remove(centralPanel);
....@@ -2970,10 +3313,15 @@
29703313 bigThree.ClearUI();
29713314 bigThree.add(scenePanel);
29723315 bigThree.FlushUI();
3316
+
3317
+ cameraView.requestFocusInWindow();
29733318 } else
29743319 if (source == sixButton)
29753320 {
29763321 radio.layout = sixButton;
3322
+
3323
+ if (CameraPane.FULLSCREEN)
3324
+ fullscreenLayout = radio.layout;
29773325
29783326 // bigThree.remove(scenePanel);
29793327 // bigThree.remove(centralPanel);
....@@ -3006,10 +3354,15 @@
30063354 bigThree.add(scenePanel);
30073355 bigThree.add(centralPanel);
30083356 bigThree.FlushUI();
3357
+
3358
+ cameraView.requestFocusInWindow();
30093359 } else
30103360 if (source == sevenButton)
30113361 {
30123362 radio.layout = sevenButton;
3363
+
3364
+ if (CameraPane.FULLSCREEN)
3365
+ fullscreenLayout = radio.layout;
30133366
30143367 // bigThree.remove(scenePanel);
30153368 // bigThree.remove(centralPanel);
....@@ -3043,6 +3396,8 @@
30433396 bigThree.add(centralPanel);
30443397 bigThree.add(XYZPanel);
30453398 bigThree.FlushUI();
3399
+
3400
+ cameraView.requestFocusInWindow();
30463401 } else
30473402 if (source == rootButton)
30483403 {
....@@ -3054,6 +3409,7 @@
30543409 EditObject(obj);
30553410 }
30563411
3412
+ cameraView.requestFocusInWindow();
30573413 refreshContents(true);
30583414 } else
30593415 if (source == closeButton)
....@@ -3063,22 +3419,37 @@
30633419 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
30643420 {
30653421 ab = (cRadio)e.nextElement();
3066
- if(ab.getModel().isSelected() && ab.GetObject() != client)
3422
+ if (ab.getModel().isSelected() && ab.GetObject() != client)
30673423 {
3424
+ // Patch to avoid bug with transparency.
3425
+ if (!ab.hadMaterial)
3426
+ {
3427
+ ab.object.material = null;
3428
+ }
3429
+
30683430 buttonGroup.remove(ab);
30693431 radioPanel.remove(ab);
30703432
3071
- ab.GetObject().editWindow = null;
3433
+ //ab.GetObject().editWindow = null;
3434
+ ab.GetObject().manipWindow = null;
30723435 // ab.GetObject().objectUI = null; // ?????????
30733436
30743437 ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick();
30753438 break;
30763439 }
30773440 }
3441
+
3442
+ cameraView.requestFocusInWindow();
30783443 refreshContents(true);
30793444 } else
30803445 if (source == editItem || source == editButton)
30813446 {
3447
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3448
+ {
3449
+ Object3D child = (Object3D)e.nextElement();
3450
+ child.pinned = true;
3451
+ }
3452
+
30823453 EditSelection(false);
30833454 } else
30843455 if (source == uneditButton)
....@@ -3088,6 +3459,7 @@
30883459 Object3D child = (Object3D)e.nextElement();
30893460 if(child.editWindow != null)
30903461 objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3462
+ child.pinned = false;
30913463 child.CloseUI();
30923464 listUI.remove(child);
30933465
....@@ -3104,6 +3476,7 @@
31043476 //copy.ClearUI();
31053477 for (Object3D obj : listUI)
31063478 {
3479
+ obj.pinned = false;
31073480 obj.CloseUI();
31083481 }
31093482 listUI.clear();
....@@ -3113,7 +3486,7 @@
31133486 {
31143487 assert(copy == group);
31153488
3116
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
3489
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
31173490
31183491 for (Object3D obj : listUI)
31193492 {
....@@ -3162,6 +3535,9 @@
31623535 }
31633536
31643537 copy = group;
3538
+
3539
+ SetUndoStates();
3540
+
31653541 //Globals.theRenderer.object = group;
31663542 if(!useclient)
31673543 {
....@@ -3179,7 +3555,8 @@
31793555 }
31803556
31813557 // fix "+" issue
3182
- group.editWindow = this;
3558
+ //group.editWindow = this;
3559
+ group.manipWindow = this;
31833560
31843561 /*
31853562 currentLayout = radio.layout;
....@@ -3187,18 +3564,27 @@
31873564 currentLayout = sevenButton;
31883565 */
31893566 radio.layout.doClick();
3567
+
3568
+ ClearUnpinned();
3569
+ //Grafreed.Assert(group != null);
3570
+ //Grafreed.Assert(group.selection != null);
3571
+ SetPinStates(group.selection == null || group.selection.size() > 0);
3572
+ if (group.selection == null || group.selection.size() == 1)
3573
+ EditSelection(false);
31903574 keepparent = group.parent;
31913575 // PARENT = NULL or not???
31923576 //group.parent = null; // ROOT
31933577 //group.attributes = -1;
31943578 ResetModel();
3579
+
3580
+ cameraView.requestFocusInWindow();
31953581 refreshContents(true);
31963582 } else if (event.getSource() == editCameraItem)
31973583 {
31983584 cameraView.ProtectCamera();
31993585 cameraView.repaint();
32003586 return;
3201
- } else if (event.getSource() == revertCameraItem)
3587
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
32023588 {
32033589 cameraView.RevertCamera();
32043590 cameraView.repaint();
....@@ -3215,7 +3601,6 @@
32153601 }
32163602
32173603 boolean useclient = false;
3218
- cRadio radio;
32193604
32203605 void ToggleRoot()
32213606 {
....@@ -4253,28 +4638,25 @@
42534638 // }
42544639 // }
42554640
4256
- static boolean allparams = true;
4257
-
4258
- static Vector<Object3D> listUI = new Vector<Object3D>();
4259
-
42604641 void EditSelection(boolean newWindow)
42614642 {
4643
+ if (group.selection == null)
4644
+ {
4645
+ EditElement(group, newWindow); // ? new
4646
+ return;
4647
+ }
4648
+
42624649 // aConstraints.gridy = 0;
42634650 for (int i=0; i<group.selection.size(); i++)
42644651 {
42654652 //System.out.println("edit : " + objectPanel.indexOfTab("Material"));
42664653 //objectPanel.setEnabledAt(objectPanel.indexOfTab("Material"), false);
4267
- objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
4654
+ //objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit"));
42684655
42694656 Object3D elem = (Object3D)group.selection.elementAt(i);
42704657 if(elem != group || !newWindow)
42714658 {
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
4659
+ EditElement(elem, newWindow); // ? new
42784660 }
42794661 }
42804662 }
....@@ -4349,7 +4731,8 @@
43494731 //new Exception().printStackTrace();
43504732
43514733 freezemodel = true;
4352
-
4734
+ ClearUnpinned();
4735
+
43534736 /**/
43544737 //switch (event.id)
43554738 {
....@@ -4382,7 +4765,7 @@
43824765 if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera)
43834766 // a camera
43844767 {
4385
- if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera())
4768
+ if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace
43864769 {
43874770 CameraPane.camerachangeframe = 0; // don't refuse it
43884771 Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
....@@ -4391,6 +4774,13 @@
43914774 // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
43924775 }
43934776
4777
+ if (tps != null && tps.length == 1)
4778
+ {
4779
+ EditSelection(false);
4780
+ }
4781
+
4782
+ SetPinStates(tps != null && tps.length > 0);
4783
+
43944784 refreshContents();
43954785 //return true;
43964786 }
....@@ -4400,9 +4790,18 @@
44004790 freezemodel = false;
44014791 }
44024792
4793
+ void SetPinStates(boolean enabled)
4794
+ {
4795
+ editButton.setEnabled(enabled);
4796
+ uneditButton.setEnabled(enabled);
4797
+ unselectButton.setEnabled(enabled);
4798
+ flashSelectionButton.setEnabled(enabled);
4799
+ }
4800
+
44034801 void refreshContents(boolean cp)
44044802 {
4405
- if (!Globals.MOUSEDRAGGED)
4803
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
4804
+ if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
44064805 {
44074806 objEditor.ClearInfo(); // .GetMaterial());
44084807
....@@ -4501,7 +4900,8 @@
45014900
45024901 if (cut)
45034902 {
4504
- Save();
4903
+// if (Globals.SAVEONMAKE) // Moved to the clipboard, no need to save.
4904
+// Save();
45054905 //int indices[] = jList.getSelectedIndices();
45064906 //for (int i = indices.length - 1; i >= 0; i--)
45074907 //jList.remove(indices[i]);
....@@ -4604,6 +5004,10 @@
46045004
46055005 void paste(boolean expand)
46065006 {
5007
+ if (Globals.REPLACEONMAKE)
5008
+ Save();
5009
+ boolean keep = Globals.REPLACEONMAKE;
5010
+ Globals.REPLACEONMAKE = false;
46075011 // if (GrafreeD.clipboard == null)
46085012 // return;
46095013 boolean first = true;
....@@ -4663,6 +5067,7 @@
46635067 Grafreed.clipboard.get(0).parent = keepparent;
46645068 }
46655069
5070
+ Globals.REPLACEONMAKE = keep;
46665071 ResetModel();
46675072 refreshContents();
46685073 }
....@@ -4798,6 +5203,10 @@
47985203
47995204 void group(Object3D csg, boolean grab)
48005205 {
5206
+ if (Globals.REPLACEONMAKE)
5207
+ Save();
5208
+ boolean keep = Globals.REPLACEONMAKE;
5209
+ Globals.REPLACEONMAKE = false;
48015210 if (//false) // why??
48025211 !group.selection.isEmpty())
48035212 {
....@@ -4911,10 +5320,15 @@
49115320 //node.add(csg);
49125321 //makeSomething(node);
49135322 makeSomething(csg);
5323
+ Globals.REPLACEONMAKE = keep;
49145324 }
49155325
49165326 void Ungroup(Object3D g)
49175327 {
5328
+ if (Globals.REPLACEONMAKE)
5329
+ Save();
5330
+ boolean keep = Globals.REPLACEONMAKE;
5331
+ Globals.REPLACEONMAKE = false;
49185332 if (g instanceof HiddenObject)
49195333 {
49205334 HiddenObject h = (HiddenObject) g;
....@@ -4931,6 +5345,7 @@
49315345 objEditor.makeSomething(g.get(i), false);
49325346 }
49335347 }
5348
+ Globals.REPLACEONMAKE = keep;
49345349 }
49355350
49365351 void ungroup()
....@@ -5219,10 +5634,28 @@
52195634 cButton clearpanelButton;
52205635 cButton unselectButton;
52215636
5637
+ cButton restoreCameraButton;
5638
+
52225639 cButton saveButton;
5223
- cButton undoButton;
5224
- cButton redoButton;
52255640 cButton oneStepButton;
5641
+
5642
+ cButton groupButton;
5643
+ cButton ungroupButton;
5644
+ cButton compositeButton;
5645
+ cButton switchButton;
5646
+ cButton loopButton;
5647
+ cButton textureButton;
5648
+
5649
+ cButton gridButton;
5650
+ cButton boxButton;
5651
+ cButton sphereButton;
5652
+ cButton coneButton;
5653
+ cButton torusButton;
5654
+ cButton superButton;
5655
+ cButton kleinButton;
5656
+ cButton particlesButton;
5657
+ cButton overlayButton;
5658
+ cButton lightButton;
52265659
52275660 cButton screenfitButton;
52285661 cButton screenfitpointButton;
....@@ -5235,14 +5668,6 @@
52355668
52365669 cButton setsupportButton;
52375670
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
-
52465671 //
52475672 //Composite
52485673 Object3D // to do !!
....@@ -5252,11 +5677,11 @@
52525677 //JTree jTree;
52535678 private MenuItem lookAtItem;
52545679 private MenuItem lookFromItem;
5255
- private MenuItem switchItem;
5680
+ private MenuItem switchViewItem;
52565681 private MenuItem cutItem;
52575682 private MenuItem undoItem;
52585683 private MenuItem redoItem;
5259
- private MenuItem duplicateItem;
5684
+ private JMenuItem duplicateItem;
52605685 private MenuItem cloneItem;
52615686 private MenuItem cloneSupportItem;
52625687 private MenuItem overwriteGeoItem;
....@@ -5284,7 +5709,7 @@
52845709 private MenuItem pasteLinkItem;
52855710 private MenuItem pasteCloneItem;
52865711 private MenuItem pasteExpandItem;
5287
- private MenuItem clearItem;
5712
+ private MenuItem deleteItem;
52885713 private MenuItem clearAllItem;
52895714 private MenuItem genUVItem;
52905715 private MenuItem genNormalsMESHItem;
....@@ -5344,7 +5769,7 @@
53445769 private MenuItem frontItem;
53455770 private MenuItem cameraItem;
53465771 private MenuItem compositeItem;
5347
- private MenuItem randomItem;
5772
+ private MenuItem switchItem;
53485773 private MenuItem physicsItem;
53495774 private MenuItem frameselectorItem;
53505775 private MenuItem scriptNodeItem;
....@@ -5418,5 +5843,5 @@
54185843
54195844 Menu cameraMenu;
54205845 MenuItem editCameraItem;
5421
- MenuItem revertCameraItem;
5846
+ MenuItem restoreCameraItem;
54225847 }