.. | .. |
---|
29 | 29 | { |
---|
30 | 30 | cButton skyboxButton; |
---|
31 | 31 | final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
32 | | - row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF)); |
---|
| 32 | + row.add(skyboxButton = GetButton(path + "/preview.jpg", !Globals.NIMBUSLAF)); |
---|
33 | 33 | //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF)); |
---|
34 | 34 | skyboxButton.setToolTipText(s.equals("") ? "No background" : s); |
---|
35 | 35 | skyboxButton.addActionListener(new ActionListener() |
---|
.. | .. |
---|
46 | 46 | { |
---|
47 | 47 | cButton textureButton; |
---|
48 | 48 | final String path = "textures/" + f + "/" + c + "/"; // + t; |
---|
49 | | - row.add(textureButton = GetButton(path + "icons/" + t, !Grafreed.NIMBUSLAF)); |
---|
| 49 | + row.add(textureButton = GetButton(path + "icons/" + t, !Globals.NIMBUSLAF)); |
---|
50 | 50 | textureButton.setToolTipText(c + count); |
---|
51 | 51 | textureButton.addActionListener(new ActionListener() |
---|
52 | 52 | { |
---|
.. | .. |
---|
347 | 347 | |
---|
348 | 348 | public void CreateSkyboxPanel(cGridBag skyboxPanel) |
---|
349 | 349 | { |
---|
350 | | - JTabbedPane skyboxpane = new JTabbedPane(); |
---|
| 350 | + JTabbedPane skyboxpane = new JTabbedPane(JTabbedPane.LEFT); |
---|
351 | 351 | |
---|
352 | 352 | AddSkyboxTab0(skyboxpane); |
---|
353 | 353 | AddSkyboxTab1(skyboxpane); |
---|
.. | .. |
---|
415 | 415 | this.copy = this.group = group; |
---|
416 | 416 | //selectees = this.group.selectees; |
---|
417 | 417 | |
---|
418 | | - if (copy.versionlist == null) |
---|
419 | | - { |
---|
420 | | - copy.versionlist = new Object3D[100]; |
---|
421 | | - copy.versionindex = -1; |
---|
422 | | - |
---|
423 | | - Save(true); |
---|
424 | | - } |
---|
| 418 | + assert(false); |
---|
| 419 | + |
---|
| 420 | +// if (copy.versionlist == null) |
---|
| 421 | +// { |
---|
| 422 | +// copy.versionlist = new Object3D[100]; |
---|
| 423 | +// copy.versionindex = -1; |
---|
| 424 | +// |
---|
| 425 | +// //Save(true); |
---|
| 426 | +// } |
---|
425 | 427 | |
---|
426 | 428 | if(ui) |
---|
427 | 429 | SetupUI(objEditor); |
---|
.. | .. |
---|
444 | 446 | |
---|
445 | 447 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
446 | 448 | |
---|
447 | | - if (copy.versionlist == null) |
---|
448 | | - { |
---|
449 | | - copy.versionlist = new Object3D[100]; |
---|
450 | | - copy.versionindex = -1; |
---|
451 | | - |
---|
452 | | - Save(true); |
---|
453 | | - } |
---|
| 449 | +// if (copy.versionlist == null) |
---|
| 450 | +// { |
---|
| 451 | +// copy.versionlist = new Object3D[100]; |
---|
| 452 | +// copy.versionindex = -1; |
---|
| 453 | +// |
---|
| 454 | +// //Save(true); |
---|
| 455 | +// } |
---|
454 | 456 | } |
---|
455 | 457 | |
---|
456 | 458 | void CloneSelection(boolean supports) |
---|
.. | .. |
---|
569 | 571 | // pasteExpandItem.addActionListener(this); |
---|
570 | 572 | //menu.add("-"); |
---|
571 | 573 | oe.jTree.popup.addSeparator(); |
---|
572 | | - |
---|
573 | | - deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); |
---|
574 | | - deleteItem.addActionListener(this); |
---|
575 | 574 | |
---|
576 | 575 | if (Globals.ADVANCED) |
---|
577 | 576 | { |
---|
.. | .. |
---|
706 | 705 | setMasterItem.addActionListener(this); |
---|
707 | 706 | } |
---|
708 | 707 | |
---|
709 | | - oe.menuBar.add(menu = new Menu("Group")); |
---|
710 | | -// grabItem = menu.add(new MenuItem("Grab")); |
---|
711 | | -// grabItem.addActionListener(this); |
---|
| 708 | + oe.menuBar.add(menu = new Menu("Order")); |
---|
| 709 | + |
---|
712 | 710 | backItem = menu.add(new MenuItem("Back")); |
---|
713 | 711 | backItem.addActionListener(this); |
---|
714 | 712 | frontItem = menu.add(new MenuItem("Front")); |
---|
715 | 713 | frontItem.addActionListener(this); |
---|
716 | 714 | // compositeItem = menu.add(new MenuItem("Composite")); |
---|
717 | 715 | // compositeItem.addActionListener(this); |
---|
| 716 | + |
---|
| 717 | + grabItem = oe.jTree.popup.add(new JMenuItem("Group")); |
---|
| 718 | + grabItem.addActionListener(this); |
---|
718 | 719 | |
---|
719 | 720 | if (Globals.ADVANCED) |
---|
720 | 721 | { |
---|
.. | .. |
---|
723 | 724 | } |
---|
724 | 725 | ungroupItem = oe.jTree.popup.add(new JMenuItem("Ungroup")); |
---|
725 | 726 | ungroupItem.addActionListener(this); |
---|
| 727 | + |
---|
| 728 | + oe.jTree.popup.addSeparator(); |
---|
| 729 | + |
---|
| 730 | + deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); |
---|
| 731 | + deleteItem.addActionListener(this); |
---|
726 | 732 | |
---|
727 | 733 | // menu.add("-"); |
---|
728 | 734 | // |
---|
.. | .. |
---|
759 | 765 | shadowYItem.addActionListener(this); |
---|
760 | 766 | shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
761 | 767 | shadowZItem.addActionListener(this); |
---|
762 | | - attributeItem = menu.add(new MenuItem("Attribute")); |
---|
763 | | - attributeItem.addActionListener(this); |
---|
764 | 768 | |
---|
765 | 769 | if (Globals.ADVANCED) |
---|
766 | 770 | { |
---|
| 771 | + attributeItem = menu.add(new MenuItem("Attribute")); |
---|
| 772 | + attributeItem.addActionListener(this); |
---|
767 | 773 | menu.add("-"); |
---|
768 | 774 | linkerItem = menu.add(new MenuItem("Linker")); |
---|
769 | 775 | linkerItem.addActionListener(this); |
---|
.. | .. |
---|
773 | 779 | pointflowItem.addActionListener(this); |
---|
774 | 780 | } |
---|
775 | 781 | menu.add("-"); |
---|
| 782 | + textureRatioRItem = menu.add(new MenuItem("Texture Ratio Red")); |
---|
| 783 | + textureRatioRItem.addActionListener(this); |
---|
| 784 | + textureRatioGItem = menu.add(new MenuItem("Texture Ratio Green")); |
---|
| 785 | + textureRatioGItem.addActionListener(this); |
---|
| 786 | + textureRatioBItem = menu.add(new MenuItem("Texture Ratio Blue")); |
---|
| 787 | + textureRatioBItem.addActionListener(this); |
---|
| 788 | + menu.add("-"); |
---|
776 | 789 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
777 | 790 | resetTransformItem.addActionListener(this); |
---|
778 | 791 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
779 | 792 | resetCentroidItem.addActionListener(this); |
---|
780 | | - resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 793 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XZ")); |
---|
781 | 794 | resetCentroidXZItem.addActionListener(this); |
---|
782 | 795 | transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
783 | 796 | transformGeometryItem.addActionListener(this); |
---|
.. | .. |
---|
829 | 842 | } |
---|
830 | 843 | |
---|
831 | 844 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
| 845 | + clearVersionsItem = menu.add(new MenuItem("Clear Versions")); |
---|
| 846 | + clearVersionsItem.addActionListener(this); |
---|
832 | 847 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
833 | 848 | clearMaterialsItem.addActionListener(this); |
---|
834 | 849 | resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
.. | .. |
---|
851 | 866 | hideleavesItem.addActionListener(this); |
---|
852 | 867 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
853 | 868 | showleavesItem.addActionListener(this); |
---|
854 | | - markleavesItem = menu.add(new MenuItem("Mark Leaves")); |
---|
| 869 | + markleavesItem = menu.add(new MenuItem("Anim Leaves")); |
---|
855 | 870 | markleavesItem.addActionListener(this); |
---|
856 | | - unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
| 871 | + unmarkleavesItem = menu.add(new MenuItem("Unanim Leaves")); |
---|
857 | 872 | unmarkleavesItem.addActionListener(this); |
---|
858 | 873 | rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
859 | 874 | rewindleavesItem.addActionListener(this); |
---|
.. | .. |
---|
930 | 945 | cGridBag currenttab; |
---|
931 | 946 | //boolean added; // patch for jar |
---|
932 | 947 | |
---|
| 948 | + int totalcount = 0; |
---|
| 949 | + |
---|
933 | 950 | int tabcount = 0; |
---|
934 | 951 | int colcount = 0; |
---|
935 | 952 | int rowcount = 0; |
---|
.. | .. |
---|
958 | 975 | texturecount = 0; |
---|
959 | 976 | } |
---|
960 | 977 | |
---|
961 | | - if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg")) |
---|
| 978 | + if (path.length > 2 && (path[2].toLowerCase().endsWith(".jpg") || path[2].toLowerCase().endsWith(".png"))) |
---|
962 | 979 | { |
---|
963 | 980 | //if (!added) |
---|
964 | 981 | { |
---|
.. | .. |
---|
967 | 984 | currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname)); |
---|
968 | 985 | } |
---|
969 | 986 | |
---|
970 | | - AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab); |
---|
| 987 | + AddTextureButton(path[0], path[1], path[2], ++texturecount, currenttab); |
---|
| 988 | + totalcount++; |
---|
971 | 989 | |
---|
972 | 990 | if (++colcount >= columns) |
---|
973 | 991 | { |
---|
.. | .. |
---|
993 | 1011 | container.add(resourcecontainer); |
---|
994 | 1012 | |
---|
995 | 1013 | Grafreed.ParseResources("textures", this); |
---|
| 1014 | + |
---|
| 1015 | + // 935. System.out.println("Total = " + totalcount); |
---|
996 | 1016 | } |
---|
997 | 1017 | |
---|
998 | 1018 | void SetupUI2(ObjEditor oe) |
---|
.. | .. |
---|
1032 | 1052 | oe.radioPanel.add(dummyButton); |
---|
1033 | 1053 | oe.buttonGroup.add(dummyButton); |
---|
1034 | 1054 | */ |
---|
1035 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 1055 | + cGridBag versionManagerPanel = new cGridBag(); |
---|
1036 | 1056 | |
---|
1037 | | - copyOptionsPanel.preferredHeight = 2; |
---|
| 1057 | + versionManagerPanel.preferredHeight = 4; |
---|
1038 | 1058 | |
---|
1039 | 1059 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
1040 | 1060 | |
---|
.. | .. |
---|
1061 | 1081 | // } |
---|
1062 | 1082 | // }); |
---|
1063 | 1083 | |
---|
1064 | | - oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1084 | + oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1065 | 1085 | collapseButton.setToolTipText("Collapse toolbar"); |
---|
1066 | 1086 | collapseButton.addActionListener(this); |
---|
1067 | 1087 | |
---|
1068 | | - oe.toolbarPanel.add(maximize3DButton = GetButton("", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1088 | + oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1069 | 1089 | maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
1070 | 1090 | maximize3DButton.addActionListener(this); |
---|
1071 | 1091 | |
---|
1072 | | - oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1092 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1073 | 1093 | twoButton.setToolTipText("Show 3D view only"); |
---|
1074 | 1094 | twoButton.addActionListener(this); |
---|
1075 | 1095 | this.fullscreenLayout = twoButton; |
---|
1076 | 1096 | |
---|
1077 | | - oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1097 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1078 | 1098 | threeButton.setToolTipText("Show controls and 3D view"); |
---|
1079 | 1099 | threeButton.addActionListener(this); |
---|
1080 | 1100 | if (Globals.ADVANCED) |
---|
1081 | 1101 | { |
---|
1082 | | - oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1102 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1083 | 1103 | sixButton.setToolTipText("Show 3D view and controls"); |
---|
1084 | 1104 | sixButton.addActionListener(this); |
---|
1085 | 1105 | } |
---|
.. | .. |
---|
1088 | 1108 | // sevenButton.addActionListener(this); |
---|
1089 | 1109 | // |
---|
1090 | 1110 | |
---|
1091 | | - oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1111 | + oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1092 | 1112 | fullButton.setToolTipText("Full-screen window"); |
---|
1093 | 1113 | fullButton.addActionListener(this); |
---|
1094 | 1114 | |
---|
1095 | | - oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1115 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1096 | 1116 | screenfitButton.setToolTipText("Screen fit"); |
---|
1097 | 1117 | screenfitButton.addActionListener(this); |
---|
1098 | 1118 | |
---|
1099 | | - oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1119 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1100 | 1120 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
1101 | 1121 | restoreCameraButton.addActionListener(this); |
---|
1102 | 1122 | |
---|
1103 | | - copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1123 | + versionManagerPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1104 | 1124 | saveVersionButton.setToolTipText("Duplicate current version"); |
---|
1105 | 1125 | saveVersionButton.addActionListener(this); |
---|
1106 | 1126 | |
---|
1107 | | - copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1127 | + versionManagerPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1108 | 1128 | deleteVersionButton.setToolTipText("Delete current version"); |
---|
1109 | 1129 | deleteVersionButton.addActionListener(this); |
---|
| 1130 | + deleteVersionButton.setEnabled(false); |
---|
1110 | 1131 | |
---|
1111 | | - copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1132 | + versionManagerPanel.add(previousVersionButton = GetButton("icons/undo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1112 | 1133 | previousVersionButton.setToolTipText("Previous version"); |
---|
1113 | 1134 | previousVersionButton.addActionListener(this); |
---|
1114 | 1135 | previousVersionButton.setEnabled(false); |
---|
1115 | 1136 | |
---|
1116 | 1137 | cGridBag updown = new cGridBag().setVertical(true); |
---|
1117 | | - updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1138 | + updown.add(restoreButton = GetButton("icons/restore.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1118 | 1139 | restoreButton.setToolTipText("Undo (restore current version)"); |
---|
1119 | 1140 | restoreButton.addActionListener(this); |
---|
1120 | | - //restoreButton.setEnabled(false); |
---|
| 1141 | + restoreButton.setEnabled(false); |
---|
1121 | 1142 | |
---|
1122 | | - updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1143 | + updown.add(replaceButton = GetButton("icons/replace.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1123 | 1144 | replaceButton.setToolTipText("Save (replace current version)"); |
---|
1124 | 1145 | replaceButton.addActionListener(this); |
---|
1125 | | - //replaceButton.setEnabled(false); |
---|
| 1146 | + replaceButton.setEnabled(false); |
---|
1126 | 1147 | |
---|
1127 | | - copyOptionsPanel.add(updown); |
---|
| 1148 | + versionManagerPanel.add(updown); |
---|
1128 | 1149 | |
---|
1129 | | - copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1150 | + versionManagerPanel.add(nextVersionButton = GetButton("icons/redo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1130 | 1151 | nextVersionButton.setToolTipText("Next version"); |
---|
1131 | 1152 | nextVersionButton.addActionListener(this); |
---|
1132 | 1153 | nextVersionButton.setEnabled(false); |
---|
1133 | 1154 | |
---|
1134 | | - oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1155 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1135 | 1156 | oneStepButton.setToolTipText("Animate one step forward"); |
---|
1136 | 1157 | oneStepButton.addActionListener(this); |
---|
1137 | 1158 | |
---|
.. | .. |
---|
1154 | 1175 | |
---|
1155 | 1176 | if (Globals.ADVANCED) |
---|
1156 | 1177 | { |
---|
1157 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1178 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1158 | 1179 | snapobjectButton.addActionListener(this); |
---|
1159 | 1180 | snapobjectButton.setToolTipText("Snap Object"); |
---|
1160 | 1181 | |
---|
1161 | | - oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1182 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1162 | 1183 | fourButton.addActionListener(this); |
---|
1163 | 1184 | fourButton.setToolTipText("Show control panel only"); |
---|
1164 | 1185 | } |
---|
.. | .. |
---|
1166 | 1187 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
1167 | 1188 | |
---|
1168 | 1189 | |
---|
1169 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1190 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1170 | 1191 | rootButton.setToolTipText("Open selection in new tab"); |
---|
1171 | 1192 | rootButton.addActionListener(this); |
---|
1172 | 1193 | |
---|
1173 | | - oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1194 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1174 | 1195 | closeButton.setToolTipText("Close tab"); |
---|
1175 | 1196 | closeButton.addActionListener(this); |
---|
1176 | 1197 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
.. | .. |
---|
1179 | 1200 | cGridBag row1 = new cGridBag(); |
---|
1180 | 1201 | |
---|
1181 | 1202 | // INSERT |
---|
1182 | | - row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1203 | + row1.add(gridButton = GetButton("icons/grid.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1183 | 1204 | gridButton.setToolTipText("Create ground"); |
---|
1184 | 1205 | gridButton.addActionListener(this); |
---|
1185 | 1206 | |
---|
1186 | | - row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1207 | + row1.add(boxButton = GetButton("icons/box.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1187 | 1208 | boxButton.setToolTipText("Create box"); |
---|
1188 | 1209 | boxButton.addActionListener(this); |
---|
1189 | 1210 | |
---|
1190 | | - row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1211 | + row1.add(superButton = GetButton("icons/super.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1191 | 1212 | superButton.setToolTipText("Create superellipsoid"); |
---|
1192 | 1213 | superButton.addActionListener(this); |
---|
1193 | 1214 | |
---|
1194 | | - row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1215 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1195 | 1216 | sphereButton.setToolTipText("Create sphere"); |
---|
1196 | 1217 | sphereButton.addActionListener(this); |
---|
1197 | 1218 | |
---|
1198 | | - row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1219 | + row1.add(coneButton = GetButton("icons/cone.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1199 | 1220 | coneButton.setToolTipText("Create cone"); |
---|
1200 | 1221 | coneButton.addActionListener(this); |
---|
1201 | 1222 | |
---|
1202 | | - row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1223 | + row1.add(torusButton = GetButton("icons/torus.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1203 | 1224 | torusButton.setToolTipText("Create torus"); |
---|
1204 | 1225 | torusButton.addActionListener(this); |
---|
1205 | 1226 | |
---|
1206 | | - if (Globals.ADVANCED) |
---|
| 1227 | + if (false) //Globals.ADVANCED) |
---|
1207 | 1228 | { |
---|
1208 | | - oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1229 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1209 | 1230 | kleinButton.setToolTipText("Create Klein bottle"); |
---|
1210 | 1231 | kleinButton.addActionListener(this); |
---|
1211 | 1232 | } |
---|
1212 | 1233 | |
---|
1213 | | - row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1234 | + row1.add(particlesButton = GetButton("icons/particles.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1214 | 1235 | particlesButton.setToolTipText("Create particle system"); |
---|
1215 | 1236 | particlesButton.addActionListener(this); |
---|
1216 | 1237 | |
---|
.. | .. |
---|
1218 | 1239 | |
---|
1219 | 1240 | cGridBag row2 = new cGridBag(); |
---|
1220 | 1241 | |
---|
1221 | | - row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1242 | + row2.add(groupButton = GetButton("icons/group.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1222 | 1243 | groupButton.setToolTipText("Create group"); |
---|
1223 | 1244 | groupButton.addActionListener(this); |
---|
1224 | 1245 | |
---|
1225 | | - row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1246 | + row2.add(compositeButton = GetButton("icons/composite.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1226 | 1247 | compositeButton.setToolTipText("Create composite"); |
---|
1227 | 1248 | compositeButton.addActionListener(this); |
---|
1228 | 1249 | |
---|
1229 | | - row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1250 | + row2.add(switchButton = GetButton("icons/switch.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1230 | 1251 | switchButton.setToolTipText("Create item switcher"); |
---|
1231 | 1252 | switchButton.addActionListener(this); |
---|
1232 | 1253 | |
---|
1233 | | - row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1254 | + row2.add(loopButton = GetButton("icons/loop.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1234 | 1255 | loopButton.setToolTipText("Create loop"); |
---|
1235 | 1256 | loopButton.addActionListener(this); |
---|
1236 | 1257 | |
---|
1237 | | - row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1258 | + row2.add(textureButton = GetButton("icons/texture.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1238 | 1259 | textureButton.setToolTipText("Create texture"); |
---|
1239 | 1260 | textureButton.addActionListener(this); |
---|
1240 | 1261 | |
---|
1241 | | - row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1262 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1242 | 1263 | overlayButton.setToolTipText("Create overlay"); |
---|
1243 | 1264 | overlayButton.addActionListener(this); |
---|
1244 | 1265 | |
---|
1245 | | - row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1266 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1246 | 1267 | lightButton.setToolTipText("Create light"); |
---|
1247 | 1268 | lightButton.addActionListener(this); |
---|
1248 | 1269 | |
---|
.. | .. |
---|
1252 | 1273 | |
---|
1253 | 1274 | CreateTexturePanel(textures); |
---|
1254 | 1275 | |
---|
| 1276 | + int tabCount = resourcecontainer.getTabCount(); |
---|
| 1277 | + |
---|
| 1278 | + if (tabCount > 0) |
---|
| 1279 | + resourcecontainer.setSelectedIndex((int)(Math.random() * tabCount)); |
---|
| 1280 | + |
---|
1255 | 1281 | oe.toolboxPanel.add(textures); |
---|
1256 | 1282 | |
---|
1257 | 1283 | textures.preferredHeight = 100; |
---|
.. | .. |
---|
1259 | 1285 | CreateSkyboxPanel(oe.skyboxPanel); |
---|
1260 | 1286 | |
---|
1261 | 1287 | // EDIT panel |
---|
1262 | | - editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1288 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1263 | 1289 | editButton.setToolTipText("Pin selection controls"); |
---|
1264 | 1290 | editButton.addActionListener(this); |
---|
1265 | 1291 | |
---|
1266 | | - editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1292 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1267 | 1293 | uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
1268 | 1294 | uneditButton.addActionListener(this); |
---|
1269 | 1295 | |
---|
.. | .. |
---|
1271 | 1297 | allParamsButton.setToolTipText("Show all controls"); |
---|
1272 | 1298 | allParamsButton.addActionListener(this); |
---|
1273 | 1299 | |
---|
1274 | | - editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1300 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1275 | 1301 | clearPanelButton.setToolTipText("Clear all controls"); |
---|
1276 | 1302 | clearPanelButton.addActionListener(this); |
---|
1277 | 1303 | |
---|
.. | .. |
---|
1279 | 1305 | //unselectButton.setToolTipText("Unselect"); |
---|
1280 | 1306 | //unselectButton.addActionListener(this); |
---|
1281 | 1307 | |
---|
1282 | | - editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1308 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1283 | 1309 | flashSelectionButton.setToolTipText("Highlight selection"); |
---|
1284 | 1310 | flashSelectionButton.addActionListener(this); |
---|
1285 | 1311 | |
---|
.. | .. |
---|
1302 | 1328 | |
---|
1303 | 1329 | cGridBag jSPPanel = new cGridBag(); |
---|
1304 | 1330 | |
---|
| 1331 | + jSPPanel.preferredHeight = 20; |
---|
| 1332 | + |
---|
1305 | 1333 | JScrollPane jSP; |
---|
1306 | 1334 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
1307 | 1335 | jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
.. | .. |
---|
1310 | 1338 | oe.treePanel.add(jSPPanel); |
---|
1311 | 1339 | oe.treePanel.Return(); |
---|
1312 | 1340 | |
---|
1313 | | - oe.treePanel.add(copyOptionsPanel); |
---|
| 1341 | + oe.treePanel.add(versionManagerPanel); |
---|
1314 | 1342 | oe.treePanel.Return(); |
---|
1315 | | - cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
1316 | | - versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
1317 | | - sliderPane.preferredHeight = 1; |
---|
| 1343 | + versionSliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 1344 | + versionSlider = (cNumberSlider)versionSliderPane.getComponent(1); |
---|
| 1345 | + versionSliderPane.preferredHeight = 3; |
---|
1318 | 1346 | |
---|
1319 | 1347 | // mainPanel.setDividerLocation(0.1); //1.0); |
---|
1320 | 1348 | mainPanel.setResizeWeight(0.4); |
---|
.. | .. |
---|
1472 | 1500 | |
---|
1473 | 1501 | void EditObject(Object3D obj) |
---|
1474 | 1502 | { |
---|
1475 | | - assert(obj instanceof Composite); |
---|
| 1503 | + //assert(obj instanceof Composite); |
---|
1476 | 1504 | |
---|
1477 | 1505 | // if (obj.versionlist == null) |
---|
1478 | 1506 | // { |
---|
.. | .. |
---|
1504 | 1532 | |
---|
1505 | 1533 | oe.SetupViews(); |
---|
1506 | 1534 | |
---|
| 1535 | + if (Globals.DEBUG) |
---|
1507 | 1536 | System.out.println("SetupViews"); |
---|
1508 | 1537 | DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer( |
---|
1509 | 1538 | oe.cameraView, DnDConstants.ACTION_COPY_OR_MOVE, this); // ACTION_LINK ?? |
---|
.. | .. |
---|
2107 | 2136 | switch(axis) |
---|
2108 | 2137 | { |
---|
2109 | 2138 | case 0 : |
---|
2110 | | - vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z; |
---|
2111 | | - vert2.x = minima.x; vert2.y = maxima.y; vert2.z = minima.z; |
---|
2112 | | - vert3.x = minima.x; vert3.y = minima.y; vert3.z = maxima.z; |
---|
2113 | | - vert4.x = minima.x; vert4.y = maxima.y; vert4.z = maxima.z; |
---|
| 2139 | + vert1.x = minima.x + 0.001f; vert1.y = minima.y; vert1.z = minima.z; |
---|
| 2140 | + vert2.x = minima.x + 0.001f; vert2.y = maxima.y; vert2.z = minima.z; |
---|
| 2141 | + vert3.x = minima.x + 0.001f; vert3.y = minima.y; vert3.z = maxima.z; |
---|
| 2142 | + vert4.x = minima.x + 0.001f; vert4.y = maxima.y; vert4.z = maxima.z; |
---|
2114 | 2143 | norm = cVector.X; |
---|
2115 | 2144 | break; |
---|
2116 | 2145 | case 1 : |
---|
2117 | | - vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z; |
---|
2118 | | - vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z; |
---|
2119 | | - vert3.x = minima.x; vert3.y = minima.y; vert3.z = maxima.z; |
---|
2120 | | - vert4.x = maxima.x; vert4.y = minima.y; vert4.z = maxima.z; |
---|
| 2146 | + vert1.x = minima.x; vert1.y = minima.y + 0.001f; vert1.z = minima.z; |
---|
| 2147 | + vert2.x = maxima.x; vert2.y = minima.y + 0.001f; vert2.z = minima.z; |
---|
| 2148 | + vert3.x = minima.x; vert3.y = minima.y + 0.001f; vert3.z = maxima.z; |
---|
| 2149 | + vert4.x = maxima.x; vert4.y = minima.y + 0.001f; vert4.z = maxima.z; |
---|
2121 | 2150 | norm = cVector.Y; |
---|
2122 | 2151 | break; |
---|
2123 | 2152 | case 2 : |
---|
2124 | | - vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z; |
---|
2125 | | - vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z; |
---|
2126 | | - vert3.x = minima.x; vert3.y = maxima.y; vert3.z = minima.z; |
---|
2127 | | - vert4.x = maxima.x; vert4.y = maxima.y; vert4.z = minima.z; |
---|
| 2153 | + vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z + 0.001f; |
---|
| 2154 | + vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z + 0.001f; |
---|
| 2155 | + vert3.x = minima.x; vert3.y = maxima.y; vert3.z = minima.z + 0.001f; |
---|
| 2156 | + vert4.x = maxima.x; vert4.y = maxima.y; vert4.z = minima.z + 0.001f; |
---|
2128 | 2157 | norm = cVector.Z; |
---|
2129 | 2158 | break; |
---|
2130 | 2159 | } |
---|
.. | .. |
---|
3446 | 3475 | { |
---|
3447 | 3476 | ClearMaterials(); |
---|
3448 | 3477 | } else |
---|
| 3478 | + if (source == clearVersionsItem) |
---|
| 3479 | + { |
---|
| 3480 | + ClearVersions(); |
---|
| 3481 | + } else |
---|
3449 | 3482 | if (source == liveleavesItem) |
---|
3450 | 3483 | { |
---|
3451 | 3484 | LiveLeaves(true); |
---|
.. | .. |
---|
3585 | 3618 | if (source == transformChildrenItem) |
---|
3586 | 3619 | { |
---|
3587 | 3620 | TransformChildren(); |
---|
| 3621 | + } else |
---|
| 3622 | + if (source == textureRatioRItem) |
---|
| 3623 | + { |
---|
| 3624 | + TextureRatio(0); |
---|
| 3625 | + } else |
---|
| 3626 | + if (source == textureRatioGItem) |
---|
| 3627 | + { |
---|
| 3628 | + TextureRatio(1); |
---|
| 3629 | + } else |
---|
| 3630 | + if (source == textureRatioBItem) |
---|
| 3631 | + { |
---|
| 3632 | + TextureRatio(2); |
---|
3588 | 3633 | } else |
---|
3589 | 3634 | if (source == resetTransformItem) |
---|
3590 | 3635 | { |
---|
.. | .. |
---|
3958 | 4003 | if (source == closeButton) |
---|
3959 | 4004 | { |
---|
3960 | 4005 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
| 4006 | + if (copy.versionlist != null) |
---|
| 4007 | + Replace(); |
---|
| 4008 | + |
---|
3961 | 4009 | cRadio ab; |
---|
3962 | 4010 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3963 | 4011 | { |
---|
.. | .. |
---|
4056 | 4104 | } else |
---|
4057 | 4105 | if(source instanceof cRadio) |
---|
4058 | 4106 | { |
---|
| 4107 | + if (copy.versionlist != null) |
---|
| 4108 | + Replace(); |
---|
| 4109 | + |
---|
4059 | 4110 | group.parent = keepparent; |
---|
4060 | 4111 | group.attributes = 0; |
---|
4061 | 4112 | //group.editWindow = null; |
---|
.. | .. |
---|
4107 | 4158 | */ |
---|
4108 | 4159 | radio.layout.doClick(); |
---|
4109 | 4160 | |
---|
4110 | | - assert(copy instanceof Composite); |
---|
| 4161 | + //assert(copy instanceof Composite); |
---|
4111 | 4162 | |
---|
4112 | 4163 | if (copy.versionlist == null) |
---|
4113 | 4164 | { |
---|
4114 | | - copy.versionlist = new Object3D[100]; |
---|
4115 | 4165 | copy.versionindex = -1; |
---|
4116 | 4166 | |
---|
4117 | | - Save(true); |
---|
| 4167 | + // Cannot work with loops |
---|
| 4168 | + // To fix this issue, we first mark all nodes above the root, |
---|
| 4169 | + // and check if any of these nodes are reachable below the root. |
---|
| 4170 | + Grafreed.grafreed.universe.TagObjects(copy, true); |
---|
| 4171 | + |
---|
| 4172 | + if (copy instanceof Composite && copy.versionlist == null && !copy.HasTags()) |
---|
| 4173 | + { |
---|
| 4174 | + copy.versionlist = new Object3D[100]; |
---|
| 4175 | + |
---|
| 4176 | + //Save(true); |
---|
| 4177 | + } |
---|
| 4178 | + else |
---|
| 4179 | + copy.versionindex = -2; |
---|
| 4180 | + |
---|
| 4181 | + Grafreed.grafreed.universe.TagObjects(copy, false); |
---|
4118 | 4182 | } |
---|
4119 | 4183 | |
---|
4120 | 4184 | SetVersionStates(); |
---|
.. | .. |
---|
4232 | 4296 | refreshContents(); |
---|
4233 | 4297 | } |
---|
4234 | 4298 | |
---|
| 4299 | + void TextureRatio(int axis) |
---|
| 4300 | + { |
---|
| 4301 | + Object3D obj; |
---|
| 4302 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 4303 | + { |
---|
| 4304 | + obj = (Object3D)e.nextElement(); |
---|
| 4305 | + obj.TextureRatio(axis); |
---|
| 4306 | + } |
---|
| 4307 | + |
---|
| 4308 | + refreshContents(); |
---|
| 4309 | + } |
---|
| 4310 | + |
---|
4235 | 4311 | void ResetTransform() |
---|
4236 | 4312 | { |
---|
4237 | 4313 | ResetTransform(-1); |
---|
.. | .. |
---|
4247 | 4323 | if (obj.toParent == null) |
---|
4248 | 4324 | continue; |
---|
4249 | 4325 | |
---|
4250 | | - if (mask == -1) |
---|
4251 | | - { |
---|
4252 | | - if (obj instanceof Camera) // jan 2014 |
---|
4253 | | - { |
---|
4254 | | - LA.matIdentity(obj.toParent); |
---|
4255 | | - LA.matIdentity(obj.fromParent); |
---|
4256 | | - } |
---|
4257 | | - else |
---|
4258 | | - { |
---|
4259 | | - obj.toParent = null; // jan 2014 LA.matIdentity(obj.toParent); |
---|
4260 | | - obj.fromParent = null; // LA.matIdentity(obj.fromParent); |
---|
4261 | | - } |
---|
4262 | | - TouchTransform(obj); |
---|
4263 | | - continue; |
---|
4264 | | - } |
---|
4265 | | - if ((mask&2) != 0) // Scale |
---|
4266 | | - { |
---|
4267 | | - obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1; |
---|
4268 | | - obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0; |
---|
4269 | | - obj.toParent[0][2] = obj.toParent[1][2] = obj.toParent[2][1] = 0; |
---|
4270 | | - obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1; |
---|
4271 | | - obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0; |
---|
4272 | | - obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0; |
---|
4273 | | - } |
---|
4274 | | - if ((mask&4) != 0) // Rotation |
---|
4275 | | - { |
---|
4276 | | - // ? |
---|
4277 | | - } |
---|
4278 | | - if ((mask&1) != 0) // Translation |
---|
4279 | | - { |
---|
4280 | | - if (obj.toParent != null) |
---|
4281 | | - { |
---|
4282 | | - obj.toParent[3][0] = obj.toParent[3][1] = obj.toParent[3][2] = 0; |
---|
4283 | | - obj.fromParent[3][0] = obj.fromParent[3][1] = obj.fromParent[3][2] = 0; |
---|
4284 | | - } |
---|
4285 | | - } |
---|
| 4326 | + obj.ResetTransform(mask); |
---|
| 4327 | + |
---|
4286 | 4328 | if (obj.parent == null) |
---|
4287 | 4329 | { |
---|
4288 | 4330 | System.out.println("NULL PARENT!"); |
---|
.. | .. |
---|
4791 | 4833 | { |
---|
4792 | 4834 | Object3D obj = group.selection.get(i); |
---|
4793 | 4835 | |
---|
| 4836 | + if (obj.toParent == null) |
---|
| 4837 | + { |
---|
| 4838 | + obj.toParent = LA.newMatrix(); |
---|
| 4839 | + obj.fromParent = LA.newMatrix(); |
---|
| 4840 | + } |
---|
| 4841 | + |
---|
4794 | 4842 | LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
4795 | 4843 | LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
4796 | 4844 | } |
---|
.. | .. |
---|
5082 | 5130 | refreshContents(); |
---|
5083 | 5131 | } |
---|
5084 | 5132 | |
---|
| 5133 | + void ClearVersions() |
---|
| 5134 | + { |
---|
| 5135 | + group.selection.ClearVersions(); |
---|
| 5136 | + refreshContents(); |
---|
| 5137 | + } |
---|
| 5138 | + |
---|
5085 | 5139 | void FlipV(boolean flip) |
---|
5086 | 5140 | { |
---|
5087 | 5141 | group.selection.FlipV(flip); |
---|
.. | .. |
---|
5359 | 5413 | if (group.selection != null) |
---|
5360 | 5414 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
5361 | 5415 | { |
---|
5362 | | - if (!(e.nextElement() instanceof Composite)) |
---|
| 5416 | + Object next = e.nextElement(); |
---|
| 5417 | + if (!(next instanceof Composite)) // || (next instanceof GroupLeaf)) |
---|
5363 | 5418 | { |
---|
5364 | 5419 | allComposites = false; |
---|
5365 | 5420 | break; |
---|
5366 | 5421 | } |
---|
5367 | 5422 | } |
---|
5368 | 5423 | |
---|
5369 | | - rootButton.setEnabled(allComposites); |
---|
| 5424 | + rootButton.setEnabled(true); // allComposites); |
---|
5370 | 5425 | } |
---|
5371 | 5426 | |
---|
5372 | 5427 | void refreshContents(boolean cp) |
---|
5373 | 5428 | { |
---|
| 5429 | + if (Globals.ADVANCED) |
---|
5374 | 5430 | //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
5375 | 5431 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
5376 | 5432 | { |
---|
.. | .. |
---|
6321 | 6377 | private MenuItem clipMeshItem; |
---|
6322 | 6378 | private MenuItem smoothMeshItem; |
---|
6323 | 6379 | private MenuItem clearMaterialsItem; |
---|
| 6380 | + private MenuItem clearVersionsItem; |
---|
6324 | 6381 | |
---|
6325 | 6382 | private MenuItem liveleavesItem; |
---|
6326 | 6383 | private MenuItem unliveleavesItem; |
---|
.. | .. |
---|
6344 | 6401 | private MenuItem maxTexturesItem; |
---|
6345 | 6402 | private MenuItem panoTexturesItem; |
---|
6346 | 6403 | |
---|
| 6404 | + private MenuItem textureRatioRItem; |
---|
| 6405 | + private MenuItem textureRatioGItem; |
---|
| 6406 | + private MenuItem textureRatioBItem; |
---|
6347 | 6407 | private MenuItem resetCentroidItem; |
---|
6348 | 6408 | private MenuItem resetCentroidXZItem; |
---|
6349 | 6409 | private MenuItem resetTransformItem; |
---|
6350 | 6410 | private MenuItem transformGeometryItem; |
---|
6351 | 6411 | private MenuItem transformChildrenItem; |
---|
6352 | 6412 | private MenuItem hideItem; |
---|
6353 | | - private MenuItem grabItem; |
---|
| 6413 | + private JMenuItem grabItem; |
---|
6354 | 6414 | private MenuItem backItem; |
---|
6355 | 6415 | private MenuItem frontItem; |
---|
6356 | 6416 | private MenuItem cameraItem; |
---|