Normand Briere
2019-06-25 d2f456cf5280f59425084532bd2397ec625f7577
GroupEditor.java
....@@ -204,21 +204,21 @@
204204 //zBufferItem.addActionListener(this);
205205 //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens"));
206206 //normalLensItem.addActionListener(this);
207
- cameraMenu.add(revertCameraItem = new MenuItem("Restore Viewpoint"));
208
- revertCameraItem.addActionListener(this);
207
+ cameraMenu.add(restoreCameraItem = new MenuItem("Restore Viewpoint"));
208
+ restoreCameraItem.addActionListener(this);
209209
210
- cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
211
- toggleFullScreenItem.addItemListener(this);
212
- toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
213
- cameraMenu.add("-");
214
-
215
- cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
216
- toggleTextureItem.addItemListener(this);
217
- toggleTextureItem.setState(CameraPane.textureon);
218
-
219
- cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
220
- toggleSwitchItem.addItemListener(this);
221
- toggleSwitchItem.setState(CameraPane.SWITCH);
210
+// cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen"));
211
+// toggleFullScreenItem.addItemListener(this);
212
+// toggleFullScreenItem.setState(CameraPane.FULLSCREEN);
213
+// cameraMenu.add("-");
214
+//
215
+// cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture"));
216
+// toggleTextureItem.addItemListener(this);
217
+// toggleTextureItem.setState(CameraPane.textureon);
218
+//
219
+// cameraMenu.add(toggleSwitchItem = new CheckboxMenuItem("Switch"));
220
+// toggleSwitchItem.addItemListener(this);
221
+// toggleSwitchItem.setState(CameraPane.SWITCH);
222222
223223 cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles"));
224224 toggleHandleItem.addItemListener(this);
....@@ -275,7 +275,7 @@
275275 {
276276 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
277277 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
278
- //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
278
+ //cameraMenu.add(switchViewItem = new MenuItem("Reverse View"));
279279 editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf"));
280280 oe.cameraMenu.add("-");
281281 openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy..."));
....@@ -283,7 +283,7 @@
283283 editLeafItem.addActionListener(this);
284284 lookAtItem.addActionListener(this);
285285 //lookFromItem.addActinoListener(this);
286
- //switchItem.addActionListener(this);
286
+ //switchViewItem.addActionListener(this);
287287 }
288288
289289 oe.menuBar.add(menu = new Menu("Setting"));
....@@ -328,14 +328,14 @@
328328 }
329329
330330 oe.menuBar.add(menu = new Menu("Group"));
331
- grabItem = menu.add(new MenuItem("Grab"));
332
- grabItem.addActionListener(this);
331
+// grabItem = menu.add(new MenuItem("Grab"));
332
+// grabItem.addActionListener(this);
333333 backItem = menu.add(new MenuItem("Back"));
334334 backItem.addActionListener(this);
335335 frontItem = menu.add(new MenuItem("Front"));
336336 frontItem.addActionListener(this);
337
- compositeItem = menu.add(new MenuItem("Composite"));
338
- compositeItem.addActionListener(this);
337
+// compositeItem = menu.add(new MenuItem("Composite"));
338
+// compositeItem.addActionListener(this);
339339
340340 if (Globals.ADVANCED)
341341 {
....@@ -345,10 +345,10 @@
345345 ungroupItem = menu.add(new MenuItem("Ungroup"));
346346 ungroupItem.addActionListener(this);
347347
348
- menu.add("-");
349
-
350
- randomItem = menu.add(new MenuItem("Switch node"));
351
- randomItem.addActionListener(this);
348
+// menu.add("-");
349
+//
350
+// switchItem = menu.add(new MenuItem("Switch node"));
351
+// switchItem.addActionListener(this);
352352 if (Globals.ADVANCED)
353353 {
354354 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
....@@ -365,13 +365,11 @@
365365 frameselectorItem.addActionListener(this);
366366 scriptNodeItem = menu.add(new MenuItem("Script Node"));
367367 scriptNodeItem.addActionListener(this);
368
- cameraItem = menu.add(new MenuItem("Camera"));
369
- cameraItem.addActionListener(this);
370368 }
371369
372370 oe.menuBar.add(menu = new Menu("Object"));
373
- textureItem = menu.add(new MenuItem("Texture"));
374
- textureItem.addActionListener(this);
371
+// textureItem = menu.add(new MenuItem("Texture"));
372
+// textureItem.addActionListener(this);
375373 billboardItem = menu.add(new MenuItem("Billboard"));
376374 billboardItem.addActionListener(this);
377375 csgItem = menu.add(new MenuItem("CSG"));
....@@ -582,6 +580,10 @@
582580 oe.radioPanel.add(dummyButton);
583581 oe.buttonGroup.add(dummyButton);
584582 */
583
+ cGridBag copyOptionsPanel = new cGridBag();
584
+
585
+ copyOptionsPanel.preferredHeight = 2;
586
+
585587 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
586588
587589 //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -596,39 +598,43 @@
596598 fullButton.setToolTipText("Full-screen window");
597599 fullButton.addActionListener(this);
598600
599
- oe.toolboxPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
601
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
602
+ restoreCameraButton.setToolTipText("Restore viewpoint");
603
+ restoreCameraButton.addActionListener(this);
604
+
605
+ copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
600606 undoButton.setToolTipText("Undo changes");
601607 undoButton.addActionListener(this);
602608
603
- oe.toolboxPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
609
+ copyOptionsPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
604610 redoButton.setToolTipText("Redo changes");
605611 redoButton.addActionListener(this);
606612
607
- oe.toolboxPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
613
+ copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
608614 saveButton.setToolTipText("Save changes");
609615 saveButton.addActionListener(this);
610616
611
- oe.toolboxPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
617
+ copyOptionsPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints);
612618 liveCB.setToolTipText("Enable animation");
613619 liveCB.addItemListener(this);
614620
615
- oe.toolboxPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
621
+ copyOptionsPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
616622 oneStepButton.setToolTipText("Animate one step forward");
617623 oneStepButton.addActionListener(this);
618624
619
- oe.toolboxPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
625
+ copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints);
620626 fastCB.setToolTipText("Fast mode");
621627 fastCB.addItemListener(this);
622628
623
- oe.toolboxPanel.Return();
629
+ //oe.toolboxPanel.Return();
624630
625
- oe.toolboxPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
626
- trackCB.setToolTipText("Enable tracking");
627
- trackCB.addItemListener(this);
628
-
629
- oe.toolboxPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
631
+ copyOptionsPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
630632 screenfitButton.setToolTipText("Screen fit");
631633 screenfitButton.addActionListener(this);
634
+
635
+// copyOptionsPanel.add(trackCB = GetToggleButton("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints);
636
+// trackCB.setToolTipText("Enable tracking");
637
+// trackCB.addItemListener(this);
632638
633639 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
634640 // screenfitpointButton.addActionListener(this);
....@@ -640,10 +646,6 @@
640646 snapobjectButton.setToolTipText("Snap Object");
641647 }
642648
643
- oe.toolboxPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
644
- flashSelectionButton.setToolTipText("Highlight selection");
645
- flashSelectionButton.addActionListener(this);
646
-
647649 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
648650
649651 oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -688,8 +690,6 @@
688690 sphereButton.setToolTipText("Create sphere");
689691 sphereButton.addActionListener(this);
690692
691
- oe.toolboxPanel.Return();
692
-
693693 oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
694694 coneButton.setToolTipText("Create cone");
695695 coneButton.addActionListener(this);
....@@ -712,6 +712,28 @@
712712 oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
713713 particlesButton.setToolTipText("Create particle system");
714714 particlesButton.addActionListener(this);
715
+
716
+ oe.toolboxPanel.Return();
717
+
718
+ oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
719
+ groupButton.setToolTipText("Create group");
720
+ groupButton.addActionListener(this);
721
+
722
+ oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
723
+ compositeButton.setToolTipText("Create composite");
724
+ compositeButton.addActionListener(this);
725
+
726
+ oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
727
+ switchButton.setToolTipText("Create switch");
728
+ switchButton.addActionListener(this);
729
+
730
+ oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
731
+ loopButton.setToolTipText("Create loop");
732
+ loopButton.addActionListener(this);
733
+
734
+ oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
735
+ textureButton.setToolTipText("Create texture");
736
+ textureButton.addActionListener(this);
715737
716738 oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
717739 overlayButton.setToolTipText("Create overlay");
....@@ -742,6 +764,10 @@
742764 unselectButton.setToolTipText("Unselect");
743765 unselectButton.addActionListener(this);
744766
767
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
768
+ flashSelectionButton.setToolTipText("Highlight selection");
769
+ flashSelectionButton.addActionListener(this);
770
+
745771 editCommandsPanel.preferredHeight = 1;
746772
747773 // oe.treePanel.add(commandsPanel);
....@@ -768,21 +794,6 @@
768794 oe.treePanel.add(jSPPanel);
769795 oe.treePanel.Return();
770796
771
- cGridBag copyOptionsPanel = new cGridBag();
772
-
773
- copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
774
- colorCB.setToolTipText("Copy color when dropped");
775
- colorCB.addItemListener(this);
776
-
777
- copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
778
- materialCB.setToolTipText("Copy material when dropped");
779
- materialCB.addItemListener(this);
780
-
781
- copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
782
- textureCB.setToolTipText("Copy texture when dropped");
783
- textureCB.addItemListener(this);
784
-
785
- copyOptionsPanel.preferredHeight = 1;
786797 oe.treePanel.add(copyOptionsPanel);
787798 oe.treePanel.Return();
788799
....@@ -813,6 +824,20 @@
813824
814825 void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
815826 {
827
+ panel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
828
+ colorCB.setToolTipText("Copy color when dropped");
829
+ colorCB.addItemListener(this);
830
+
831
+ panel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
832
+ materialCB.setToolTipText("Copy material when dropped");
833
+ materialCB.addItemListener(this);
834
+
835
+ panel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
836
+ textureCB.setToolTipText("Copy texture when dropped");
837
+ textureCB.addItemListener(this);
838
+
839
+ panel.Return();
840
+
816841 panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
817842 boxCB.setToolTipText("Display bounding boxes");
818843 boxCB.addItemListener(this);
....@@ -830,6 +855,8 @@
830855 // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
831856 // localCB.addItemListener(this);
832857
858
+ panel.Return();
859
+
833860 panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
834861 crowdCB.setToolTipText("Used for crowds");
835862 crowdCB.addItemListener(this);
....@@ -846,6 +873,8 @@
846873 // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
847874 // speakerMocapCB.addItemListener(this);
848875
876
+ panel.Return();
877
+
849878 if (false)
850879 {
851880 // handled in scripts
....@@ -860,24 +889,39 @@
860889 //constraints.gridy += 1;
861890 panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
862891 smoothfocusCB.addItemListener(this);
892
+ panel.Return();
863893 }
864894
865895 //constraints.gridx += 1;
866896 //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
867897 // debugCB.addItemListener(this);
868898
899
+ panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
900
+ trackCB.setToolTipText("Enable tracking target");
901
+ trackCB.addItemListener(this);
902
+
869903 panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
870
- oeilCB.setToolTipText("Move camera when tracking target");
904
+ oeilCB.setToolTipText("Move camera when tracking");
871905 oeilCB.addItemListener(this);
872906
873907 panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints);
874908 shadowCB.setToolTipText("Compute shadows when live");
875909 shadowCB.addItemListener(this);
876910
911
+ panel.Return();
912
+ panel.add(toggleTextureCB = new cCheckBox("Textures", CameraPane.textureon)); //, constraints);
913
+ toggleTextureCB.setToolTipText("Load textures");
914
+ toggleTextureCB.addItemListener(this);
915
+
916
+ panel.add(toggleSwitchCB = new cCheckBox("Switch", CameraPane.SWITCH)); //, constraints);
917
+ toggleSwitchCB.setToolTipText("Use switch");
918
+ toggleSwitchCB.addItemListener(this);
919
+
877920 panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints);
878921 autosaveCB.setToolTipText("Auto-save on structure change");
879922 autosaveCB.addItemListener(this);
880923
924
+ panel.Return();
881925 if (Globals.ADVANCED)
882926 {
883927 panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
....@@ -888,10 +932,15 @@
888932 }
889933
890934 cGridBag fill = new cGridBag();
891
-
892935 fill.preferredHeight = 200;
936
+ cGridBag fill2 = new cGridBag();
937
+ fill2.preferredHeight = 200;
938
+ cGridBag fill3 = new cGridBag();
939
+ fill3.preferredHeight = 200;
893940
894941 panel.add(fill);
942
+ panel.add(fill2);
943
+ panel.add(fill3);
895944
896945 }
897946
....@@ -936,7 +985,8 @@
936985 cCheckBox slowCB;
937986 cCheckBox boxCB;
938987 cCheckBox zoomBoxCB;
939
- cToggleButton trackCB;
988
+ //cToggleButton trackCB;
989
+ cCheckBox trackCB;
940990 cCheckBox smoothfocusCB;
941991 // JCheckBox speakerMocapCB;
942992 cCheckBox speakerCameraCB;
....@@ -1191,13 +1241,23 @@
11911241
11921242 assert target == objEditor.jTree;
11931243 TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y);
1244
+ Object3D destinationLeaf;
11941245 try {
1195
- Object3D dummy = (Composite) destinationPath.getLastPathComponent();
1246
+ destinationLeaf = (Composite) destinationPath.getLastPathComponent();
11961247 } catch (Exception e) {
11971248 System.out.println("destinationPath : " + destinationPath);
11981249 return;
11991250 }
12001251
1252
+ for (int i=group.selection.size(); --i>=0;)
1253
+ {
1254
+ Object3D child = (Object3D)group.selection.elementAt(i);
1255
+
1256
+ // Cannot move into itself
1257
+ if (child == destinationLeaf)
1258
+ return;
1259
+ }
1260
+
12011261 // june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK)
12021262 // {
12031263 loadClipboard(true);
....@@ -1312,22 +1372,30 @@
13121372 {
13131373 //heightFieldItem = menu.add(new MenuItem("Height Field"));
13141374 //heightFieldItem.addActionListener(this);
1315
- gridItem = menu.add(new MenuItem("Grid"));
1316
- gridItem.addActionListener(this);
1317
- rectoidItem = menu.add(new MenuItem("Box"));
1318
- rectoidItem.addActionListener(this);
1319
- ellipsoidItem = menu.add(new MenuItem("Sphere"));
1320
- ellipsoidItem.addActionListener(this);
1321
- coneItem = menu.add(new MenuItem("Cone"));
1322
- coneItem.addActionListener(this);
1323
- torusItem = menu.add(new MenuItem("Torus"));
1324
- torusItem.addActionListener(this);
1325
- superItem = menu.add(new MenuItem("Superellipsoid"));
1326
- superItem.addActionListener(this);
1375
+// gridItem = menu.add(new MenuItem("Grid"));
1376
+// gridItem.addActionListener(this);
1377
+// rectoidItem = menu.add(new MenuItem("Box"));
1378
+// rectoidItem.addActionListener(this);
1379
+// ellipsoidItem = menu.add(new MenuItem("Sphere"));
1380
+// ellipsoidItem.addActionListener(this);
1381
+// coneItem = menu.add(new MenuItem("Cone"));
1382
+// coneItem.addActionListener(this);
1383
+// torusItem = menu.add(new MenuItem("Torus"));
1384
+// torusItem.addActionListener(this);
1385
+// superItem = menu.add(new MenuItem("Superellipsoid"));
1386
+// superItem.addActionListener(this);
1387
+
1388
+ cameraItem = menu.add(new MenuItem("Camera"));
1389
+ cameraItem.addActionListener(this);
1390
+
1391
+ if (!Globals.ADVANCED)
1392
+ {
13271393 kleinItem = menu.add(new MenuItem("Klein Bottle"));
13281394 kleinItem.addActionListener(this);
1329
- particleItem = menu.add(new MenuItem("Particle system"));
1330
- particleItem.addActionListener(this);
1395
+ }
1396
+
1397
+// particleItem = menu.add(new MenuItem("Particle system"));
1398
+// particleItem.addActionListener(this);
13311399 if (Globals.ADVANCED)
13321400 {
13331401 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1353,15 +1421,15 @@
13531421 }
13541422 bezierItem = menu.add(new MenuItem("Bezier Patch"));
13551423 bezierItem.addActionListener(this);
1356
- overlayItem = menu.add(new MenuItem("Overlay"));
1357
- overlayItem.addActionListener(this);
1358
- lightItem = menu.add(new MenuItem("Light"));
1359
- lightItem.addActionListener(this);
1424
+// overlayItem = menu.add(new MenuItem("Overlay"));
1425
+// overlayItem.addActionListener(this);
1426
+// lightItem = menu.add(new MenuItem("Light"));
1427
+// lightItem.addActionListener(this);
13601428 menu.add("-");
13611429 //superLoopItem = menu.add(new MenuItem("Super Loop"));
13621430 //superLoopItem.addActionListener(this);
1363
- loopItem = menu.add(new MenuItem("Loop"));
1364
- loopItem.addActionListener(this);
1431
+// loopItem = menu.add(new MenuItem("Loop"));
1432
+// loopItem.addActionListener(this);
13651433 doubleItem = menu.add(new MenuItem("Fork"));
13661434 doubleItem.addActionListener(this);
13671435 if (Globals.ADVANCED)
....@@ -1790,7 +1858,7 @@
17901858 {
17911859 ScreenFit();
17921860 } else
1793
- if (source == switchItem)
1861
+ if (source == switchViewItem)
17941862 {
17951863 cVector v1 = new cVector();
17961864 cVector v2 = new cVector();
....@@ -2020,7 +2088,7 @@
20202088
20212089 group(g);
20222090 } else
2023
- if (source == loopItem)
2091
+ if (source == loopItem || source == loopButton)
20242092 {
20252093 Composite csg = new GroupLeaf();
20262094 csg.count = 5;
....@@ -2510,9 +2578,9 @@
25102578 {
25112579 ClearSelection(true);
25122580 } else
2513
- if (source == grabItem)
2581
+ if (source == grabItem || source == groupButton)
25142582 {
2515
- group(new cGroup(), true);
2583
+ group(new cGroup(), false); // true);
25162584 } else
25172585 if (source == hideItem)
25182586 {
....@@ -2530,11 +2598,11 @@
25302598 {
25312599 makeSomething(new Camera());
25322600 } else
2533
- if (source == compositeItem)
2601
+ if (source == compositeItem || source == compositeButton)
25342602 {
25352603 group(new Composite());
25362604 } else
2537
- if (source == randomItem)
2605
+ if (source == switchItem || source == switchButton)
25382606 {
25392607 RandomNode random = new RandomNode();
25402608 group(random);
....@@ -2636,7 +2704,7 @@
26362704 {
26372705 group(new cLinker());
26382706 } else
2639
- if (source == textureItem)
2707
+ if (source == textureItem || source == textureButton)
26402708 {
26412709 group(new TextureNode());
26422710 } else
....@@ -3380,7 +3448,7 @@
33803448 cameraView.ProtectCamera();
33813449 cameraView.repaint();
33823450 return;
3383
- } else if (event.getSource() == revertCameraItem)
3451
+ } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton)
33843452 {
33853453 cameraView.RevertCamera();
33863454 cameraView.repaint();
....@@ -4583,7 +4651,8 @@
45834651
45844652 void refreshContents(boolean cp)
45854653 {
4586
- if (!Globals.MOUSEDRAGGED)
4654
+ if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4655
+ if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING)
45874656 {
45884657 objEditor.ClearInfo(); // .GetMaterial());
45894658
....@@ -5401,6 +5470,8 @@
54015470 cButton clearpanelButton;
54025471 cButton unselectButton;
54035472
5473
+ cButton restoreCameraButton;
5474
+
54045475 cButton minButton;
54055476 cButton maxButton;
54065477 cButton fullButton;
....@@ -5412,6 +5483,9 @@
54125483 cButton groupButton;
54135484 cButton ungroupButton;
54145485 cButton compositeButton;
5486
+ cButton switchButton;
5487
+ cButton loopButton;
5488
+ cButton textureButton;
54155489
54165490 cButton gridButton;
54175491 cButton boxButton;
....@@ -5444,7 +5518,7 @@
54445518 //JTree jTree;
54455519 private MenuItem lookAtItem;
54465520 private MenuItem lookFromItem;
5447
- private MenuItem switchItem;
5521
+ private MenuItem switchViewItem;
54485522 private MenuItem cutItem;
54495523 private MenuItem undoItem;
54505524 private MenuItem redoItem;
....@@ -5536,7 +5610,7 @@
55365610 private MenuItem frontItem;
55375611 private MenuItem cameraItem;
55385612 private MenuItem compositeItem;
5539
- private MenuItem randomItem;
5613
+ private MenuItem switchItem;
55405614 private MenuItem physicsItem;
55415615 private MenuItem frameselectorItem;
55425616 private MenuItem scriptNodeItem;
....@@ -5610,5 +5684,5 @@
56105684
56115685 Menu cameraMenu;
56125686 MenuItem editCameraItem;
5613
- MenuItem revertCameraItem;
5687
+ MenuItem restoreCameraItem;
56145688 }