.. | .. |
---|
580 | 580 | //minButton.setToolTipText("Minimize window"); |
---|
581 | 581 | //minButton.addActionListener(this); |
---|
582 | 582 | |
---|
583 | | - oe.toolbarPanel.add(maxButton = new cButton("\u271A", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 583 | + oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
584 | 584 | maxButton.setToolTipText("Maximize window"); |
---|
585 | 585 | maxButton.addActionListener(this); |
---|
586 | 586 | |
---|
587 | | - oe.toolbarPanel.add(fullButton = new cButton("\u2b1c", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 587 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
588 | 588 | fullButton.setToolTipText("Full-screen window"); |
---|
589 | 589 | fullButton.addActionListener(this); |
---|
590 | 590 | |
---|
591 | | - oe.toolbarPanel.add(undoButton = new cButton("\u21a9", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 591 | + oe.toolbarPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
592 | 592 | undoButton.setToolTipText("Undo changes"); |
---|
593 | 593 | undoButton.addActionListener(this); |
---|
594 | 594 | |
---|
595 | | - oe.toolbarPanel.add(redoButton = new cButton("\u21aa", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 595 | + oe.toolbarPanel.add(redoButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
596 | 596 | redoButton.setToolTipText("Redo changes"); |
---|
597 | 597 | redoButton.addActionListener(this); |
---|
598 | 598 | |
---|
599 | | - oe.toolbarPanel.add(saveButton = new cButton("\u21e3", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 599 | + oe.toolbarPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
600 | 600 | saveButton.setToolTipText("Save changes"); |
---|
601 | 601 | saveButton.addActionListener(this); |
---|
602 | 602 | |
---|
603 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints); |
---|
| 603 | + oe.toolbarPanel.add(liveCB = GetCheckBox("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
604 | 604 | liveCB.setToolTipText("Enable animation"); |
---|
605 | 605 | liveCB.addItemListener(this); |
---|
606 | 606 | |
---|
607 | | - oe.toolbarPanel.add(oneStepButton = new cButton("\u29f4", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
608 | | - oneStepButton.setToolTipText("Animate one step forward"); |
---|
609 | | - oneStepButton.addActionListener(this); |
---|
610 | | - |
---|
611 | | - oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints); |
---|
| 607 | + oe.toolbarPanel.add(fastCB = GetCheckBox("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
612 | 608 | fastCB.setToolTipText("Fast mode"); |
---|
613 | 609 | fastCB.addItemListener(this); |
---|
614 | 610 | |
---|
615 | | - oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK)); //, oe.aConstraints); |
---|
| 611 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 612 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 613 | + oneStepButton.addActionListener(this); |
---|
| 614 | + |
---|
| 615 | + oe.toolbarPanel.add(trackCB = GetCheckBox("icons/track.png", CameraPane.TRACK)); //, oe.aConstraints); |
---|
616 | 616 | trackCB.setToolTipText("Enable tracking"); |
---|
617 | 617 | trackCB.addItemListener(this); |
---|
618 | 618 | |
---|
619 | | - oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 619 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
620 | 620 | screenfitButton.setToolTipText("Screen fit"); |
---|
621 | 621 | screenfitButton.addActionListener(this); |
---|
622 | 622 | |
---|
.. | .. |
---|
630 | 630 | snapobjectButton.setToolTipText("Snap Object"); |
---|
631 | 631 | } |
---|
632 | 632 | |
---|
633 | | - oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
634 | | - flashSelectionButton.setToolTipText("Show selection"); |
---|
| 633 | + oe.toolbarPanel.add(flashSelectionButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 634 | + flashSelectionButton.setToolTipText("Highlight selection"); |
---|
635 | 635 | flashSelectionButton.addActionListener(this); |
---|
636 | 636 | |
---|
637 | 637 | oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
.. | .. |
---|
808 | 808 | // debugCB.addItemListener(this); |
---|
809 | 809 | |
---|
810 | 810 | panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints); |
---|
| 811 | + oeilCB.setToolTipText("Move camera when tracking target"); |
---|
811 | 812 | oeilCB.addItemListener(this); |
---|
812 | 813 | |
---|
| 814 | + panel.add(shadowCB = new cCheckBox("Shadow", Globals.COMPUTESHADOWWHENLIVE)); //, constraints); |
---|
| 815 | + shadowCB.setToolTipText("Compute shadows when live"); |
---|
| 816 | + shadowCB.addItemListener(this); |
---|
| 817 | + |
---|
| 818 | + panel.add(autosaveCB = new cCheckBox("Auto-save", Globals.SAVEONMAKE)); //, constraints); |
---|
| 819 | + autosaveCB.setToolTipText("Auto-save on structure change"); |
---|
| 820 | + autosaveCB.addItemListener(this); |
---|
| 821 | + |
---|
| 822 | + if (Globals.ADVANCED) |
---|
| 823 | + { |
---|
813 | 824 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
814 | 825 | lookAtCB.setToolTipText("Look-at target"); |
---|
815 | 826 | lookAtCB.addItemListener(this); |
---|
| 827 | + } |
---|
816 | 828 | |
---|
817 | 829 | } |
---|
818 | 830 | |
---|
.. | .. |
---|
827 | 839 | void EditObject(Object3D obj) |
---|
828 | 840 | { |
---|
829 | 841 | cRadio radioButton = new cRadio(obj.name); |
---|
| 842 | + |
---|
| 843 | + // Patch to avoid bug with transparency. |
---|
| 844 | + radioButton.hadMaterial = obj.material != null; |
---|
| 845 | + if (!radioButton.hadMaterial) |
---|
| 846 | + { |
---|
| 847 | + obj.material = new cMaterial(); |
---|
| 848 | + } |
---|
| 849 | + |
---|
830 | 850 | radioButton.SetObject(obj); |
---|
831 | 851 | radioButton.layout = sevenButton; |
---|
832 | 852 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
.. | .. |
---|
848 | 868 | /*DropTarget dropTarget =*/ new DropTarget(oe.cameraView, this); |
---|
849 | 869 | } |
---|
850 | 870 | |
---|
851 | | - JCheckBox liveCB; |
---|
852 | | - JCheckBox supportCB; |
---|
853 | | - JCheckBox localCB; |
---|
854 | | - JCheckBox crowdCB; |
---|
855 | | - JCheckBox smoothCB; |
---|
856 | | - JCheckBox fastCB; |
---|
857 | | - JCheckBox slowCB; |
---|
858 | | - JCheckBox boxCB; |
---|
859 | | - JCheckBox zoomBoxCB; |
---|
860 | | - JCheckBox trackCB; |
---|
861 | | - JCheckBox smoothfocusCB; |
---|
| 871 | + cCheckBox liveCB; |
---|
| 872 | + cCheckBox supportCB; |
---|
| 873 | + cCheckBox localCB; |
---|
| 874 | + cCheckBox crowdCB; |
---|
| 875 | + cCheckBox smoothCB; |
---|
| 876 | + cCheckBox fastCB; |
---|
| 877 | + cCheckBox slowCB; |
---|
| 878 | + cCheckBox boxCB; |
---|
| 879 | + cCheckBox zoomBoxCB; |
---|
| 880 | + cCheckBox trackCB; |
---|
| 881 | + cCheckBox smoothfocusCB; |
---|
862 | 882 | // JCheckBox speakerMocapCB; |
---|
863 | | - JCheckBox speakerCameraCB; |
---|
864 | | - JCheckBox speakerFocusCB; |
---|
865 | | - JCheckBox debugCB; |
---|
866 | | - JCheckBox oeilCB; |
---|
867 | | - JCheckBox lookAtCB; |
---|
| 883 | + cCheckBox speakerCameraCB; |
---|
| 884 | + cCheckBox speakerFocusCB; |
---|
| 885 | + cCheckBox debugCB; |
---|
| 886 | + |
---|
| 887 | + cCheckBox oeilCB; |
---|
| 888 | + cCheckBox shadowCB; |
---|
| 889 | + cCheckBox autosaveCB; |
---|
| 890 | + cCheckBox lookAtCB; |
---|
868 | 891 | |
---|
869 | 892 | // static int COLOR = 1; |
---|
870 | 893 | // static int MATERIAL = 2; |
---|
.. | .. |
---|
872 | 895 | |
---|
873 | 896 | int dropAttributes = Object3D.COLOR | Object3D.MATERIAL; |
---|
874 | 897 | |
---|
875 | | - JCheckBox colorCB; |
---|
876 | | - JCheckBox materialCB; |
---|
877 | | - JCheckBox textureCB; |
---|
| 898 | + cCheckBox colorCB; |
---|
| 899 | + cCheckBox materialCB; |
---|
| 900 | + cCheckBox textureCB; |
---|
878 | 901 | |
---|
879 | 902 | public void itemStateChanged(ItemEvent e) |
---|
880 | 903 | { |
---|
.. | .. |
---|
966 | 989 | else if(e.getSource() == oeilCB) |
---|
967 | 990 | { |
---|
968 | 991 | cameraView.ToggleOeil(); |
---|
| 992 | + } |
---|
| 993 | + else if(e.getSource() == shadowCB) |
---|
| 994 | + { |
---|
| 995 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
| 996 | + } |
---|
| 997 | + else if(e.getSource() == autosaveCB) |
---|
| 998 | + { |
---|
| 999 | + Globals.SAVEONMAKE ^= true; |
---|
969 | 1000 | } |
---|
970 | 1001 | else if(e.getSource() == lookAtCB) |
---|
971 | 1002 | { |
---|
.. | .. |
---|
3126 | 3157 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3127 | 3158 | { |
---|
3128 | 3159 | ab = (cRadio)e.nextElement(); |
---|
3129 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3160 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
3130 | 3161 | { |
---|
| 3162 | + // Patch to avoid bug with transparency. |
---|
| 3163 | + if (!ab.hadMaterial) |
---|
| 3164 | + { |
---|
| 3165 | + ab.object.material = null; |
---|
| 3166 | + } |
---|
| 3167 | + |
---|
3131 | 3168 | buttonGroup.remove(ab); |
---|
3132 | 3169 | radioPanel.remove(ab); |
---|
3133 | 3170 | |
---|
3134 | | - ab.GetObject().editWindow = null; |
---|
| 3171 | + //ab.GetObject().editWindow = null; |
---|
| 3172 | + ab.GetObject().manipWindow = null; |
---|
3135 | 3173 | // ab.GetObject().objectUI = null; // ????????? |
---|
3136 | 3174 | |
---|
3137 | 3175 | ((cRadio)radioPanel.getComponent(radioPanel.getComponentCount() - 1)).doClick(); |
---|
.. | .. |
---|
3245 | 3283 | |
---|
3246 | 3284 | // fix "+" issue |
---|
3247 | 3285 | //group.editWindow = this; |
---|
| 3286 | + group.manipWindow = this; |
---|
3248 | 3287 | |
---|
3249 | 3288 | /* |
---|
3250 | 3289 | currentLayout = radio.layout; |
---|
.. | .. |
---|
4567 | 4606 | |
---|
4568 | 4607 | if (cut) |
---|
4569 | 4608 | { |
---|
| 4609 | + if (Globals.SAVEONMAKE) |
---|
4570 | 4610 | Save(); |
---|
4571 | 4611 | //int indices[] = jList.getSelectedIndices(); |
---|
4572 | 4612 | //for (int i = indices.length - 1; i >= 0; i--) |
---|