.. | .. |
---|
483 | 483 | |
---|
484 | 484 | Object3D parent = obj.parent; |
---|
485 | 485 | obj.parent = null; |
---|
| 486 | + |
---|
486 | 487 | // Object3D support = obj.support; |
---|
487 | 488 | // obj.support = null; |
---|
488 | 489 | if (!supports) |
---|
489 | 490 | obj.SaveSupports(); |
---|
| 491 | + |
---|
490 | 492 | Object3D clone = (Object3D)Grafreed.clone(obj); |
---|
| 493 | + |
---|
| 494 | + clone.ResetUUIDs(); |
---|
| 495 | + |
---|
491 | 496 | obj.parent = parent; |
---|
492 | 497 | // obj.support = support; |
---|
493 | 498 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
557 | 562 | pasteLinkItem.addActionListener(this); |
---|
558 | 563 | pasteCloneItem = oe.jTree.popup.add(new JMenuItem("Paste clone")); |
---|
559 | 564 | pasteCloneItem.addActionListener(this); |
---|
560 | | -// CRASH pasteExpandItem = oe.jTree.popup.add(new JMenuItem("Paste expand")); |
---|
561 | | -// pasteExpandItem.addActionListener(this); |
---|
| 565 | +// CRASH |
---|
| 566 | + pasteExpandItem = oe.jTree.popup.add(new JMenuItem("Paste expand")); |
---|
| 567 | +// |
---|
| 568 | + pasteExpandItem.addActionListener(this); |
---|
562 | 569 | //menu.add("-"); |
---|
563 | 570 | oe.jTree.popup.addSeparator(); |
---|
564 | 571 | |
---|
.. | .. |
---|
796 | 803 | genNormalsCADItem.addActionListener(this); |
---|
797 | 804 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
798 | 805 | genNormalsMESHItem.addActionListener(this); |
---|
799 | | - if (Globals.ADVANCED) |
---|
| 806 | + //if (Globals.ADVANCED) |
---|
800 | 807 | { |
---|
801 | 808 | genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
802 | 809 | genNormalsMINEItem.addActionListener(this); |
---|
.. | .. |
---|
959 | 966 | currenttab.setName(tabname); |
---|
960 | 967 | //added = false; |
---|
961 | 968 | resourcecontainer.add(currenttab); |
---|
962 | | - resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
| 969 | + resourcecontainer.setToolTipTextAt(tabcount++, "Texture " + tabname); |
---|
963 | 970 | rowcount = 1; |
---|
964 | 971 | colcount = 0; |
---|
965 | 972 | texturecount = 0; |
---|
.. | .. |
---|
974 | 981 | currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname)); |
---|
975 | 982 | } |
---|
976 | 983 | |
---|
| 984 | + columns = 5; |
---|
| 985 | + |
---|
| 986 | + if (path[0].contains("D&R") || path[0].contains("Paint")) |
---|
| 987 | + columns = 4; |
---|
| 988 | + |
---|
977 | 989 | AddTextureButton(path[0], path[1], path[2], ++texturecount, currenttab); |
---|
978 | 990 | totalcount++; |
---|
979 | 991 | |
---|
.. | .. |
---|
1188 | 1200 | //clearButton.addActionListener(this); |
---|
1189 | 1201 | |
---|
1190 | 1202 | cGridBag row1 = new cGridBag(); |
---|
| 1203 | + row1.preferredHeight = 8; |
---|
1191 | 1204 | |
---|
1192 | 1205 | // INSERT |
---|
1193 | 1206 | row1.add(gridButton = GetButton("icons/grid.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
1228 | 1241 | oe.toolboxPanel.add(row1); |
---|
1229 | 1242 | |
---|
1230 | 1243 | cGridBag row2 = new cGridBag(); |
---|
| 1244 | + row2.preferredHeight = 8; |
---|
1231 | 1245 | |
---|
1232 | 1246 | row2.add(groupButton = GetButton("icons/group.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1233 | 1247 | groupButton.setToolTipText("Create group"); |
---|
.. | .. |
---|
1330 | 1344 | |
---|
1331 | 1345 | oe.treePanel.add(versionManagerPanel); |
---|
1332 | 1346 | oe.treePanel.Return(); |
---|
| 1347 | + |
---|
1333 | 1348 | versionSliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
1334 | 1349 | versionSlider = (cNumberSlider)versionSliderPane.getComponent(1); |
---|
1335 | 1350 | versionSliderPane.preferredHeight = 3; |
---|
.. | .. |
---|
1389 | 1404 | // supportCB.setToolTipText("Enable rigging"); |
---|
1390 | 1405 | // supportCB.addItemListener(this); |
---|
1391 | 1406 | |
---|
1392 | | - panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 1407 | + panel.add(freezeCB = new cCheckBox("Fast cam", Globals.FREEZEONMOVE)); //, constraints); |
---|
1393 | 1408 | freezeCB.setToolTipText("Fast moving camera"); |
---|
1394 | 1409 | freezeCB.addItemListener(this); |
---|
1395 | 1410 | |
---|
.. | .. |
---|
1398 | 1413 | |
---|
1399 | 1414 | panel.Return(); |
---|
1400 | 1415 | |
---|
| 1416 | + if (Globals.ADVANCED) |
---|
| 1417 | + { |
---|
1401 | 1418 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
1402 | 1419 | crowdCB.setToolTipText("Used for crowds"); |
---|
1403 | 1420 | crowdCB.addItemListener(this); |
---|
| 1421 | + } |
---|
1404 | 1422 | |
---|
1405 | 1423 | panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
1406 | 1424 | smoothCB.setToolTipText("Snapping delay"); |
---|
.. | .. |
---|
1413 | 1431 | minshaderCB.setToolTipText("Minimal fast shader"); |
---|
1414 | 1432 | minshaderCB.addItemListener(this); |
---|
1415 | 1433 | |
---|
1416 | | -// constraints.gridy += 1; |
---|
1417 | 1434 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
1418 | 1435 | // speakerMocapCB.addItemListener(this); |
---|
1419 | 1436 | |
---|
1420 | | - panel.Return(); |
---|
1421 | | - |
---|
1422 | 1437 | if (false) |
---|
1423 | 1438 | { |
---|
1424 | 1439 | // handled in scripts |
---|
1425 | | - //constraints.gridy += 1; |
---|
1426 | 1440 | panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
1427 | 1441 | speakerCameraCB.addItemListener(this); |
---|
1428 | 1442 | |
---|
1429 | | - //constraints.gridy += 1; |
---|
1430 | 1443 | panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
1431 | 1444 | speakerFocusCB.addItemListener(this); |
---|
1432 | 1445 | |
---|
1433 | | - //constraints.gridy += 1; |
---|
1434 | | - panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
1435 | | - smoothfocusCB.addItemListener(this); |
---|
1436 | 1446 | panel.Return(); |
---|
1437 | 1447 | } |
---|
1438 | 1448 | |
---|
1439 | | -//constraints.gridx += 1; |
---|
| 1449 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
| 1450 | + smoothfocusCB.addItemListener(this); |
---|
| 1451 | + |
---|
| 1452 | + panel.Return(); |
---|
| 1453 | + |
---|
1440 | 1454 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
1441 | 1455 | // debugCB.addItemListener(this); |
---|
1442 | 1456 | |
---|
.. | .. |
---|
2075 | 2089 | Object3D obj = (Object3D)group.selection.elementAt(0); |
---|
2076 | 2090 | objEditor.ScreenFit(obj, false); |
---|
2077 | 2091 | |
---|
2078 | | - cameraView.pingthread.StepToTarget(true); |
---|
| 2092 | + cameraView.pingthread.StepToTarget(); //true); |
---|
2079 | 2093 | refreshContents(); |
---|
2080 | 2094 | } |
---|
2081 | 2095 | |
---|
.. | .. |
---|
2112 | 2126 | obj.parent.TransformToWorld(maxima); //, maxima); |
---|
2113 | 2127 | } |
---|
2114 | 2128 | |
---|
2115 | | - Object3D shadow = new Object3D("Shadow " + obj.name); |
---|
| 2129 | + Object3D shadow = new Object3D("Shadow" + obj.name); |
---|
2116 | 2130 | |
---|
2117 | 2131 | shadow.toParent = LA.newMatrix(); |
---|
2118 | 2132 | shadow.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
2840 | 2854 | if (source == saveVersionButton) |
---|
2841 | 2855 | { |
---|
2842 | 2856 | // Save a new version |
---|
2843 | | - if (!Save(true)) |
---|
| 2857 | + if (!DuplicateVersion()) //true)) |
---|
2844 | 2858 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2845 | 2859 | } else |
---|
2846 | 2860 | if (source == deleteVersionButton) |
---|
.. | .. |
---|
4304 | 4318 | ResetTransform(-1); |
---|
4305 | 4319 | } |
---|
4306 | 4320 | |
---|
| 4321 | + void ScaleSelection(int scale) |
---|
| 4322 | + { |
---|
| 4323 | + Object3D obj; |
---|
| 4324 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 4325 | + { |
---|
| 4326 | + obj = (Object3D)e.nextElement(); |
---|
| 4327 | + |
---|
| 4328 | + if (obj.toParent == null) |
---|
| 4329 | + continue; |
---|
| 4330 | + |
---|
| 4331 | + obj.Scale(scale); |
---|
| 4332 | + |
---|
| 4333 | + if (obj.parent == null) |
---|
| 4334 | + { |
---|
| 4335 | + System.out.println("NULL PARENT!"); |
---|
| 4336 | + // new Exception().printStackTrace(); |
---|
| 4337 | + } |
---|
| 4338 | + else |
---|
| 4339 | + TouchTransform(obj); |
---|
| 4340 | + //obj.parent.Touch(); |
---|
| 4341 | + } |
---|
| 4342 | + |
---|
| 4343 | + refreshContents(); |
---|
| 4344 | + } |
---|
| 4345 | + |
---|
4307 | 4346 | void ResetTransform(int mask) |
---|
4308 | 4347 | { |
---|
4309 | 4348 | Object3D obj; |
---|
.. | .. |
---|
4834 | 4873 | LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
4835 | 4874 | } |
---|
4836 | 4875 | |
---|
| 4876 | + Globals.lighttouched = true; |
---|
4837 | 4877 | refreshContents(); |
---|
4838 | 4878 | } |
---|
4839 | 4879 | |
---|
.. | .. |
---|
5368 | 5408 | if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crashes the camera because of invalid lightspace |
---|
5369 | 5409 | { |
---|
5370 | 5410 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
5371 | | - Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 5411 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent(), true); |
---|
5372 | 5412 | } |
---|
5373 | 5413 | // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
5374 | 5414 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|