.. | .. |
---|
368 | 368 | refreshContents(); |
---|
369 | 369 | } |
---|
370 | 370 | |
---|
371 | | - public void Show3DView() |
---|
372 | | - { |
---|
373 | | - // bug |
---|
374 | | - //gridPanel.setDividerLocation(1.0); |
---|
375 | | - //bigPanel.setDividerLocation(0.0); |
---|
376 | | - bigThree.ClearUI(); |
---|
377 | | - bigThree.add(centralPanel); |
---|
378 | | - bigThree.FlushUI(); |
---|
379 | | - } |
---|
380 | | - |
---|
381 | 371 | //ObjEditor objEditor; |
---|
382 | 372 | public void closeUI2() |
---|
383 | 373 | { |
---|
.. | .. |
---|
493 | 483 | |
---|
494 | 484 | Object3D parent = obj.parent; |
---|
495 | 485 | obj.parent = null; |
---|
| 486 | + |
---|
496 | 487 | // Object3D support = obj.support; |
---|
497 | 488 | // obj.support = null; |
---|
498 | 489 | if (!supports) |
---|
499 | 490 | obj.SaveSupports(); |
---|
| 491 | + |
---|
500 | 492 | Object3D clone = (Object3D)Grafreed.clone(obj); |
---|
| 493 | + |
---|
| 494 | + clone.ResetUUIDs(); |
---|
| 495 | + |
---|
501 | 496 | obj.parent = parent; |
---|
502 | 497 | // obj.support = support; |
---|
503 | 498 | // clone.support = support; // aout 2013 |
---|
.. | .. |
---|
567 | 562 | pasteLinkItem.addActionListener(this); |
---|
568 | 563 | pasteCloneItem = oe.jTree.popup.add(new JMenuItem("Paste clone")); |
---|
569 | 564 | pasteCloneItem.addActionListener(this); |
---|
570 | | -// CRASH pasteExpandItem = oe.jTree.popup.add(new JMenuItem("Paste expand")); |
---|
571 | | -// pasteExpandItem.addActionListener(this); |
---|
| 565 | +// CRASH |
---|
| 566 | + pasteExpandItem = oe.jTree.popup.add(new JMenuItem("Paste expand")); |
---|
| 567 | +// |
---|
| 568 | + pasteExpandItem.addActionListener(this); |
---|
572 | 569 | //menu.add("-"); |
---|
573 | 570 | oe.jTree.popup.addSeparator(); |
---|
574 | 571 | |
---|
.. | .. |
---|
806 | 803 | genNormalsCADItem.addActionListener(this); |
---|
807 | 804 | genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals")); |
---|
808 | 805 | genNormalsMESHItem.addActionListener(this); |
---|
809 | | - if (Globals.ADVANCED) |
---|
| 806 | + //if (Globals.ADVANCED) |
---|
810 | 807 | { |
---|
811 | 808 | genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
812 | 809 | genNormalsMINEItem.addActionListener(this); |
---|
.. | .. |
---|
969 | 966 | currenttab.setName(tabname); |
---|
970 | 967 | //added = false; |
---|
971 | 968 | resourcecontainer.add(currenttab); |
---|
972 | | - resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
| 969 | + resourcecontainer.setToolTipTextAt(tabcount++, "Texture " + tabname); |
---|
973 | 970 | rowcount = 1; |
---|
974 | 971 | colcount = 0; |
---|
975 | 972 | texturecount = 0; |
---|
.. | .. |
---|
984 | 981 | currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname)); |
---|
985 | 982 | } |
---|
986 | 983 | |
---|
| 984 | + columns = 5; |
---|
| 985 | + |
---|
| 986 | + if (path[0].contains("D&R") || path[0].contains("Paint")) |
---|
| 987 | + columns = 4; |
---|
| 988 | + |
---|
987 | 989 | AddTextureButton(path[0], path[1], path[2], ++texturecount, currenttab); |
---|
988 | 990 | totalcount++; |
---|
989 | 991 | |
---|
.. | .. |
---|
1081 | 1083 | // } |
---|
1082 | 1084 | // }); |
---|
1083 | 1085 | |
---|
| 1086 | + oe.toolbarPanel.add(fullScreenButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1087 | + fullScreenButton.setToolTipText("Full-screen window"); |
---|
| 1088 | + fullScreenButton.addActionListener(this); |
---|
| 1089 | + |
---|
1084 | 1090 | oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1085 | 1091 | collapseButton.setToolTipText("Collapse toolbar"); |
---|
1086 | 1092 | collapseButton.addActionListener(this); |
---|
1087 | 1093 | |
---|
1088 | | - oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1089 | | - maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
1090 | | - maximize3DButton.addActionListener(this); |
---|
| 1094 | +// oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1095 | +// maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
| 1096 | +// maximize3DButton.addActionListener(this); |
---|
1091 | 1097 | |
---|
1092 | 1098 | oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1093 | 1099 | twoButton.setToolTipText("Show 3D view only"); |
---|
.. | .. |
---|
1107 | 1113 | // sevenButton.setToolTipText("3-column layout"); |
---|
1108 | 1114 | // sevenButton.addActionListener(this); |
---|
1109 | 1115 | // |
---|
1110 | | - |
---|
1111 | | - oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1112 | | - fullButton.setToolTipText("Full-screen window"); |
---|
1113 | | - fullButton.addActionListener(this); |
---|
1114 | 1116 | |
---|
1115 | 1117 | oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1116 | 1118 | screenfitButton.setToolTipText("Screen fit"); |
---|
.. | .. |
---|
1198 | 1200 | //clearButton.addActionListener(this); |
---|
1199 | 1201 | |
---|
1200 | 1202 | cGridBag row1 = new cGridBag(); |
---|
| 1203 | + row1.preferredHeight = 8; |
---|
1201 | 1204 | |
---|
1202 | 1205 | // INSERT |
---|
1203 | 1206 | row1.add(gridButton = GetButton("icons/grid.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
1238 | 1241 | oe.toolboxPanel.add(row1); |
---|
1239 | 1242 | |
---|
1240 | 1243 | cGridBag row2 = new cGridBag(); |
---|
| 1244 | + row2.preferredHeight = 8; |
---|
1241 | 1245 | |
---|
1242 | 1246 | row2.add(groupButton = GetButton("icons/group.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1243 | 1247 | groupButton.setToolTipText("Create group"); |
---|
.. | .. |
---|
1340 | 1344 | |
---|
1341 | 1345 | oe.treePanel.add(versionManagerPanel); |
---|
1342 | 1346 | oe.treePanel.Return(); |
---|
| 1347 | + |
---|
1343 | 1348 | versionSliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
1344 | 1349 | versionSlider = (cNumberSlider)versionSliderPane.getComponent(1); |
---|
1345 | 1350 | versionSliderPane.preferredHeight = 3; |
---|
.. | .. |
---|
1399 | 1404 | // supportCB.setToolTipText("Enable rigging"); |
---|
1400 | 1405 | // supportCB.addItemListener(this); |
---|
1401 | 1406 | |
---|
1402 | | - panel.add(freezeCB = new cCheckBox("Freeze", Globals.FREEZEONMOVE)); //, constraints); |
---|
| 1407 | + panel.add(freezeCB = new cCheckBox("Fast cam", Globals.FREEZEONMOVE)); //, constraints); |
---|
1403 | 1408 | freezeCB.setToolTipText("Fast moving camera"); |
---|
1404 | 1409 | freezeCB.addItemListener(this); |
---|
1405 | 1410 | |
---|
.. | .. |
---|
1408 | 1413 | |
---|
1409 | 1414 | panel.Return(); |
---|
1410 | 1415 | |
---|
| 1416 | + if (Globals.ADVANCED) |
---|
| 1417 | + { |
---|
1411 | 1418 | panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints); |
---|
1412 | 1419 | crowdCB.setToolTipText("Used for crowds"); |
---|
1413 | 1420 | crowdCB.addItemListener(this); |
---|
| 1421 | + } |
---|
1414 | 1422 | |
---|
1415 | 1423 | panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints); |
---|
1416 | 1424 | smoothCB.setToolTipText("Snapping delay"); |
---|
.. | .. |
---|
1423 | 1431 | minshaderCB.setToolTipText("Minimal fast shader"); |
---|
1424 | 1432 | minshaderCB.addItemListener(this); |
---|
1425 | 1433 | |
---|
1426 | | -// constraints.gridy += 1; |
---|
1427 | 1434 | // panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
1428 | 1435 | // speakerMocapCB.addItemListener(this); |
---|
1429 | 1436 | |
---|
1430 | | - panel.Return(); |
---|
1431 | | - |
---|
1432 | 1437 | if (false) |
---|
1433 | 1438 | { |
---|
1434 | 1439 | // handled in scripts |
---|
1435 | | - //constraints.gridy += 1; |
---|
1436 | 1440 | panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints); |
---|
1437 | 1441 | speakerCameraCB.addItemListener(this); |
---|
1438 | 1442 | |
---|
1439 | | - //constraints.gridy += 1; |
---|
1440 | 1443 | panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints); |
---|
1441 | 1444 | speakerFocusCB.addItemListener(this); |
---|
1442 | 1445 | |
---|
1443 | | - //constraints.gridy += 1; |
---|
1444 | | - panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
1445 | | - smoothfocusCB.addItemListener(this); |
---|
1446 | 1446 | panel.Return(); |
---|
1447 | 1447 | } |
---|
1448 | 1448 | |
---|
1449 | | -//constraints.gridx += 1; |
---|
| 1449 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints); |
---|
| 1450 | + smoothfocusCB.addItemListener(this); |
---|
| 1451 | + |
---|
| 1452 | + panel.Return(); |
---|
| 1453 | + |
---|
1450 | 1454 | //panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
1451 | 1455 | // debugCB.addItemListener(this); |
---|
1452 | 1456 | |
---|
.. | .. |
---|
2085 | 2089 | Object3D obj = (Object3D)group.selection.elementAt(0); |
---|
2086 | 2090 | objEditor.ScreenFit(obj, false); |
---|
2087 | 2091 | |
---|
2088 | | - cameraView.pingthread.StepToTarget(true); |
---|
| 2092 | + cameraView.pingthread.StepToTarget(); //true); |
---|
2089 | 2093 | refreshContents(); |
---|
2090 | 2094 | } |
---|
2091 | 2095 | |
---|
.. | .. |
---|
2122 | 2126 | obj.parent.TransformToWorld(maxima); //, maxima); |
---|
2123 | 2127 | } |
---|
2124 | 2128 | |
---|
2125 | | - Object3D shadow = new Object3D("Shadow " + obj.name); |
---|
| 2129 | + Object3D shadow = new Object3D("Shadow" + obj.name); |
---|
2126 | 2130 | |
---|
2127 | 2131 | shadow.toParent = LA.newMatrix(); |
---|
2128 | 2132 | shadow.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
2807 | 2811 | { |
---|
2808 | 2812 | Maximize(); |
---|
2809 | 2813 | } else |
---|
2810 | | - if (source == fullButton) |
---|
| 2814 | + if (source == fullScreenButton) |
---|
2811 | 2815 | { |
---|
2812 | 2816 | ToggleFullScreen(); |
---|
2813 | 2817 | } else |
---|
.. | .. |
---|
2816 | 2820 | this.expandedLayout = radio.layout; |
---|
2817 | 2821 | CollapseToolbar(); |
---|
2818 | 2822 | } else |
---|
2819 | | - if (source == maximize3DButton) |
---|
2820 | | - { |
---|
2821 | | - this.expandedLayout = radio.layout; |
---|
2822 | | - radio.layout = twoButton; |
---|
2823 | | - Show3DView(); |
---|
2824 | | - CollapseToolbar(); |
---|
2825 | | - } else |
---|
| 2823 | +// if (source == maximize3DButton) |
---|
| 2824 | +// { |
---|
| 2825 | +// this.expandedLayout = radio.layout; |
---|
| 2826 | +// radio.layout = twoButton; |
---|
| 2827 | +// CollapseToolbar(); |
---|
| 2828 | +// Show3DView(); |
---|
| 2829 | +// } else |
---|
2826 | 2830 | if (source == previousVersionButton) |
---|
2827 | 2831 | { |
---|
2828 | 2832 | // Go to previous version |
---|
.. | .. |
---|
2850 | 2854 | if (source == saveVersionButton) |
---|
2851 | 2855 | { |
---|
2852 | 2856 | // Save a new version |
---|
2853 | | - if (!Save(true)) |
---|
| 2857 | + if (!DuplicateVersion()) //true)) |
---|
2854 | 2858 | java.awt.Toolkit.getDefaultToolkit().beep(); |
---|
2855 | 2859 | } else |
---|
2856 | 2860 | if (source == deleteVersionButton) |
---|
.. | .. |
---|
4169 | 4173 | // and check if any of these nodes are reachable below the root. |
---|
4170 | 4174 | Grafreed.grafreed.universe.TagObjects(copy, true); |
---|
4171 | 4175 | |
---|
4172 | | - if (copy instanceof Composite && copy.versionlist == null && !copy.HasTags()) |
---|
| 4176 | + if (copy instanceof Composite && !copy.HasTags()) |
---|
4173 | 4177 | { |
---|
4174 | | - copy.versionlist = new Object3D[100]; |
---|
| 4178 | + if (copy.versionlist == null) |
---|
| 4179 | + copy.versionlist = new Object3D[100]; |
---|
4175 | 4180 | |
---|
4176 | 4181 | //Save(true); |
---|
4177 | 4182 | } |
---|
.. | .. |
---|
4311 | 4316 | void ResetTransform() |
---|
4312 | 4317 | { |
---|
4313 | 4318 | ResetTransform(-1); |
---|
| 4319 | + } |
---|
| 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(); |
---|
4314 | 4344 | } |
---|
4315 | 4345 | |
---|
4316 | 4346 | void ResetTransform(int mask) |
---|
.. | .. |
---|
4843 | 4873 | LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
4844 | 4874 | } |
---|
4845 | 4875 | |
---|
| 4876 | + Globals.lighttouched = true; |
---|
4846 | 4877 | refreshContents(); |
---|
4847 | 4878 | } |
---|
4848 | 4879 | |
---|
.. | .. |
---|
5377 | 5408 | if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crashes the camera because of invalid lightspace |
---|
5378 | 5409 | { |
---|
5379 | 5410 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
5380 | | - Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 5411 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent(), true); |
---|
5381 | 5412 | } |
---|
5382 | 5413 | // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
5383 | 5414 | // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|