.. | .. |
---|
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 | + if (Globals.ADVANCED) |
---|
| 819 | + { |
---|
813 | 820 | panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints); |
---|
814 | 821 | lookAtCB.setToolTipText("Look-at target"); |
---|
815 | 822 | lookAtCB.addItemListener(this); |
---|
| 823 | + } |
---|
816 | 824 | |
---|
817 | 825 | } |
---|
818 | 826 | |
---|
.. | .. |
---|
827 | 835 | void EditObject(Object3D obj) |
---|
828 | 836 | { |
---|
829 | 837 | cRadio radioButton = new cRadio(obj.name); |
---|
| 838 | + |
---|
| 839 | + // Patch to avoid bug with transparency. |
---|
| 840 | + radioButton.hadMaterial = obj.material != null; |
---|
| 841 | + if (!radioButton.hadMaterial) |
---|
| 842 | + { |
---|
| 843 | + obj.material = new cMaterial(); |
---|
| 844 | + } |
---|
| 845 | + |
---|
830 | 846 | radioButton.SetObject(obj); |
---|
831 | 847 | radioButton.layout = sevenButton; |
---|
832 | 848 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
.. | .. |
---|
863 | 879 | JCheckBox speakerCameraCB; |
---|
864 | 880 | JCheckBox speakerFocusCB; |
---|
865 | 881 | JCheckBox debugCB; |
---|
| 882 | + |
---|
866 | 883 | JCheckBox oeilCB; |
---|
| 884 | + JCheckBox shadowCB; |
---|
867 | 885 | JCheckBox lookAtCB; |
---|
868 | 886 | |
---|
869 | 887 | // static int COLOR = 1; |
---|
.. | .. |
---|
966 | 984 | else if(e.getSource() == oeilCB) |
---|
967 | 985 | { |
---|
968 | 986 | cameraView.ToggleOeil(); |
---|
| 987 | + } |
---|
| 988 | + else if(e.getSource() == shadowCB) |
---|
| 989 | + { |
---|
| 990 | + Globals.COMPUTESHADOWWHENLIVE ^= true; |
---|
969 | 991 | } |
---|
970 | 992 | else if(e.getSource() == lookAtCB) |
---|
971 | 993 | { |
---|
.. | .. |
---|
3126 | 3148 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3127 | 3149 | { |
---|
3128 | 3150 | ab = (cRadio)e.nextElement(); |
---|
3129 | | - if(ab.getModel().isSelected() && ab.GetObject() != client) |
---|
| 3151 | + if (ab.getModel().isSelected() && ab.GetObject() != client) |
---|
3130 | 3152 | { |
---|
| 3153 | + // Patch to avoid bug with transparency. |
---|
| 3154 | + if (!ab.hadMaterial) |
---|
| 3155 | + { |
---|
| 3156 | + ab.object.material = null; |
---|
| 3157 | + } |
---|
| 3158 | + |
---|
3131 | 3159 | buttonGroup.remove(ab); |
---|
3132 | 3160 | radioPanel.remove(ab); |
---|
3133 | 3161 | |
---|