.. | .. |
---|
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 | { |
---|
.. | .. |
---|
417 | 407 | |
---|
418 | 408 | assert(false); |
---|
419 | 409 | |
---|
420 | | - if (copy.versionlist == null) |
---|
421 | | - { |
---|
422 | | - copy.versionlist = new Object3D[100]; |
---|
423 | | - copy.versionindex = -1; |
---|
424 | | - |
---|
425 | | - //Save(true); |
---|
426 | | - } |
---|
| 410 | +// if (copy.versionlist == null) |
---|
| 411 | +// { |
---|
| 412 | +// copy.versionlist = new Object3D[100]; |
---|
| 413 | +// copy.versionindex = -1; |
---|
| 414 | +// |
---|
| 415 | +// //Save(true); |
---|
| 416 | +// } |
---|
427 | 417 | |
---|
428 | 418 | if(ui) |
---|
429 | 419 | SetupUI(objEditor); |
---|
.. | .. |
---|
446 | 436 | |
---|
447 | 437 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
448 | 438 | |
---|
449 | | - if (copy.versionlist == null) |
---|
450 | | - { |
---|
451 | | - copy.versionlist = new Object3D[100]; |
---|
452 | | - copy.versionindex = -1; |
---|
453 | | - |
---|
454 | | - //Save(true); |
---|
455 | | - } |
---|
| 439 | +// if (copy.versionlist == null) |
---|
| 440 | +// { |
---|
| 441 | +// copy.versionlist = new Object3D[100]; |
---|
| 442 | +// copy.versionindex = -1; |
---|
| 443 | +// |
---|
| 444 | +// //Save(true); |
---|
| 445 | +// } |
---|
456 | 446 | } |
---|
457 | 447 | |
---|
458 | 448 | void CloneSelection(boolean supports) |
---|
.. | .. |
---|
765 | 755 | shadowYItem.addActionListener(this); |
---|
766 | 756 | shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
767 | 757 | shadowZItem.addActionListener(this); |
---|
| 758 | + |
---|
768 | 759 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
769 | 760 | attributeItem.addActionListener(this); |
---|
770 | | - |
---|
771 | 761 | if (Globals.ADVANCED) |
---|
772 | 762 | { |
---|
773 | 763 | menu.add("-"); |
---|
.. | .. |
---|
779 | 769 | pointflowItem.addActionListener(this); |
---|
780 | 770 | } |
---|
781 | 771 | menu.add("-"); |
---|
| 772 | + textureRatioRItem = menu.add(new MenuItem("Texture Ratio Red")); |
---|
| 773 | + textureRatioRItem.addActionListener(this); |
---|
| 774 | + textureRatioGItem = menu.add(new MenuItem("Texture Ratio Green")); |
---|
| 775 | + textureRatioGItem.addActionListener(this); |
---|
| 776 | + textureRatioBItem = menu.add(new MenuItem("Texture Ratio Blue")); |
---|
| 777 | + textureRatioBItem.addActionListener(this); |
---|
| 778 | + menu.add("-"); |
---|
782 | 779 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
783 | 780 | resetTransformItem.addActionListener(this); |
---|
784 | 781 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
785 | 782 | resetCentroidItem.addActionListener(this); |
---|
786 | | - resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 783 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XZ")); |
---|
787 | 784 | resetCentroidXZItem.addActionListener(this); |
---|
788 | 785 | transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
789 | 786 | transformGeometryItem.addActionListener(this); |
---|
.. | .. |
---|
835 | 832 | } |
---|
836 | 833 | |
---|
837 | 834 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
| 835 | + clearVersionsItem = menu.add(new MenuItem("Clear Versions")); |
---|
| 836 | + clearVersionsItem.addActionListener(this); |
---|
838 | 837 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
839 | 838 | clearMaterialsItem.addActionListener(this); |
---|
840 | 839 | resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
.. | .. |
---|
936 | 935 | cGridBag currenttab; |
---|
937 | 936 | //boolean added; // patch for jar |
---|
938 | 937 | |
---|
| 938 | + int totalcount = 0; |
---|
| 939 | + |
---|
939 | 940 | int tabcount = 0; |
---|
940 | 941 | int colcount = 0; |
---|
941 | 942 | int rowcount = 0; |
---|
.. | .. |
---|
974 | 975 | } |
---|
975 | 976 | |
---|
976 | 977 | AddTextureButton(path[0], path[1], path[2], ++texturecount, currenttab); |
---|
| 978 | + totalcount++; |
---|
977 | 979 | |
---|
978 | 980 | if (++colcount >= columns) |
---|
979 | 981 | { |
---|
.. | .. |
---|
999 | 1001 | container.add(resourcecontainer); |
---|
1000 | 1002 | |
---|
1001 | 1003 | Grafreed.ParseResources("textures", this); |
---|
| 1004 | + |
---|
| 1005 | + // 935. System.out.println("Total = " + totalcount); |
---|
1002 | 1006 | } |
---|
1003 | 1007 | |
---|
1004 | 1008 | void SetupUI2(ObjEditor oe) |
---|
.. | .. |
---|
1067 | 1071 | // } |
---|
1068 | 1072 | // }); |
---|
1069 | 1073 | |
---|
| 1074 | + oe.toolbarPanel.add(fullScreenButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1075 | + fullScreenButton.setToolTipText("Full-screen window"); |
---|
| 1076 | + fullScreenButton.addActionListener(this); |
---|
| 1077 | + |
---|
1070 | 1078 | oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1071 | 1079 | collapseButton.setToolTipText("Collapse toolbar"); |
---|
1072 | 1080 | collapseButton.addActionListener(this); |
---|
1073 | 1081 | |
---|
1074 | | - oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1075 | | - maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
1076 | | - maximize3DButton.addActionListener(this); |
---|
| 1082 | +// oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1083 | +// maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
| 1084 | +// maximize3DButton.addActionListener(this); |
---|
1077 | 1085 | |
---|
1078 | 1086 | oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1079 | 1087 | twoButton.setToolTipText("Show 3D view only"); |
---|
.. | .. |
---|
1093 | 1101 | // sevenButton.setToolTipText("3-column layout"); |
---|
1094 | 1102 | // sevenButton.addActionListener(this); |
---|
1095 | 1103 | // |
---|
1096 | | - |
---|
1097 | | - oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1098 | | - fullButton.setToolTipText("Full-screen window"); |
---|
1099 | | - fullButton.addActionListener(this); |
---|
1100 | 1104 | |
---|
1101 | 1105 | oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1102 | 1106 | screenfitButton.setToolTipText("Screen fit"); |
---|
.. | .. |
---|
1210 | 1214 | torusButton.setToolTipText("Create torus"); |
---|
1211 | 1215 | torusButton.addActionListener(this); |
---|
1212 | 1216 | |
---|
1213 | | - if (Globals.ADVANCED) |
---|
| 1217 | + if (false) //Globals.ADVANCED) |
---|
1214 | 1218 | { |
---|
1215 | 1219 | oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1216 | 1220 | kleinButton.setToolTipText("Create Klein bottle"); |
---|
.. | .. |
---|
1259 | 1263 | |
---|
1260 | 1264 | CreateTexturePanel(textures); |
---|
1261 | 1265 | |
---|
1262 | | - resourcecontainer.setSelectedIndex((int)(Math.random() * resourcecontainer.getTabCount())); |
---|
| 1266 | + int tabCount = resourcecontainer.getTabCount(); |
---|
| 1267 | + |
---|
| 1268 | + if (tabCount > 0) |
---|
| 1269 | + resourcecontainer.setSelectedIndex((int)(Math.random() * tabCount)); |
---|
1263 | 1270 | |
---|
1264 | 1271 | oe.toolboxPanel.add(textures); |
---|
1265 | 1272 | |
---|
.. | .. |
---|
1483 | 1490 | |
---|
1484 | 1491 | void EditObject(Object3D obj) |
---|
1485 | 1492 | { |
---|
1486 | | - assert(obj instanceof Composite); |
---|
| 1493 | + //assert(obj instanceof Composite); |
---|
1487 | 1494 | |
---|
1488 | 1495 | // if (obj.versionlist == null) |
---|
1489 | 1496 | // { |
---|
.. | .. |
---|
2119 | 2126 | switch(axis) |
---|
2120 | 2127 | { |
---|
2121 | 2128 | case 0 : |
---|
2122 | | - vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z; |
---|
2123 | | - vert2.x = minima.x; vert2.y = maxima.y; vert2.z = minima.z; |
---|
2124 | | - vert3.x = minima.x; vert3.y = minima.y; vert3.z = maxima.z; |
---|
2125 | | - vert4.x = minima.x; vert4.y = maxima.y; vert4.z = maxima.z; |
---|
| 2129 | + vert1.x = minima.x + 0.001f; vert1.y = minima.y; vert1.z = minima.z; |
---|
| 2130 | + vert2.x = minima.x + 0.001f; vert2.y = maxima.y; vert2.z = minima.z; |
---|
| 2131 | + vert3.x = minima.x + 0.001f; vert3.y = minima.y; vert3.z = maxima.z; |
---|
| 2132 | + vert4.x = minima.x + 0.001f; vert4.y = maxima.y; vert4.z = maxima.z; |
---|
2126 | 2133 | norm = cVector.X; |
---|
2127 | 2134 | break; |
---|
2128 | 2135 | case 1 : |
---|
2129 | | - vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z; |
---|
2130 | | - vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z; |
---|
2131 | | - vert3.x = minima.x; vert3.y = minima.y; vert3.z = maxima.z; |
---|
2132 | | - vert4.x = maxima.x; vert4.y = minima.y; vert4.z = maxima.z; |
---|
| 2136 | + vert1.x = minima.x; vert1.y = minima.y + 0.001f; vert1.z = minima.z; |
---|
| 2137 | + vert2.x = maxima.x; vert2.y = minima.y + 0.001f; vert2.z = minima.z; |
---|
| 2138 | + vert3.x = minima.x; vert3.y = minima.y + 0.001f; vert3.z = maxima.z; |
---|
| 2139 | + vert4.x = maxima.x; vert4.y = minima.y + 0.001f; vert4.z = maxima.z; |
---|
2133 | 2140 | norm = cVector.Y; |
---|
2134 | 2141 | break; |
---|
2135 | 2142 | case 2 : |
---|
2136 | | - vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z; |
---|
2137 | | - vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z; |
---|
2138 | | - vert3.x = minima.x; vert3.y = maxima.y; vert3.z = minima.z; |
---|
2139 | | - vert4.x = maxima.x; vert4.y = maxima.y; vert4.z = minima.z; |
---|
| 2143 | + vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z + 0.001f; |
---|
| 2144 | + vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z + 0.001f; |
---|
| 2145 | + vert3.x = minima.x; vert3.y = maxima.y; vert3.z = minima.z + 0.001f; |
---|
| 2146 | + vert4.x = maxima.x; vert4.y = maxima.y; vert4.z = minima.z + 0.001f; |
---|
2140 | 2147 | norm = cVector.Z; |
---|
2141 | 2148 | break; |
---|
2142 | 2149 | } |
---|
.. | .. |
---|
2705 | 2712 | if (!group.selection.isEmpty()) |
---|
2706 | 2713 | { |
---|
2707 | 2714 | Composite csg = new GroupLeaf(); |
---|
| 2715 | + group(csg); |
---|
2708 | 2716 | csg.count = 5; |
---|
2709 | 2717 | Composite child = new cGroup("Branch"); |
---|
2710 | 2718 | csg.addChild(child); |
---|
2711 | 2719 | child.addChild(csg); |
---|
2712 | | - group(csg); |
---|
2713 | 2720 | } |
---|
2714 | 2721 | } else |
---|
2715 | 2722 | if (source == doubleItem) |
---|
.. | .. |
---|
2717 | 2724 | if (!group.selection.isEmpty()) |
---|
2718 | 2725 | { |
---|
2719 | 2726 | Composite csg = new GroupLeaf("Fork"); |
---|
| 2727 | + group(csg); |
---|
2720 | 2728 | csg.count = 5; |
---|
2721 | 2729 | Composite child = new cGroup("Branch A"); |
---|
2722 | 2730 | csg.addChild(child); |
---|
.. | .. |
---|
2724 | 2732 | child = new cGroup("Branch B"); |
---|
2725 | 2733 | csg.addChild(child); |
---|
2726 | 2734 | child.addChild(csg); |
---|
2727 | | - group(csg); |
---|
2728 | 2735 | } |
---|
2729 | 2736 | } else |
---|
2730 | 2737 | if (source == tripleItem) |
---|
.. | .. |
---|
2790 | 2797 | { |
---|
2791 | 2798 | Maximize(); |
---|
2792 | 2799 | } else |
---|
2793 | | - if (source == fullButton) |
---|
| 2800 | + if (source == fullScreenButton) |
---|
2794 | 2801 | { |
---|
2795 | 2802 | ToggleFullScreen(); |
---|
2796 | 2803 | } else |
---|
.. | .. |
---|
2799 | 2806 | this.expandedLayout = radio.layout; |
---|
2800 | 2807 | CollapseToolbar(); |
---|
2801 | 2808 | } else |
---|
2802 | | - if (source == maximize3DButton) |
---|
2803 | | - { |
---|
2804 | | - this.expandedLayout = radio.layout; |
---|
2805 | | - radio.layout = twoButton; |
---|
2806 | | - Show3DView(); |
---|
2807 | | - CollapseToolbar(); |
---|
2808 | | - } else |
---|
| 2809 | +// if (source == maximize3DButton) |
---|
| 2810 | +// { |
---|
| 2811 | +// this.expandedLayout = radio.layout; |
---|
| 2812 | +// radio.layout = twoButton; |
---|
| 2813 | +// CollapseToolbar(); |
---|
| 2814 | +// Show3DView(); |
---|
| 2815 | +// } else |
---|
2809 | 2816 | if (source == previousVersionButton) |
---|
2810 | 2817 | { |
---|
2811 | 2818 | // Go to previous version |
---|
.. | .. |
---|
3458 | 3465 | { |
---|
3459 | 3466 | ClearMaterials(); |
---|
3460 | 3467 | } else |
---|
| 3468 | + if (source == clearVersionsItem) |
---|
| 3469 | + { |
---|
| 3470 | + ClearVersions(); |
---|
| 3471 | + } else |
---|
3461 | 3472 | if (source == liveleavesItem) |
---|
3462 | 3473 | { |
---|
3463 | 3474 | LiveLeaves(true); |
---|
.. | .. |
---|
3597 | 3608 | if (source == transformChildrenItem) |
---|
3598 | 3609 | { |
---|
3599 | 3610 | TransformChildren(); |
---|
| 3611 | + } else |
---|
| 3612 | + if (source == textureRatioRItem) |
---|
| 3613 | + { |
---|
| 3614 | + TextureRatio(0); |
---|
| 3615 | + } else |
---|
| 3616 | + if (source == textureRatioGItem) |
---|
| 3617 | + { |
---|
| 3618 | + TextureRatio(1); |
---|
| 3619 | + } else |
---|
| 3620 | + if (source == textureRatioBItem) |
---|
| 3621 | + { |
---|
| 3622 | + TextureRatio(2); |
---|
3600 | 3623 | } else |
---|
3601 | 3624 | if (source == resetTransformItem) |
---|
3602 | 3625 | { |
---|
.. | .. |
---|
3970 | 3993 | if (source == closeButton) |
---|
3971 | 3994 | { |
---|
3972 | 3995 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
3973 | | - Replace(); |
---|
| 3996 | + if (copy.versionlist != null) |
---|
| 3997 | + Replace(); |
---|
3974 | 3998 | |
---|
3975 | 3999 | cRadio ab; |
---|
3976 | 4000 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
.. | .. |
---|
4070 | 4094 | } else |
---|
4071 | 4095 | if(source instanceof cRadio) |
---|
4072 | 4096 | { |
---|
4073 | | - Replace(); |
---|
| 4097 | + if (copy.versionlist != null) |
---|
| 4098 | + Replace(); |
---|
4074 | 4099 | |
---|
4075 | 4100 | group.parent = keepparent; |
---|
4076 | 4101 | group.attributes = 0; |
---|
.. | .. |
---|
4123 | 4148 | */ |
---|
4124 | 4149 | radio.layout.doClick(); |
---|
4125 | 4150 | |
---|
4126 | | - assert(copy instanceof Composite); |
---|
| 4151 | + //assert(copy instanceof Composite); |
---|
4127 | 4152 | |
---|
4128 | 4153 | if (copy.versionlist == null) |
---|
4129 | 4154 | { |
---|
.. | .. |
---|
4134 | 4159 | // and check if any of these nodes are reachable below the root. |
---|
4135 | 4160 | Grafreed.grafreed.universe.TagObjects(copy, true); |
---|
4136 | 4161 | |
---|
4137 | | - if (!copy.HasTags()) |
---|
| 4162 | + if (copy instanceof Composite && !copy.HasTags()) |
---|
4138 | 4163 | { |
---|
4139 | | - copy.versionlist = new Object3D[100]; |
---|
| 4164 | + if (copy.versionlist == null) |
---|
| 4165 | + copy.versionlist = new Object3D[100]; |
---|
4140 | 4166 | |
---|
4141 | | - Save(true); |
---|
| 4167 | + //Save(true); |
---|
4142 | 4168 | } |
---|
| 4169 | + else |
---|
| 4170 | + copy.versionindex = -2; |
---|
4143 | 4171 | |
---|
4144 | 4172 | Grafreed.grafreed.universe.TagObjects(copy, false); |
---|
4145 | 4173 | } |
---|
.. | .. |
---|
4259 | 4287 | refreshContents(); |
---|
4260 | 4288 | } |
---|
4261 | 4289 | |
---|
| 4290 | + void TextureRatio(int axis) |
---|
| 4291 | + { |
---|
| 4292 | + Object3D obj; |
---|
| 4293 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 4294 | + { |
---|
| 4295 | + obj = (Object3D)e.nextElement(); |
---|
| 4296 | + obj.TextureRatio(axis); |
---|
| 4297 | + } |
---|
| 4298 | + |
---|
| 4299 | + refreshContents(); |
---|
| 4300 | + } |
---|
| 4301 | + |
---|
4262 | 4302 | void ResetTransform() |
---|
4263 | 4303 | { |
---|
4264 | 4304 | ResetTransform(-1); |
---|
.. | .. |
---|
4274 | 4314 | if (obj.toParent == null) |
---|
4275 | 4315 | continue; |
---|
4276 | 4316 | |
---|
4277 | | - if (mask == -1) |
---|
4278 | | - { |
---|
4279 | | - if (obj instanceof Camera) // jan 2014 |
---|
4280 | | - { |
---|
4281 | | - LA.matIdentity(obj.toParent); |
---|
4282 | | - LA.matIdentity(obj.fromParent); |
---|
4283 | | - } |
---|
4284 | | - else |
---|
4285 | | - { |
---|
4286 | | - obj.toParent = null; // jan 2014 LA.matIdentity(obj.toParent); |
---|
4287 | | - obj.fromParent = null; // LA.matIdentity(obj.fromParent); |
---|
4288 | | - } |
---|
4289 | | - TouchTransform(obj); |
---|
4290 | | - continue; |
---|
4291 | | - } |
---|
4292 | | - if ((mask&2) != 0) // Scale/rotation |
---|
4293 | | - { |
---|
4294 | | - obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1; |
---|
4295 | | - obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0; |
---|
4296 | | - obj.toParent[0][2] = obj.toParent[1][2] = obj.toParent[2][1] = 0; |
---|
4297 | | - obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1; |
---|
4298 | | - obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0; |
---|
4299 | | - obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0; |
---|
4300 | | - } |
---|
4301 | | - if ((mask&1) != 0) // Translation |
---|
4302 | | - { |
---|
4303 | | - if (obj.toParent != null) |
---|
4304 | | - { |
---|
4305 | | - obj.toParent[3][0] = obj.toParent[3][1] = obj.toParent[3][2] = 0; |
---|
4306 | | - obj.fromParent[3][0] = obj.fromParent[3][1] = obj.fromParent[3][2] = 0; |
---|
4307 | | - } |
---|
4308 | | - } |
---|
| 4317 | + obj.ResetTransform(mask); |
---|
| 4318 | + |
---|
4309 | 4319 | if (obj.parent == null) |
---|
4310 | 4320 | { |
---|
4311 | 4321 | System.out.println("NULL PARENT!"); |
---|
.. | .. |
---|
4814 | 4824 | { |
---|
4815 | 4825 | Object3D obj = group.selection.get(i); |
---|
4816 | 4826 | |
---|
| 4827 | + if (obj.toParent == null) |
---|
| 4828 | + { |
---|
| 4829 | + obj.toParent = LA.newMatrix(); |
---|
| 4830 | + obj.fromParent = LA.newMatrix(); |
---|
| 4831 | + } |
---|
| 4832 | + |
---|
4817 | 4833 | LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
4818 | 4834 | LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
4819 | 4835 | } |
---|
.. | .. |
---|
5105 | 5121 | refreshContents(); |
---|
5106 | 5122 | } |
---|
5107 | 5123 | |
---|
| 5124 | + void ClearVersions() |
---|
| 5125 | + { |
---|
| 5126 | + group.selection.ClearVersions(); |
---|
| 5127 | + refreshContents(); |
---|
| 5128 | + } |
---|
| 5129 | + |
---|
5108 | 5130 | void FlipV(boolean flip) |
---|
5109 | 5131 | { |
---|
5110 | 5132 | group.selection.FlipV(flip); |
---|
.. | .. |
---|
5343 | 5365 | if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
5344 | 5366 | // a camera |
---|
5345 | 5367 | { |
---|
5346 | | - if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
| 5368 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crashes the camera because of invalid lightspace |
---|
5347 | 5369 | { |
---|
5348 | 5370 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
5349 | 5371 | Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
.. | .. |
---|
5390 | 5412 | } |
---|
5391 | 5413 | } |
---|
5392 | 5414 | |
---|
5393 | | - rootButton.setEnabled(allComposites); |
---|
| 5415 | + rootButton.setEnabled(true); // allComposites); |
---|
5394 | 5416 | } |
---|
5395 | 5417 | |
---|
5396 | 5418 | void refreshContents(boolean cp) |
---|
5397 | 5419 | { |
---|
5398 | | - if (Globals.ADVANCED) |
---|
| 5420 | + if (Globals.SHOWINFO) |
---|
5399 | 5421 | //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
5400 | 5422 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
5401 | 5423 | { |
---|
.. | .. |
---|
6346 | 6368 | private MenuItem clipMeshItem; |
---|
6347 | 6369 | private MenuItem smoothMeshItem; |
---|
6348 | 6370 | private MenuItem clearMaterialsItem; |
---|
| 6371 | + private MenuItem clearVersionsItem; |
---|
6349 | 6372 | |
---|
6350 | 6373 | private MenuItem liveleavesItem; |
---|
6351 | 6374 | private MenuItem unliveleavesItem; |
---|
.. | .. |
---|
6369 | 6392 | private MenuItem maxTexturesItem; |
---|
6370 | 6393 | private MenuItem panoTexturesItem; |
---|
6371 | 6394 | |
---|
| 6395 | + private MenuItem textureRatioRItem; |
---|
| 6396 | + private MenuItem textureRatioGItem; |
---|
| 6397 | + private MenuItem textureRatioBItem; |
---|
6372 | 6398 | private MenuItem resetCentroidItem; |
---|
6373 | 6399 | private MenuItem resetCentroidXZItem; |
---|
6374 | 6400 | private MenuItem resetTransformItem; |
---|