Normand Briere
2019-05-13 f924d3e00db476c06f55f3d5aaef307e17575340
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -97,14 +98,14 @@
9798
9899 void CloneClipboard(boolean supports)
99100 {
100
- assert(GrafreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
102
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
104
- makeSomething(CloneObject(GrafreeD.clipboard.get(0), false));
101
+ assert(Grafreed.clipboard.parent == null);
102
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
103
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
104
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
105
+ makeSomething(CloneObject(Grafreed.clipboard.get(0), false));
105106 else
106
- makeSomething(CloneObject(GrafreeD.clipboard, false));
107
- GrafreeD.clipboard.get(0).parent = keepparent;
107
+ makeSomething(CloneObject(Grafreed.clipboard, false));
108
+ Grafreed.clipboard.get(0).parent = keepparent;
108109 }
109110
110111 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +119,7 @@
118119 // obj.support = null;
119120 if (!supports)
120121 obj.SaveSupports();
121
- Object3D clone = (Object3D)GrafreeD.clone(obj);
122
+ Object3D clone = (Object3D)Grafreed.clone(obj);
122123 obj.parent = parent;
123124 // obj.support = support;
124125 // clone.support = support; // aout 2013
....@@ -149,6 +150,8 @@
149150
150151 void SetupMenu2(ObjEditor oe)
151152 {
153
+ if (Globals.ADVANCED)
154
+ {
152155 oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest"));
153156 //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection"));
154157 //cameraMenu.add(switchItem = new MenuItem("Reverse View"));
....@@ -160,17 +163,21 @@
160163 lookAtItem.addActionListener(this);
161164 //lookFromItem.addActinoListener(this);
162165 //switchItem.addActionListener(this);
166
+ }
167
+
163168 Menu menu;
164169 oe.menuBar.add(menu = new Menu("Edit"));
165170 //editItem = menu.add(new MenuItem("Edit"));
166171 //editItem.addActionListener(this);
167172 duplicateItem = menu.add(new MenuItem("Duplicate"));
168173 duplicateItem.addActionListener(this);
169
- menu.add("-");
170174 cloneItem = menu.add(new MenuItem("Clone"));
171175 cloneItem.addActionListener(this);
176
+ if (Globals.ADVANCED)
177
+ {
172178 cloneSupportItem = menu.add(new MenuItem("Clone (+supports)"));
173179 cloneSupportItem.addActionListener(this);
180
+ }
174181 menu.add("-");
175182 cutItem = menu.add(new MenuItem("Cut"));
176183 cutItem.addActionListener(this);
....@@ -178,18 +185,31 @@
178185 copyItem.addActionListener(this);
179186 pasteItem = menu.add(new MenuItem("Paste"));
180187 pasteItem.addActionListener(this);
188
+ menu.add("-");
189
+
190
+ menu.add("-");
191
+ pasteIntoItem = menu.add(new MenuItem("Paste into"));
192
+ pasteIntoItem.addActionListener(this);
181193 pasteLinkItem = menu.add(new MenuItem("Paste link"));
182194 pasteLinkItem.addActionListener(this);
183195 pasteCloneItem = menu.add(new MenuItem("Paste clone"));
184196 pasteCloneItem.addActionListener(this);
185197 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
186198 // pasteExpandItem.addActionListener(this);
199
+ menu.add("-");
187200 clearItem = menu.add(new MenuItem("Clear"));
188201 clearItem.addActionListener(this);
202
+
203
+ if (Globals.ADVANCED)
204
+ {
205
+ // Deletes the cameras...
189206 clearAllItem = menu.add(new MenuItem("Clear All"));
190207 clearAllItem.addActionListener(this);
208
+ }
191209
192210 oe.menuBar.add(menu = new Menu("Setting"));
211
+ if (Globals.ADVANCED)
212
+ {
193213 resetMeshItem = menu.add(new MenuItem("Reset All"));
194214 resetMeshItem.addActionListener(this);
195215 stepAllItem = menu.add(new MenuItem("Step All"));
....@@ -199,6 +219,7 @@
199219 resetreferencesItem = menu.add(new MenuItem("Reset Mesh References"));
200220 resetreferencesItem.addActionListener(this);
201221 menu.add("-");
222
+ }
202223 overwriteGeoItem = menu.add(new MenuItem("Overwrite Geometry"));
203224 overwriteGeoItem.addActionListener(this);
204225 overwriteMatItem = menu.add(new MenuItem("Overwrite Material"));
....@@ -210,17 +231,26 @@
210231 overwriteUVItem = menu.add(new MenuItem("Overwrite UV"));
211232 overwriteUVItem.addActionListener(this);
212233 menu.add("-");
234
+ if (Globals.ADVANCED)
235
+ {
213236 generateMeshItem = menu.add(new MenuItem("Generate Meshes"));
214237 generateMeshItem.addActionListener(this);
215238 poseMeshItem = menu.add(new MenuItem("Set Pose Meshes"));
216239 poseMeshItem.addActionListener(this);
217240 menu.add("-");
241
+ }
218242 resetsupportItem = menu.add(new MenuItem("Reset support"));
219243 resetsupportItem.addActionListener(this);
220244 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221245 linkverticesItem.addActionListener(this);
246
+ relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
247
+ relinkverticesItem.addActionListener(this);
248
+
249
+ if (Globals.ADVANCED)
250
+ {
222251 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
223252 setMasterItem.addActionListener(this);
253
+ }
224254
225255 oe.menuBar.add(menu = new Menu("Group"));
226256 grabItem = menu.add(new MenuItem("Grab"));
....@@ -231,27 +261,38 @@
231261 frontItem.addActionListener(this);
232262 compositeItem = menu.add(new MenuItem("Composite"));
233263 compositeItem.addActionListener(this);
264
+ hideItem = menu.add(new MenuItem("Hidden Group"));
265
+ hideItem.addActionListener(this);
266
+ ungroupItem = menu.add(new MenuItem("Ungroup"));
267
+ ungroupItem.addActionListener(this);
234268 menu.add("-");
235
- randomItem = menu.add(new MenuItem("Random"));
269
+ randomItem = menu.add(new MenuItem("Switch node"));
236270 randomItem.addActionListener(this);
237
- physicsItem = menu.add(new MenuItem("Physics"));
238
- physicsItem.addActionListener(this);
239
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
240
- frameselectorItem.addActionListener(this);
241271 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
242272 switchGeoItem.addActionListener(this);
243273 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
244274 switchTransfoItem.addActionListener(this);
245
- morphItem = menu.add(new MenuItem("Morph"));
275
+ morphItem = menu.add(new MenuItem("Morph Group"));
246276 morphItem.addActionListener(this);
277
+
278
+ if (Globals.ADVANCED)
279
+ {
280
+ menu.add("-");
281
+ physicsItem = menu.add(new MenuItem("Physics"));
282
+ physicsItem.addActionListener(this);
283
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
284
+ frameselectorItem.addActionListener(this);
247285 scriptNodeItem = menu.add(new MenuItem("Script Node"));
248286 scriptNodeItem.addActionListener(this);
249287 cameraItem = menu.add(new MenuItem("Camera"));
250288 cameraItem.addActionListener(this);
289
+ }
251290
252291 oe.menuBar.add(menu = new Menu("Object"));
253292 textureItem = menu.add(new MenuItem("Texture"));
254293 textureItem.addActionListener(this);
294
+ billboardItem = menu.add(new MenuItem("Billboard"));
295
+ billboardItem.addActionListener(this);
255296 csgItem = menu.add(new MenuItem("CSG"));
256297 csgItem.addActionListener(this);
257298 shadowXItem = menu.add(new MenuItem("Shadow X"));
....@@ -260,23 +301,29 @@
260301 shadowYItem.addActionListener(this);
261302 shadowZItem = menu.add(new MenuItem("Shadow Z"));
262303 shadowZItem.addActionListener(this);
304
+ if (Globals.ADVANCED)
305
+ {
306
+ menu.add("-");
263307 linkerItem = menu.add(new MenuItem("Linker"));
264308 linkerItem.addActionListener(this);
265
- templateItem = menu.add(new MenuItem("Template"));
266
- templateItem.addActionListener(this);
267309 attributeItem = menu.add(new MenuItem("Attribute"));
268310 attributeItem.addActionListener(this);
311
+ templateItem = menu.add(new MenuItem("Template"));
312
+ templateItem.addActionListener(this);
269313 pointflowItem = menu.add(new MenuItem("Point Flow"));
270314 pointflowItem.addActionListener(this);
315
+ }
271316 menu.add("-");
272
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
273
- transformgeometryItem.addActionListener(this);
274317 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
275318 resetTransformItem.addActionListener(this);
276319 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
277320 resetCentroidItem.addActionListener(this);
278
- ungroupItem = menu.add(new MenuItem("Ungroup"));
279
- ungroupItem.addActionListener(this);
321
+ resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY"));
322
+ resetCentroidXZItem.addActionListener(this);
323
+ transformGeometryItem = menu.add(new MenuItem("Transform Geometry"));
324
+ transformGeometryItem.addActionListener(this);
325
+ transformChildrenItem = menu.add(new MenuItem("Transform Children"));
326
+ transformChildrenItem.addActionListener(this);
280327
281328 oe.menuBar.add(menu = new Menu("Geometry"));
282329 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -287,6 +334,11 @@
287334 genNormalsCADItem.addActionListener(this);
288335 genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
289336 genNormalsMESHItem.addActionListener(this);
337
+ if (Globals.ADVANCED)
338
+ {
339
+ genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
340
+ genNormalsMINEItem.addActionListener(this);
341
+ }
290342 stripifyItem = menu.add(new MenuItem("Stripify"));
291343 stripifyItem.addActionListener(this);
292344 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -308,10 +360,14 @@
308360 reduce34MeshItem.addActionListener(this);
309361 increaseMeshItem = menu.add(new MenuItem("Increase mesh"));
310362 increaseMeshItem.addActionListener(this);
311
- smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
312
- smoothMeshItem.addActionListener(this);
313363 clipMeshItem = menu.add(new MenuItem("Clip mesh"));
314364 clipMeshItem.addActionListener(this);
365
+
366
+ if (Globals.ADVANCED)
367
+ {
368
+ smoothMeshItem = menu.add(new MenuItem("Smooth mesh"));
369
+ smoothMeshItem.addActionListener(this);
370
+ }
315371
316372 oe.menuBar.add(menu = new Menu("Attributes"));
317373 clearMaterialsItem = menu.add(new MenuItem("Clear Materials"));
....@@ -321,10 +377,13 @@
321377 liveleavesItem.addActionListener(this);
322378 unliveleavesItem = menu.add(new MenuItem("Unlive Leaves"));
323379 unliveleavesItem.addActionListener(this);
380
+ if (Globals.ADVANCED)
381
+ {
324382 supportleavesItem = menu.add(new MenuItem("Support Leaves"));
325383 supportleavesItem.addActionListener(this);
326384 unsupportleavesItem = menu.add(new MenuItem("Unsupport Leaves"));
327385 unsupportleavesItem.addActionListener(this);
386
+ }
328387 hideleavesItem = menu.add(new MenuItem("Hide Leaves"));
329388 hideleavesItem.addActionListener(this);
330389 showleavesItem = menu.add(new MenuItem("Show Leaves"));
....@@ -368,28 +427,34 @@
368427 sortbynameItem = menu.add(new MenuItem("Sort by name"));
369428 sortbynameItem.addActionListener(this);
370429 menu.add("-");
430
+ shareGeometriesItem = menu.add(new MenuItem("Share Geometries"));
431
+ shareGeometriesItem.addActionListener(this);
432
+ mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries"));
433
+ mergeGeometriesItem.addActionListener(this);
434
+ if (Globals.ADVANCED)
435
+ {
436
+ // Pretty much the same as duplicate and clone.
371437 extractGeometriesItem = menu.add(new MenuItem("Link Geometry"));
372438 extractGeometriesItem.addActionListener(this);
373439 cloneGeometriesItem = menu.add(new MenuItem("Clone Geometry"));
374440 cloneGeometriesItem.addActionListener(this);
375
- shareGeometriesItem = menu.add(new MenuItem("Share Geometry"));
376
- shareGeometriesItem.addActionListener(this);
377
- mergeGeometriesItem = menu.add(new MenuItem("Merge Geometry"));
378
- mergeGeometriesItem.addActionListener(this);
441
+ }
379442
380443 oe.menuBar.add(menu = new Menu("Insert"));
381444 buildCreateMenu(menu);
382445
383
-
384446 oe.menuBar.add(menu = new Menu("Include"));
385
- importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
386
- importGFDItem.addActionListener(this);
387
- importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
388
- importVRMLX3DItem.addActionListener(this);
389
- importOBJItem = menu.add(new MenuItem("OBJ Object..."));
447
+ importOBJItem = menu.add(new MenuItem("OBJ file..."));
390448 importOBJItem.addActionListener(this);
391
- import3DSItem = menu.add(new MenuItem("3DS Object..."));
449
+ menu.add("-");
450
+ import3DSItem = menu.add(new MenuItem("3DS file..."));
392451 import3DSItem.addActionListener(this);
452
+ menu.add("-");
453
+ importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D file..."));
454
+ importVRMLX3DItem.addActionListener(this);
455
+ menu.add("-");
456
+ importGFDItem = menu.add(new MenuItem("GrafreeD file..."));
457
+ importGFDItem.addActionListener(this);
393458
394459 oe.menuBar.add(menu = new Menu("Tools"));
395460 buildToolsMenu(menu);
....@@ -425,150 +490,98 @@
425490 oe.radioPanel.add(dummyButton);
426491 oe.buttonGroup.add(dummyButton);
427492 */
428
- aConstraints.gridy += 1;
429
- oe.aConstraints.gridwidth = 1;
430
- oe.aConstraints.gridx = 0;
493
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
431494
432
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
495
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
496
+ liveCB.setToolTipText("Enabled animation");
433497 liveCB.addItemListener(this);
434498
435
- oe.aConstraints.gridx += 1;
436
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
437
- supportCB.addItemListener(this);
438
-
439
- // oe.aConstraints.gridx += 1;
440
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
441
- // localCB.addItemListener(this);
442
-
443
- oe.aConstraints.gridx += 1;
444
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
445
- crowdCB.addItemListener(this);
446
-
447
- oe.aConstraints.gridx += 1;
448
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
449
- smoothCB.addItemListener(this);
450
-
451
- oe.aConstraints.gridx += 1;
452
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
499
+ oe.toolbarPanel.add(oneStepButton = new cButton("Step", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
500
+ oneStepButton.setToolTipText("Animate one step forward");
501
+ oneStepButton.addActionListener(this);
502
+
503
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
504
+ fastCB.setToolTipText("Fast mode");
453505 fastCB.addItemListener(this);
454
- oe.aConstraints.gridx += 1;
455
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
456
- slowCB.addItemListener(this);
457
- oe.aConstraints.gridx += 1;
458
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
459
- boxCB.addItemListener(this);
460
-
461
-// oe.aConstraints.gridx += 1;
462
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
463
-// speakerMocapCB.addItemListener(this);
464
-
465
- if (false)
466
- {
467
- // handled in scripts
468
- oe.aConstraints.gridx += 1;
469
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
470
- speakerCameraCB.addItemListener(this);
471
-
472
- oe.aConstraints.gridx += 1;
473
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
474
- speakerFocusCB.addItemListener(this);
475
-
476
- oe.aConstraints.gridx += 1;
477
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
478
- smoothfocusCB.addItemListener(this);
479
- }
480
-
481
-//oe.aConstraints.gridx += 1;
482
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
483
-// debugCB.addItemListener(this);
484
-
485
- oe.aConstraints.gridx += 1;
486
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
487
- oeilCB.addItemListener(this);
488
-
489
- oe.aConstraints.gridx += 1;
490
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
491
- lookAtCB.addItemListener(this);
492
-
493
- oe.aConstraints.gridx += 1;
494
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
506
+
507
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
508
+ trackCB.setToolTipText("Enable tracking");
495509 trackCB.addItemListener(this);
496510
497
- oe.aConstraints.gridx += 1;
498
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
511
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
512
+ screenfitButton.setToolTipText("Screen fit");
499513 screenfitButton.addActionListener(this);
500
- oe.aConstraints.gridx += 1;
514
+
501515 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
502516 // screenfitpointButton.addActionListener(this);
503
-// oe.aConstraints.gridx += 1;
504
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
505
- snapobjectButton.addActionListener(this);
506
- oe.aConstraints.gridx += 1;
507517
508
- //aConstraints.gridx = 0;
509
- //aConstraints.gridy += 1;
510
- oe.aConstraints.weighty = 0;
511
- oe.aConstraints.gridwidth = 1;
512
-
513
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
518
+ if (Globals.ADVANCED)
519
+ {
520
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
521
+ snapobjectButton.addActionListener(this);
522
+ snapobjectButton.setToolTipText("Snap Object");
523
+ }
524
+
525
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
526
+ flashSelectionButton.setToolTipText("Show selection");
514527 flashSelectionButton.addActionListener(this);
515
- oe.aConstraints.gridx += 1;
516
- oe.aConstraints.weighty = 0;
517
- oe.aConstraints.gridwidth = 1;
518528
519
- //
520
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
529
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
530
+
531
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
532
+ twoButton.setToolTipText("Show center view only");
521533 twoButton.addActionListener(this);
522
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
534
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
523535 fourButton.addActionListener(this);
524
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
536
+ fourButton.setToolTipText("Show left panel only");
537
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
538
+ sixButton.setToolTipText("2-column layout left");
525539 sixButton.addActionListener(this);
526
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
540
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
541
+ threeButton.setToolTipText("2-column layout right");
527542 threeButton.addActionListener(this);
528
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
543
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
544
+ sevenButton.setToolTipText("3-column layout");
529545 sevenButton.addActionListener(this);
530546 //
531547
532
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
548
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
549
+ rootButton.setToolTipText("Edit selection in new tab");
533550 rootButton.addActionListener(this);
534
- oe.aConstraints.gridx += 1;
535
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
551
+
552
+ oe.toolbarPanel.add(closeButton = new cButton("X", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
553
+ closeButton.setToolTipText("Close tab");
536554 closeButton.addActionListener(this);
537555 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
538556 //clearButton.addActionListener(this);
539
- oe.aConstraints.gridx += 1;
540557
541
- oe.aConstraints.gridx = 1; //
542
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
558
+ cGridBag commandsPanel = new cGridBag();
559
+
560
+ commandsPanel.add(editButton = new cButton("+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
561
+ editButton.setToolTipText("Edit selection");
543562 editButton.addActionListener(this);
544
- oe.aConstraints.gridx += 1;
545
- oe.aConstraints.weighty = 0;
546
- oe.aConstraints.gridwidth = 1;
547563
548
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
564
+ commandsPanel.add(uneditButton = new cButton("-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
565
+ uneditButton.setToolTipText("Unedit selection");
549566 uneditButton.addActionListener(this);
550567
551
- oe.aConstraints.gridx += 1;
552
- oe.aConstraints.weighty = 0;
553
- oe.aConstraints.gridwidth = 1;
554
-
555
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
556
- clearPanelButton.addActionListener(this);
557
-
558
- oe.aConstraints.gridx += 1;
559
- oe.aConstraints.weighty = 0;
560
- oe.aConstraints.gridwidth = 1;
561
-
562
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
568
+ commandsPanel.add(allParamsButton = new JCheckBox("All", allparams)); //, oe.aConstraints);
569
+ allParamsButton.setToolTipText("Edit all params");
563570 allParamsButton.addActionListener(this);
564571
565
- oe.aConstraints.gridx += 1;
566
- oe.aConstraints.weighty = 0;
567
- oe.aConstraints.gridwidth = 1;
568
-
569
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
572
+ commandsPanel.add(clearPanelButton = new cButton("C", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
573
+ clearPanelButton.setToolTipText("Clear edit panel");
574
+ clearPanelButton.addActionListener(this);
575
+
576
+ commandsPanel.add(unselectButton = new cButton("U", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
577
+ unselectButton.setToolTipText("Unselect");
570578 unselectButton.addActionListener(this);
571579
580
+ commandsPanel.preferredHeight = 1;
581
+
582
+ oe.treePanel.add(commandsPanel);
583
+ oe.treePanel.Return();
584
+
572585 // oe.aConstraints.gridx += 1;
573586 // oe.aConstraints.weighty = 0;
574587 // oe.aConstraints.gridwidth = 1;
....@@ -580,40 +593,37 @@
580593 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
581594 // gcButton.addActionListener(this);
582595
583
- oe.aConstraints.gridx = 0;
584
- oe.aConstraints.gridy += 1;
585
-
586
- //ctrlPanel.add(objList = new List(5, true));
587
- oe.aConstraints.gridwidth = 100;
588
- // oe.aConstraints.gridheight = 100;
589
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
590
- oe.aConstraints.gridheight = 1;
591
- oe.aConstraints.weighty = 0.5;
592
- oe.aConstraints.gridx = 0;
593
- JScrollPane jSP;
596
+ cGridBag jSPPanel = new cGridBag();
597
+
598
+ JScrollPane jSP;
594599 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
595
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
600
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
596601 ResetModel();
597
- oe.aConstraints.weighty = 0.5;
598
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
599
- oe.aConstraints.gridy += 1;
600
- oe.aConstraints.gridwidth = 1;
602
+
603
+ oe.treePanel.add(jSPPanel);
604
+ oe.treePanel.Return();
601605
602
- oe.aConstraints.weighty = 0;
603
- oe.aConstraints.gridwidth = 2;
604
-
605
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
606
+ cGridBag copyOptionsPanel = new cGridBag();
607
+
608
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
609
+ colorCB.setToolTipText("Copy color when dropped");
606610 colorCB.addItemListener(this);
607
- oe.aConstraints.gridx += 2;
608
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
611
+
612
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
613
+ materialCB.setToolTipText("Copy material when dropped");
609614 materialCB.addItemListener(this);
610
- oe.aConstraints.gridx += 2;
611
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
615
+
616
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
617
+ textureCB.setToolTipText("Copy texture when dropped");
612618 textureCB.addItemListener(this);
613619
614
- oe.aConstraints.gridx = 0;
615
- oe.aConstraints.gridy += 1;
620
+ copyOptionsPanel.preferredHeight = 1;
621
+ oe.treePanel.add(copyOptionsPanel);
622
+ oe.treePanel.Return();
616623
624
+// mainPanel.setDividerLocation(0.5); //1.0);
625
+// mainPanel.setResizeWeight(0.5);
626
+
617627 //jList.addListSelectionListener(this);
618628 oe.jTree.addTreeSelectionListener(this);
619629 //jTree.setRootVisible(false);
....@@ -635,17 +645,89 @@
635645 radio.layout = sevenButton;
636646 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
637647 }
648
+
649
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
650
+ {
651
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
652
+ boxCB.setToolTipText("Display bounding boxes");
653
+ boxCB.addItemListener(this);
654
+
655
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
656
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
657
+ zoomBoxCB.addItemListener(this);
658
+
659
+ if (true) // Globals.ADVANCED)
660
+ {
661
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
662
+ supportCB.setToolTipText("Enable rigging");
663
+ supportCB.addItemListener(this);
664
+
665
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
666
+ // localCB.addItemListener(this);
667
+
668
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
669
+ crowdCB.setToolTipText("Used for crowds");
670
+ crowdCB.addItemListener(this);
671
+
672
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
673
+ smoothCB.setToolTipText("Snapping delay");
674
+ smoothCB.addItemListener(this);
675
+
676
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
677
+ slowCB.setToolTipText("Smooth interpolation");
678
+ slowCB.addItemListener(this);
679
+
680
+// constraints.gridy += 1;
681
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
682
+// speakerMocapCB.addItemListener(this);
683
+
684
+ if (false)
685
+ {
686
+ // handled in scripts
687
+ //constraints.gridy += 1;
688
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
689
+ speakerCameraCB.addItemListener(this);
690
+
691
+ //constraints.gridy += 1;
692
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
693
+ speakerFocusCB.addItemListener(this);
694
+
695
+ //constraints.gridy += 1;
696
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
697
+ smoothfocusCB.addItemListener(this);
698
+ }
699
+
700
+//constraints.gridx += 1;
701
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
702
+// debugCB.addItemListener(this);
703
+
704
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
705
+ oeilCB.addItemListener(this);
706
+
707
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
708
+ lookAtCB.setToolTipText("Look-at target");
709
+ lookAtCB.addItemListener(this);
710
+
711
+ }
712
+
713
+ cGridBag fill = new cGridBag();
714
+
715
+ fill.preferredHeight = 200;
716
+
717
+ panel.add(fill);
718
+
719
+ }
638720
639721 void EditObject(Object3D obj)
640722 {
641
- cRadio dummyButton = new cRadio(obj.name);
642
- dummyButton.SetObject(obj);
643
- dummyButton.layout = sevenButton;
644
- dummyButton.SetCamera(cameraView.renderCamera, false);
645
- dummyButton.addActionListener(this);
646
- radioPanel.add(dummyButton);
647
- buttonGroup.add(dummyButton);
648
- dummyButton.doClick();
723
+ cRadio radioButton = new cRadio(obj.name);
724
+ radioButton.SetObject(obj);
725
+ radioButton.layout = sevenButton;
726
+ radioButton.SetCamera(cameraView.renderCamera, false);
727
+ radioButton.addActionListener(this);
728
+ radioPanel.add(radioButton);
729
+ buttonGroup.add(radioButton);
730
+ radioButton.doClick();
649731 }
650732 void SetupViews(ObjEditor oe)
651733 {
....@@ -665,6 +747,7 @@
665747 JCheckBox fastCB;
666748 JCheckBox slowCB;
667749 JCheckBox boxCB;
750
+ JCheckBox zoomBoxCB;
668751 JCheckBox trackCB;
669752 JCheckBox smoothfocusCB;
670753 // JCheckBox speakerMocapCB;
....@@ -707,8 +790,7 @@
707790 dropAttributes |= Object3D.TEXTURE;
708791 else
709792 dropAttributes &= ~Object3D.TEXTURE;
710
- }
711
- else if(e.getSource() == liveCB)
793
+ } else if(e.getSource() == liveCB)
712794 {
713795 cameraView.ToggleLive();
714796 }
....@@ -745,6 +827,10 @@
745827 Recompile();
746828 cameraView.repaint();
747829 // refreshContents();
830
+ }
831
+ else if(e.getSource() == zoomBoxCB)
832
+ {
833
+ cameraView.ToggleZoomBoxMode();
748834 }
749835 else if(e.getSource() == smoothfocusCB)
750836 {
....@@ -859,7 +945,9 @@
859945 // objEditor.DropFile((java.io.File[]) object, true);
860946 // return;
861947 // }
862
- if (string.charAt(0) == '/')
948
+
949
+ // File path for Mac and Windows
950
+ if (string.charAt(0) == '/' || string.charAt(1) == ':')
863951 {
864952 // file(s)
865953 String[] names = string.split("\n");
....@@ -886,7 +974,7 @@
886974
887975 flashIt = false;
888976 CameraPane pane = (CameraPane) target;
889
- pane.clickStart(objEditor.location.x, objEditor.location.y, 0);
977
+ pane.clickStart(objEditor.location.x, objEditor.location.y, 0, 0);
890978 pane.clickEnd(objEditor.location.x, objEditor.location.y, 0, true);
891979
892980 if (group.selection.size() == 1)
....@@ -913,11 +1001,11 @@
9131001 {
9141002 loadClipboard(true);
9151003 objEditor.jTree.setSelectionPath(destinationPath);
916
- pasteInto(false);
1004
+ pasteInto(false, false);
9171005 } else {
9181006 loadClipboard(false);
9191007 objEditor.jTree.setSelectionPath(destinationPath);
920
- pasteInto(false); // true); // ???
1008
+ pasteInto(false, false); // true); // ???
9211009 }
9221010 }
9231011 public void dropActionChanged(DropTargetDragEvent dtde)
....@@ -1035,29 +1123,37 @@
10351123 torusItem.addActionListener(this);
10361124 superItem = menu.add(new MenuItem("Superellipsoid"));
10371125 superItem.addActionListener(this);
1126
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1127
+ kleinItem.addActionListener(this);
10381128 particleItem = menu.add(new MenuItem("Particle system"));
10391129 particleItem.addActionListener(this);
1130
+ if (Globals.ADVANCED)
1131
+ {
10401132 ragdollItem = menu.add(new MenuItem("Rag Walk"));
10411133 ragdollItem.addActionListener(this);
10421134 ragdoll2Item = menu.add(new MenuItem("Rag Fall"));
10431135 ragdoll2Item.addActionListener(this);
1136
+ }
10441137 menu.add("-");
1045
- meshItem = menu.add(new MenuItem("Mesh"));
1138
+ meshItem = menu.add(new MenuItem("Dynamic Mesh"));
10461139 meshItem.addActionListener(this);
10471140 // meshGroupItem = menu.add(new MenuItem("Mesh Group"));
10481141 // meshGroupItem.addActionListener(this);
1142
+ if (Globals.ADVANCED)
1143
+ {
10491144 springItem = menu.add(new MenuItem("Spring"));
10501145 springItem.addActionListener(this);
10511146 flagItem = menu.add(new MenuItem("Flag"));
10521147 flagItem.addActionListener(this);
1053
- bezierItem = menu.add(new MenuItem("Patch"));
1054
- bezierItem.addActionListener(this);
1055
- checkerItem = menu.add(new MenuItem("Checker"));
1056
- checkerItem.addActionListener(this);
10571148 blobItem = menu.add(new MenuItem("Blob"));
10581149 blobItem.addActionListener(this);
10591150 latheItem = menu.add(new MenuItem("Lathe"));
10601151 latheItem.addActionListener(this);
1152
+ }
1153
+ bezierItem = menu.add(new MenuItem("Bezier Patch"));
1154
+ bezierItem.addActionListener(this);
1155
+ overlayItem = menu.add(new MenuItem("Overlay"));
1156
+ overlayItem.addActionListener(this);
10611157 lightItem = menu.add(new MenuItem("Light"));
10621158 lightItem.addActionListener(this);
10631159 menu.add("-");
....@@ -1067,34 +1163,39 @@
10671163 loopItem.addActionListener(this);
10681164 doubleItem = menu.add(new MenuItem("Fork"));
10691165 doubleItem.addActionListener(this);
1166
+ if (Globals.ADVANCED)
1167
+ {
10701168 tripleItem = menu.add(new MenuItem("Trident"));
10711169 tripleItem.addActionListener(this);
1170
+ }
10721171 }
10731172
10741173 void buildToolsMenu(Menu menu)
10751174 {
10761175 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10771176 animationItem.addItemListener(this);
1078
- animationItem.setState(CameraPane.ANIMATION);
1177
+ animationItem.setState(Globals.ANIMATION);
10791178
10801179 menu.add("-");
10811180 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
10821181 parseverticesItem.addActionListener(this);
10831182 textureFieldItem = menu.add(new MenuItem("Texture Field"));
10841183 textureFieldItem.addActionListener(this);
1085
- alignItem = menu.add(new MenuItem("Align"));
1184
+ alignItem = menu.add(new MenuItem("Align Objects"));
10861185 alignItem.addActionListener(this);
1087
- mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1088
- mirrorItem.addActionListener(this);
10891186 reduceMorphItem = menu.add(new MenuItem("Reduce Morphs"));
10901187 reduceMorphItem.addActionListener(this);
10911188 reduce34MorphItem = menu.add(new MenuItem("Reduce Morphs (34)"));
10921189 reduce34MorphItem.addActionListener(this);
1093
-
1190
+ menu.add("-");
10941191 menu.add(computeAOItem = new MenuItem("Compute AO"));
10951192 computeAOItem.addActionListener(this);
1096
- menu.add("-");
10971193
1194
+ if (Globals.ADVANCED)
1195
+ {
1196
+ mirrorItem = menu.add(new MenuItem("Mirror Poses"));
1197
+ mirrorItem.addActionListener(this);
1198
+ menu.add("-");
10981199 menu.add(memoryItem = new MenuItem("Memory Usage"));
10991200 memoryItem.addActionListener(this);
11001201 menu.add(analyzeItem = new MenuItem("Analyze"));
....@@ -1108,6 +1209,8 @@
11081209 resetParentItem.addActionListener(this);
11091210 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11101211 repairParentItem.addActionListener(this);
1212
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1213
+ repairShadowItem.addActionListener(this);
11111214 menu.add(invariantsItem = new MenuItem("Invariants"));
11121215 invariantsItem.addActionListener(this);
11131216 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1115,6 +1218,7 @@
11151218 menu.add("-");
11161219 menu.add(editScriptItem = new MenuItem("Edit Script..."));
11171220 editScriptItem.addActionListener(this);
1221
+ }
11181222 }
11191223
11201224 void ScreenFit()
....@@ -1443,9 +1547,9 @@
14431547
14441548 void Overwrite(int mask)
14451549 {
1446
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
1550
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
14471551 {
1448
- Object3D content = GrafreeD.clipboard.get(0);
1552
+ Object3D content = Grafreed.clipboard.get(0);
14491553
14501554 if (content instanceof cGroup && ((cGroup)content).transientlink )
14511555 content = ((cGroup)content).get(0);
....@@ -1468,6 +1572,7 @@
14681572 //
14691573 public void actionPerformed(ActionEvent event) // , Object arg)
14701574 {
1575
+ Object source = event.getSource();
14711576 /*
14721577 if (event.getSource() == nameField)
14731578 {
....@@ -1479,11 +1584,11 @@
14791584 }
14801585 else
14811586 */
1482
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1587
+ if (source == lookAtItem || source == lookFromItem)
14831588 {
14841589 ScreenFit();
14851590 } else
1486
- if (event.getSource() == switchItem)
1591
+ if (source == switchItem)
14871592 {
14881593 cVector v1 = new cVector();
14891594 cVector v2 = new cVector();
....@@ -1492,11 +1597,11 @@
14921597 objEditor.cameraView.renderCamera.setAim(v2, v1);
14931598 objEditor.cameraView.repaint();
14941599 } else
1495
- if (event.getSource() == rectoidItem)
1600
+ if (source == rectoidItem)
14961601 {
14971602 makeSomething(new Box());
14981603 } else
1499
- if (event.getSource() == particleItem)
1604
+ if (source == particleItem)
15001605 {
15011606 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15021607 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1517,9 +1622,9 @@
15171622 applyExample(particleGeom, "SMOKE");
15181623 makeSomething(particleGeom);
15191624 } else
1520
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1625
+ if (source == ragdollItem || source == ragdoll2Item)
15211626 {
1522
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1627
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15231628
15241629 ragdoll.toParent = LA.newMatrix();
15251630 ragdoll.fromParent = LA.newMatrix();
....@@ -1537,7 +1642,7 @@
15371642 } else
15381643 /*
15391644 */
1540
- if (event.getSource() == heightFieldItem)
1645
+ if (source == heightFieldItem)
15411646 {
15421647 Object3D obj = new Object3D();
15431648
....@@ -1575,27 +1680,31 @@
15751680
15761681 makeSomething(obj);
15771682 } else
1578
- if (event.getSource() == gridItem)
1683
+ if (source == gridItem)
15791684 {
15801685 makeSomething(new Grid());
15811686 } else
1582
- if (event.getSource() == ellipsoidItem)
1687
+ if (source == ellipsoidItem)
15831688 {
15841689 makeSomething(new Sphere());
15851690 } else
1586
- if (event.getSource() == coneItem)
1691
+ if (source == coneItem)
15871692 {
15881693 makeSomething(new Cone());
15891694 } else
1590
- if (event.getSource() == torusItem)
1695
+ if (source == torusItem)
15911696 {
15921697 makeSomething(new Torus());
15931698 } else
1594
- if (event.getSource() == superItem)
1699
+ if (source == superItem)
15951700 {
15961701 makeSomething(new Superellipsoid());
15971702 } else
1598
- if (event.getSource() == blobItem)
1703
+ if (source == kleinItem)
1704
+ {
1705
+ makeSomething(new Klein());
1706
+ } else
1707
+ if (source == blobItem)
15991708 {
16001709 Blob blob = new Blob();
16011710 BlobComponent comp = new BlobComponent();
....@@ -1603,15 +1712,15 @@
16031712 //blob.retile();
16041713 makeSomething(blob);
16051714 } else
1606
- if (event.getSource() == latheItem)
1715
+ if (source == latheItem)
16071716 {
16081717 makeSomething(new Lathe());
16091718 } else
1610
- if (event.getSource() == bezierItem)
1719
+ if (source == bezierItem)
16111720 {
16121721 makeSomething(new BezierSurface());
16131722 } else
1614
- if (event.getSource() == checkerItem)
1723
+ if (source == overlayItem)
16151724 {
16161725 /*
16171726 Object3D obj = new BezierSurface(5,8);
....@@ -1626,7 +1735,7 @@
16261735 */
16271736 makeSomething(new Checker());
16281737 } else
1629
- if (event.getSource() == meshItem)
1738
+ if (source == meshItem)
16301739 {
16311740 Object3D itemtomake = new Object3D();
16321741 Object3D child;
....@@ -1647,35 +1756,35 @@
16471756 makeSomething(child);
16481757 }
16491758 } else
1650
- if (event.getSource() == springItem)
1759
+ if (source == springItem)
16511760 {
16521761 cSpring s = new cSpring();
16531762 s.setup();
16541763 makeSomething(s);
16551764 } else
1656
- if (event.getSource() == flagItem)
1765
+ if (source == flagItem)
16571766 {
16581767 cSpring s = new cFlag();
16591768 s.setup();
16601769 makeSomething(s);
16611770 } else
1662
- if (event.getSource() == lightItem)
1771
+ if (source == lightItem)
16631772 {
16641773 makeSomething(new Light());
16651774 } else
1666
- if (event.getSource() == csgItem)
1775
+ if (source == csgItem)
16671776 {
16681777 group(new CSG());
16691778 } else
1670
- if (event.getSource() == templateItem)
1779
+ if (source == templateItem)
16711780 {
16721781 group(new cTemplate());
16731782 } else
1674
- if (event.getSource() == attributeItem)
1783
+ if (source == attributeItem)
16751784 {
16761785 makeSomething(new Attribute());
16771786 } else
1678
- if (event.getSource() == pointflowItem)
1787
+ if (source == pointflowItem)
16791788 {
16801789 makeSomething(new PointFlow());
16811790 } else
....@@ -1687,7 +1796,7 @@
16871796 } else
16881797 */
16891798
1690
- if (event.getSource() == superLoopItem)
1799
+ if (source == superLoopItem)
16911800 {
16921801 Composite g = new cGroup();
16931802 for (int i=0; i<15; i++)
....@@ -1709,7 +1818,7 @@
17091818
17101819 group(g);
17111820 } else
1712
- if (event.getSource() == loopItem)
1821
+ if (source == loopItem)
17131822 {
17141823 Composite csg = new GroupLeaf();
17151824 csg.count = 5;
....@@ -1718,7 +1827,7 @@
17181827 csg.addChild(child);
17191828 child.addChild(csg);
17201829 } else
1721
- if (event.getSource() == doubleItem)
1830
+ if (source == doubleItem)
17221831 {
17231832 Composite csg = new GroupLeaf();
17241833 csg.count = 5;
....@@ -1730,7 +1839,7 @@
17301839 csg.addChild(child);
17311840 child.addChild(csg);
17321841 } else
1733
- if (event.getSource() == tripleItem)
1842
+ if (source == tripleItem)
17341843 {
17351844 Composite csg = new GroupLeaf();
17361845 csg.count = 4;
....@@ -1746,70 +1855,83 @@
17461855 child.addChild(csg);
17471856 } else
17481857
1749
- if (event.getSource() == importGFDItem)
1858
+ if (source == importGFDItem)
17501859 {
17511860 ImportGFD();
17521861 } else
1753
- if (event.getSource() == importVRMLX3DItem)
1862
+ if (source == importVRMLX3DItem)
17541863 {
17551864 ImportVRMLX3D();
17561865 } else
1757
- if (event.getSource() == import3DSItem)
1866
+ if (source == import3DSItem)
17581867 {
17591868 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17601869 } else
1761
- if (event.getSource() == importOBJItem)
1870
+ if (source == importOBJItem)
17621871 {
1763
- objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1872
+ //objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
1873
+ FileDialog browser = new FileDialog(frame, "Import OBJ", FileDialog.LOAD);
1874
+ browser.setVisible(true);
1875
+ String filename = browser.getFile();
1876
+ if (filename != null && filename.length() > 0)
1877
+ {
1878
+ String fullname = browser.getDirectory() + filename;
1879
+ makeSomething(ReadOBJ(fullname), true);
1880
+ }
17641881 } else
1765
- if (event.getSource() == computeAOItem)
1882
+ if (source == computeAOItem)
17661883 {
1767
- CameraPane.drawMode = CameraPane.OCCLUSION;
1768
- CameraPane.theRenderer.repaint();
1884
+ Globals.drawMode = CameraPane.OCCLUSION;
1885
+ Globals.theRenderer.repaint();
17691886 } else
1770
- if (event.getSource() == recompileItem)
1887
+ if (source == recompileItem)
17711888 {
17721889 Recompile();
17731890 refreshContents();
17741891 } else
1775
- if (event.getSource() == editScriptItem)
1892
+ if (source == editScriptItem)
17761893 {
17771894 OpenDialog();
17781895 refreshContents();
17791896 } else
1780
- if (event.getSource() == invariantsItem)
1897
+ if (source == invariantsItem)
17811898 {
17821899 System.out.println("Invariants:");
1783
- GrafreeD.theApplet3D.universe.invariants();
1900
+ Grafreed.grafreeD.universe.invariants();
17841901 } else
1785
- if (event.getSource() == memoryItem)
1902
+ if (source == memoryItem)
17861903 {
17871904 //System.out.println("Invariants:");
17881905 PrintMemory();
17891906 } else
1790
- if (event.getSource() == pathItem)
1907
+ if (source == pathItem)
17911908 {
17921909 PrintPath();
17931910 } else
1794
- if (event.getSource() == analyzeItem)
1911
+ if (source == analyzeItem)
17951912 {
17961913 AnalyzeObject();
17971914 } else
1798
- if (event.getSource() == dumpItem)
1915
+ if (source == dumpItem)
17991916 {
18001917 DumpObject();
18011918 } else
1802
- if (event.getSource() == screenfitButton)
1919
+ if (source == oneStepButton)
1920
+ {
1921
+ Globals.ONESTEP = true;
1922
+ cameraView.repaint();
1923
+ } else
1924
+ if (source == screenfitButton)
18031925 {
18041926 //Reload(lastConverter, lastFilename, true);
18051927 ScreenFit();
18061928 } else
1807
- if (event.getSource() == screenfitpointButton)
1929
+ if (source == screenfitpointButton)
18081930 {
18091931 //Reload(lastConverter, lastFilename, true);
18101932 ScreenFitPoint();
18111933 } else
1812
- if (event.getSource() == snapobjectButton)
1934
+ if (source == snapobjectButton)
18131935 {
18141936 //Reload(lastConverter, lastFilename, true);
18151937 SnapObject();
....@@ -1820,13 +1942,13 @@
18201942 // Recompile();
18211943 // refreshContents();
18221944 // } else
1823
- if (event.getSource() == gcButton)
1945
+ if (source == gcButton)
18241946 {
18251947 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18261948 System.gc();
18271949 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18281950 } else
1829
- if (event.getSource() == editLeafItem)
1951
+ if (source == editLeafItem)
18301952 {
18311953 Object3D obj;
18321954 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1840,62 +1962,66 @@
18401962 }
18411963 refreshContents(true);
18421964 } else
1843
- if (event.getSource() == openWindowItem)
1965
+ if (source == openWindowItem)
18441966 {
18451967 EditSelection(true);
18461968 } else
1847
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1969
+ if (source == cutItem || source == clearButton)
18481970 {
18491971 loadClipboard(true);
18501972 } else
1851
- if (event.getSource() == duplicateItem)
1973
+ if (source == duplicateItem)
18521974 {
1853
- Object3D keep = GrafreeD.clipboard;
1975
+ Object3D keep = Grafreed.clipboard;
18541976 loadClipboard(false);
18551977 paste(false);
1856
- GrafreeD.clipboard = keep;
1978
+ Grafreed.clipboard = keep;
18571979 } else
1858
- if (event.getSource() == cloneItem)
1980
+ if (source == cloneItem)
18591981 {
18601982 CloneSelection(false);
18611983 } else
1862
- if (event.getSource() == cloneSupportItem)
1984
+ if (source == cloneSupportItem)
18631985 {
18641986 CloneSelection(true);
18651987 } else
1866
- if (event.getSource() == copyItem)
1988
+ if (source == copyItem)
18671989 {
18681990 loadClipboard(false);
18691991 } else
1870
- if (event.getSource() == pasteItem)
1992
+ if (source == pasteItem)
18711993 {
18721994 paste(false);
18731995 } else
1874
- if (event.getSource() == pasteLinkItem)
1996
+ if (source == pasteIntoItem)
18751997 {
1876
- pasteInto(false);
1998
+ pasteInto(true, false);
18771999 } else
1878
- if (event.getSource() == pasteCloneItem)
2000
+ if (source == pasteLinkItem)
18792001 {
1880
- pasteInto(true);
2002
+ pasteInto(false, false);
18812003 } else
1882
- if (event.getSource() == pasteExpandItem)
2004
+ if (source == pasteCloneItem)
2005
+ {
2006
+ pasteInto(true, true);
2007
+ } else
2008
+ if (source == pasteExpandItem)
18832009 {
18842010 paste(true);
18852011 } else
1886
- if (event.getSource() == synchronizeItem)
2012
+ if (source == synchronizeItem)
18872013 {
18882014 Overwrite(Object3D.TRANSFORM);
18892015 } else
1890
- if (event.getSource() == overwriteNameItem)
2016
+ if (source == overwriteNameItem)
18912017 {
18922018 Overwrite(Object3D.NAME);
18932019 } else
1894
- if (event.getSource() == overwriteUVItem)
2020
+ if (source == overwriteUVItem)
18952021 {
18962022 Overwrite(Object3D.UV);
18972023 } else
1898
- if (event.getSource() == overwriteMatItem)
2024
+ if (source == overwriteMatItem)
18992025 {
19002026 /* july 2015
19012027 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1915,7 +2041,7 @@
19152041
19162042 Overwrite(dropAttributes);
19172043 }
1918
- if (event.getSource() == overwriteGeoItem)
2044
+ if (source == overwriteGeoItem)
19192045 {
19202046 Overwrite(Object3D.GEOMETRY);
19212047 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1932,7 +2058,7 @@
19322058 // refreshContents();
19332059 // }
19342060 } else
1935
- if (event.getSource() == generateMeshItem)
2061
+ if (source == generateMeshItem)
19362062 {
19372063 //if (group.selection.size() == 1)
19382064 // for (int i=0; i<group.selection.size(); i++)
....@@ -1943,7 +2069,7 @@
19432069 ResetModel();
19442070 refreshContents();
19452071 } else
1946
- if (event.getSource() == extractGeometriesItem)
2072
+ if (source == extractGeometriesItem)
19472073 {
19482074 boolean one = false;
19492075
....@@ -1970,7 +2096,7 @@
19702096 ResetModel();
19712097 refreshContents();
19722098 } else
1973
- if (event.getSource() == cloneGeometriesItem)
2099
+ if (source == cloneGeometriesItem)
19742100 {
19752101 boolean one = false;
19762102
....@@ -1996,32 +2122,37 @@
19962122 ResetModel();
19972123 refreshContents();
19982124 } else
1999
- if (event.getSource() == shareGeometriesItem)
2125
+ if (source == shareGeometriesItem)
20002126 {
20012127 boolean one = false;
20022128
20032129 if (group.selection.size() == 1)
20042130 one = true;
20052131
2132
+ Object3D merge = null;
2133
+
20062134 Object3D content = new cGroup();
20072135
20082136 for (int i=0; i<group.selection.size(); i++)
20092137 {
2010
- Object3D sel = new Merge(group.selection.get(i));
2138
+ merge = new Merge(group.selection.get(i));
20112139
20122140 if (one)
2013
- makeSomething(sel, false);
2141
+ makeSomething(merge, false);
20142142 else
2015
- content.addChild(sel);
2143
+ content.addChild(merge);
20162144 }
20172145
20182146 if (!one)
2019
- makeSomething(content, false);
2020
-
2021
- ResetModel();
2022
- refreshContents();
2147
+ makeSomething(content, true);
2148
+ else
2149
+ {
2150
+ ResetModel();
2151
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2152
+ refreshContents();
2153
+ }
20232154 } else
2024
- if (event.getSource() == mergeGeometriesItem)
2155
+ if (source == mergeGeometriesItem)
20252156 {
20262157 boolean one = false;
20272158
....@@ -2051,7 +2182,7 @@
20512182 ResetModel();
20522183 refreshContents();
20532184 } else
2054
- if (event.getSource() == linkverticesItem)
2185
+ if (source == linkverticesItem)
20552186 {
20562187 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20572188 // {
....@@ -2064,39 +2195,48 @@
20642195 // group.selection.get(0).setMasterThis(content); // should be identity
20652196 // refreshContents();
20662197 // }
2067
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
2198
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
20682199 {
2069
- Object3D content = GrafreeD.clipboard.get(0);
2200
+ Object3D content = Grafreed.clipboard.get(0);
20702201
20712202 if (content instanceof cGroup && ((cGroup)content).transientlink )
20722203 content = ((cGroup)content).get(0);
20732204
2074
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2205
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20752206 for (int i=0; i<group.selection.size(); i++)
20762207 {
2077
- boolean random = CameraPane.RANDOM;
2078
- CameraPane.RANDOM = false; // parse all random nodes
2208
+ boolean random = CameraPane.SWITCH;
2209
+ CameraPane.SWITCH = false; // parse all random nodes
20792210 group.selection.get(i).linkVerticesThis(content);
20802211 // group.selection.get(i).setMasterThis(content); // should be identity
2081
- CameraPane.RANDOM = random;
2212
+ CameraPane.SWITCH = random;
20822213 }
2083
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2214
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20842215 refreshContents();
20852216 }
20862217 } else
2087
- if (event.getSource() == resetsupportItem)
2218
+ if (source == resetsupportItem)
20882219 {
20892220 for (int i=0; i<group.selection.size(); i++)
20902221 {
2091
- boolean random = CameraPane.RANDOM;
2092
- CameraPane.RANDOM = false; // parse all random nodes
2222
+ boolean random = CameraPane.SWITCH;
2223
+ CameraPane.SWITCH = false; // parse all random nodes
20932224 group.selection.get(i).linkVerticesThis(null);
2094
- CameraPane.RANDOM = random;
2225
+ CameraPane.SWITCH = random;
20952226 }
20962227
20972228 refreshContents();
20982229 } else
2099
- if (event.getSource() == resetreferencesItem)
2230
+ if (source == relinkverticesItem)
2231
+ {
2232
+ boolean random = CameraPane.SWITCH;
2233
+ CameraPane.SWITCH = false; // parse all random nodes
2234
+ group.selection.RelinkToSupport();
2235
+ CameraPane.SWITCH = random;
2236
+
2237
+ refreshContents();
2238
+ } else
2239
+ if (source == resetreferencesItem)
21002240 {
21012241 for (int i=0; i<group.selection.size(); i++)
21022242 {
....@@ -2105,11 +2245,11 @@
21052245
21062246 refreshContents();
21072247 } else
2108
- if (event.getSource() == setMasterItem)
2248
+ if (source == setMasterItem)
21092249 {
2110
- if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
2250
+ if (group.selection.size() == 1 && Grafreed.clipboard.size() == 1)
21112251 {
2112
- Object3D content = GrafreeD.clipboard.get(0);
2252
+ Object3D content = Grafreed.clipboard.get(0);
21132253
21142254 if (content instanceof cGroup && ((cGroup)content).transientlink )
21152255 content = ((cGroup)content).get(0);
....@@ -2118,13 +2258,13 @@
21182258 refreshContents();
21192259 }
21202260 } else
2121
- if (event.getSource() == poseMeshItem)
2261
+ if (source == poseMeshItem)
21222262 {
21232263 if (group.selection.size() == 1)
21242264 {
2125
- if (GrafreeD.clipboard.size() == 1)
2265
+ if (Grafreed.clipboard.size() == 1)
21262266 {
2127
- Object3D content = GrafreeD.clipboard.get(0);
2267
+ Object3D content = Grafreed.clipboard.get(0);
21282268
21292269 if (content instanceof cGroup && ((cGroup)content).transientlink )
21302270 content = ((cGroup)content).get(0);
....@@ -2137,19 +2277,19 @@
21372277 }
21382278
21392279 } else
2140
- if (event.getSource() == revertMeshItem)
2280
+ if (source == revertMeshItem)
21412281 {
21422282 RevertMeshes();
21432283 } else
2144
- if (event.getSource() == resetMeshItem)
2284
+ if (source == resetMeshItem)
21452285 {
21462286 ResetAll();
21472287 } else
2148
- if (event.getSource() == stepAllItem)
2288
+ if (source == stepAllItem)
21492289 {
21502290 StepAll();
21512291 } else
2152
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2292
+ if (source == clearItem) // || event.getSource() == clearButton)
21532293 {
21542294 //int indices[] = jList.getSelectedIndices();
21552295 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2157,42 +2297,46 @@
21572297
21582298 ClearSelection(false);
21592299 } else
2160
- if (event.getSource() == clearAllItem)
2300
+ if (source == clearAllItem)
21612301 {
21622302 ClearSelection(true);
21632303 } else
2164
- if (event.getSource() == grabItem)
2304
+ if (source == grabItem)
21652305 {
21662306 group(new cGroup(), true);
21672307 } else
2168
- if (event.getSource() == frontItem)
2308
+ if (source == hideItem)
2309
+ {
2310
+ group(new HiddenObject());
2311
+ } else
2312
+ if (source == frontItem)
21692313 {
21702314 front();
21712315 } else
2172
- if (event.getSource() == backItem)
2316
+ if (source == backItem)
21732317 {
21742318 back();
21752319 } else
2176
- if (event.getSource() == cameraItem)
2320
+ if (source == cameraItem)
21772321 {
21782322 makeSomething(new Camera());
21792323 } else
2180
- if (event.getSource() == compositeItem)
2324
+ if (source == compositeItem)
21812325 {
21822326 group(new Composite());
21832327 } else
2184
- if (event.getSource() == randomItem)
2328
+ if (source == randomItem)
21852329 {
21862330 RandomNode random = new RandomNode();
21872331 group(random);
21882332 if (random.size() > 0)
2189
- random.name = random.get(0).name + "Rnd";
2333
+ random.name = random.get(0).name + "Switch";
21902334 } else
2191
- if (event.getSource() == physicsItem)
2335
+ if (source == physicsItem)
21922336 {
21932337 group(new PhysicsNode());
21942338 } else
2195
- if (event.getSource() == frameselectorItem)
2339
+ if (source == frameselectorItem)
21962340 {
21972341 for (int i=0; i<group.selection.size(); i++)
21982342 {
....@@ -2204,7 +2348,7 @@
22042348 ResetModel();
22052349 refreshContents();
22062350 } else
2207
- if (event.getSource() == switchGeoItem)
2351
+ if (source == switchGeoItem)
22082352 {
22092353 for (int i=0; i<group.selection.size(); i++)
22102354 {
....@@ -2216,7 +2360,7 @@
22162360 ResetModel();
22172361 refreshContents();
22182362 } else
2219
- if (event.getSource() == switchTransfoItem)
2363
+ if (source == switchTransfoItem)
22202364 {
22212365 for (int i=0; i<group.selection.size(); i++)
22222366 {
....@@ -2228,7 +2372,7 @@
22282372 ResetModel();
22292373 refreshContents();
22302374 } else
2231
- if (event.getSource() == morphItem)
2375
+ if (source == morphItem)
22322376 {
22332377 for (int i=0; i<group.selection.size(); i++)
22342378 {
....@@ -2240,7 +2384,7 @@
22402384 ResetModel();
22412385 refreshContents();
22422386 } else
2243
- if (event.getSource() == scriptNodeItem)
2387
+ if (source == scriptNodeItem)
22442388 {
22452389 boolean atleastone = false;
22462390
....@@ -2279,199 +2423,223 @@
22792423 }
22802424 }
22812425 } else
2282
- if (event.getSource() == linkerItem)
2426
+ if (source == linkerItem)
22832427 {
22842428 group(new cLinker());
22852429 } else
2286
- if (event.getSource() == textureItem)
2430
+ if (source == textureItem)
22872431 {
22882432 group(new TextureNode());
22892433 } else
2290
- if (event.getSource() == shadowXItem)
2434
+ if (source == billboardItem)
2435
+ {
2436
+ group(new BillboardNode());
2437
+ } else
2438
+ if (source == shadowXItem)
22912439 {
22922440 CastShadow(0);
22932441 } else
2294
- if (event.getSource() == shadowYItem)
2442
+ if (source == shadowYItem)
22952443 {
22962444 CastShadow(1);
22972445 } else
2298
- if (event.getSource() == shadowZItem)
2446
+ if (source == shadowZItem)
22992447 {
23002448 CastShadow(2);
23012449 } else
2302
- if (event.getSource() == ungroupItem)
2450
+ if (source == ungroupItem)
23032451 {
2304
- ungroup();
2452
+ //ungroup();
2453
+ for (int i=0; i<group.selection.size(); i++)
2454
+ {
2455
+ Ungroup(group.selection.get(i));
2456
+ }
2457
+
2458
+ ClearSelection(false);
2459
+
2460
+ refreshContents();
23052461 } else
2306
- if (event.getSource() == genUVItem)
2462
+ if (source == genUVItem)
23072463 {
23082464 GenUV();
23092465 } else
2310
- if (event.getSource() == genNormalsCADItem)
2466
+ if (source == genNormalsCADItem)
23112467 {
23122468 GenNormals(true);
23132469 } else
2314
- if (event.getSource() == genNormalsMESHItem)
2470
+ if (source == genNormalsMESHItem)
23152471 {
23162472 GenNormals(true); // TODO
23172473 } else
2318
- if (event.getSource() == genNormalsORGANItem)
2474
+ if (source == genNormalsORGANItem)
23192475 {
23202476 GenNormals(false);
23212477 } else
2322
- if (event.getSource() == stripifyItem)
2478
+ if (source == genNormalsMINEItem)
2479
+ {
2480
+ GenNormalsMINE();
2481
+ } else
2482
+ if (source == stripifyItem)
23232483 {
23242484 Stripify();
23252485 } else
2326
- if (event.getSource() == unstripifyItem)
2486
+ if (source == unstripifyItem)
23272487 {
23282488 Unstripify();
23292489 } else
2330
- if (event.getSource() == trimItem)
2490
+ if (source == trimItem)
23312491 {
23322492 Trim();
23332493 } else
2334
- if (event.getSource() == untrimItem)
2494
+ if (source == untrimItem)
23352495 {
23362496 Untrim();
23372497 } else
2338
- if (event.getSource() == clearColorsItem)
2498
+ if (source == clearColorsItem)
23392499 {
23402500 ClearColors();
23412501 } else
2342
- if (event.getSource() == clearMaterialsItem)
2502
+ if (source == clearMaterialsItem)
23432503 {
23442504 ClearMaterials();
23452505 } else
2346
- if (event.getSource() == liveleavesItem)
2506
+ if (source == liveleavesItem)
23472507 {
23482508 LiveLeaves(true);
23492509 } else
2350
- if (event.getSource() == unliveleavesItem)
2510
+ if (source == unliveleavesItem)
23512511 {
23522512 LiveLeaves(false);
23532513 } else
2354
- if (event.getSource() == supportleavesItem)
2514
+ if (source == supportleavesItem)
23552515 {
23562516 SupportLeaves(true);
23572517 } else
2358
- if (event.getSource() == unsupportleavesItem)
2518
+ if (source == unsupportleavesItem)
23592519 {
23602520 SupportLeaves(false);
23612521 } else
2362
- if (event.getSource() == hideleavesItem)
2522
+ if (source == hideleavesItem)
23632523 {
23642524 HideLeaves(true);
23652525 } else
2366
- if (event.getSource() == showleavesItem)
2526
+ if (source == showleavesItem)
23672527 {
23682528 HideLeaves(false);
23692529 } else
2370
- if (event.getSource() == markleavesItem)
2530
+ if (source == markleavesItem)
23712531 {
23722532 MarkLeaves(true);
23732533 } else
2374
- if (event.getSource() == unmarkleavesItem)
2534
+ if (source == unmarkleavesItem)
23752535 {
23762536 MarkLeaves(false);
23772537 } else
2378
- if (event.getSource() == flipVItem)
2538
+ if (source == flipVItem)
23792539 {
23802540 FlipV(true);
23812541 } else
2382
- if (event.getSource() == unflipVItem)
2542
+ if (source == unflipVItem)
23832543 {
23842544 FlipV(false);
23852545 } else
2386
- if (event.getSource() == lowTexturesItem)
2546
+ if (source == lowTexturesItem)
23872547 {
23882548 SetTexRes(0);
23892549 } else
2390
- if (event.getSource() == normalTexturesItem)
2550
+ if (source == normalTexturesItem)
23912551 {
23922552 SetTexRes(1);
23932553 } else
2394
- if (event.getSource() == highTexturesItem)
2554
+ if (source == highTexturesItem)
23952555 {
23962556 SetTexRes(2);
23972557 } else
2398
- if (event.getSource() == veryhighTexturesItem)
2558
+ if (source == veryhighTexturesItem)
23992559 {
24002560 SetTexRes(3);
24012561 } else
2402
- if (event.getSource() == maxTexturesItem)
2562
+ if (source == maxTexturesItem)
24032563 {
24042564 SetTexRes(4);
24052565 } else
2406
- if (event.getSource() == panoTexturesItem)
2566
+ if (source == panoTexturesItem)
24072567 {
24082568 SetTexRes(5);
24092569 } else
2410
- if (event.getSource() == reverseNormalsItem)
2570
+ if (source == reverseNormalsItem)
24112571 {
24122572 ReverseNormals();
24132573 } else
2414
- if (event.getSource() == parseverticesItem)
2574
+ if (source == parseverticesItem)
24152575 {
24162576 ParseVertices();
24172577 } else
2418
- if (event.getSource() == textureFieldItem)
2578
+ if (source == textureFieldItem)
24192579 {
24202580 TextureVertices();
24212581 } else
2422
- if (event.getSource() == alignItem)
2582
+ if (source == alignItem)
24232583 {
24242584 Align();
24252585 } else
2426
- if (event.getSource() == mirrorItem)
2586
+ if (source == mirrorItem)
24272587 {
24282588 MirrorPoses();
24292589 } else
2430
- if (event.getSource() == reduceMorphItem)
2590
+ if (source == reduceMorphItem)
24312591 {
24322592 MeshReduction(false);
24332593 } else
2434
- if (event.getSource() == reduce34MorphItem)
2594
+ if (source == reduce34MorphItem)
24352595 {
24362596 MeshReduction(true);
24372597 } else
2438
- if (event.getSource() == reverseTrianglesItem)
2598
+ if (source == reverseTrianglesItem)
24392599 {
24402600 ReverseTriangles();
24412601 } else
2442
- if (event.getSource() == reduceMeshItem)
2602
+ if (source == reduceMeshItem)
24432603 {
24442604 ReduceMesh(false);
24452605 } else
2446
- if (event.getSource() == reduce34MeshItem)
2606
+ if (source == reduce34MeshItem)
24472607 {
24482608 ReduceMesh(true);
24492609 } else
2450
- if (event.getSource() == increaseMeshItem)
2610
+ if (source == increaseMeshItem)
24512611 {
24522612 IncreaseMesh();
24532613 } else
2454
- if (event.getSource() == clipMeshItem)
2614
+ if (source == clipMeshItem)
24552615 {
24562616 ClipMesh();
24572617 } else
2458
- if (event.getSource() == smoothMeshItem)
2618
+ if (source == smoothMeshItem)
24592619 {
24602620 SmoothMesh();
24612621 } else
2462
- if (event.getSource() == transformgeometryItem)
2622
+ if (source == transformGeometryItem)
24632623 {
24642624 TransformGeometry();
24652625 } else
2466
- if (event.getSource() == resetTransformItem)
2626
+ if (source == transformChildrenItem)
2627
+ {
2628
+ TransformChildren();
2629
+ } else
2630
+ if (source == resetTransformItem)
24672631 {
24682632 ResetTransform();
24692633 } else
2470
- if (event.getSource() == resetCentroidItem)
2634
+ if (source == resetCentroidItem)
24712635 {
2472
- ResetCentroid();
2636
+ ResetCentroid(true);
24732637 } else
2474
- if (event.getSource() == resetParentItem)
2638
+ if (source == resetCentroidXZItem)
2639
+ {
2640
+ ResetCentroid(false);
2641
+ } else
2642
+ if (source == resetParentItem)
24752643 {
24762644 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24772645 {
....@@ -2481,7 +2649,7 @@
24812649
24822650 refreshContents();
24832651 } else
2484
- if (event.getSource() == repairParentItem)
2652
+ if (source == repairParentItem)
24852653 {
24862654 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24872655 {
....@@ -2495,7 +2663,21 @@
24952663
24962664 refreshContents();
24972665 } else
2498
- if (event.getSource() == sortbysizeItem)
2666
+ if (source == repairShadowItem)
2667
+ {
2668
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2669
+ {
2670
+ Object3D obj = (Object3D)e.nextElement();
2671
+ obj.RepairShadow();
2672
+// for (int i=0; i<obj.size(); i++)
2673
+// {
2674
+// obj.get(i).parent = obj;
2675
+// }
2676
+ }
2677
+
2678
+ refreshContents();
2679
+ } else
2680
+ if (source == sortbysizeItem)
24992681 {
25002682 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25012683 {
....@@ -2507,7 +2689,7 @@
25072689 ResetModel();
25082690 refreshContents();
25092691 } else
2510
- if (event.getSource() == sortbynameItem)
2692
+ if (source == sortbynameItem)
25112693 {
25122694 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25132695 {
....@@ -2519,7 +2701,7 @@
25192701 ResetModel();
25202702 refreshContents();
25212703 } else
2522
- if (event.getSource() == attachPigmentItem)
2704
+ if (source == attachPigmentItem)
25232705 {
25242706 String texture = GetFile("Attach pigment");
25252707 Object3D obj;
....@@ -2531,7 +2713,7 @@
25312713
25322714 refreshContents();
25332715 } else
2534
- if (event.getSource() == detachPigmentItem)
2716
+ if (source == detachPigmentItem)
25352717 {
25362718 Object3D obj;
25372719 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2542,7 +2724,7 @@
25422724
25432725 refreshContents();
25442726 } else
2545
- if (event.getSource() == attachBumpItem)
2727
+ if (source == attachBumpItem)
25462728 {
25472729 String texture = GetFile("Attach bump");
25482730 Object3D obj;
....@@ -2554,7 +2736,7 @@
25542736
25552737 refreshContents();
25562738 } else
2557
- if (event.getSource() == detachBumpItem)
2739
+ if (source == detachBumpItem)
25582740 {
25592741 Object3D obj;
25602742 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2565,7 +2747,7 @@
25652747
25662748 refreshContents();
25672749 } else
2568
- if (event.getSource() == pigmentBumpItem)
2750
+ if (source == pigmentBumpItem)
25692751 {
25702752 Object3D obj;
25712753 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2576,158 +2758,195 @@
25762758
25772759 refreshContents();
25782760 } else
2579
- if (event.getSource() == flashSelectionButton)
2761
+ if (source == flashSelectionButton)
25802762 {
25812763 CameraPane.flash = true;
25822764 refreshContents();
25832765 } else
2584
- if (event.getSource() == oneButton)
2766
+ if (source == oneButton)
25852767 {
25862768 } else
2587
- if (event.getSource() == twoButton)
2769
+ if (source == twoButton)
25882770 {
25892771 radio.layout = twoButton;
25902772 // bug
25912773 //gridPanel.setDividerLocation(1.0);
25922774 //bigPanel.setDividerLocation(0.0);
2593
- bigThree.remove(jtp);
2594
- bigThree.remove(cameraPanel);
2595
- bigThree.remove(XYZPanel);
2596
- aWindowConstraints.gridx = 0;
2597
- aWindowConstraints.gridy = 0;
2598
- aWindowConstraints.gridwidth = 1;
2599
- // aConstraints.gridheight = 3;
2600
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2601
- aWindowConstraints.weightx = 0;
2602
- aWindowConstraints.weighty = 1;
2603
- //bigThree.add(jtp, aWindowConstraints);
2604
- aWindowConstraints.weightx = 1;
2605
- aWindowConstraints.gridwidth = 3;
2606
- // aConstraints.gridheight = 3;
2607
- aWindowConstraints.gridx = 1;
2608
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2609
- bigThree.add(cameraPanel, aWindowConstraints);
2610
- aWindowConstraints.weightx = 0;
2611
- aWindowConstraints.gridx = 4;
2612
- aWindowConstraints.gridwidth = 1;
2613
- // aConstraints.gridheight = 3;
2614
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2615
- //bigThree.add(XYZPanel, aWindowConstraints);
2616
- bigThree.revalidate();
2775
+// bigThree.remove(scenePanel);
2776
+// bigThree.remove(centralPanel);
2777
+// bigThree.remove(XYZPanel);
2778
+// aWindowConstraints.gridx = 0;
2779
+// aWindowConstraints.gridy = 0;
2780
+// aWindowConstraints.gridwidth = 1;
2781
+// // aConstraints.gridheight = 3;
2782
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2783
+// aWindowConstraints.weightx = 0;
2784
+// aWindowConstraints.weighty = 1;
2785
+// //bigThree.add(jtp, aWindowConstraints);
2786
+// aWindowConstraints.weightx = 1;
2787
+// aWindowConstraints.gridwidth = 3;
2788
+// // aConstraints.gridheight = 3;
2789
+// aWindowConstraints.gridx = 1;
2790
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2791
+// bigThree.add(centralPanel, aWindowConstraints);
2792
+// aWindowConstraints.weightx = 0;
2793
+// aWindowConstraints.gridx = 4;
2794
+// aWindowConstraints.gridwidth = 1;
2795
+// // aConstraints.gridheight = 3;
2796
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2797
+// //bigThree.add(XYZPanel, aWindowConstraints);
2798
+// scenePanel.setVisible(false);
2799
+// centralPanel.setVisible(true);
2800
+// XYZPanel.setVisible(false);
2801
+ bigThree.ClearUI();
2802
+ bigThree.add(centralPanel);
2803
+ bigThree.FlushUI();
26172804 } else
2618
- if (event.getSource() == threeButton)
2805
+ if (source == threeButton)
26192806 {
26202807 radio.layout = threeButton;
2621
- bigThree.remove(jtp);
2622
- bigThree.remove(cameraPanel);
2623
- bigThree.remove(XYZPanel);
2624
- aWindowConstraints.gridx = 0;
2625
- aWindowConstraints.gridy = 0;
2626
- aWindowConstraints.gridwidth = 1;
2627
- // aConstraints.gridheight = 3;
2628
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2629
- aWindowConstraints.weightx = 0;
2630
- aWindowConstraints.weighty = 1;
2631
- //bigThree.add(jtp, aWindowConstraints);
2632
- aWindowConstraints.weightx = 1;
2633
- aWindowConstraints.gridwidth = 3;
2634
- // aConstraints.gridheight = 3;
2635
- aWindowConstraints.gridx = 1;
2636
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2637
- bigThree.add(cameraPanel, aWindowConstraints);
2638
- aWindowConstraints.weightx = 0;
2639
- aWindowConstraints.gridx = 4;
2640
- aWindowConstraints.gridwidth = 1;
2641
- // aConstraints.gridheight = 3;
2642
- aConstraints.fill = GridBagConstraints.VERTICAL;
2643
- bigThree.add(XYZPanel, aWindowConstraints);
2644
- bigThree.revalidate();
2808
+
2809
+// bigThree.remove(scenePanel);
2810
+// bigThree.remove(centralPanel);
2811
+// bigThree.remove(XYZPanel);
2812
+// aWindowConstraints.gridx = 0;
2813
+// aWindowConstraints.gridy = 0;
2814
+// aWindowConstraints.gridwidth = 1;
2815
+// // aConstraints.gridheight = 3;
2816
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2817
+// aWindowConstraints.weightx = 0;
2818
+// aWindowConstraints.weighty = 1;
2819
+// //bigThree.add(jtp, aWindowConstraints);
2820
+// aWindowConstraints.weightx = 1;
2821
+// aWindowConstraints.gridwidth = 3;
2822
+// // aConstraints.gridheight = 3;
2823
+// aWindowConstraints.gridx = 1;
2824
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2825
+// bigThree.add(centralPanel, aWindowConstraints);
2826
+// aWindowConstraints.weightx = 0;
2827
+// aWindowConstraints.gridx = 4;
2828
+// aWindowConstraints.gridwidth = 1;
2829
+// // aConstraints.gridheight = 3;
2830
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2831
+// bigThree.add(XYZPanel, aWindowConstraints);
2832
+// bigThree.validate();
2833
+// scenePanel.setVisible(false);
2834
+// centralPanel.setVisible(true);
2835
+// XYZPanel.setVisible(true);
2836
+ bigThree.ClearUI();
2837
+ bigThree.add(centralPanel);
2838
+ bigThree.add(XYZPanel);
2839
+ bigThree.FlushUI();
26452840 } else
2646
- if (event.getSource() == fourButton)
2841
+ if (source == fourButton)
26472842 {
26482843 radio.layout = fourButton;
2649
- bigThree.remove(jtp);
2650
- bigThree.remove(cameraPanel);
2651
- bigThree.remove(XYZPanel);
2652
- aWindowConstraints.gridx = 0;
2653
- aWindowConstraints.gridy = 0;
2654
- aWindowConstraints.gridwidth = 1;
2655
- // aWindowConstraints.gridheight = 3;
2656
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2657
- aWindowConstraints.weightx = 1;
2658
- aWindowConstraints.weighty = 1;
2659
- bigThree.add(jtp, aWindowConstraints);
2660
- aWindowConstraints.weightx = 1;
2661
- aWindowConstraints.gridwidth = 3;
2662
- // aConstraints.gridheight = 3;
2663
- aWindowConstraints.gridx = 1;
2664
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2665
- //bigThree.add(cameraPanel, aWindowConstraints);
2666
- aWindowConstraints.weightx = 0;
2667
- aWindowConstraints.gridx = 4;
2668
- aWindowConstraints.gridwidth = 1;
2669
- // aWindowConstraints.gridheight = 3;
2670
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2671
- //bigThree.add(XYZPanel, aWindowConstraints);
2672
- bigThree.revalidate();
2844
+
2845
+// bigThree.remove(scenePanel);
2846
+// bigThree.remove(centralPanel);
2847
+// bigThree.remove(XYZPanel);
2848
+// aWindowConstraints.gridx = 0;
2849
+// aWindowConstraints.gridy = 0;
2850
+// aWindowConstraints.gridwidth = 1;
2851
+// // aWindowConstraints.gridheight = 3;
2852
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2853
+// aWindowConstraints.weightx = 1;
2854
+// aWindowConstraints.weighty = 1;
2855
+// bigThree.add(scenePanel, aWindowConstraints);
2856
+// aWindowConstraints.weightx = 1;
2857
+// aWindowConstraints.gridwidth = 3;
2858
+// // aConstraints.gridheight = 3;
2859
+// aWindowConstraints.gridx = 1;
2860
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2861
+// //bigThree.add(cameraPanel, aWindowConstraints);
2862
+// aWindowConstraints.weightx = 0;
2863
+// aWindowConstraints.gridx = 4;
2864
+// aWindowConstraints.gridwidth = 1;
2865
+// // aWindowConstraints.gridheight = 3;
2866
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2867
+// //bigThree.add(XYZPanel, aWindowConstraints);
2868
+// bigThree.validate();
2869
+// scenePanel.setVisible(true);
2870
+// centralPanel.setVisible(false);
2871
+// XYZPanel.setVisible(false);
2872
+ bigThree.ClearUI();
2873
+ bigThree.add(scenePanel);
2874
+ bigThree.FlushUI();
26732875 } else
2674
- if (event.getSource() == sixButton)
2876
+ if (source == sixButton)
26752877 {
26762878 radio.layout = sixButton;
2677
- bigThree.remove(jtp);
2678
- bigThree.remove(cameraPanel);
2679
- bigThree.remove(XYZPanel);
2680
- aWindowConstraints.gridx = 0;
2681
- aWindowConstraints.gridy = 0;
2682
- aWindowConstraints.gridwidth = 1;
2683
- // aConstraints.gridheight = 3;
2684
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2685
- aWindowConstraints.weightx = 0;
2686
- aWindowConstraints.weighty = 1;
2687
- bigThree.add(jtp, aWindowConstraints);
2688
- aWindowConstraints.weightx = 1;
2689
- aWindowConstraints.gridwidth = 3;
2690
- // aWindowConstraints.gridheight = 3;
2691
- aWindowConstraints.gridx = 1;
2692
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2693
- bigThree.add(cameraPanel, aWindowConstraints);
2694
- aWindowConstraints.weightx = 0;
2695
- aWindowConstraints.gridx = 4;
2696
- aWindowConstraints.gridwidth = 1;
2697
- // aWindowConstraints.gridheight = 3;
2698
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2699
- //bigThree.add(XYZPanel, aConstraints);
2700
- bigThree.revalidate();
2879
+
2880
+// bigThree.remove(scenePanel);
2881
+// bigThree.remove(centralPanel);
2882
+// bigThree.remove(XYZPanel);
2883
+// aWindowConstraints.gridx = 0;
2884
+// aWindowConstraints.gridy = 0;
2885
+// aWindowConstraints.gridwidth = 1;
2886
+// // aConstraints.gridheight = 3;
2887
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2888
+// aWindowConstraints.weightx = 0;
2889
+// aWindowConstraints.weighty = 1;
2890
+// bigThree.add(scenePanel, aWindowConstraints);
2891
+// aWindowConstraints.weightx = 1;
2892
+// aWindowConstraints.gridwidth = 3;
2893
+// // aWindowConstraints.gridheight = 3;
2894
+// aWindowConstraints.gridx = 1;
2895
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2896
+// bigThree.add(centralPanel, aWindowConstraints);
2897
+// aWindowConstraints.weightx = 0;
2898
+// aWindowConstraints.gridx = 4;
2899
+// aWindowConstraints.gridwidth = 1;
2900
+// // aWindowConstraints.gridheight = 3;
2901
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2902
+// //bigThree.add(XYZPanel, aConstraints);
2903
+// bigThree.validate();
2904
+// scenePanel.setVisible(true);
2905
+// centralPanel.setVisible(true);
2906
+// XYZPanel.setVisible(false);
2907
+ bigThree.ClearUI();
2908
+ bigThree.add(scenePanel);
2909
+ bigThree.add(centralPanel);
2910
+ bigThree.FlushUI();
27012911 } else
2702
- if (event.getSource() == sevenButton)
2912
+ if (source == sevenButton)
27032913 {
27042914 radio.layout = sevenButton;
2705
- bigThree.remove(jtp);
2706
- bigThree.remove(cameraPanel);
2707
- bigThree.remove(XYZPanel);
2708
- aWindowConstraints.gridx = 0;
2709
- aWindowConstraints.gridy = 0;
2710
- aWindowConstraints.gridwidth = 1;
2711
- // aWindowConstraints.gridheight = 3;
2712
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2713
- aWindowConstraints.weightx = 0;
2714
- aWindowConstraints.weighty = 1;
2715
- bigThree.add(jtp, aWindowConstraints);
2716
- aWindowConstraints.weightx = 1;
2717
- aWindowConstraints.gridwidth = 3;
2718
- // aWindowConstraints.gridheight = 3;
2719
- aWindowConstraints.gridx = 1;
2720
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2721
- bigThree.add(cameraPanel, aWindowConstraints);
2722
- aWindowConstraints.weightx = 0;
2723
- aWindowConstraints.gridx = 4;
2724
- aWindowConstraints.gridwidth = 1;
2725
- // aConstraints.gridheight = 3;
2726
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2727
- bigThree.add(XYZPanel, aWindowConstraints);
2728
- bigThree.revalidate();
2915
+
2916
+// bigThree.remove(scenePanel);
2917
+// bigThree.remove(centralPanel);
2918
+// bigThree.remove(XYZPanel);
2919
+// aWindowConstraints.gridx = 0;
2920
+// aWindowConstraints.gridy = 0;
2921
+// aWindowConstraints.gridwidth = 1;
2922
+// // aWindowConstraints.gridheight = 3;
2923
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2924
+// aWindowConstraints.weightx = 0;
2925
+// aWindowConstraints.weighty = 1;
2926
+// bigThree.add(scenePanel, aWindowConstraints);
2927
+// aWindowConstraints.weightx = 1;
2928
+// aWindowConstraints.gridwidth = 3;
2929
+// // aWindowConstraints.gridheight = 3;
2930
+// aWindowConstraints.gridx = 1;
2931
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2932
+// bigThree.add(centralPanel, aWindowConstraints);
2933
+// aWindowConstraints.weightx = 0;
2934
+// aWindowConstraints.gridx = 4;
2935
+// aWindowConstraints.gridwidth = 1;
2936
+// // aConstraints.gridheight = 3;
2937
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2938
+// bigThree.add(XYZPanel, aWindowConstraints);
2939
+// bigThree.validate();
2940
+// scenePanel.setVisible(true);
2941
+// centralPanel.setVisible(true);
2942
+// XYZPanel.setVisible(true);
2943
+ bigThree.ClearUI();
2944
+ bigThree.add(scenePanel);
2945
+ bigThree.add(centralPanel);
2946
+ bigThree.add(XYZPanel);
2947
+ bigThree.FlushUI();
27292948 } else
2730
- if (event.getSource() == rootButton)
2949
+ if (source == rootButton)
27312950 {
27322951 Object3D obj;
27332952 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2739,7 +2958,7 @@
27392958
27402959 refreshContents(true);
27412960 } else
2742
- if (event.getSource() == closeButton)
2961
+ if (source == closeButton)
27432962 {
27442963 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27452964 cRadio ab;
....@@ -2760,11 +2979,11 @@
27602979 }
27612980 refreshContents(true);
27622981 } else
2763
- if (event.getSource() == editItem || event.getSource() == editButton)
2982
+ if (source == editItem || source == editButton)
27642983 {
27652984 EditSelection(false);
27662985 } else
2767
- if (event.getSource() == uneditButton)
2986
+ if (source == uneditButton)
27682987 {
27692988 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27702989 {
....@@ -2776,12 +2995,12 @@
27762995
27772996 child.editWindow = null; // ???????????
27782997 }
2779
- objEditor.ctrlPanel.revalidate();
2998
+ objEditor.ctrlPanel.FlushUI();
27802999 //objEditor.jTree.clearSelection();
27813000 //objEditor.ResetSliders();
27823001 refreshContents(true);
27833002 } else
2784
- if (event.getSource() == clearPanelButton)
3003
+ if (source == clearPanelButton)
27853004 {
27863005 assert(copy == group);
27873006 //copy.ClearUI();
....@@ -2792,7 +3011,7 @@
27923011 listUI.clear();
27933012 refreshContents(true);
27943013 } else
2795
- if (event.getSource() == allParamsButton)
3014
+ if (source == allParamsButton)
27963015 {
27973016 assert(copy == group);
27983017
....@@ -2813,19 +3032,19 @@
28133032
28143033 refreshContents(true);
28153034 } else
2816
- if (event.getSource() == unselectButton)
3035
+ if (source == unselectButton)
28173036 {
28183037 objEditor.jTree.clearSelection();
28193038 // ?? oct 2012 GrafreeD.clipboard.clear();
28203039 objEditor.ResetSliders();
28213040 refreshContents(true);
28223041 } else
2823
- if(event.getSource() instanceof cRadio)
3042
+ if(source instanceof cRadio)
28243043 {
28253044 group.parent = keepparent;
28263045 group.attributes = 0;
28273046 //group.editWindow = null;
2828
- /*cRadio*/ radio = (cRadio)event.getSource();
3047
+ /*cRadio*/ radio = (cRadio)source;
28293048 Object3D obj = radio.GetObject();
28303049 System.out.println("Edit " + obj);
28313050 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2845,7 +3064,7 @@
28453064 }
28463065
28473066 copy = group;
2848
- //CameraPane.theRenderer.object = group;
3067
+ //Globals.theRenderer.object = group;
28493068 if(!useclient)
28503069 {
28513070 cameraView.renderCamera = radio.camera;
....@@ -2854,7 +3073,8 @@
28543073 cameraView.cameras[cameraView.cameracount] = radio.camera;
28553074 cameraView.targetLookAt.set(radio.camera.lookAt);
28563075 cameraView.object = group;
2857
- cameraView.lighttouched = true;
3076
+ //cameraView.lighttouched = true;
3077
+ Globals.lighttouched = true;
28583078 topView.object = group;
28593079 frontView.object = group;
28603080 sideView.object = group;
....@@ -2890,7 +3110,7 @@
28903110 if (useclient)
28913111 {
28923112 cameraView.object = client;
2893
- cameraView.lighttouched = true;
3113
+ Globals.lighttouched = true;
28943114 //topView.object = client;
28953115 //frontView.object = client;
28963116 //sideView.object = client;
....@@ -2898,7 +3118,7 @@
28983118 else
28993119 {
29003120 cameraView.object = group;
2901
- cameraView.lighttouched = true;
3121
+ Globals.lighttouched = true;
29023122 //topView.object = group;
29033123 //frontView.object = group;
29043124 //sideView.object = group;
....@@ -2933,6 +3153,28 @@
29333153 refreshContents();
29343154 }
29353155
3156
+ void TransformChildren()
3157
+ {
3158
+ Object3D obj;
3159
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
3160
+ {
3161
+ obj = (Object3D)e.nextElement();
3162
+ obj.KeepTextureMatrices();
3163
+ obj.TransformChildren();
3164
+ obj.RestoreTextureMatrices();
3165
+
3166
+// if (obj.parent == null)
3167
+// {
3168
+// System.out.println("NULL PARENT!");
3169
+// new Exception().printStackTrace();
3170
+// }
3171
+// else
3172
+// TouchTransform(obj);
3173
+// //obj.parent.Touch();
3174
+ }
3175
+
3176
+ refreshContents();
3177
+ }
29363178
29373179 void ResetTransform()
29383180 {
....@@ -3045,7 +3287,7 @@
30453287 refreshContents();
30463288 }
30473289
3048
- void ResetCentroid()
3290
+ void ResetCentroid(boolean full)
30493291 {
30503292 Object3D obj;
30513293 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -3060,12 +3302,16 @@
30603302 LA.matIdentity(Object3D.mat);
30613303 obj.getBounds(minima, maxima, false);
30623304 Object3D.mat[3][0] = -(minima.x + maxima.x)/2;
3063
- Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
3305
+ if (full)
3306
+ Object3D.mat[3][1] = -(minima.y + maxima.y)/2;
30643307 Object3D.mat[3][2] = -(minima.z + maxima.z)/2;
30653308 obj.TransformMesh(Object3D.mat);
3309
+
30663310 Object3D.mat[3][0] = (minima.x + maxima.x)/2;
3067
- Object3D.mat[3][1] = (minima.y + maxima.y)/2;
3311
+ if (full)
3312
+ Object3D.mat[3][1] = (minima.y + maxima.y)/2;
30683313 Object3D.mat[3][2] = (minima.z + maxima.z)/2;
3314
+
30693315 LA.matConcat(Object3D.mat, obj.toParent, obj.toParent);
30703316 //Object3D.mat[3][0] = -Object3D.mat[3][0];
30713317 //Object3D.mat[3][1] = -Object3D.mat[3][1];
....@@ -3131,9 +3377,9 @@
31313377 obj = (Object3D)e.nextElement();
31323378
31333379 System.out.println("Object is: " + obj);
3134
- GrafreeD.AnalyzeObject(obj);
3380
+ Grafreed.AnalyzeObject(obj);
31353381 System.out.println("Boundary rep: " + obj.bRep);
3136
- GrafreeD.AnalyzeObject(obj.bRep);
3382
+ Grafreed.AnalyzeObject(obj.bRep);
31373383
31383384 // System.err.println((size/1024) + " KB is the size of " + obj);
31393385 }
....@@ -3175,6 +3421,13 @@
31753421 void GenNormals(boolean crease)
31763422 {
31773423 group.GenNormalsS(crease);
3424
+
3425
+ refreshContents();
3426
+ }
3427
+
3428
+ void GenNormalsMINE()
3429
+ {
3430
+ group.selection.GenNormalsMINE();
31783431
31793432 refreshContents();
31803433 }
....@@ -3340,8 +3593,8 @@
33403593
33413594 void ParseVertices()
33423595 {
3343
- boolean epsequal = GrafreeD.epsequal;
3344
- GrafreeD.epsequal = true;
3596
+ boolean epsequal = Grafreed.epsequal;
3597
+ Grafreed.epsequal = true;
33453598
33463599 for (int i=0; i<group.selection.size(); i++)
33473600 {
....@@ -3366,7 +3619,7 @@
33663619 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33673620 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33683621
3369
- g.add(GrafreeD.clipboard);
3622
+ g.add(Grafreed.clipboard);
33703623
33713624 buffer.add(g);
33723625 }
....@@ -3381,7 +3634,7 @@
33813634 makeSomething(buffer, i==group.selection.size()-1);
33823635 }
33833636
3384
- GrafreeD.epsequal = epsequal;
3637
+ Grafreed.epsequal = epsequal;
33853638
33863639 refreshContents();
33873640 }
....@@ -3399,7 +3652,7 @@
33993652 String pigment = Object3D.GetPigment(tex);
34003653 //String bump = Object3D.GetBump(tex);
34013654
3402
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3655
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
34033656
34043657 double s = v.s;
34053658
....@@ -3447,12 +3700,26 @@
34473700
34483701 void Align()
34493702 {
3703
+ if (group.selection.size() == 0)
3704
+ return;
3705
+
3706
+ cVector bbmin = new cVector();
3707
+ cVector bbmax = new cVector();
3708
+
3709
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3710
+
3711
+ double dx = bbmax.x - bbmin.x;
3712
+ double dy = bbmax.y - bbmin.y;
3713
+ double dz = bbmax.z - bbmin.z;
3714
+
3715
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3716
+
34503717 for (int i=0; i<group.selection.size(); i++)
34513718 {
34523719 Object3D obj = group.selection.get(i);
34533720
3454
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3455
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3721
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3722
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
34563723 }
34573724
34583725 refreshContents();
....@@ -3473,11 +3740,11 @@
34733740
34743741 SwitchNode sn = new SwitchNode(poses, Object3D.GEOMETRY);
34753742
3476
- boolean random = CameraPane.RANDOM;
3477
- CameraPane.RANDOM = false; // parse all random nodes
3743
+ boolean random = CameraPane.SWITCH;
3744
+ CameraPane.SWITCH = false; // parse all random nodes
34783745 lowres.linkVerticesThis(null);
34793746 lowres.linkVerticesThis(sn);
3480
- CameraPane.RANDOM = random;
3747
+ CameraPane.SWITCH = random;
34813748
34823749 System.err.flush();
34833750
....@@ -3517,7 +3784,7 @@
35173784 return;
35183785
35193786 Object3D poses = group.selection.get(0);
3520
- Object3D ref = GrafreeD.clipboard.get(0);
3787
+ Object3D ref = Grafreed.clipboard.get(0);
35213788
35223789 Object3D newgroup = new Object3D("Po:" + poses.name);
35233790
....@@ -3686,7 +3953,7 @@
36863953 group.selection.RelinkToSupport(); // july 2014
36873954 System.out.println("DONE.");
36883955 refreshContents();
3689
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3956
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
36903957 }
36913958
36923959 void ReduceMesh(boolean reduction34)
....@@ -3711,9 +3978,9 @@
37113978
37123979 void ClipMesh()
37133980 {
3714
- if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
3981
+ if (/*group.selection.size() == 1 &&*/ Grafreed.clipboard.size() == 1)
37153982 {
3716
- Object3D content = GrafreeD.clipboard.get(0);
3983
+ Object3D content = Grafreed.clipboard.get(0);
37173984
37183985 if (content instanceof cGroup && ((cGroup)content).transientlink )
37193986 content = ((cGroup)content).get(0);
....@@ -3722,7 +3989,7 @@
37223989 // {
37233990 // group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37243991 // }
3725
- group.selection.ClipMesh(GrafreeD.clipboard);
3992
+ group.selection.ClipMesh(Grafreed.clipboard);
37263993 }
37273994 // group.selection.ClipMesh(GrafreeD.clipboard);
37283995 System.out.println("DONE.");
....@@ -3962,25 +4229,25 @@
39624229 System.err.println("info : " + child.GetPath());
39634230 }
39644231 }
3965
- else
3966
- {
3967
- objEditor.SetMaterial(group); // .GetMaterial());
3968
- objEditor.AddInfo(group, this, true); // .GetMaterial());
3969
- System.err.println("info : " + group.GetPath());
3970
- }
4232
+// else
4233
+// {
4234
+// objEditor.SetMaterial(group); // .GetMaterial());
4235
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4236
+// System.err.println("info : " + group.GetPath());
4237
+// }
39714238
39724239 objEditor.SetText(); // jan 2014
39734240
3974
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4241
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
39754242 CameraPane.flash = true;
39764243
39774244 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
39784245 // a camera
39794246 {
39804247 CameraPane.camerachangeframe = 0; // don't refuse it
3981
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
3982
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
3983
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4248
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4249
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4250
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39844251 }
39854252
39864253 refreshContents();
....@@ -4062,12 +4329,12 @@
40624329 {
40634330 if (group.selection.isEmpty())
40644331 return;
4065
- GrafreeD.clipboardIsTempGroup = false;
4332
+ Grafreed.clipboardIsTempGroup = false;
40664333 Composite tGroup = null;
40674334 if (group.selection.size() > 0) // 1)
40684335 {
40694336 tGroup = new cGroup();
4070
- GrafreeD.clipboardIsTempGroup = true;
4337
+ Grafreed.clipboardIsTempGroup = true;
40714338 }
40724339
40734340 if (cut)
....@@ -4107,16 +4374,16 @@
41074374 //System.out.println("cut " + child);
41084375 //System.out.println("parent = " + child.parent);
41094376 // tmp.addChild(child);
4110
- if (GrafreeD.clipboardIsTempGroup)
4377
+ if (Grafreed.clipboardIsTempGroup)
41114378 tGroup.add/*Child*/(tmp);
41124379 else
4113
- GrafreeD.clipboard = tmp;
4380
+ Grafreed.clipboard = tmp;
41144381 }
41154382 else
4116
- if (GrafreeD.clipboardIsTempGroup)
4383
+ if (Grafreed.clipboardIsTempGroup)
41174384 tGroup.add/*Child*/(child);
41184385 else
4119
- GrafreeD.clipboard = child;
4386
+ Grafreed.clipboard = child;
41204387 }
41214388
41224389 //ResetModel();
....@@ -4148,21 +4415,21 @@
41484415 //System.out.println("cut " + elem);
41494416 //System.out.println("parent = " + elem.parent);
41504417 // tmp.addChild(elem);
4151
- if (GrafreeD.clipboardIsTempGroup)
4418
+ if (Grafreed.clipboardIsTempGroup)
41524419 tGroup.add/*Child*/(tmp);
41534420 else
4154
- GrafreeD.clipboard = tmp;
4421
+ Grafreed.clipboard = tmp;
41554422 }
41564423 else
4157
- if (GrafreeD.clipboardIsTempGroup)
4424
+ if (Grafreed.clipboardIsTempGroup)
41584425 tGroup.add/*Child*/(child);
41594426 else
4160
- GrafreeD.clipboard = child;
4427
+ Grafreed.clipboard = child;
41614428 }
41624429
41634430 }
4164
- if (GrafreeD.clipboardIsTempGroup)
4165
- GrafreeD.clipboard = tGroup;
4431
+ if (Grafreed.clipboardIsTempGroup)
4432
+ Grafreed.clipboard = tGroup;
41664433 if (cut)
41674434 {
41684435 ResetModel();
....@@ -4176,7 +4443,7 @@
41764443 // return;
41774444 boolean first = true;
41784445
4179
- if (GrafreeD.clipboardIsTempGroup)
4446
+ if (Grafreed.clipboardIsTempGroup)
41804447 {
41814448 Composite temp;
41824449
....@@ -4187,7 +4454,7 @@
41874454 temp = (Composite)Applet3D.clipboard.deepCopy();
41884455 */
41894456 Object3D elem;
4190
- for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4457
+ for (Enumeration e = /*temp.children*/Grafreed.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
41914458 {
41924459 Object3D child = (Object3D)e.nextElement();
41934460
....@@ -4221,21 +4488,21 @@
42214488 //Object3D cb = Applet3D.clipboard;
42224489 //temp.addChild(cb);
42234490 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4224
- assert(GrafreeD.clipboard.parent == null);
4225
- Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4226
- GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4227
- if (LA.isIdentity(GrafreeD.clipboard.toParent))
4228
- makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
4491
+ assert(Grafreed.clipboard.parent == null);
4492
+ Object3D /*Composite*/ keepparent = Grafreed.clipboard.get(0).parent;
4493
+ Grafreed.clipboard.get(0).parent = null; // Avoid copy?
4494
+ if (LA.isIdentity(Grafreed.clipboard.toParent))
4495
+ makeSomething(expand?Grafreed.clipboard.get(0).copyExpand():Grafreed.clipboard.get(0).deepCopy());
42294496 else
4230
- makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4231
- GrafreeD.clipboard.get(0).parent = keepparent;
4497
+ makeSomething(expand?Grafreed.clipboard.copyExpand():Grafreed.clipboard.deepCopy());
4498
+ Grafreed.clipboard.get(0).parent = keepparent;
42324499 }
42334500
42344501 ResetModel();
42354502 refreshContents();
42364503 }
42374504
4238
- void pasteInto(boolean copyit)
4505
+ void pasteInto(boolean copyit, boolean clone)
42394506 {
42404507 // if (GrafreeD.clipboard == null)
42414508 // return;
....@@ -4264,15 +4531,22 @@
42644531 if (copyit)
42654532 {
42664533 // paste(false);
4267
- CloneClipboard(false); // sept 2014
4534
+ if (clone)
4535
+ {
4536
+ CloneClipboard(false); // sept 2014
4537
+ }
4538
+ else
4539
+ {
4540
+ paste(false);
4541
+ }
42684542 }
42694543 else
42704544 {
42714545 boolean first = true;
42724546
4273
- if (GrafreeD.clipboardIsTempGroup)
4547
+ if (Grafreed.clipboardIsTempGroup)
42744548 {
4275
- Composite temp = (Composite)GrafreeD.clipboard;
4549
+ Composite temp = (Composite)Grafreed.clipboard;
42764550 Object3D copy;
42774551 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42784552 {
....@@ -4282,7 +4556,7 @@
42824556 }
42834557 } else
42844558 {
4285
- linkSomething(GrafreeD.clipboard); //.get(0));
4559
+ linkSomething(Grafreed.clipboard); //.get(0));
42864560 }
42874561 }
42884562 }
....@@ -4474,6 +4748,26 @@
44744748 makeSomething(csg);
44754749 }
44764750
4751
+ void Ungroup(Object3D g)
4752
+ {
4753
+ if (g instanceof HiddenObject)
4754
+ {
4755
+ HiddenObject h = (HiddenObject) g;
4756
+
4757
+ for (int i=0; i<h.ActualSize(); i++)
4758
+ {
4759
+ objEditor.makeSomething(h.get(i), false);
4760
+ }
4761
+ }
4762
+ else
4763
+ {
4764
+ for (int i=0; i<g.Size(); i++)
4765
+ {
4766
+ objEditor.makeSomething(g.get(i), false);
4767
+ }
4768
+ }
4769
+ }
4770
+
44774771 void ungroup()
44784772 {
44794773 /*
....@@ -4707,7 +5001,7 @@
47075001
47085002 void ImportVRMLX3D()
47095003 {
4710
- if (GrafreeD.standAlone)
5004
+ if (Grafreed.standAlone)
47115005 {
47125006 /**/
47135007 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4724,7 +5018,7 @@
47245018
47255019 String GetFile(String dialogName)
47265020 {
4727
- if (GrafreeD.standAlone)
5021
+ if (Grafreed.standAlone)
47285022 {
47295023 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47305024 browser.show();
....@@ -4788,10 +5082,12 @@
47885082 cButton flashSelectionButton;
47895083 cButton editButton;
47905084 cButton uneditButton;
5085
+ JCheckBox allParamsButton;
47915086 cButton clearpanelButton;
4792
- cButton allParamsButton;
47935087 cButton unselectButton;
47945088
5089
+ cButton oneStepButton;
5090
+
47955091 cButton screenfitButton;
47965092 cButton screenfitpointButton;
47975093 cButton snapobjectButton;
....@@ -4833,6 +5129,7 @@
48335129 private MenuItem resetsupportItem;
48345130 private MenuItem resetreferencesItem;
48355131 private MenuItem linkverticesItem;
5132
+ private MenuItem relinkverticesItem;
48365133 private MenuItem setMasterItem;
48375134 private MenuItem resetMeshItem;
48385135 private MenuItem stepAllItem;
....@@ -4845,6 +5142,7 @@
48455142 private MenuItem mergeGeometriesItem;
48465143 private MenuItem copyItem;
48475144 private MenuItem pasteItem;
5145
+ private MenuItem pasteIntoItem;
48485146 private MenuItem pasteLinkItem;
48495147 private MenuItem pasteCloneItem;
48505148 private MenuItem pasteExpandItem;
....@@ -4854,6 +5152,7 @@
48545152 private MenuItem genNormalsMESHItem;
48555153 private MenuItem genNormalsCADItem;
48565154 private MenuItem genNormalsORGANItem;
5155
+ private MenuItem genNormalsMINEItem;
48575156 private MenuItem stripifyItem;
48585157 private MenuItem unstripifyItem;
48595158 private MenuItem trimItem;
....@@ -4893,8 +5192,11 @@
48935192 private MenuItem panoTexturesItem;
48945193
48955194 private MenuItem resetCentroidItem;
4896
- private MenuItem transformgeometryItem;
5195
+ private MenuItem resetCentroidXZItem;
48975196 private MenuItem resetTransformItem;
5197
+ private MenuItem transformGeometryItem;
5198
+ private MenuItem transformChildrenItem;
5199
+ private MenuItem hideItem;
48985200 private MenuItem grabItem;
48995201 private MenuItem backItem;
49005202 private MenuItem frontItem;
....@@ -4915,6 +5217,7 @@
49155217
49165218 private MenuItem resetParentItem;
49175219 private MenuItem repairParentItem;
5220
+ private MenuItem repairShadowItem;
49185221 private MenuItem sortbysizeItem;
49195222 private MenuItem sortbynameItem;
49205223
....@@ -4935,10 +5238,11 @@
49355238 private MenuItem coneItem;
49365239 private MenuItem torusItem;
49375240 private MenuItem superItem;
5241
+ private MenuItem kleinItem;
49385242 private MenuItem blobItem;
49395243 private MenuItem latheItem;
49405244 private MenuItem bezierItem;
4941
- private MenuItem checkerItem;
5245
+ private MenuItem overlayItem;
49425246 private MenuItem meshItem;
49435247 // private MenuItem meshGroupItem;
49445248 private MenuItem springItem;
....@@ -4947,6 +5251,7 @@
49475251 private MenuItem csgItem;
49485252 private MenuItem templateItem;
49495253 private MenuItem textureItem;
5254
+ private MenuItem billboardItem;
49505255 private MenuItem shadowXItem;
49515256 private MenuItem shadowYItem;
49525257 private MenuItem shadowZItem;