.. | .. |
---|
4 | 4 | |
---|
5 | 5 | import java.awt.*; |
---|
6 | 6 | import java.awt.event.*; |
---|
| 7 | +import java.awt.image.BufferedImage; |
---|
7 | 8 | import javax.swing.*; |
---|
8 | 9 | import javax.swing.event.*; |
---|
9 | 10 | import javax.swing.text.*; |
---|
.. | .. |
---|
13 | 14 | import javax.swing.plaf.metal.MetalLookAndFeel; |
---|
14 | 15 | //import javax.swing.plaf.ColorUIResource; |
---|
15 | 16 | //import javax.swing.plaf.metal.DefaultMetalTheme; |
---|
| 17 | + |
---|
| 18 | +import javax.swing.plaf.basic.BasicSplitPaneDivider; |
---|
| 19 | +import javax.swing.plaf.basic.BasicSplitPaneUI; |
---|
16 | 20 | |
---|
17 | 21 | //import javax.media.opengl.GLCanvas; |
---|
18 | 22 | |
---|
.. | .. |
---|
37 | 41 | JFrame frame; |
---|
38 | 42 | |
---|
39 | 43 | static ObjEditor theFrame; |
---|
| 44 | + |
---|
| 45 | + cButton GetButton(String name, boolean border) |
---|
| 46 | + { |
---|
| 47 | + try |
---|
| 48 | + { |
---|
| 49 | + ImageIcon icon = GetIcon(name); |
---|
| 50 | + return new cButton(icon, border); |
---|
| 51 | + } |
---|
| 52 | + catch (Exception e) |
---|
| 53 | + { |
---|
| 54 | + return new cButton(name, border); |
---|
| 55 | + } |
---|
| 56 | + } |
---|
| 57 | + |
---|
| 58 | + cToggleButton GetToggleButton(String name, boolean border) |
---|
| 59 | + { |
---|
| 60 | + try |
---|
| 61 | + { |
---|
| 62 | + ImageIcon icon = GetIcon(name); |
---|
| 63 | + return new cToggleButton(icon, border); |
---|
| 64 | + } |
---|
| 65 | + catch (Exception e) |
---|
| 66 | + { |
---|
| 67 | + return new cToggleButton(name, border); |
---|
| 68 | + } |
---|
| 69 | + } |
---|
| 70 | + |
---|
| 71 | + cCheckBox GetCheckBox(String name, boolean border) |
---|
| 72 | + { |
---|
| 73 | + try |
---|
| 74 | + { |
---|
| 75 | + ImageIcon icon = GetIcon(name); |
---|
| 76 | + return new cCheckBox(icon, border); |
---|
| 77 | + } |
---|
| 78 | + catch (Exception e) |
---|
| 79 | + { |
---|
| 80 | + return new cCheckBox(name, border); |
---|
| 81 | + } |
---|
| 82 | + } |
---|
| 83 | + |
---|
| 84 | + private ImageIcon GetIcon(String name) throws IOException |
---|
| 85 | + { |
---|
| 86 | + BufferedImage image = javax.imageio.ImageIO.read(getClass().getClassLoader().getResourceAsStream(name)); |
---|
| 87 | + |
---|
| 88 | + if (image.getWidth() != 24 && image.getHeight() != 24) |
---|
| 89 | + { |
---|
| 90 | + BufferedImage resized = new BufferedImage(24, 24, image.getType()); |
---|
| 91 | + Graphics2D g = resized.createGraphics(); |
---|
| 92 | + g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR); |
---|
| 93 | + //g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
---|
| 94 | + g.drawImage(image, 0, 0, 24, 24, 0, 0, image.getWidth(), image.getHeight(), null); |
---|
| 95 | + g.dispose(); |
---|
| 96 | + |
---|
| 97 | + image = resized; |
---|
| 98 | + } |
---|
| 99 | + |
---|
| 100 | + javax.swing.ImageIcon icon = new javax.swing.ImageIcon(image); |
---|
| 101 | + return icon; |
---|
| 102 | + } |
---|
40 | 103 | |
---|
41 | 104 | // SCRIPT |
---|
42 | 105 | |
---|
.. | .. |
---|
147 | 210 | |
---|
148 | 211 | objEditor.ctrlPanel.remove(namePanel); |
---|
149 | 212 | |
---|
150 | | - if (!GroupEditor.allparams) |
---|
| 213 | + if (!allparams) |
---|
151 | 214 | return; |
---|
152 | 215 | |
---|
153 | 216 | // objEditor.ctrlPanel.remove(liveCB); |
---|
.. | .. |
---|
171 | 234 | |
---|
172 | 235 | objEditor.ctrlPanel.remove(setupPanel); |
---|
173 | 236 | objEditor.ctrlPanel.remove(setupPanel2); |
---|
174 | | - objEditor.ctrlPanel.remove(commandsPanel); |
---|
| 237 | + objEditor.ctrlPanel.remove(objectCommandsPanel); |
---|
175 | 238 | objEditor.ctrlPanel.remove(pushPanel); |
---|
176 | 239 | //objEditor.ctrlPanel.remove(fillPanel); |
---|
177 | 240 | |
---|
.. | .. |
---|
277 | 340 | return frame.action(event, obj); |
---|
278 | 341 | } |
---|
279 | 342 | |
---|
| 343 | + // Cannot work without static |
---|
| 344 | + static boolean allparams = true; |
---|
| 345 | + |
---|
| 346 | + static java.util.Vector<Object3D> listUI = new java.util.Vector<Object3D>(); |
---|
| 347 | + |
---|
280 | 348 | void SetupMenu() |
---|
281 | 349 | { |
---|
282 | 350 | frame.setMenuBar(menuBar = new MenuBar()); |
---|
.. | .. |
---|
323 | 391 | closeItem.addActionListener(this); |
---|
324 | 392 | |
---|
325 | 393 | objectPanel = new JTabbedPane(); |
---|
| 394 | + |
---|
| 395 | + ChangeListener changeListener = new ChangeListener() |
---|
| 396 | + { |
---|
| 397 | + public void stateChanged(ChangeEvent changeEvent) |
---|
| 398 | + { |
---|
| 399 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Material") && !materialFlushed) |
---|
| 400 | +// { |
---|
| 401 | +// if (latestObject != null) |
---|
| 402 | +// { |
---|
| 403 | +// refreshContents(true); |
---|
| 404 | +// SetMaterial(latestObject); |
---|
| 405 | +// } |
---|
| 406 | +// |
---|
| 407 | +// materialFlushed = true; |
---|
| 408 | +// } |
---|
| 409 | +// if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Edit")) |
---|
| 410 | +// { |
---|
| 411 | +// if (listUI.size() == 0) |
---|
| 412 | +// EditSelection(false); |
---|
| 413 | +// } |
---|
| 414 | + |
---|
| 415 | + refreshContents(false); // To refresh Info tab |
---|
| 416 | + } |
---|
| 417 | + }; |
---|
| 418 | + objectPanel.addChangeListener(changeListener); |
---|
| 419 | + |
---|
326 | 420 | toolbarPanel = new JPanel(); |
---|
327 | 421 | toolbarPanel.setName("Toolbar"); |
---|
328 | 422 | treePanel = new cGridBag(); |
---|
329 | 423 | treePanel.setName("Tree"); |
---|
| 424 | + |
---|
| 425 | + editPanel = new cGridBag().setVertical(true); |
---|
| 426 | + editPanel.setName("Edit"); |
---|
| 427 | + |
---|
330 | 428 | ctrlPanel = new cGridBag().setVertical(false); // new GridBagLayout()); |
---|
331 | | - ctrlPanel.setName("Edit"); |
---|
| 429 | + |
---|
| 430 | + editCommandsPanel = new cGridBag(); |
---|
| 431 | + editPanel.add(editCommandsPanel); |
---|
| 432 | + editPanel.add(ctrlPanel); |
---|
| 433 | + |
---|
| 434 | + toolboxPanel = new cGridBag().setVertical(false); |
---|
| 435 | + toolboxPanel.setName("Toolbox"); |
---|
| 436 | + |
---|
332 | 437 | materialPanel = new cGridBag().setVertical(true); |
---|
333 | 438 | materialPanel.setName("Material"); |
---|
| 439 | + |
---|
334 | 440 | /*JTextPane*/ |
---|
335 | 441 | infoarea = createTextPane(); |
---|
336 | 442 | doc = infoarea.getStyledDocument(); |
---|
.. | .. |
---|
355 | 461 | mainPanel.setDividerSize(9); |
---|
356 | 462 | mainPanel.setDividerLocation(0.5); //1.0); |
---|
357 | 463 | mainPanel.setResizeWeight(0.5); |
---|
358 | | - |
---|
| 464 | + |
---|
| 465 | +//mainPanel.setDividerSize((int) (mainPanel.getDividerSize() * 1.5)); |
---|
| 466 | +// BasicSplitPaneDivider divider = ( (BasicSplitPaneUI) mainPanel.getUI()).getDivider(); |
---|
| 467 | +// divider.setDividerSize(15); |
---|
| 468 | +// divider.setBorder(BorderFactory.createTitledBorder(divider.getBorder(), "Custom border title -- gets rid of the one-touch arrows!")); |
---|
| 469 | + |
---|
| 470 | + |
---|
359 | 471 | //ctrlPanel.setLayout(new GridLayout(4, 1, 5, 5)); |
---|
360 | 472 | //mainPanel.setLayout(new GridBagLayout()); |
---|
361 | 473 | toolbarPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); |
---|
.. | .. |
---|
603 | 715 | |
---|
604 | 716 | boolean maximized; |
---|
605 | 717 | |
---|
| 718 | + cButton fullscreenLayout; |
---|
| 719 | + |
---|
606 | 720 | void Minimize() |
---|
607 | 721 | { |
---|
608 | 722 | frame.setState(Frame.ICONIFIED); |
---|
.. | .. |
---|
628 | 742 | |
---|
629 | 743 | void ToggleFullScreen() |
---|
630 | 744 | { |
---|
631 | | - if (CameraPane.FULLSCREEN) |
---|
| 745 | + cameraView.ToggleFullScreen(); |
---|
| 746 | + |
---|
| 747 | + if (!CameraPane.FULLSCREEN) |
---|
632 | 748 | { |
---|
633 | 749 | device.setFullScreenWindow(null); |
---|
634 | 750 | //frame.setVisible(false); |
---|
.. | .. |
---|
664 | 780 | // X frame.getContentPane().add(/*"Center",*/bigThree); |
---|
665 | 781 | framePanel.setDividerLocation(0); |
---|
666 | 782 | |
---|
667 | | - radio.layout = twoButton; |
---|
| 783 | + radio.layout = fullscreenLayout; |
---|
668 | 784 | radio.layout.doClick(); |
---|
669 | 785 | //frame.setVisible(true); |
---|
670 | 786 | } |
---|
671 | | - |
---|
672 | | - cameraView.ToggleFullScreen(); |
---|
673 | 787 | } |
---|
674 | 788 | |
---|
675 | 789 | private JTextPane createTextPane() |
---|
.. | .. |
---|
810 | 924 | JCheckBox speedupCB; |
---|
811 | 925 | JCheckBox rewindCB; |
---|
812 | 926 | JCheckBox flipVCB; |
---|
| 927 | + |
---|
| 928 | + cCheckBox toggleTextureCB; |
---|
| 929 | + cCheckBox toggleSwitchCB; |
---|
| 930 | + |
---|
813 | 931 | JComboBox texresMenu; |
---|
| 932 | + |
---|
814 | 933 | JButton resetButton; |
---|
815 | 934 | JButton stepButton; |
---|
816 | 935 | JButton stepAllButton; |
---|
.. | .. |
---|
819 | 938 | JButton fasterButton; |
---|
820 | 939 | JButton remarkButton; |
---|
821 | 940 | |
---|
| 941 | + cGridBag editPanel; |
---|
| 942 | + cGridBag editCommandsPanel; |
---|
| 943 | + |
---|
822 | 944 | cGridBag namePanel; |
---|
823 | 945 | cGridBag setupPanel; |
---|
824 | 946 | cGridBag setupPanel2; |
---|
825 | | - cGridBag commandsPanel; |
---|
| 947 | + cGridBag objectCommandsPanel; |
---|
826 | 948 | cGridBag pushPanel; |
---|
827 | 949 | cGridBag fillPanel; |
---|
828 | 950 | |
---|
.. | .. |
---|
999 | 1121 | |
---|
1000 | 1122 | oe.ctrlPanel.Return(); |
---|
1001 | 1123 | |
---|
1002 | | - if (!GroupEditor.allparams) |
---|
| 1124 | + if (!allparams) |
---|
1003 | 1125 | return; |
---|
1004 | 1126 | |
---|
1005 | 1127 | setupPanel = new cGridBag().setVertical(false); |
---|
.. | .. |
---|
1012 | 1134 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
1013 | 1135 | hideCB.setToolTipText("Hide object"); |
---|
1014 | 1136 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
1015 | | - markCB.setToolTipText("Set the animation target transform"); |
---|
| 1137 | + markCB.setToolTipText("As animation target transform"); |
---|
1016 | 1138 | |
---|
1017 | 1139 | setupPanel2 = new cGridBag().setVertical(false); |
---|
1018 | 1140 | |
---|
.. | .. |
---|
1020 | 1142 | rewindCB.setToolTipText("Rewind animation"); |
---|
1021 | 1143 | |
---|
1022 | 1144 | randomCB = AddCheckBox(setupPanel2, "Rand", copy.random); |
---|
1023 | | - randomCB.setToolTipText("Randomly Rewind or Go back and forth"); |
---|
| 1145 | + randomCB.setToolTipText("Randomly Rewind (or Go back and forth)"); |
---|
1024 | 1146 | |
---|
1025 | 1147 | if (Globals.ADVANCED) |
---|
1026 | 1148 | { |
---|
.. | .. |
---|
1035 | 1157 | oe.ctrlPanel.add(setupPanel2); |
---|
1036 | 1158 | oe.ctrlPanel.Return(); |
---|
1037 | 1159 | |
---|
1038 | | - commandsPanel = new cGridBag().setVertical(false); |
---|
| 1160 | + objectCommandsPanel = new cGridBag().setVertical(false); |
---|
1039 | 1161 | |
---|
1040 | | - resetButton = AddButton(commandsPanel, "Reset"); |
---|
| 1162 | + resetButton = AddButton(objectCommandsPanel, "Reset"); |
---|
1041 | 1163 | resetButton.setToolTipText("Jump to frame zero"); |
---|
1042 | | - stepButton = AddButton(commandsPanel, "Step"); |
---|
| 1164 | + stepButton = AddButton(objectCommandsPanel, "Step"); |
---|
1043 | 1165 | stepButton.setToolTipText("Step one frame"); |
---|
1044 | 1166 | // resetAllButton = AddButton(oe, "Reset All"); |
---|
1045 | 1167 | // stepAllButton = AddButton(oe, "Step All"); |
---|
1046 | 1168 | // Return(); |
---|
1047 | | - slowerButton = AddButton(commandsPanel, "Slow"); |
---|
| 1169 | + slowerButton = AddButton(objectCommandsPanel, "Slow"); |
---|
1048 | 1170 | slowerButton.setToolTipText("Decrease animation speed"); |
---|
1049 | | - fasterButton = AddButton(commandsPanel, "Fast"); |
---|
| 1171 | + fasterButton = AddButton(objectCommandsPanel, "Fast"); |
---|
1050 | 1172 | fasterButton.setToolTipText("Increase animation speed"); |
---|
1051 | | - remarkButton = AddButton(commandsPanel, "Remark"); |
---|
| 1173 | + remarkButton = AddButton(objectCommandsPanel, "Remark"); |
---|
1052 | 1174 | remarkButton.setToolTipText("Set the current transform as the target"); |
---|
1053 | 1175 | |
---|
1054 | | - oe.ctrlPanel.add(commandsPanel); |
---|
| 1176 | + oe.ctrlPanel.add(objectCommandsPanel); |
---|
1055 | 1177 | oe.ctrlPanel.Return(); |
---|
1056 | 1178 | |
---|
1057 | 1179 | pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
.. | .. |
---|
1340 | 1462 | // north.setName("Edit"); |
---|
1341 | 1463 | // north.add(ctrlPanel, BorderLayout.NORTH); |
---|
1342 | 1464 | // objectPanel.add(north); |
---|
1343 | | - objectPanel.add(ctrlPanel); |
---|
| 1465 | + objectPanel.add(editPanel); |
---|
1344 | 1466 | objectPanel.add(infoPanel); |
---|
| 1467 | + objectPanel.add(toolboxPanel); |
---|
1345 | 1468 | |
---|
1346 | 1469 | /* |
---|
1347 | 1470 | aConstraints.gridx = 0; |
---|
.. | .. |
---|
1350 | 1473 | aConstraints.gridy += 1; |
---|
1351 | 1474 | aConstraints.gridwidth = 1; |
---|
1352 | 1475 | mainPanel.add(objectPanel, aConstraints); |
---|
1353 | | - */ |
---|
| 1476 | + */ |
---|
1354 | 1477 | |
---|
1355 | 1478 | scrollpane = new JScrollPane(mainPanel, ScrollPaneConstants.// VERTICAL_SCROLLBAR_ALWAYS, |
---|
1356 | 1479 | VERTICAL_SCROLLBAR_AS_NEEDED, |
---|
.. | .. |
---|
1367 | 1490 | JTabbedPane tabbedPane = new JTabbedPane(); |
---|
1368 | 1491 | tabbedPane.add(scrollpane); |
---|
1369 | 1492 | |
---|
1370 | | - tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
1371 | | - |
---|
1372 | | - optionsPanel = new cGridBag().setVertical(true); |
---|
| 1493 | + optionsPanel = new cGridBag().setVertical(false); |
---|
1373 | 1494 | |
---|
1374 | 1495 | optionsPanel.setName("Options"); |
---|
1375 | 1496 | |
---|
.. | .. |
---|
1377 | 1498 | |
---|
1378 | 1499 | tabbedPane.add(optionsPanel); |
---|
1379 | 1500 | |
---|
| 1501 | + tabbedPane.add(FSPane = new cFileSystemPane(this)); |
---|
| 1502 | + |
---|
1380 | 1503 | scenePanel.add(tabbedPane); |
---|
1381 | 1504 | |
---|
1382 | 1505 | /* |
---|
.. | .. |
---|
1469 | 1592 | // aConstraints = gbc; // (GridBagConstraints) GrafreeD.clone(gbc); |
---|
1470 | 1593 | |
---|
1471 | 1594 | frame.setSize(1280, 860); |
---|
| 1595 | + |
---|
| 1596 | + frame.validate(); |
---|
1472 | 1597 | frame.setVisible(true); |
---|
1473 | 1598 | |
---|
1474 | 1599 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
2788 | 2913 | |
---|
2789 | 2914 | void SetMaterial(Object3D object) |
---|
2790 | 2915 | { |
---|
| 2916 | + latestObject = object; |
---|
| 2917 | + |
---|
2791 | 2918 | cMaterial mat = object.material; |
---|
2792 | 2919 | |
---|
2793 | 2920 | if (mat == null) |
---|
.. | .. |
---|
2899 | 3026 | // } |
---|
2900 | 3027 | |
---|
2901 | 3028 | /**/ |
---|
2902 | | - if (deselect) |
---|
| 3029 | + if (deselect || child == null) |
---|
2903 | 3030 | { |
---|
2904 | 3031 | //group.deselectAll(); |
---|
2905 | 3032 | //freeze = true; |
---|
2906 | 3033 | GetTree().clearSelection(); |
---|
2907 | 3034 | //freeze = false; |
---|
| 3035 | + |
---|
| 3036 | + if (child == null) |
---|
| 3037 | + { |
---|
| 3038 | + return; |
---|
| 3039 | + } |
---|
2908 | 3040 | } |
---|
2909 | 3041 | |
---|
2910 | 3042 | //group.addSelectee(child); |
---|
.. | .. |
---|
2973 | 3105 | cameraView.ToggleDL(); |
---|
2974 | 3106 | cameraView.repaint(); |
---|
2975 | 3107 | return; |
---|
2976 | | - } else if (event.getSource() == toggleTextureItem) |
---|
| 3108 | + } else if (event.getSource() == toggleTextureItem || event.getSource() == toggleTextureCB) |
---|
2977 | 3109 | { |
---|
2978 | 3110 | cameraView.ToggleTexture(); |
---|
2979 | 3111 | // june 2013 copy.HardTouch(); |
---|
.. | .. |
---|
3012 | 3144 | frame.validate(); |
---|
3013 | 3145 | |
---|
3014 | 3146 | return; |
---|
3015 | | - } else if (event.getSource() == toggleSwitchItem) |
---|
| 3147 | + } else if (event.getSource() == toggleSwitchItem || event.getSource() == toggleSwitchCB) |
---|
3016 | 3148 | { |
---|
3017 | 3149 | cameraView.ToggleSwitch(); |
---|
3018 | 3150 | cameraView.repaint(); |
---|
.. | .. |
---|
3396 | 3528 | |
---|
3397 | 3529 | public void Save() |
---|
3398 | 3530 | { |
---|
| 3531 | + System.err.println("Save"); |
---|
| 3532 | + |
---|
3399 | 3533 | cRadio tab = GetCurrentTab(); |
---|
3400 | 3534 | |
---|
3401 | 3535 | boolean temp = CameraPane.SWITCH; |
---|
.. | .. |
---|
3417 | 3551 | tab.graphs[i] = null; |
---|
3418 | 3552 | } |
---|
3419 | 3553 | |
---|
| 3554 | + SetUndoStates(); |
---|
| 3555 | + |
---|
3420 | 3556 | // test save |
---|
3421 | 3557 | if (false) |
---|
3422 | 3558 | { |
---|
.. | .. |
---|
3439 | 3575 | |
---|
3440 | 3576 | void CopyChanged(Object3D obj) |
---|
3441 | 3577 | { |
---|
| 3578 | + SetUndoStates(); |
---|
| 3579 | + |
---|
3442 | 3580 | boolean temp = CameraPane.SWITCH; |
---|
3443 | 3581 | CameraPane.SWITCH = false; |
---|
3444 | 3582 | |
---|
.. | .. |
---|
3478 | 3616 | refreshContents(); |
---|
3479 | 3617 | } |
---|
3480 | 3618 | |
---|
| 3619 | + cButton undoButton; |
---|
| 3620 | + cButton redoButton; |
---|
| 3621 | + |
---|
| 3622 | + void SetUndoStates() |
---|
| 3623 | + { |
---|
| 3624 | + cRadio tab = GetCurrentTab(); |
---|
| 3625 | + |
---|
| 3626 | + undoButton.setEnabled(tab.undoindex > 0); |
---|
| 3627 | + redoButton.setEnabled(tab.graphs[tab.undoindex + 1] != null); |
---|
| 3628 | + } |
---|
| 3629 | + |
---|
3481 | 3630 | public void Undo() |
---|
3482 | 3631 | { |
---|
| 3632 | + System.err.println("Undo"); |
---|
| 3633 | + |
---|
3483 | 3634 | cRadio tab = GetCurrentTab(); |
---|
3484 | 3635 | |
---|
3485 | 3636 | if (tab.undoindex == 0) |
---|
.. | .. |
---|
3663 | 3814 | assert false; |
---|
3664 | 3815 | } |
---|
3665 | 3816 | |
---|
3666 | | - void EditSelection() |
---|
| 3817 | + void EditSelection(boolean newWindow) |
---|
3667 | 3818 | { |
---|
3668 | 3819 | } |
---|
3669 | 3820 | |
---|
.. | .. |
---|
4158 | 4309 | |
---|
4159 | 4310 | void makeSomething(Object3D thing, boolean resetmodel) // deselect) |
---|
4160 | 4311 | { |
---|
4161 | | - Save(); |
---|
| 4312 | + if (Globals.SAVEONMAKE) // && resetmodel) |
---|
| 4313 | + Save(); |
---|
4162 | 4314 | //Tween.set(thing, 0).target(1).start(tweenManager); |
---|
4163 | 4315 | //Tween.to(thing, 0, 0.5f).target(0).start(tweenManager); |
---|
4164 | 4316 | // if (thing instanceof GenericJointDemo) |
---|
.. | .. |
---|
4245 | 4397 | { |
---|
4246 | 4398 | ResetModel(); |
---|
4247 | 4399 | Select(thing.GetTreePath(), true, false); // unselect... false); |
---|
| 4400 | + |
---|
| 4401 | + if (thing.Size() == 0) |
---|
| 4402 | + { |
---|
| 4403 | + //EditSelection(false); |
---|
| 4404 | + } |
---|
| 4405 | + |
---|
4248 | 4406 | refreshContents(); |
---|
4249 | 4407 | } |
---|
4250 | 4408 | |
---|
.. | .. |
---|
4467 | 4625 | |
---|
4468 | 4626 | if (readobj != null) |
---|
4469 | 4627 | { |
---|
| 4628 | + if (Globals.SAVEONMAKE) |
---|
4470 | 4629 | Save(); |
---|
4471 | 4630 | try |
---|
4472 | 4631 | { |
---|
.. | .. |
---|
4645 | 4804 | String filename = browser.getFile(); |
---|
4646 | 4805 | if (filename != null && filename.length() > 0) |
---|
4647 | 4806 | { |
---|
| 4807 | + if (!filename.endsWith(".gfd")) |
---|
| 4808 | + filename += ".gfd"; |
---|
4648 | 4809 | lastname = browser.getDirectory() + filename; |
---|
4649 | 4810 | save(); |
---|
4650 | 4811 | } |
---|
.. | .. |
---|
4838 | 4999 | CheckboxMenuItem togglePaintItem; |
---|
4839 | 5000 | JSplitPane mainPanel; |
---|
4840 | 5001 | JScrollPane scrollpane; |
---|
| 5002 | + |
---|
4841 | 5003 | JPanel toolbarPanel; |
---|
| 5004 | + |
---|
4842 | 5005 | cGridBag treePanel; |
---|
| 5006 | + |
---|
4843 | 5007 | JPanel radioPanel; |
---|
4844 | 5008 | ButtonGroup buttonGroup; |
---|
4845 | | - cGridBag ctrlPanel; |
---|
| 5009 | + |
---|
| 5010 | + cGridBag toolboxPanel; |
---|
4846 | 5011 | cGridBag materialPanel; |
---|
| 5012 | + cGridBag ctrlPanel; |
---|
| 5013 | + |
---|
4847 | 5014 | JScrollPane infoPanel; |
---|
| 5015 | + |
---|
4848 | 5016 | cGridBag optionsPanel; |
---|
| 5017 | + |
---|
4849 | 5018 | JTabbedPane objectPanel; |
---|
| 5019 | + boolean materialFlushed; |
---|
| 5020 | + Object3D latestObject; |
---|
| 5021 | + |
---|
4850 | 5022 | cGridBag XYZPanel; |
---|
| 5023 | + |
---|
4851 | 5024 | JSplitPane gridPanel; |
---|
4852 | 5025 | JSplitPane bigPanel; |
---|
| 5026 | + |
---|
4853 | 5027 | cGridBag bigThree; |
---|
4854 | 5028 | cGridBag scenePanel; |
---|
4855 | 5029 | cGridBag centralPanel; |
---|
.. | .. |
---|
4964 | 5138 | cNumberSlider fogField; |
---|
4965 | 5139 | JLabel opacityPowerLabel; |
---|
4966 | 5140 | cNumberSlider opacityPowerField; |
---|
4967 | | - JTree jTree; |
---|
| 5141 | + cTree jTree; |
---|
4968 | 5142 | //ObjectUI parent; |
---|
4969 | 5143 | |
---|
4970 | 5144 | cNumberSlider normalpushField; |
---|