Normand Briere
2019-08-22 6a145f6c81dfcbe0653eda27d042efb48daa7512
GroupEditor.java
....@@ -29,7 +29,7 @@
2929 {
3030 cButton skyboxButton;
3131 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));
3333 //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF));
3434 skyboxButton.setToolTipText(s.equals("") ? "No background" : s);
3535 skyboxButton.addActionListener(new ActionListener()
....@@ -46,7 +46,7 @@
4646 {
4747 cButton textureButton;
4848 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));
5050 textureButton.setToolTipText(c + count);
5151 textureButton.addActionListener(new ActionListener()
5252 {
....@@ -347,7 +347,7 @@
347347
348348 public void CreateSkyboxPanel(cGridBag skyboxPanel)
349349 {
350
- JTabbedPane skyboxpane = new JTabbedPane();
350
+ JTabbedPane skyboxpane = new JTabbedPane(JTabbedPane.LEFT);
351351
352352 AddSkyboxTab0(skyboxpane);
353353 AddSkyboxTab1(skyboxpane);
....@@ -857,9 +857,9 @@
857857 hideleavesItem.addActionListener(this);
858858 showleavesItem = menu.add(new MenuItem("Show Leaves"));
859859 showleavesItem.addActionListener(this);
860
- markleavesItem = menu.add(new MenuItem("Mark Leaves"));
860
+ markleavesItem = menu.add(new MenuItem("Anim Leaves"));
861861 markleavesItem.addActionListener(this);
862
- unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves"));
862
+ unmarkleavesItem = menu.add(new MenuItem("Unanim Leaves"));
863863 unmarkleavesItem.addActionListener(this);
864864 rewindleavesItem = menu.add(new MenuItem("Rewind Leaves"));
865865 rewindleavesItem.addActionListener(this);
....@@ -936,6 +936,8 @@
936936 cGridBag currenttab;
937937 //boolean added; // patch for jar
938938
939
+ int totalcount = 0;
940
+
939941 int tabcount = 0;
940942 int colcount = 0;
941943 int rowcount = 0;
....@@ -964,7 +966,7 @@
964966 texturecount = 0;
965967 }
966968
967
- if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg"))
969
+ if (path.length > 2 && (path[2].toLowerCase().endsWith(".jpg") || path[2].toLowerCase().endsWith(".png")))
968970 {
969971 //if (!added)
970972 {
....@@ -973,7 +975,8 @@
973975 currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname));
974976 }
975977
976
- AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab);
978
+ AddTextureButton(path[0], path[1], path[2], ++texturecount, currenttab);
979
+ totalcount++;
977980
978981 if (++colcount >= columns)
979982 {
....@@ -999,6 +1002,8 @@
9991002 container.add(resourcecontainer);
10001003
10011004 Grafreed.ParseResources("textures", this);
1005
+
1006
+ // 935. System.out.println("Total = " + totalcount);
10021007 }
10031008
10041009 void SetupUI2(ObjEditor oe)
....@@ -1038,9 +1043,9 @@
10381043 oe.radioPanel.add(dummyButton);
10391044 oe.buttonGroup.add(dummyButton);
10401045 */
1041
- cGridBag copyOptionsPanel = new cGridBag();
1046
+ cGridBag versionManagerPanel = new cGridBag();
10421047
1043
- copyOptionsPanel.preferredHeight = 2;
1048
+ versionManagerPanel.preferredHeight = 4;
10441049
10451050 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
10461051
....@@ -1067,25 +1072,25 @@
10671072 // }
10681073 // });
10691074
1070
- oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1075
+ oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10711076 collapseButton.setToolTipText("Collapse toolbar");
10721077 collapseButton.addActionListener(this);
10731078
1074
- oe.toolbarPanel.add(maximize3DButton = GetButton("icons/empty.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1079
+ oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10751080 maximize3DButton.setToolTipText("Maximize 3D view");
10761081 maximize3DButton.addActionListener(this);
10771082
1078
- oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1083
+ oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10791084 twoButton.setToolTipText("Show 3D view only");
10801085 twoButton.addActionListener(this);
10811086 this.fullscreenLayout = twoButton;
10821087
1083
- oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1088
+ oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10841089 threeButton.setToolTipText("Show controls and 3D view");
10851090 threeButton.addActionListener(this);
10861091 if (Globals.ADVANCED)
10871092 {
1088
- oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1093
+ oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10891094 sixButton.setToolTipText("Show 3D view and controls");
10901095 sixButton.addActionListener(this);
10911096 }
....@@ -1094,51 +1099,51 @@
10941099 // sevenButton.addActionListener(this);
10951100 //
10961101
1097
- oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1102
+ oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
10981103 fullButton.setToolTipText("Full-screen window");
10991104 fullButton.addActionListener(this);
11001105
1101
- oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1106
+ oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11021107 screenfitButton.setToolTipText("Screen fit");
11031108 screenfitButton.addActionListener(this);
11041109
1105
- oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1110
+ oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11061111 restoreCameraButton.setToolTipText("Restore viewpoint");
11071112 restoreCameraButton.addActionListener(this);
11081113
1109
- copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1114
+ versionManagerPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11101115 saveVersionButton.setToolTipText("Duplicate current version");
11111116 saveVersionButton.addActionListener(this);
11121117
1113
- copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1118
+ versionManagerPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11141119 deleteVersionButton.setToolTipText("Delete current version");
11151120 deleteVersionButton.addActionListener(this);
11161121 deleteVersionButton.setEnabled(false);
11171122
1118
- copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1123
+ versionManagerPanel.add(previousVersionButton = GetButton("icons/undo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11191124 previousVersionButton.setToolTipText("Previous version");
11201125 previousVersionButton.addActionListener(this);
11211126 previousVersionButton.setEnabled(false);
11221127
11231128 cGridBag updown = new cGridBag().setVertical(true);
1124
- updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1129
+ updown.add(restoreButton = GetButton("icons/restore.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11251130 restoreButton.setToolTipText("Undo (restore current version)");
11261131 restoreButton.addActionListener(this);
11271132 restoreButton.setEnabled(false);
11281133
1129
- updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1134
+ updown.add(replaceButton = GetButton("icons/replace.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11301135 replaceButton.setToolTipText("Save (replace current version)");
11311136 replaceButton.addActionListener(this);
11321137 replaceButton.setEnabled(false);
11331138
1134
- copyOptionsPanel.add(updown);
1139
+ versionManagerPanel.add(updown);
11351140
1136
- copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1141
+ versionManagerPanel.add(nextVersionButton = GetButton("icons/redo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11371142 nextVersionButton.setToolTipText("Next version");
11381143 nextVersionButton.addActionListener(this);
11391144 nextVersionButton.setEnabled(false);
11401145
1141
- oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1146
+ oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11421147 oneStepButton.setToolTipText("Animate one step forward");
11431148 oneStepButton.addActionListener(this);
11441149
....@@ -1161,11 +1166,11 @@
11611166
11621167 if (Globals.ADVANCED)
11631168 {
1164
- oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1169
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11651170 snapobjectButton.addActionListener(this);
11661171 snapobjectButton.setToolTipText("Snap Object");
11671172
1168
- oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1173
+ oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11691174 fourButton.addActionListener(this);
11701175 fourButton.setToolTipText("Show control panel only");
11711176 }
....@@ -1173,11 +1178,11 @@
11731178 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
11741179
11751180
1176
- oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1181
+ oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11771182 rootButton.setToolTipText("Open selection in new tab");
11781183 rootButton.addActionListener(this);
11791184
1180
- oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1185
+ oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11811186 closeButton.setToolTipText("Close tab");
11821187 closeButton.addActionListener(this);
11831188 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
....@@ -1186,38 +1191,38 @@
11861191 cGridBag row1 = new cGridBag();
11871192
11881193 // INSERT
1189
- row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1194
+ row1.add(gridButton = GetButton("icons/grid.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11901195 gridButton.setToolTipText("Create ground");
11911196 gridButton.addActionListener(this);
11921197
1193
- row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1198
+ row1.add(boxButton = GetButton("icons/box.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11941199 boxButton.setToolTipText("Create box");
11951200 boxButton.addActionListener(this);
11961201
1197
- row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1202
+ row1.add(superButton = GetButton("icons/super.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
11981203 superButton.setToolTipText("Create superellipsoid");
11991204 superButton.addActionListener(this);
12001205
1201
- row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1206
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12021207 sphereButton.setToolTipText("Create sphere");
12031208 sphereButton.addActionListener(this);
12041209
1205
- row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1210
+ row1.add(coneButton = GetButton("icons/cone.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12061211 coneButton.setToolTipText("Create cone");
12071212 coneButton.addActionListener(this);
12081213
1209
- row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1214
+ row1.add(torusButton = GetButton("icons/torus.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12101215 torusButton.setToolTipText("Create torus");
12111216 torusButton.addActionListener(this);
12121217
12131218 if (Globals.ADVANCED)
12141219 {
1215
- oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1220
+ oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12161221 kleinButton.setToolTipText("Create Klein bottle");
12171222 kleinButton.addActionListener(this);
12181223 }
12191224
1220
- row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1225
+ row1.add(particlesButton = GetButton("icons/particles.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12211226 particlesButton.setToolTipText("Create particle system");
12221227 particlesButton.addActionListener(this);
12231228
....@@ -1225,31 +1230,31 @@
12251230
12261231 cGridBag row2 = new cGridBag();
12271232
1228
- row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1233
+ row2.add(groupButton = GetButton("icons/group.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12291234 groupButton.setToolTipText("Create group");
12301235 groupButton.addActionListener(this);
12311236
1232
- row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1237
+ row2.add(compositeButton = GetButton("icons/composite.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12331238 compositeButton.setToolTipText("Create composite");
12341239 compositeButton.addActionListener(this);
12351240
1236
- row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1241
+ row2.add(switchButton = GetButton("icons/switch.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12371242 switchButton.setToolTipText("Create item switcher");
12381243 switchButton.addActionListener(this);
12391244
1240
- row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1245
+ row2.add(loopButton = GetButton("icons/loop.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12411246 loopButton.setToolTipText("Create loop");
12421247 loopButton.addActionListener(this);
12431248
1244
- row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1249
+ row2.add(textureButton = GetButton("icons/texture.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12451250 textureButton.setToolTipText("Create texture");
12461251 textureButton.addActionListener(this);
12471252
1248
- row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1253
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12491254 overlayButton.setToolTipText("Create overlay");
12501255 overlayButton.addActionListener(this);
12511256
1252
- row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1257
+ row2.add(lightButton = GetButton("icons/light-bulb.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12531258 lightButton.setToolTipText("Create light");
12541259 lightButton.addActionListener(this);
12551260
....@@ -1259,6 +1264,11 @@
12591264
12601265 CreateTexturePanel(textures);
12611266
1267
+ int tabCount = resourcecontainer.getTabCount();
1268
+
1269
+ if (tabCount > 0)
1270
+ resourcecontainer.setSelectedIndex((int)(Math.random() * tabCount));
1271
+
12621272 oe.toolboxPanel.add(textures);
12631273
12641274 textures.preferredHeight = 100;
....@@ -1266,11 +1276,11 @@
12661276 CreateSkyboxPanel(oe.skyboxPanel);
12671277
12681278 // EDIT panel
1269
- editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1279
+ editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12701280 editButton.setToolTipText("Pin selection controls");
12711281 editButton.addActionListener(this);
12721282
1273
- editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1283
+ editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12741284 uneditButton.setToolTipText("Unpin and remove selection controls");
12751285 uneditButton.addActionListener(this);
12761286
....@@ -1278,7 +1288,7 @@
12781288 allParamsButton.setToolTipText("Show all controls");
12791289 allParamsButton.addActionListener(this);
12801290
1281
- editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1291
+ editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12821292 clearPanelButton.setToolTipText("Clear all controls");
12831293 clearPanelButton.addActionListener(this);
12841294
....@@ -1286,7 +1296,7 @@
12861296 //unselectButton.setToolTipText("Unselect");
12871297 //unselectButton.addActionListener(this);
12881298
1289
- editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1299
+ editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Globals.NIMBUSLAF)); //, oe.aConstraints);
12901300 flashSelectionButton.setToolTipText("Highlight selection");
12911301 flashSelectionButton.addActionListener(this);
12921302
....@@ -1309,6 +1319,8 @@
13091319
13101320 cGridBag jSPPanel = new cGridBag();
13111321
1322
+ jSPPanel.preferredHeight = 20;
1323
+
13121324 JScrollPane jSP;
13131325 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
13141326 jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints);
....@@ -1317,11 +1329,11 @@
13171329 oe.treePanel.add(jSPPanel);
13181330 oe.treePanel.Return();
13191331
1320
- oe.treePanel.add(copyOptionsPanel);
1332
+ oe.treePanel.add(versionManagerPanel);
13211333 oe.treePanel.Return();
1322
- cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1323
- versionSlider = (cNumberSlider)sliderPane.getComponent(1);
1324
- sliderPane.preferredHeight = 1;
1334
+ versionSliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
1335
+ versionSlider = (cNumberSlider)versionSliderPane.getComponent(1);
1336
+ versionSliderPane.preferredHeight = 3;
13251337
13261338 // mainPanel.setDividerLocation(0.1); //1.0);
13271339 mainPanel.setResizeWeight(0.4);
....@@ -3966,6 +3978,8 @@
39663978 if (source == closeButton)
39673979 {
39683980 //System.out.println("CLOSE: " + buttonGroup.getSelection());
3981
+ Replace();
3982
+
39693983 cRadio ab;
39703984 for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();)
39713985 {
....@@ -4064,6 +4078,8 @@
40644078 } else
40654079 if(source instanceof cRadio)
40664080 {
4081
+ Replace();
4082
+
40674083 group.parent = keepparent;
40684084 group.attributes = 0;
40694085 //group.editWindow = null;
....@@ -4119,13 +4135,21 @@
41194135
41204136 if (copy.versionlist == null)
41214137 {
4122
- copy.versionlist = new Object3D[100];
41234138 copy.versionindex = -1;
41244139
41254140 // Cannot work with loops
4126
- // To fix this issue, first mark all nodes above the root,
4141
+ // To fix this issue, we first mark all nodes above the root,
41274142 // and check if any of these nodes are reachable below the root.
4128
- //Save(true);
4143
+ Grafreed.grafreed.universe.TagObjects(copy, true);
4144
+
4145
+ if (!copy.HasTags())
4146
+ {
4147
+ copy.versionlist = new Object3D[100];
4148
+
4149
+ Save(true);
4150
+ }
4151
+
4152
+ Grafreed.grafreed.universe.TagObjects(copy, false);
41294153 }
41304154
41314155 SetVersionStates();
....@@ -4273,7 +4297,7 @@
42734297 TouchTransform(obj);
42744298 continue;
42754299 }
4276
- if ((mask&2) != 0) // Scale
4300
+ if ((mask&2) != 0) // Scale/rotation
42774301 {
42784302 obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1;
42794303 obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0;
....@@ -4281,10 +4305,6 @@
42814305 obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1;
42824306 obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0;
42834307 obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0;
4284
- }
4285
- if ((mask&4) != 0) // Rotation
4286
- {
4287
- // ?
42884308 }
42894309 if ((mask&1) != 0) // Translation
42904310 {
....@@ -5383,6 +5403,7 @@
53835403
53845404 void refreshContents(boolean cp)
53855405 {
5406
+ if (Globals.ADVANCED)
53865407 //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
53875408 if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
53885409 {