.. | .. |
---|
356 | 356 | this.copy = this.group = group; |
---|
357 | 357 | //selectees = this.group.selectees; |
---|
358 | 358 | |
---|
359 | | - if (copy.versions == null) |
---|
| 359 | + if (copy.versionlist == null) |
---|
360 | 360 | { |
---|
361 | | - copy.versions = new byte[100][]; |
---|
| 361 | + copy.versionlist = new Object3D[100]; |
---|
362 | 362 | copy.versionindex = -1; |
---|
363 | 363 | } |
---|
364 | 364 | |
---|
.. | .. |
---|
383 | 383 | |
---|
384 | 384 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
385 | 385 | |
---|
386 | | - if (copy.versions == null) |
---|
| 386 | + if (copy.versionlist == null) |
---|
387 | 387 | { |
---|
388 | | - copy.versions = new byte[100][]; |
---|
| 388 | + copy.versionlist = new Object3D[100]; |
---|
389 | 389 | copy.versionindex = -1; |
---|
390 | 390 | |
---|
391 | 391 | Save(true); |
---|
.. | .. |
---|
932 | 932 | restoreCameraButton.addActionListener(this); |
---|
933 | 933 | |
---|
934 | 934 | copyOptionsPanel.add(saveButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
935 | | - saveButton.setToolTipText("New version"); |
---|
| 935 | + saveButton.setToolTipText("Duplicate current version"); |
---|
936 | 936 | saveButton.addActionListener(this); |
---|
937 | 937 | |
---|
938 | 938 | copyOptionsPanel.add(undoButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
942 | 942 | |
---|
943 | 943 | cGridBag updown = new cGridBag().setVertical(true); |
---|
944 | 944 | updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
945 | | - restoreButton.setToolTipText("Restore current"); |
---|
| 945 | + restoreButton.setToolTipText("Undo (restore current version)"); |
---|
946 | 946 | restoreButton.addActionListener(this); |
---|
947 | 947 | restoreButton.setEnabled(false); |
---|
948 | 948 | |
---|
949 | 949 | updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
950 | | - replaceButton.setToolTipText("Replace current"); |
---|
| 950 | + replaceButton.setToolTipText("Save (replace current version)"); |
---|
951 | 951 | replaceButton.addActionListener(this); |
---|
952 | 952 | replaceButton.setEnabled(false); |
---|
953 | 953 | |
---|
.. | .. |
---|
1110 | 1110 | editButton.addActionListener(this); |
---|
1111 | 1111 | |
---|
1112 | 1112 | editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1113 | | - uneditButton.setToolTipText("Remove selection controls"); |
---|
| 1113 | + uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
1114 | 1114 | uneditButton.addActionListener(this); |
---|
1115 | 1115 | |
---|
1116 | 1116 | editCommandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints); |
---|
1117 | 1117 | allParamsButton.setToolTipText("Show all controle"); |
---|
1118 | 1118 | allParamsButton.addActionListener(this); |
---|
1119 | 1119 | |
---|
1120 | | - editCommandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1120 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1121 | 1121 | clearPanelButton.setToolTipText("Clear edit panel"); |
---|
1122 | 1122 | clearPanelButton.addActionListener(this); |
---|
1123 | 1123 | |
---|
.. | .. |
---|
1183 | 1183 | dgr.addDragGestureListener(this); |
---|
1184 | 1184 | }catch(Exception e) {} |
---|
1185 | 1185 | */ |
---|
1186 | | - radio.layout = sixButton; // sevenButton; |
---|
| 1186 | + radio.layout = threeButton; // sixButton; |
---|
1187 | 1187 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
1188 | 1188 | } |
---|
1189 | 1189 | |
---|
.. | .. |
---|
1234 | 1234 | smoothCB.setToolTipText("Snapping delay"); |
---|
1235 | 1235 | smoothCB.addItemListener(this); |
---|
1236 | 1236 | |
---|
1237 | | - panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
1238 | | - slowCB.setToolTipText("Smooth interpolation"); |
---|
1239 | | - slowCB.addItemListener(this); |
---|
| 1237 | +// panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints); |
---|
| 1238 | +// slowCB.setToolTipText("Smooth interpolation"); |
---|
| 1239 | +// slowCB.addItemListener(this); |
---|
| 1240 | + panel.add(minshaderCB = new cCheckBox("Min shader", Globals.MINSHADER)); //, constraints); |
---|
| 1241 | + minshaderCB.setToolTipText("Minimal fast shader"); |
---|
| 1242 | + minshaderCB.addItemListener(this); |
---|
1240 | 1243 | |
---|
1241 | 1244 | // constraints.gridy += 1; |
---|
1242 | 1245 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
.. | .. |
---|
1325 | 1328 | } |
---|
1326 | 1329 | |
---|
1327 | 1330 | radioButton.SetObject(obj); |
---|
1328 | | - radioButton.layout = sixButton; // sevenButton; |
---|
| 1331 | + radioButton.layout = threeButton; // sixButton; |
---|
1329 | 1332 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
1330 | 1333 | radioButton.addActionListener(this); |
---|
1331 | 1334 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1350 | 1353 | cCheckBox localCB; |
---|
1351 | 1354 | cCheckBox crowdCB; |
---|
1352 | 1355 | cCheckBox smoothCB; |
---|
| 1356 | + cCheckBox minshaderCB; |
---|
| 1357 | + |
---|
1353 | 1358 | cToggleButton fastCB; |
---|
1354 | 1359 | cCheckBox slowCB; |
---|
1355 | 1360 | cCheckBox boxCB; |
---|
.. | .. |
---|
1420 | 1425 | { |
---|
1421 | 1426 | cameraView.ToggleInertia(); |
---|
1422 | 1427 | cameraView.repaint(); |
---|
| 1428 | + } |
---|
| 1429 | + else if(e.getSource() == minshaderCB) |
---|
| 1430 | + { |
---|
| 1431 | + Globals.MINSHADER ^= true; |
---|
| 1432 | + cameraView.programInitialized = false; |
---|
| 1433 | + cameraView.repaint(); |
---|
1423 | 1434 | } |
---|
1424 | 1435 | else if(e.getSource() == localCB) |
---|
1425 | 1436 | { |
---|
.. | .. |
---|
2602 | 2613 | { |
---|
2603 | 2614 | // Restore current version |
---|
2604 | 2615 | Restore(); |
---|
| 2616 | + restoreButton.setEnabled(false); |
---|
2605 | 2617 | } else |
---|
2606 | 2618 | if (source == replaceButton) |
---|
2607 | 2619 | { |
---|
2608 | 2620 | // Overwrite current version |
---|
2609 | 2621 | Replace(); |
---|
| 2622 | + replaceButton.setEnabled(false); |
---|
2610 | 2623 | } else |
---|
2611 | 2624 | if (source == redoButton) |
---|
2612 | 2625 | { |
---|
.. | .. |
---|
3809 | 3822 | { |
---|
3810 | 3823 | Object3D child = (Object3D)e.nextElement(); |
---|
3811 | 3824 | if(child.editWindow != null) |
---|
3812 | | - objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3813 | 3825 | child.pinned = false; |
---|
3814 | 3826 | child.CloseUI(); |
---|
3815 | 3827 | listUI.remove(child); |
---|
| 3828 | +// objectPanel.setSelectedIndex(objectPanel.indexOfTab("Edit")); |
---|
3816 | 3829 | |
---|
3817 | 3830 | //child.editWindow = null; // ??????????? |
---|
3818 | 3831 | } |
---|
.. | .. |
---|
3831 | 3844 | obj.CloseUI(); |
---|
3832 | 3845 | } |
---|
3833 | 3846 | listUI.clear(); |
---|
| 3847 | + SetPinStates(group.selection.size() > 0); |
---|
3834 | 3848 | refreshContents(true); |
---|
3835 | 3849 | } else |
---|
3836 | 3850 | if (source == allParamsButton) |
---|
.. | .. |
---|
3917 | 3931 | radio.layout.doClick(); |
---|
3918 | 3932 | |
---|
3919 | 3933 | ClearUnpinned(); |
---|
| 3934 | + |
---|
3920 | 3935 | //Grafreed.Assert(group != null); |
---|
3921 | 3936 | //Grafreed.Assert(group.selection != null); |
---|
3922 | 3937 | SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
.. | .. |
---|
3933 | 3948 | } else if (event.getSource() == editCameraItem) |
---|
3934 | 3949 | { |
---|
3935 | 3950 | cameraView.ProtectCamera(); |
---|
| 3951 | + cameraView.requestFocusInWindow(); |
---|
3936 | 3952 | cameraView.repaint(); |
---|
3937 | 3953 | return; |
---|
3938 | 3954 | } else if (event.getSource() == restoreCameraItem || event.getSource() == restoreCameraButton) |
---|
3939 | 3955 | { |
---|
3940 | 3956 | cameraView.RevertCamera(); |
---|
| 3957 | + cameraView.requestFocusInWindow(); |
---|
3941 | 3958 | cameraView.repaint(); |
---|
3942 | 3959 | return; |
---|
3943 | 3960 | // } else if (event.getSource() == textureButton) |
---|
.. | .. |
---|
5070 | 5087 | |
---|
5071 | 5088 | freezemodel = false; |
---|
5072 | 5089 | } |
---|
5073 | | - |
---|
5074 | | - boolean flashIt = true; |
---|
5075 | | - |
---|
| 5090 | + |
---|
5076 | 5091 | public void valueChanged(TreeSelectionEvent e) |
---|
5077 | 5092 | //public boolean handleEvent(Event event) |
---|
5078 | 5093 | { |
---|
.. | .. |
---|
5147 | 5162 | uneditButton.setEnabled(enabled); |
---|
5148 | 5163 | unselectButton.setEnabled(enabled); |
---|
5149 | 5164 | flashSelectionButton.setEnabled(enabled); |
---|
| 5165 | + |
---|
| 5166 | + clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
5150 | 5167 | } |
---|
5151 | 5168 | |
---|
5152 | 5169 | void refreshContents(boolean cp) |
---|