.. | .. |
---|
204 | 204 | //zBufferItem.addActionListener(this); |
---|
205 | 205 | //cameraMenu.add(normalLensItem = new MenuItem("Normal Lens")); |
---|
206 | 206 | //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); |
---|
209 | 209 | |
---|
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); |
---|
222 | 222 | |
---|
223 | 223 | cameraMenu.add(toggleHandleItem = new CheckboxMenuItem("Handles")); |
---|
224 | 224 | toggleHandleItem.addItemListener(this); |
---|
.. | .. |
---|
275 | 275 | { |
---|
276 | 276 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
277 | 277 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
278 | | - //cameraMenu.add(switchItem = new MenuItem("Reverse View")); |
---|
| 278 | + //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
279 | 279 | editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
280 | 280 | oe.cameraMenu.add("-"); |
---|
281 | 281 | openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
.. | .. |
---|
283 | 283 | editLeafItem.addActionListener(this); |
---|
284 | 284 | lookAtItem.addActionListener(this); |
---|
285 | 285 | //lookFromItem.addActinoListener(this); |
---|
286 | | - //switchItem.addActionListener(this); |
---|
| 286 | + //switchViewItem.addActionListener(this); |
---|
287 | 287 | } |
---|
288 | 288 | |
---|
289 | 289 | oe.menuBar.add(menu = new Menu("Setting")); |
---|
.. | .. |
---|
328 | 328 | } |
---|
329 | 329 | |
---|
330 | 330 | 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); |
---|
333 | 333 | backItem = menu.add(new MenuItem("Back")); |
---|
334 | 334 | backItem.addActionListener(this); |
---|
335 | 335 | frontItem = menu.add(new MenuItem("Front")); |
---|
336 | 336 | 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); |
---|
339 | 339 | |
---|
340 | 340 | if (Globals.ADVANCED) |
---|
341 | 341 | { |
---|
.. | .. |
---|
345 | 345 | ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
346 | 346 | ungroupItem.addActionListener(this); |
---|
347 | 347 | |
---|
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); |
---|
352 | 352 | if (Globals.ADVANCED) |
---|
353 | 353 | { |
---|
354 | 354 | switchGeoItem = menu.add(new MenuItem("Switch Geometry")); |
---|
.. | .. |
---|
365 | 365 | frameselectorItem.addActionListener(this); |
---|
366 | 366 | scriptNodeItem = menu.add(new MenuItem("Script Node")); |
---|
367 | 367 | scriptNodeItem.addActionListener(this); |
---|
368 | | - cameraItem = menu.add(new MenuItem("Camera")); |
---|
369 | | - cameraItem.addActionListener(this); |
---|
370 | 368 | } |
---|
371 | 369 | |
---|
372 | 370 | 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); |
---|
375 | 373 | billboardItem = menu.add(new MenuItem("Billboard")); |
---|
376 | 374 | billboardItem.addActionListener(this); |
---|
377 | 375 | csgItem = menu.add(new MenuItem("CSG")); |
---|
.. | .. |
---|
582 | 580 | oe.radioPanel.add(dummyButton); |
---|
583 | 581 | oe.buttonGroup.add(dummyButton); |
---|
584 | 582 | */ |
---|
| 583 | + cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 584 | + |
---|
| 585 | + copyOptionsPanel.preferredHeight = 2; |
---|
| 586 | + |
---|
585 | 587 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
586 | 588 | |
---|
587 | 589 | //oe.toolbarPanel.add(minButton = new cButton("Min", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
596 | 598 | fullButton.setToolTipText("Full-screen window"); |
---|
597 | 599 | fullButton.addActionListener(this); |
---|
598 | 600 | |
---|
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); |
---|
600 | 606 | undoButton.setToolTipText("Undo changes"); |
---|
601 | 607 | undoButton.addActionListener(this); |
---|
602 | 608 | |
---|
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); |
---|
604 | 610 | redoButton.setToolTipText("Redo changes"); |
---|
605 | 611 | redoButton.addActionListener(this); |
---|
606 | 612 | |
---|
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); |
---|
608 | 614 | saveButton.setToolTipText("Save changes"); |
---|
609 | 615 | saveButton.addActionListener(this); |
---|
610 | 616 | |
---|
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); |
---|
612 | 618 | liveCB.setToolTipText("Enable animation"); |
---|
613 | 619 | liveCB.addItemListener(this); |
---|
614 | 620 | |
---|
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); |
---|
616 | 622 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
617 | 623 | oneStepButton.addActionListener(this); |
---|
618 | 624 | |
---|
619 | | - oe.toolboxPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
| 625 | + copyOptionsPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
620 | 626 | fastCB.setToolTipText("Fast mode"); |
---|
621 | 627 | fastCB.addItemListener(this); |
---|
622 | 628 | |
---|
623 | | - oe.toolboxPanel.Return(); |
---|
| 629 | + //oe.toolboxPanel.Return(); |
---|
624 | 630 | |
---|
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); |
---|
630 | 632 | screenfitButton.setToolTipText("Screen fit"); |
---|
631 | 633 | 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); |
---|
632 | 638 | |
---|
633 | 639 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
634 | 640 | // screenfitpointButton.addActionListener(this); |
---|
.. | .. |
---|
640 | 646 | snapobjectButton.setToolTipText("Snap Object"); |
---|
641 | 647 | } |
---|
642 | 648 | |
---|
643 | | - oe.toolboxPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
644 | | - flashSelectionButton.setToolTipText("Highlight selection"); |
---|
645 | | - flashSelectionButton.addActionListener(this); |
---|
646 | | - |
---|
647 | 649 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
648 | 650 | |
---|
649 | 651 | oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
688 | 690 | sphereButton.setToolTipText("Create sphere"); |
---|
689 | 691 | sphereButton.addActionListener(this); |
---|
690 | 692 | |
---|
691 | | - oe.toolboxPanel.Return(); |
---|
692 | | - |
---|
693 | 693 | oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
694 | 694 | coneButton.setToolTipText("Create cone"); |
---|
695 | 695 | coneButton.addActionListener(this); |
---|
.. | .. |
---|
712 | 712 | oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
713 | 713 | particlesButton.setToolTipText("Create particle system"); |
---|
714 | 714 | 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); |
---|
715 | 737 | |
---|
716 | 738 | oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
717 | 739 | overlayButton.setToolTipText("Create overlay"); |
---|
.. | .. |
---|
742 | 764 | unselectButton.setToolTipText("Unselect"); |
---|
743 | 765 | unselectButton.addActionListener(this); |
---|
744 | 766 | |
---|
| 767 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 768 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
| 769 | + flashSelectionButton.addActionListener(this); |
---|
| 770 | + |
---|
745 | 771 | editCommandsPanel.preferredHeight = 1; |
---|
746 | 772 | |
---|
747 | 773 | // oe.treePanel.add(commandsPanel); |
---|
.. | .. |
---|
768 | 794 | oe.treePanel.add(jSPPanel); |
---|
769 | 795 | oe.treePanel.Return(); |
---|
770 | 796 | |
---|
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; |
---|
786 | 797 | oe.treePanel.add(copyOptionsPanel); |
---|
787 | 798 | oe.treePanel.Return(); |
---|
788 | 799 | |
---|
.. | .. |
---|
813 | 824 | |
---|
814 | 825 | void AddOptions(cGridBag panel) //, GridBagConstraints constraints) |
---|
815 | 826 | { |
---|
| 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 | + |
---|
816 | 841 | panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints); |
---|
817 | 842 | boxCB.setToolTipText("Display bounding boxes"); |
---|
818 | 843 | boxCB.addItemListener(this); |
---|
.. | .. |
---|
830 | 855 | // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
831 | 856 | // localCB.addItemListener(this); |
---|
832 | 857 | |
---|
| 858 | + panel.Return(); |
---|
| 859 | + |
---|
833 | 860 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
834 | 861 | crowdCB.setToolTipText("Used for crowds"); |
---|
835 | 862 | crowdCB.addItemListener(this); |
---|
.. | .. |
---|
846 | 873 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
847 | 874 | // speakerMocapCB.addItemListener(this); |
---|
848 | 875 | |
---|
| 876 | + panel.Return(); |
---|
| 877 | + |
---|
849 | 878 | if (false) |
---|
850 | 879 | { |
---|
851 | 880 | // handled in scripts |
---|
.. | .. |
---|
860 | 889 | //constraints.gridy += 1; |
---|
861 | 890 | panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
862 | 891 | smoothfocusCB.addItemListener(this); |
---|
| 892 | + panel.Return(); |
---|
863 | 893 | } |
---|
864 | 894 | |
---|
865 | 895 | //constraints.gridx += 1; |
---|
866 | 896 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
867 | 897 | // debugCB.addItemListener(this); |
---|
868 | 898 | |
---|
| 899 | + panel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 900 | + trackCB.setToolTipText("Enable tracking target"); |
---|
| 901 | + trackCB.addItemListener(this); |
---|
| 902 | + |
---|
869 | 903 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
870 | | - oeilCB.setToolTipText("Move camera when tracking target"); |
---|
| 904 | + oeilCB.setToolTipText("Move camera when tracking"); |
---|
871 | 905 | oeilCB.addItemListener(this); |
---|
872 | 906 | |
---|
873 | 907 | panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
874 | 908 | shadowCB.setToolTipText("Compute shadows when live"); |
---|
875 | 909 | shadowCB.addItemListener(this); |
---|
876 | 910 | |
---|
| 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 | + |
---|
877 | 920 | panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
878 | 921 | autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
879 | 922 | autosaveCB.addItemListener(this); |
---|
880 | 923 | |
---|
| 924 | + panel.Return(); |
---|
881 | 925 | if (Globals.ADVANCED) |
---|
882 | 926 | { |
---|
883 | 927 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
.. | .. |
---|
888 | 932 | } |
---|
889 | 933 | |
---|
890 | 934 | cGridBag fill = new cGridBag(); |
---|
891 | | - |
---|
892 | 935 | fill.preferredHeight = 200; |
---|
| 936 | + cGridBag fill2 = new cGridBag(); |
---|
| 937 | + fill2.preferredHeight = 200; |
---|
| 938 | + cGridBag fill3 = new cGridBag(); |
---|
| 939 | + fill3.preferredHeight = 200; |
---|
893 | 940 | |
---|
894 | 941 | panel.add(fill); |
---|
| 942 | + panel.add(fill2); |
---|
| 943 | + panel.add(fill3); |
---|
895 | 944 | |
---|
896 | 945 | } |
---|
897 | 946 | |
---|
.. | .. |
---|
936 | 985 | cCheckBox slowCB; |
---|
937 | 986 | cCheckBox boxCB; |
---|
938 | 987 | cCheckBox zoomBoxCB; |
---|
939 | | - cToggleButton trackCB; |
---|
| 988 | + //cToggleButton trackCB; |
---|
| 989 | + cCheckBox trackCB; |
---|
940 | 990 | cCheckBox smoothfocusCB; |
---|
941 | 991 | // JCheckBox speakerMocapCB; |
---|
942 | 992 | cCheckBox speakerCameraCB; |
---|
.. | .. |
---|
1191 | 1241 | |
---|
1192 | 1242 | assert target == objEditor.jTree; |
---|
1193 | 1243 | TreePath destinationPath = objEditor.jTree.getPathForLocation(objEditor.location.x, objEditor.location.y); |
---|
| 1244 | + Object3D destinationLeaf; |
---|
1194 | 1245 | try { |
---|
1195 | | - Object3D dummy = (Composite) destinationPath.getLastPathComponent(); |
---|
| 1246 | + destinationLeaf = (Composite) destinationPath.getLastPathComponent(); |
---|
1196 | 1247 | } catch (Exception e) { |
---|
1197 | 1248 | System.out.println("destinationPath : " + destinationPath); |
---|
1198 | 1249 | return; |
---|
1199 | 1250 | } |
---|
1200 | 1251 | |
---|
| 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 | + |
---|
1201 | 1261 | // june 2019 if (dtde.getDropAction() == DnDConstants.ACTION_MOVE) // ?? LINK) |
---|
1202 | 1262 | // { |
---|
1203 | 1263 | loadClipboard(true); |
---|
.. | .. |
---|
1312 | 1372 | { |
---|
1313 | 1373 | //heightFieldItem = menu.add(new MenuItem("Height Field")); |
---|
1314 | 1374 | //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 | + { |
---|
1327 | 1393 | kleinItem = menu.add(new MenuItem("Klein Bottle")); |
---|
1328 | 1394 | 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); |
---|
1331 | 1399 | if (Globals.ADVANCED) |
---|
1332 | 1400 | { |
---|
1333 | 1401 | ragdollItem = menu.add(new MenuItem("Rag Walk")); |
---|
.. | .. |
---|
1353 | 1421 | } |
---|
1354 | 1422 | bezierItem = menu.add(new MenuItem("Bezier Patch")); |
---|
1355 | 1423 | 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); |
---|
1360 | 1428 | menu.add("-"); |
---|
1361 | 1429 | //superLoopItem = menu.add(new MenuItem("Super Loop")); |
---|
1362 | 1430 | //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); |
---|
1365 | 1433 | doubleItem = menu.add(new MenuItem("Fork")); |
---|
1366 | 1434 | doubleItem.addActionListener(this); |
---|
1367 | 1435 | if (Globals.ADVANCED) |
---|
.. | .. |
---|
1790 | 1858 | { |
---|
1791 | 1859 | ScreenFit(); |
---|
1792 | 1860 | } else |
---|
1793 | | - if (source == switchItem) |
---|
| 1861 | + if (source == switchViewItem) |
---|
1794 | 1862 | { |
---|
1795 | 1863 | cVector v1 = new cVector(); |
---|
1796 | 1864 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
2020 | 2088 | |
---|
2021 | 2089 | group(g); |
---|
2022 | 2090 | } else |
---|
2023 | | - if (source == loopItem) |
---|
| 2091 | + if (source == loopItem || source == loopButton) |
---|
2024 | 2092 | { |
---|
2025 | 2093 | Composite csg = new GroupLeaf(); |
---|
2026 | 2094 | csg.count = 5; |
---|
.. | .. |
---|
2510 | 2578 | { |
---|
2511 | 2579 | ClearSelection(true); |
---|
2512 | 2580 | } else |
---|
2513 | | - if (source == grabItem) |
---|
| 2581 | + if (source == grabItem || source == groupButton) |
---|
2514 | 2582 | { |
---|
2515 | | - group(new cGroup(), true); |
---|
| 2583 | + group(new cGroup(), false); // true); |
---|
2516 | 2584 | } else |
---|
2517 | 2585 | if (source == hideItem) |
---|
2518 | 2586 | { |
---|
.. | .. |
---|
2530 | 2598 | { |
---|
2531 | 2599 | makeSomething(new Camera()); |
---|
2532 | 2600 | } else |
---|
2533 | | - if (source == compositeItem) |
---|
| 2601 | + if (source == compositeItem || source == compositeButton) |
---|
2534 | 2602 | { |
---|
2535 | 2603 | group(new Composite()); |
---|
2536 | 2604 | } else |
---|
2537 | | - if (source == randomItem) |
---|
| 2605 | + if (source == switchItem || source == switchButton) |
---|
2538 | 2606 | { |
---|
2539 | 2607 | RandomNode random = new RandomNode(); |
---|
2540 | 2608 | group(random); |
---|
.. | .. |
---|
2636 | 2704 | { |
---|
2637 | 2705 | group(new cLinker()); |
---|
2638 | 2706 | } else |
---|
2639 | | - if (source == textureItem) |
---|
| 2707 | + if (source == textureItem || source == textureButton) |
---|
2640 | 2708 | { |
---|
2641 | 2709 | group(new TextureNode()); |
---|
2642 | 2710 | } else |
---|
.. | .. |
---|
3380 | 3448 | cameraView.ProtectCamera(); |
---|
3381 | 3449 | cameraView.repaint(); |
---|
3382 | 3450 | return; |
---|
3383 | | - } else if (event.getSource() == revertCameraItem) |
---|
| 3451 | + } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3384 | 3452 | { |
---|
3385 | 3453 | cameraView.RevertCamera(); |
---|
3386 | 3454 | cameraView.repaint(); |
---|
.. | .. |
---|
4583 | 4651 | |
---|
4584 | 4652 | void refreshContents(boolean cp) |
---|
4585 | 4653 | { |
---|
4586 | | - if (!Globals.MOUSEDRAGGED) |
---|
| 4654 | + if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
| 4655 | + if (!Globals.MOUSEDRAGGED) // && !Globals.TIMERRUNNING) |
---|
4587 | 4656 | { |
---|
4588 | 4657 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
4589 | 4658 | |
---|
.. | .. |
---|
5401 | 5470 | cButton clearpanelButton; |
---|
5402 | 5471 | cButton unselectButton; |
---|
5403 | 5472 | |
---|
| 5473 | + cButton restoreCameraButton; |
---|
| 5474 | + |
---|
5404 | 5475 | cButton minButton; |
---|
5405 | 5476 | cButton maxButton; |
---|
5406 | 5477 | cButton fullButton; |
---|
.. | .. |
---|
5412 | 5483 | cButton groupButton; |
---|
5413 | 5484 | cButton ungroupButton; |
---|
5414 | 5485 | cButton compositeButton; |
---|
| 5486 | + cButton switchButton; |
---|
| 5487 | + cButton loopButton; |
---|
| 5488 | + cButton textureButton; |
---|
5415 | 5489 | |
---|
5416 | 5490 | cButton gridButton; |
---|
5417 | 5491 | cButton boxButton; |
---|
.. | .. |
---|
5444 | 5518 | //JTree jTree; |
---|
5445 | 5519 | private MenuItem lookAtItem; |
---|
5446 | 5520 | private MenuItem lookFromItem; |
---|
5447 | | - private MenuItem switchItem; |
---|
| 5521 | + private MenuItem switchViewItem; |
---|
5448 | 5522 | private MenuItem cutItem; |
---|
5449 | 5523 | private MenuItem undoItem; |
---|
5450 | 5524 | private MenuItem redoItem; |
---|
.. | .. |
---|
5536 | 5610 | private MenuItem frontItem; |
---|
5537 | 5611 | private MenuItem cameraItem; |
---|
5538 | 5612 | private MenuItem compositeItem; |
---|
5539 | | - private MenuItem randomItem; |
---|
| 5613 | + private MenuItem switchItem; |
---|
5540 | 5614 | private MenuItem physicsItem; |
---|
5541 | 5615 | private MenuItem frameselectorItem; |
---|
5542 | 5616 | private MenuItem scriptNodeItem; |
---|
.. | .. |
---|
5610 | 5684 | |
---|
5611 | 5685 | Menu cameraMenu; |
---|
5612 | 5686 | MenuItem editCameraItem; |
---|
5613 | | - MenuItem revertCameraItem; |
---|
| 5687 | + MenuItem restoreCameraItem; |
---|
5614 | 5688 | } |
---|