.. | .. |
---|
28 | 28 | iSendInfo |
---|
29 | 29 | //KeyListener |
---|
30 | 30 | { |
---|
| 31 | + boolean timeline; |
---|
| 32 | + boolean wasFullScreen; |
---|
31 | 33 | |
---|
32 | 34 | // SCRIPT |
---|
33 | 35 | |
---|
.. | .. |
---|
158 | 160 | objEditor.ctrlPanel.remove(slowerButton); |
---|
159 | 161 | objEditor.ctrlPanel.remove(fasterButton); |
---|
160 | 162 | objEditor.ctrlPanel.remove(remarkButton); |
---|
| 163 | + |
---|
| 164 | + Remove(normalpushField); |
---|
161 | 165 | } |
---|
162 | 166 | |
---|
163 | 167 | public ObjEditor GetEditor() |
---|
164 | 168 | { |
---|
165 | 169 | return objEditor; //.GetEditor(); |
---|
166 | 170 | } |
---|
| 171 | + |
---|
| 172 | + // Sometimes myself, sometimes my callee's. |
---|
167 | 173 | ObjEditor objEditor; |
---|
168 | 174 | |
---|
169 | 175 | /* |
---|
.. | .. |
---|
238 | 244 | //if (!isDisplayable()) |
---|
239 | 245 | //setUndecorated(true); |
---|
240 | 246 | |
---|
241 | | - System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
| 247 | + //System.out.println("getFullScreenWindow? " + gd.getFullScreenWindow()); |
---|
242 | 248 | client = inClient; |
---|
243 | 249 | copy = localCopy; |
---|
244 | 250 | copy.editWindow = this; |
---|
.. | .. |
---|
292 | 298 | //normalLensItem.addActionListener(this); |
---|
293 | 299 | cameraMenu.add(revertCameraItem = new MenuItem("Revert Camera")); |
---|
294 | 300 | revertCameraItem.addActionListener(this); |
---|
295 | | - cameraMenu.add(toggleFullItem = new CheckboxMenuItem("Full Screen")); |
---|
296 | | - toggleFullItem.addItemListener(this); |
---|
297 | | - toggleFullItem.setState(CameraPane.FULLSCREEN); |
---|
| 301 | + cameraMenu.add(toggleTimelineItem = new CheckboxMenuItem("Timeline")); |
---|
| 302 | + toggleTimelineItem.addItemListener(this); |
---|
| 303 | + cameraMenu.add(toggleFullScreenItem = new CheckboxMenuItem("Full Screen")); |
---|
| 304 | + toggleFullScreenItem.addItemListener(this); |
---|
| 305 | + toggleFullScreenItem.setState(CameraPane.FULLSCREEN); |
---|
298 | 306 | cameraMenu.add("-"); |
---|
299 | 307 | cameraMenu.add(toggleTextureItem = new CheckboxMenuItem("Texture")); |
---|
300 | 308 | toggleTextureItem.addItemListener(this); |
---|
.. | .. |
---|
522 | 530 | maxima.y = sel.toParent[3][1]; |
---|
523 | 531 | maxima.z = sel.toParent[3][2]; |
---|
524 | 532 | si.SendInfo(" Orig: " + maxima, "regular"); |
---|
525 | | - maxima.x = sel.globalTransform[3][0]; |
---|
526 | | - maxima.y = sel.globalTransform[3][1]; |
---|
527 | | - maxima.z = sel.globalTransform[3][2]; |
---|
528 | | - if (full) |
---|
529 | | - si.SendInfo(" Global Orig: " + maxima, "regular"); |
---|
530 | 533 | maxima.x = sel.toParent[0][0]; |
---|
531 | 534 | maxima.y = sel.toParent[1][1]; |
---|
532 | 535 | maxima.z = sel.toParent[2][2]; |
---|
533 | 536 | si.SendInfo(" Scale: " + maxima, "regular"); |
---|
534 | | - maxima.x = sel.globalTransform[0][0]; |
---|
535 | | - maxima.y = sel.globalTransform[1][1]; |
---|
536 | | - maxima.z = sel.globalTransform[2][2]; |
---|
| 537 | + maxima.x = sel.globalTransform[3][0]; |
---|
| 538 | + maxima.y = sel.globalTransform[3][1]; |
---|
| 539 | + maxima.z = sel.globalTransform[3][2]; |
---|
| 540 | + if (full) |
---|
| 541 | + si.SendInfo(" Global Orig: " + maxima, "regular"); |
---|
| 542 | + maxima.x = sel.globalTransform[0][0]; |
---|
| 543 | + maxima.y = sel.globalTransform[1][1]; |
---|
| 544 | + maxima.z = sel.globalTransform[2][2]; |
---|
537 | 545 | if (full) |
---|
538 | 546 | si.SendInfo(" Global Scale: " + maxima, "regular"); |
---|
539 | 547 | } |
---|
.. | .. |
---|
593 | 601 | System.err.println("Couldn't insert initial text into text pane."); |
---|
594 | 602 | } |
---|
595 | 603 | } |
---|
| 604 | + |
---|
| 605 | + void ToggleFullScreen() |
---|
| 606 | + { |
---|
| 607 | + if (CameraPane.FULLSCREEN) |
---|
| 608 | + { |
---|
| 609 | + frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
| 610 | + framePanel.add(bigThree); |
---|
| 611 | + frame.getContentPane().add(/*"Center",*/framePanel); |
---|
| 612 | + } else |
---|
| 613 | + { |
---|
| 614 | + frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
| 615 | + framePanel.remove(bigThree); |
---|
| 616 | + frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 617 | + } |
---|
| 618 | + cameraView.ToggleFullScreen(); |
---|
| 619 | + } |
---|
596 | 620 | |
---|
597 | 621 | private JTextArea createTextPane() |
---|
598 | 622 | { |
---|
.. | .. |
---|
794 | 818 | |
---|
795 | 819 | aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
796 | 820 | jlabel.setHorizontalAlignment(SwingConstants.TRAILING); |
---|
797 | | - aConstraints.gridwidth = 2; |
---|
| 821 | + aConstraints.gridwidth = 1; |
---|
798 | 822 | ctrlPanel.add(jlabel, aConstraints); //, oe.ctrlPanel.getComponentCount()-1); |
---|
799 | 823 | aConstraints.gridx += 1; |
---|
800 | 824 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
.. | .. |
---|
963 | 987 | |
---|
964 | 988 | Return(); |
---|
965 | 989 | |
---|
| 990 | + normalpushField = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, -1); |
---|
| 991 | + Return(); |
---|
| 992 | + |
---|
966 | 993 | // oe.ctrlPanel.add(stepButton = new cButton("Step"), ObjEditor.aConstraints, oe.ctrlPanel.getComponentCount() - 2); |
---|
967 | 994 | // ObjEditor.aConstraints.gridx += 1; |
---|
968 | 995 | |
---|
.. | .. |
---|
1158 | 1185 | //JPanel worldPanel = |
---|
1159 | 1186 | // new gov.nasa.worldwind.examples.ApplicationTemplate.AppPanel(null, true); |
---|
1160 | 1187 | //worldPanel.setName("World"); |
---|
1161 | | - /*JPanel*/ cameraPanel = |
---|
1162 | | - new JPanel(new BorderLayout()); |
---|
1163 | | - cameraPanel.add(cameraView); |
---|
| 1188 | + centralPanel = new JPanel(new BorderLayout()); |
---|
| 1189 | + timelinePanel = new JPanel(new BorderLayout()); |
---|
| 1190 | + timelineMenubar = new timeflow.app.TimeflowApp().TimeFlowWindow(timelinePanel); |
---|
1164 | 1191 | |
---|
| 1192 | + centralPanel.add(cameraView); |
---|
| 1193 | + //frame.setJMenuBar(timelineMenubar); |
---|
| 1194 | + //centralPanel.add(timelinePanel); |
---|
| 1195 | + |
---|
1165 | 1196 | //topView.camera = ; |
---|
1166 | 1197 | //frontView.camera = new Camera(2); |
---|
1167 | 1198 | //sideView.camera = new Camera(3); |
---|
.. | .. |
---|
1191 | 1222 | gridPanel.add(cameraView); |
---|
1192 | 1223 | gridPanel.add(XYZPanel); |
---|
1193 | 1224 | */ |
---|
1194 | | - gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, cameraPanel, XYZPanel); //new BorderLayout()); |
---|
| 1225 | + gridPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, centralPanel, XYZPanel); //new BorderLayout()); |
---|
1195 | 1226 | gridPanel.setContinuousLayout(true); |
---|
1196 | 1227 | gridPanel.setOneTouchExpandable(true); |
---|
1197 | 1228 | gridPanel.setDividerLocation(1.0); |
---|
.. | .. |
---|
1244 | 1275 | scrollpane.setWheelScrollingEnabled(true); |
---|
1245 | 1276 | scrollpane.addMouseWheelListener(this); // Default not fast enough |
---|
1246 | 1277 | |
---|
1247 | | - /*JTabbedPane*/ jtp = new JTabbedPane(); |
---|
1248 | | - jtp.add(scrollpane); |
---|
| 1278 | + /*JTabbedPane*/ scenePanel = new JTabbedPane(); |
---|
| 1279 | + scenePanel.add(scrollpane); |
---|
1249 | 1280 | |
---|
1250 | | - jtp.add(FSPane = new cFileSystemPane(this)); |
---|
| 1281 | + scenePanel.add(FSPane = new cFileSystemPane(this)); |
---|
1251 | 1282 | |
---|
1252 | 1283 | optionsPanel = new JPanel(new GridBagLayout()); |
---|
1253 | 1284 | |
---|
1254 | 1285 | optionsPanel.setName("Options"); |
---|
1255 | | - jtp.add(optionsPanel); |
---|
| 1286 | + scenePanel.add(optionsPanel); |
---|
1256 | 1287 | |
---|
1257 | 1288 | |
---|
1258 | 1289 | /* |
---|
.. | .. |
---|
1275 | 1306 | jtp.add(tree); |
---|
1276 | 1307 | */ |
---|
1277 | 1308 | |
---|
1278 | | - bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, jtp, gridPanel); |
---|
| 1309 | + bigPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, scenePanel, gridPanel); |
---|
1279 | 1310 | bigPanel.setContinuousLayout(true); |
---|
1280 | 1311 | bigPanel.setOneTouchExpandable(true); |
---|
1281 | 1312 | bigPanel.setDividerLocation(0.8); |
---|
.. | .. |
---|
1297 | 1328 | aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
1298 | 1329 | aWindowConstraints.weightx = 0; |
---|
1299 | 1330 | aWindowConstraints.weighty = 1; |
---|
1300 | | - bigThree.add(jtp, aWindowConstraints); |
---|
| 1331 | + bigThree.add(scenePanel, aWindowConstraints); |
---|
1301 | 1332 | aWindowConstraints.weightx = 1; |
---|
1302 | 1333 | aWindowConstraints.gridwidth = 3; |
---|
1303 | 1334 | // aConstraints.gridheight = 3; |
---|
1304 | 1335 | aWindowConstraints.gridx = 1; |
---|
1305 | 1336 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
1306 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 1337 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
1307 | 1338 | aWindowConstraints.weightx = 0; |
---|
1308 | 1339 | aWindowConstraints.gridx = 4; |
---|
1309 | 1340 | aWindowConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1422 | 1453 | aConstraints.gridx += 1; |
---|
1423 | 1454 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1424 | 1455 | //aConstraints.weightx = 0; |
---|
1425 | | - ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1456 | + ctrlPanel.add(colorField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1426 | 1457 | aConstraints.gridx = 0; |
---|
1427 | 1458 | aConstraints.gridy += 1; |
---|
1428 | 1459 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1432 | 1463 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1433 | 1464 | aConstraints.gridx += 1; |
---|
1434 | 1465 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1435 | | - ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1466 | + ctrlPanel.add(modulationField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1436 | 1467 | aConstraints.gridx = 0; |
---|
1437 | 1468 | aConstraints.gridy += 1; |
---|
1438 | 1469 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1442 | 1473 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1443 | 1474 | aConstraints.gridx += 1; |
---|
1444 | 1475 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1445 | | - ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1476 | + ctrlPanel.add(textureField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1446 | 1477 | aConstraints.gridx = 0; |
---|
1447 | 1478 | aConstraints.gridy += 1; |
---|
1448 | 1479 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1452 | 1483 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1453 | 1484 | aConstraints.gridx += 1; |
---|
1454 | 1485 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1455 | | - ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1486 | + ctrlPanel.add(anisoField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1456 | 1487 | aConstraints.gridx = 0; |
---|
1457 | 1488 | aConstraints.gridy += 1; |
---|
1458 | 1489 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1462 | 1493 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1463 | 1494 | aConstraints.gridx += 1; |
---|
1464 | 1495 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1465 | | - ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1496 | + ctrlPanel.add(anisoVField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1466 | 1497 | aConstraints.gridx = 0; |
---|
1467 | 1498 | aConstraints.gridy += 1; |
---|
1468 | 1499 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1531 | 1562 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1532 | 1563 | aConstraints.gridx += 1; |
---|
1533 | 1564 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1534 | | - ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1565 | + ctrlPanel.add(subsurfaceField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1535 | 1566 | aConstraints.gridx = 0; |
---|
1536 | 1567 | aConstraints.gridy += 1; |
---|
1537 | 1568 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1600 | 1631 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1601 | 1632 | aConstraints.gridx += 1; |
---|
1602 | 1633 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1603 | | - ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1634 | + ctrlPanel.add(metalnessField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1604 | 1635 | aConstraints.gridx = 0; |
---|
1605 | 1636 | aConstraints.gridy += 1; |
---|
1606 | 1637 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1671 | 1702 | aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
1672 | 1703 | aConstraints.gridx += 1; |
---|
1673 | 1704 | aConstraints.gridwidth = ObjEditor.GRIDWIDTH; |
---|
1674 | | - ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.1), aConstraints); |
---|
| 1705 | + ctrlPanel.add(opacityField = new NumberSlider(0.001, 1, -0.5), aConstraints); |
---|
1675 | 1706 | aConstraints.gridx = 0; |
---|
1676 | 1707 | aConstraints.gridy += 1; |
---|
1677 | 1708 | aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
1859 | 1890 | } |
---|
1860 | 1891 | |
---|
1861 | 1892 | // Images/textures |
---|
1862 | | - if (textures |
---|
1863 | | - && (filename.toLowerCase().endsWith(".jpg") |
---|
1864 | | - || filename.toLowerCase().endsWith(".jpeg") |
---|
1865 | | - || filename.toLowerCase().endsWith(".gif") |
---|
1866 | | - || filename.toLowerCase().endsWith(".png") |
---|
1867 | | - || filename.toLowerCase().endsWith(".tre") |
---|
1868 | | - || filename.toLowerCase().endsWith(".bmp") |
---|
1869 | | - || filename.toLowerCase().endsWith(".tga") |
---|
1870 | | - || filename.toLowerCase().endsWith(".sgi") |
---|
1871 | | - || filename.toLowerCase().endsWith(".tif") |
---|
1872 | | - || filename.toLowerCase().endsWith(".tiff"))) |
---|
| 1893 | + if (filename.toLowerCase().endsWith(".jpg") |
---|
| 1894 | + || filename.toLowerCase().endsWith(".jpeg") |
---|
| 1895 | + || filename.toLowerCase().endsWith(".gif") |
---|
| 1896 | + || filename.toLowerCase().endsWith(".png") |
---|
| 1897 | + || filename.toLowerCase().endsWith(".tre") |
---|
| 1898 | + || filename.toLowerCase().endsWith(".bmp") |
---|
| 1899 | + || filename.toLowerCase().endsWith(".tga") |
---|
| 1900 | + || filename.toLowerCase().endsWith(".sgi") |
---|
| 1901 | + || filename.toLowerCase().endsWith(".tif") |
---|
| 1902 | + || filename.toLowerCase().endsWith(".tiff")) |
---|
1873 | 1903 | { |
---|
1874 | | - DropTexture(filename); |
---|
| 1904 | + if (textures) |
---|
| 1905 | + DropTexture(filename); |
---|
| 1906 | + else |
---|
| 1907 | + CreateBillboard(filename); |
---|
1875 | 1908 | continue; |
---|
1876 | 1909 | } |
---|
1877 | 1910 | |
---|
.. | .. |
---|
1880 | 1913 | } |
---|
1881 | 1914 | |
---|
1882 | 1915 | ResetModel(); |
---|
| 1916 | + } |
---|
| 1917 | + |
---|
| 1918 | + void CreateBillboard(String filename) |
---|
| 1919 | + { |
---|
| 1920 | + Object3D source = null; |
---|
| 1921 | + Object3D group = copy; |
---|
| 1922 | + |
---|
| 1923 | + if (group.selection.size() > 0) |
---|
| 1924 | + { |
---|
| 1925 | + source = group.selection.get(0); |
---|
| 1926 | + } |
---|
| 1927 | + |
---|
| 1928 | + Grid grid = new Grid(1,1); |
---|
| 1929 | + grid.material = null; |
---|
| 1930 | + |
---|
| 1931 | + grid.toParent = LA.newMatrix(); |
---|
| 1932 | + grid.fromParent = LA.newMatrix(); |
---|
| 1933 | + LA.matYRotate(grid.toParent, Math.PI/2); |
---|
| 1934 | + LA.matXRotate(grid.toParent, -Math.PI/2); |
---|
| 1935 | + LA.matXRotate(grid.fromParent, Math.PI/2); |
---|
| 1936 | + LA.matYRotate(grid.fromParent, -Math.PI/2); |
---|
| 1937 | + |
---|
| 1938 | + BillboardNode bb = new BillboardNode(); |
---|
| 1939 | + bb.addChild(grid); |
---|
| 1940 | + |
---|
| 1941 | + Object3D newgroup = new Object3D(); |
---|
| 1942 | + newgroup.CreateMaterial(); |
---|
| 1943 | + |
---|
| 1944 | + File file = new File(filename); |
---|
| 1945 | + newgroup.name = file.getName(); |
---|
| 1946 | + newgroup.addChild(bb); |
---|
| 1947 | + |
---|
| 1948 | + Object3D main = newgroup; |
---|
| 1949 | + |
---|
| 1950 | + main.SetPigmentTexture(filename); |
---|
| 1951 | + |
---|
| 1952 | + if (source != null) |
---|
| 1953 | + { |
---|
| 1954 | + main.material = new cMaterial(source.material); |
---|
| 1955 | + if (main.projectedVertices.length < source.projectedVertices.length) |
---|
| 1956 | + { |
---|
| 1957 | + main.projectedVertices = new Object3D.cVector2[source.projectedVertices.length]; |
---|
| 1958 | + } |
---|
| 1959 | + |
---|
| 1960 | + for (int i=0; i<source.projectedVertices.length; i++) |
---|
| 1961 | + { |
---|
| 1962 | + main.projectedVertices[i].x = source.projectedVertices[i].x; |
---|
| 1963 | + main.projectedVertices[i].y = source.projectedVertices[i].y; |
---|
| 1964 | + } |
---|
| 1965 | + |
---|
| 1966 | + main.texres = source.texres; |
---|
| 1967 | + } |
---|
| 1968 | + |
---|
| 1969 | + makeSomething(newgroup, false); |
---|
1883 | 1970 | } |
---|
1884 | 1971 | |
---|
1885 | 1972 | Point location; |
---|
.. | .. |
---|
2138 | 2225 | { |
---|
2139 | 2226 | Mocap sel = (Mocap) copy.selection.get(0); |
---|
2140 | 2227 | |
---|
| 2228 | + sel.SetCurrentBones(sel.frame); |
---|
| 2229 | + |
---|
2141 | 2230 | sel.fullname = fullname; |
---|
2142 | 2231 | |
---|
2143 | 2232 | if (changename) |
---|
.. | .. |
---|
2151 | 2240 | sel.smoothed = false; |
---|
2152 | 2241 | |
---|
2153 | 2242 | // if (!changename) |
---|
2154 | | - sel.SetPositionDelta(false, true, true, true/*?*/); // false |
---|
| 2243 | + //sel.SetPositionDelta(false, true, true, true/*?*/); // false |
---|
| 2244 | + sel.SetGlobalTransform(); |
---|
| 2245 | + sel.LoadData(); |
---|
| 2246 | + sel.Rewind(); |
---|
| 2247 | + sel.Fade(); |
---|
2155 | 2248 | // sel.setPose(0); |
---|
2156 | 2249 | refreshContents(); |
---|
2157 | 2250 | } else |
---|
2158 | 2251 | { |
---|
2159 | 2252 | mocap.Reset(); |
---|
2160 | 2253 | // new skeleton |
---|
2161 | | - makeSomething(mocap, false); // true); |
---|
| 2254 | + makeSomething(mocap, true); // true); |
---|
2162 | 2255 | } |
---|
2163 | 2256 | } catch (Exception e) |
---|
2164 | 2257 | { |
---|
.. | .. |
---|
2185 | 2278 | { |
---|
2186 | 2279 | Mocap sel = (Mocap) select; |
---|
2187 | 2280 | |
---|
| 2281 | + sel.SetCurrentBones(sel.frame); |
---|
| 2282 | + |
---|
2188 | 2283 | File file = new File(fullname); |
---|
2189 | 2284 | |
---|
2190 | 2285 | // Mocap mocap = new Mocap("Mocap" + file.getName()); |
---|
.. | .. |
---|
2251 | 2346 | |
---|
2252 | 2347 | if (!changename) |
---|
2253 | 2348 | { |
---|
2254 | | - sel.SetPositionDelta(false, true, true, true/*?*/); |
---|
| 2349 | + //sel.SetPositionDelta(false, true, true, true/*?*/); |
---|
| 2350 | + sel.SetGlobalTransform(); |
---|
| 2351 | + sel.LoadData(); |
---|
| 2352 | + sel.Rewind(); |
---|
| 2353 | + sel.Fade(); |
---|
2255 | 2354 | } |
---|
2256 | 2355 | |
---|
2257 | 2356 | // sel.setPose(0); |
---|
.. | .. |
---|
2890 | 2989 | // june 2013 copy.HardTouch(); |
---|
2891 | 2990 | cameraView.repaint(); |
---|
2892 | 2991 | return; |
---|
2893 | | - } else if (event.getSource() == toggleFullItem) |
---|
| 2992 | + } else if (event.getSource() == toggleTimelineItem) |
---|
2894 | 2993 | { |
---|
2895 | | - if (CameraPane.FULLSCREEN) |
---|
| 2994 | + timeline ^= true; |
---|
| 2995 | + |
---|
| 2996 | + if (timeline) |
---|
2896 | 2997 | { |
---|
2897 | | - frame.getContentPane().remove(/*"Center",*/bigThree); |
---|
2898 | | - framePanel.add(bigThree); |
---|
2899 | | - frame.getContentPane().add(/*"Center",*/framePanel); |
---|
2900 | | - } else |
---|
2901 | | - { |
---|
2902 | | - frame.getContentPane().remove(/*"Center",*/framePanel); |
---|
2903 | | - frame.getContentPane().add(/*"Center",*/bigThree); |
---|
| 2998 | + centralPanel.remove(cameraView); |
---|
| 2999 | + centralPanel.add(timelinePanel); |
---|
| 3000 | + frame.setJMenuBar(timelineMenubar); |
---|
| 3001 | + wasFullScreen = CameraPane.FULLSCREEN; |
---|
| 3002 | + if (!CameraPane.FULLSCREEN) |
---|
| 3003 | + ToggleFullScreen(); |
---|
| 3004 | + toggleFullScreenItem.setEnabled(false); |
---|
2904 | 3005 | } |
---|
| 3006 | + else |
---|
| 3007 | + { |
---|
| 3008 | + centralPanel.remove(timelinePanel); |
---|
| 3009 | + centralPanel.add(cameraView); |
---|
| 3010 | + frame.setJMenuBar(null); |
---|
| 3011 | + if (!wasFullScreen) |
---|
| 3012 | + ToggleFullScreen(); |
---|
| 3013 | + toggleFullScreenItem.setEnabled(true); |
---|
| 3014 | + } |
---|
| 3015 | + |
---|
2905 | 3016 | frame.validate(); |
---|
2906 | | - cameraView.ToggleFullScreen(); |
---|
| 3017 | + return; |
---|
| 3018 | + } else if (event.getSource() == toggleFullScreenItem) |
---|
| 3019 | + { |
---|
| 3020 | + ToggleFullScreen(); |
---|
| 3021 | + frame.validate(); |
---|
2907 | 3022 | |
---|
2908 | 3023 | return; |
---|
2909 | 3024 | } else if (event.getSource() == toggleRandomItem) |
---|
.. | .. |
---|
3152 | 3267 | cameraView.RevertCamera(); |
---|
3153 | 3268 | cameraView.repaint(); |
---|
3154 | 3269 | return; |
---|
3155 | | - } else if (event.getSource() == textureButton) |
---|
3156 | | - { |
---|
3157 | | - return; // true; |
---|
| 3270 | +// } else if (event.getSource() == textureButton) |
---|
| 3271 | +// { |
---|
| 3272 | +// return; // true; |
---|
3158 | 3273 | } else // combos... |
---|
3159 | 3274 | if (event.getSource() == texresMenu) |
---|
3160 | 3275 | { |
---|
.. | .. |
---|
3441 | 3556 | //System.out.println("PARENT = " + parent); |
---|
3442 | 3557 | //if (parent != null) |
---|
3443 | 3558 | // parent.applySelf(); |
---|
3444 | | - refreshContents(); |
---|
| 3559 | + if (e.getSource() == normalpushField) |
---|
| 3560 | + { |
---|
| 3561 | + objEditor.refreshContents(); |
---|
| 3562 | + //Refresh(); |
---|
| 3563 | + } |
---|
| 3564 | + else |
---|
| 3565 | + refreshContents(); |
---|
3445 | 3566 | // ??? client.refreshEditWindow(); |
---|
3446 | 3567 | } |
---|
3447 | 3568 | //else |
---|
.. | .. |
---|
3453 | 3574 | //group.name = nameField.getText(); |
---|
3454 | 3575 | //objEditor.applySelf(); |
---|
3455 | 3576 | |
---|
3456 | | - assert (objEditor == this); |
---|
| 3577 | + // OCT2018: assert (objEditor == this); |
---|
3457 | 3578 | if (copy.selection == null || copy.selection.size() == 0) |
---|
3458 | 3579 | //super.applySelf() |
---|
3459 | 3580 | ; else |
---|
.. | .. |
---|
3477 | 3598 | objEditor.copy = keep; |
---|
3478 | 3599 | } |
---|
3479 | 3600 | } |
---|
| 3601 | + |
---|
| 3602 | + if (normalpushField != null) |
---|
| 3603 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
3480 | 3604 | } |
---|
3481 | 3605 | |
---|
3482 | 3606 | void SnapObject() |
---|
3483 | 3607 | { |
---|
3484 | | - Object3D obj = (Object3D)copy.selection.elementAt(0); |
---|
3485 | | - SnapObject(obj); |
---|
| 3608 | + if (copy.selection.size() > 0) |
---|
| 3609 | + { |
---|
| 3610 | + Object3D obj = (Object3D)copy.selection.elementAt(0); |
---|
| 3611 | + SnapObject(obj); |
---|
| 3612 | + } |
---|
3486 | 3613 | } |
---|
3487 | 3614 | |
---|
3488 | 3615 | void SnapObject(Object3D obj) |
---|
.. | .. |
---|
3596 | 3723 | |
---|
3597 | 3724 | if (obj.parent != null) |
---|
3598 | 3725 | { |
---|
3599 | | - obj.parent.TransformToWorld(interest); |
---|
| 3726 | +// obj.parent.TransformToWorld(interest); |
---|
3600 | 3727 | } |
---|
3601 | 3728 | |
---|
3602 | 3729 | if (!CameraPane.TRACK) |
---|
.. | .. |
---|
4376 | 4503 | MenuItem revertCameraItem; |
---|
4377 | 4504 | CheckboxMenuItem toggleLiveItem; |
---|
4378 | 4505 | MenuItem stepItem; |
---|
4379 | | - CheckboxMenuItem toggleFullItem; |
---|
| 4506 | + CheckboxMenuItem toggleFullScreenItem; |
---|
| 4507 | + CheckboxMenuItem toggleTimelineItem; |
---|
4380 | 4508 | CheckboxMenuItem toggleRenderItem; |
---|
4381 | 4509 | CheckboxMenuItem toggleDebugItem; |
---|
4382 | 4510 | CheckboxMenuItem toggleFrustumItem; |
---|
.. | .. |
---|
4403 | 4531 | JSplitPane gridPanel; |
---|
4404 | 4532 | JSplitPane bigPanel; |
---|
4405 | 4533 | JPanel bigThree; |
---|
4406 | | - JTabbedPane jtp; |
---|
4407 | | - JPanel cameraPanel; |
---|
| 4534 | + JTabbedPane scenePanel; |
---|
| 4535 | + JPanel centralPanel; |
---|
| 4536 | + JPanel timelinePanel; |
---|
| 4537 | + JMenuBar timelineMenubar; |
---|
4408 | 4538 | JSplitPane framePanel; |
---|
4409 | 4539 | JTextArea/*Field*/ nameField; |
---|
4410 | | - cButton textureButton; |
---|
| 4540 | + //cButton textureButton; |
---|
4411 | 4541 | cButton okButton; |
---|
4412 | 4542 | cButton applyButton; |
---|
4413 | 4543 | cButton cancelButton; |
---|
.. | .. |
---|
4515 | 4645 | NumberSlider opacityPowerField; |
---|
4516 | 4646 | JTree jTree; |
---|
4517 | 4647 | //ObjectUI parent; |
---|
| 4648 | + |
---|
| 4649 | + NumberSlider normalpushField; |
---|
4518 | 4650 | } |
---|