Normand Briere
2019-04-29 c0c300a9dbd4c0fc127e003e9481d3f9246bbe7a
GroupEditor.java
....@@ -83,7 +83,7 @@
8383
8484 void CloneSelection(boolean supports)
8585 {
86
- // Object3D keep = GraphreeD.clipboard;
86
+ // Object3D keep = GrafreeD.clipboard;
8787 //Object3D obj;
8888 for (int i=0; i<group.selection.size(); i++)// Enumeration e = group.selection.elements(); e.hasMoreElements();)
8989 {
....@@ -97,14 +97,14 @@
9797
9898 void CloneClipboard(boolean supports)
9999 {
100
- assert(GraphreeD.clipboard.parent == null);
101
- Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent;
102
- GraphreeD.clipboard.get(0).parent = null; // Avoid copy?
103
- if (LA.isIdentity(GraphreeD.clipboard.toParent))
104
- makeSomething(CloneObject(GraphreeD.clipboard.get(0), false));
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));
105105 else
106
- makeSomething(CloneObject(GraphreeD.clipboard, false));
107
- GraphreeD.clipboard.get(0).parent = keepparent;
106
+ makeSomething(CloneObject(GrafreeD.clipboard, false));
107
+ GrafreeD.clipboard.get(0).parent = keepparent;
108108 }
109109
110110 static Object3D CloneObject(Object3D obj, boolean supports)
....@@ -118,7 +118,7 @@
118118 // obj.support = null;
119119 if (!supports)
120120 obj.SaveSupports();
121
- Object3D clone = (Object3D)GraphreeD.clone(obj);
121
+ Object3D clone = (Object3D)GrafreeD.clone(obj);
122122 obj.parent = parent;
123123 // obj.support = support;
124124 // clone.support = support; // aout 2013
....@@ -219,18 +219,24 @@
219219 resetsupportItem.addActionListener(this);
220220 linkverticesItem = menu.add(new MenuItem("Link to Support"));
221221 linkverticesItem.addActionListener(this);
222
+ relinkverticesItem = menu.add(new MenuItem("Re-link to Support"));
223
+ relinkverticesItem.addActionListener(this);
222224 setMasterItem = menu.add(new MenuItem("Set Master Mesh"));
223225 setMasterItem.addActionListener(this);
224226
225227 oe.menuBar.add(menu = new Menu("Group"));
226228 grabItem = menu.add(new MenuItem("Grab"));
227229 grabItem.addActionListener(this);
228
- frontItem = menu.add(new MenuItem("Front"));
229
- frontItem.addActionListener(this);
230230 backItem = menu.add(new MenuItem("Back"));
231231 backItem.addActionListener(this);
232
+ frontItem = menu.add(new MenuItem("Front"));
233
+ frontItem.addActionListener(this);
232234 compositeItem = menu.add(new MenuItem("Composite"));
233235 compositeItem.addActionListener(this);
236
+ hideItem = menu.add(new MenuItem("Hide"));
237
+ hideItem.addActionListener(this);
238
+ ungroupItem = menu.add(new MenuItem("Ungroup"));
239
+ ungroupItem.addActionListener(this);
234240 menu.add("-");
235241 randomItem = menu.add(new MenuItem("Random"));
236242 randomItem.addActionListener(this);
....@@ -252,6 +258,8 @@
252258 oe.menuBar.add(menu = new Menu("Object"));
253259 textureItem = menu.add(new MenuItem("Texture"));
254260 textureItem.addActionListener(this);
261
+ billboardItem = menu.add(new MenuItem("Billboard"));
262
+ billboardItem.addActionListener(this);
255263 csgItem = menu.add(new MenuItem("CSG"));
256264 csgItem.addActionListener(this);
257265 shadowXItem = menu.add(new MenuItem("Shadow X"));
....@@ -269,14 +277,12 @@
269277 pointflowItem = menu.add(new MenuItem("Point Flow"));
270278 pointflowItem.addActionListener(this);
271279 menu.add("-");
272
- transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
273
- transformgeometryItem.addActionListener(this);
274280 resetTransformItem = menu.add(new MenuItem("Reset Transform"));
275281 resetTransformItem.addActionListener(this);
276282 resetCentroidItem = menu.add(new MenuItem("Reset Centroid"));
277283 resetCentroidItem.addActionListener(this);
278
- ungroupItem = menu.add(new MenuItem("Ungroup"));
279
- ungroupItem.addActionListener(this);
284
+ transformgeometryItem = menu.add(new MenuItem("Transform Geometry"));
285
+ transformgeometryItem.addActionListener(this);
280286
281287 oe.menuBar.add(menu = new Menu("Geometry"));
282288 genUVItem = menu.add(new MenuItem("Generate UV"));
....@@ -285,6 +291,10 @@
285291 genNormalsORGANItem.addActionListener(this);
286292 genNormalsCADItem = menu.add(new MenuItem("CAD Normals"));
287293 genNormalsCADItem.addActionListener(this);
294
+ genNormalsMESHItem = menu.add(new MenuItem("Mesh Normals"));
295
+ genNormalsMESHItem.addActionListener(this);
296
+ genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
297
+ genNormalsMINEItem.addActionListener(this);
288298 stripifyItem = menu.add(new MenuItem("Stripify"));
289299 stripifyItem.addActionListener(this);
290300 unstripifyItem = menu.add(new MenuItem("Unstripify"));
....@@ -380,7 +390,7 @@
380390
381391
382392 oe.menuBar.add(menu = new Menu("Include"));
383
- importGFDItem = menu.add(new MenuItem("GraphreeD Object..."));
393
+ importGFDItem = menu.add(new MenuItem("GrafreeD Object..."));
384394 importGFDItem.addActionListener(this);
385395 importVRMLX3DItem = menu.add(new MenuItem("VRML/X3D Object..."));
386396 importVRMLX3DItem.addActionListener(this);
....@@ -424,76 +434,24 @@
424434 oe.buttonGroup.add(dummyButton);
425435 */
426436 aConstraints.gridy += 1;
437
+
438
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439
+
427440 oe.aConstraints.gridwidth = 1;
428441 oe.aConstraints.gridx = 0;
429442
430
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
443
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints);
444
+ liveCB.setToolTipText("Enabled animation");
431445 liveCB.addItemListener(this);
432446
433447 oe.aConstraints.gridx += 1;
434
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
435
- supportCB.addItemListener(this);
436
-
437
- // oe.aConstraints.gridx += 1;
438
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
439
- // localCB.addItemListener(this);
440
-
441
- oe.aConstraints.gridx += 1;
442
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
443
- crowdCB.addItemListener(this);
444
-
445
- oe.aConstraints.gridx += 1;
446
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
447
- smoothCB.addItemListener(this);
448
-
449
- oe.aConstraints.gridx += 1;
450
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
451
- fastCB.addItemListener(this);
452
- oe.aConstraints.gridx += 1;
453
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
454
- slowCB.addItemListener(this);
455
- oe.aConstraints.gridx += 1;
456
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
457
- boxCB.addItemListener(this);
458
-
459
-// oe.aConstraints.gridx += 1;
460
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
461
-// speakerMocapCB.addItemListener(this);
462
-
463
- if (false)
464
- {
465
- // handled in scripts
466
- oe.aConstraints.gridx += 1;
467
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
468
- speakerCameraCB.addItemListener(this);
469
-
470
- oe.aConstraints.gridx += 1;
471
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
472
- speakerFocusCB.addItemListener(this);
473
-
474
- oe.aConstraints.gridx += 1;
475
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
476
- smoothfocusCB.addItemListener(this);
477
- }
478
-
479
-//oe.aConstraints.gridx += 1;
480
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
481
-// debugCB.addItemListener(this);
482
-
483
- oe.aConstraints.gridx += 1;
484
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
485
- oeilCB.addItemListener(this);
486
-
487
- oe.aConstraints.gridx += 1;
488
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
489
- lookAtCB.addItemListener(this);
490
-
491
- oe.aConstraints.gridx += 1;
492
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
448
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints);
449
+ trackCB.setToolTipText("Enable tracking");
493450 trackCB.addItemListener(this);
494451
495452 oe.aConstraints.gridx += 1;
496453 oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
454
+ screenfitButton.setToolTipText("Screen fit");
497455 screenfitButton.addActionListener(this);
498456 oe.aConstraints.gridx += 1;
499457 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
....@@ -501,6 +459,7 @@
501459 // oe.aConstraints.gridx += 1;
502460 oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
503461 snapobjectButton.addActionListener(this);
462
+ snapobjectButton.setToolTipText("Snap Object");
504463 oe.aConstraints.gridx += 1;
505464
506465 //aConstraints.gridx = 0;
....@@ -509,28 +468,39 @@
509468 oe.aConstraints.gridwidth = 1;
510469
511470 oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
471
+ flashSelectionButton.setToolTipText("Show selection");
512472 flashSelectionButton.addActionListener(this);
473
+
474
+ oe.toolbarPanel.add(new cButton(" ", false));
475
+
513476 oe.aConstraints.gridx += 1;
514477 oe.aConstraints.weighty = 0;
515478 oe.aConstraints.gridwidth = 1;
516479
517480 //
518481 oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
482
+ twoButton.setToolTipText("Show center view only");
519483 twoButton.addActionListener(this);
520484 oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
521485 fourButton.addActionListener(this);
486
+ fourButton.setToolTipText("Show left panel only");
522487 oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
488
+ sixButton.setToolTipText("2-column layout left");
523489 sixButton.addActionListener(this);
524490 oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
491
+ threeButton.setToolTipText("2-column layout right");
525492 threeButton.addActionListener(this);
526493 oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
494
+ sevenButton.setToolTipText("3-column layout");
527495 sevenButton.addActionListener(this);
528496 //
529497
530
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
498
+ oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints);
499
+ rootButton.setToolTipText("Edit object in new tab");
531500 rootButton.addActionListener(this);
532501 oe.aConstraints.gridx += 1;
533502 oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
503
+ closeButton.setToolTipText("Close tab");
534504 closeButton.addActionListener(this);
535505 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
536506 //clearButton.addActionListener(this);
....@@ -633,17 +603,91 @@
633603 radio.layout = sevenButton;
634604 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
635605 }
606
+
607
+ void AddOptions(JPanel panel, GridBagConstraints constraints)
608
+ {
609
+ constraints.gridx = 0;
610
+ constraints.gridy = 0;
611
+ panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints);
612
+ fastCB.setToolTipText("Fast mode");
613
+ fastCB.addItemListener(this);
614
+ constraints.gridy += 1;
615
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints);
616
+ supportCB.setToolTipText("Enabled rigging");
617
+ supportCB.addItemListener(this);
618
+
619
+ // constraints.gridy += 1;
620
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
621
+ // localCB.addItemListener(this);
622
+
623
+ constraints.gridy += 1;
624
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints);
625
+ crowdCB.setToolTipText("Used for crowds");
626
+ crowdCB.addItemListener(this);
627
+
628
+ constraints.gridy += 1;
629
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints);
630
+ smoothCB.setToolTipText("Snapping delay");
631
+ smoothCB.addItemListener(this);
632
+
633
+ constraints.gridy += 1;
634
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints);
635
+ slowCB.setToolTipText("Smooth interpolation");
636
+ slowCB.addItemListener(this);
637
+ constraints.gridy += 1;
638
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints);
639
+ boxCB.setToolTipText("Display bounding boxes");
640
+ boxCB.addItemListener(this);
641
+ constraints.gridy += 1;
642
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints);
643
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
644
+ zoomBoxCB.addItemListener(this);
645
+
646
+// constraints.gridy += 1;
647
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
648
+// speakerMocapCB.addItemListener(this);
649
+
650
+ if (false)
651
+ {
652
+ // handled in scripts
653
+ constraints.gridy += 1;
654
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints);
655
+ speakerCameraCB.addItemListener(this);
656
+
657
+ constraints.gridy += 1;
658
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints);
659
+ speakerFocusCB.addItemListener(this);
660
+
661
+ constraints.gridy += 1;
662
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints);
663
+ smoothfocusCB.addItemListener(this);
664
+ }
665
+
666
+//constraints.gridx += 1;
667
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
668
+// debugCB.addItemListener(this);
669
+
670
+ constraints.gridy += 1;
671
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints);
672
+ oeilCB.addItemListener(this);
673
+
674
+ constraints.gridy += 1;
675
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints);
676
+ lookAtCB.setToolTipText("Look-at target");
677
+ lookAtCB.addItemListener(this);
678
+
679
+ }
636680
637681 void EditObject(Object3D obj)
638682 {
639
- cRadio dummyButton = new cRadio(obj.name);
640
- dummyButton.SetObject(obj);
641
- dummyButton.layout = sevenButton;
642
- dummyButton.SetCamera(cameraView.renderCamera, false);
643
- dummyButton.addActionListener(this);
644
- radioPanel.add(dummyButton);
645
- buttonGroup.add(dummyButton);
646
- dummyButton.doClick();
683
+ cRadio radioButton = new cRadio(obj.name);
684
+ radioButton.SetObject(obj);
685
+ radioButton.layout = sevenButton;
686
+ radioButton.SetCamera(cameraView.renderCamera, false);
687
+ radioButton.addActionListener(this);
688
+ radioPanel.add(radioButton);
689
+ buttonGroup.add(radioButton);
690
+ radioButton.doClick();
647691 }
648692 void SetupViews(ObjEditor oe)
649693 {
....@@ -663,6 +707,7 @@
663707 JCheckBox fastCB;
664708 JCheckBox slowCB;
665709 JCheckBox boxCB;
710
+ JCheckBox zoomBoxCB;
666711 JCheckBox trackCB;
667712 JCheckBox smoothfocusCB;
668713 // JCheckBox speakerMocapCB;
....@@ -705,8 +750,7 @@
705750 dropAttributes |= Object3D.TEXTURE;
706751 else
707752 dropAttributes &= ~Object3D.TEXTURE;
708
- }
709
- else if(e.getSource() == liveCB)
753
+ } else if(e.getSource() == liveCB)
710754 {
711755 cameraView.ToggleLive();
712756 }
....@@ -743,6 +787,10 @@
743787 Recompile();
744788 cameraView.repaint();
745789 // refreshContents();
790
+ }
791
+ else if(e.getSource() == zoomBoxCB)
792
+ {
793
+ cameraView.ToggleZoomBoxMode();
746794 }
747795 else if(e.getSource() == smoothfocusCB)
748796 {
....@@ -1033,6 +1081,8 @@
10331081 torusItem.addActionListener(this);
10341082 superItem = menu.add(new MenuItem("Superellipsoid"));
10351083 superItem.addActionListener(this);
1084
+ kleinItem = menu.add(new MenuItem("Klein Bottle"));
1085
+ kleinItem.addActionListener(this);
10361086 particleItem = menu.add(new MenuItem("Particle system"));
10371087 particleItem.addActionListener(this);
10381088 ragdollItem = menu.add(new MenuItem("Rag Walk"));
....@@ -1106,6 +1156,8 @@
11061156 resetParentItem.addActionListener(this);
11071157 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11081158 repairParentItem.addActionListener(this);
1159
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1160
+ repairShadowItem.addActionListener(this);
11091161 menu.add(invariantsItem = new MenuItem("Invariants"));
11101162 invariantsItem.addActionListener(this);
11111163 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1441,9 +1493,9 @@
14411493
14421494 void Overwrite(int mask)
14431495 {
1444
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1496
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
14451497 {
1446
- Object3D content = GraphreeD.clipboard.get(0);
1498
+ Object3D content = GrafreeD.clipboard.get(0);
14471499
14481500 if (content instanceof cGroup && ((cGroup)content).transientlink )
14491501 content = ((cGroup)content).get(0);
....@@ -1466,6 +1518,7 @@
14661518 //
14671519 public void actionPerformed(ActionEvent event) // , Object arg)
14681520 {
1521
+ Object source = event.getSource();
14691522 /*
14701523 if (event.getSource() == nameField)
14711524 {
....@@ -1477,11 +1530,11 @@
14771530 }
14781531 else
14791532 */
1480
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1533
+ if (source == lookAtItem || source == lookFromItem)
14811534 {
14821535 ScreenFit();
14831536 } else
1484
- if (event.getSource() == switchItem)
1537
+ if (source == switchItem)
14851538 {
14861539 cVector v1 = new cVector();
14871540 cVector v2 = new cVector();
....@@ -1490,11 +1543,11 @@
14901543 objEditor.cameraView.renderCamera.setAim(v2, v1);
14911544 objEditor.cameraView.repaint();
14921545 } else
1493
- if (event.getSource() == rectoidItem)
1546
+ if (source == rectoidItem)
14941547 {
14951548 makeSomething(new Box());
14961549 } else
1497
- if (event.getSource() == particleItem)
1550
+ if (source == particleItem)
14981551 {
14991552 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15001553 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1515,9 +1568,9 @@
15151568 applyExample(particleGeom, "SMOKE");
15161569 makeSomething(particleGeom);
15171570 } else
1518
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1571
+ if (source == ragdollItem || source == ragdoll2Item)
15191572 {
1520
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1573
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15211574
15221575 ragdoll.toParent = LA.newMatrix();
15231576 ragdoll.fromParent = LA.newMatrix();
....@@ -1535,7 +1588,7 @@
15351588 } else
15361589 /*
15371590 */
1538
- if (event.getSource() == heightFieldItem)
1591
+ if (source == heightFieldItem)
15391592 {
15401593 Object3D obj = new Object3D();
15411594
....@@ -1573,27 +1626,31 @@
15731626
15741627 makeSomething(obj);
15751628 } else
1576
- if (event.getSource() == gridItem)
1629
+ if (source == gridItem)
15771630 {
15781631 makeSomething(new Grid());
15791632 } else
1580
- if (event.getSource() == ellipsoidItem)
1633
+ if (source == ellipsoidItem)
15811634 {
15821635 makeSomething(new Sphere());
15831636 } else
1584
- if (event.getSource() == coneItem)
1637
+ if (source == coneItem)
15851638 {
15861639 makeSomething(new Cone());
15871640 } else
1588
- if (event.getSource() == torusItem)
1641
+ if (source == torusItem)
15891642 {
15901643 makeSomething(new Torus());
15911644 } else
1592
- if (event.getSource() == superItem)
1645
+ if (source == superItem)
15931646 {
15941647 makeSomething(new Superellipsoid());
15951648 } else
1596
- if (event.getSource() == blobItem)
1649
+ if (source == kleinItem)
1650
+ {
1651
+ makeSomething(new Klein());
1652
+ } else
1653
+ if (source == blobItem)
15971654 {
15981655 Blob blob = new Blob();
15991656 BlobComponent comp = new BlobComponent();
....@@ -1601,15 +1658,15 @@
16011658 //blob.retile();
16021659 makeSomething(blob);
16031660 } else
1604
- if (event.getSource() == latheItem)
1661
+ if (source == latheItem)
16051662 {
16061663 makeSomething(new Lathe());
16071664 } else
1608
- if (event.getSource() == bezierItem)
1665
+ if (source == bezierItem)
16091666 {
16101667 makeSomething(new BezierSurface());
16111668 } else
1612
- if (event.getSource() == checkerItem)
1669
+ if (source == checkerItem)
16131670 {
16141671 /*
16151672 Object3D obj = new BezierSurface(5,8);
....@@ -1624,7 +1681,7 @@
16241681 */
16251682 makeSomething(new Checker());
16261683 } else
1627
- if (event.getSource() == meshItem)
1684
+ if (source == meshItem)
16281685 {
16291686 Object3D itemtomake = new Object3D();
16301687 Object3D child;
....@@ -1645,35 +1702,35 @@
16451702 makeSomething(child);
16461703 }
16471704 } else
1648
- if (event.getSource() == springItem)
1705
+ if (source == springItem)
16491706 {
16501707 cSpring s = new cSpring();
16511708 s.setup();
16521709 makeSomething(s);
16531710 } else
1654
- if (event.getSource() == flagItem)
1711
+ if (source == flagItem)
16551712 {
16561713 cSpring s = new cFlag();
16571714 s.setup();
16581715 makeSomething(s);
16591716 } else
1660
- if (event.getSource() == lightItem)
1717
+ if (source == lightItem)
16611718 {
16621719 makeSomething(new Light());
16631720 } else
1664
- if (event.getSource() == csgItem)
1721
+ if (source == csgItem)
16651722 {
16661723 group(new CSG());
16671724 } else
1668
- if (event.getSource() == templateItem)
1725
+ if (source == templateItem)
16691726 {
16701727 group(new cTemplate());
16711728 } else
1672
- if (event.getSource() == attributeItem)
1729
+ if (source == attributeItem)
16731730 {
16741731 makeSomething(new Attribute());
16751732 } else
1676
- if (event.getSource() == pointflowItem)
1733
+ if (source == pointflowItem)
16771734 {
16781735 makeSomething(new PointFlow());
16791736 } else
....@@ -1685,7 +1742,7 @@
16851742 } else
16861743 */
16871744
1688
- if (event.getSource() == superLoopItem)
1745
+ if (source == superLoopItem)
16891746 {
16901747 Composite g = new cGroup();
16911748 for (int i=0; i<15; i++)
....@@ -1707,7 +1764,7 @@
17071764
17081765 group(g);
17091766 } else
1710
- if (event.getSource() == loopItem)
1767
+ if (source == loopItem)
17111768 {
17121769 Composite csg = new GroupLeaf();
17131770 csg.count = 5;
....@@ -1716,7 +1773,7 @@
17161773 csg.addChild(child);
17171774 child.addChild(csg);
17181775 } else
1719
- if (event.getSource() == doubleItem)
1776
+ if (source == doubleItem)
17201777 {
17211778 Composite csg = new GroupLeaf();
17221779 csg.count = 5;
....@@ -1728,7 +1785,7 @@
17281785 csg.addChild(child);
17291786 child.addChild(csg);
17301787 } else
1731
- if (event.getSource() == tripleItem)
1788
+ if (source == tripleItem)
17321789 {
17331790 Composite csg = new GroupLeaf();
17341791 csg.count = 4;
....@@ -1744,70 +1801,70 @@
17441801 child.addChild(csg);
17451802 } else
17461803
1747
- if (event.getSource() == importGFDItem)
1804
+ if (source == importGFDItem)
17481805 {
17491806 ImportGFD();
17501807 } else
1751
- if (event.getSource() == importVRMLX3DItem)
1808
+ if (source == importVRMLX3DItem)
17521809 {
17531810 ImportVRMLX3D();
17541811 } else
1755
- if (event.getSource() == import3DSItem)
1812
+ if (source == import3DSItem)
17561813 {
17571814 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17581815 } else
1759
- if (event.getSource() == importOBJItem)
1816
+ if (source == importOBJItem)
17601817 {
17611818 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17621819 } else
1763
- if (event.getSource() == computeAOItem)
1820
+ if (source == computeAOItem)
17641821 {
1765
- CameraPane.drawMode = CameraPane.OCCLUSION;
1766
- CameraPane.theRenderer.repaint();
1822
+ Globals.drawMode = CameraPane.OCCLUSION;
1823
+ Globals.theRenderer.repaint();
17671824 } else
1768
- if (event.getSource() == recompileItem)
1825
+ if (source == recompileItem)
17691826 {
17701827 Recompile();
17711828 refreshContents();
17721829 } else
1773
- if (event.getSource() == editScriptItem)
1830
+ if (source == editScriptItem)
17741831 {
17751832 OpenDialog();
17761833 refreshContents();
17771834 } else
1778
- if (event.getSource() == invariantsItem)
1835
+ if (source == invariantsItem)
17791836 {
17801837 System.out.println("Invariants:");
1781
- GraphreeD.theApplet3D.universe.invariants();
1838
+ GrafreeD.grafreeD.universe.invariants();
17821839 } else
1783
- if (event.getSource() == memoryItem)
1840
+ if (source == memoryItem)
17841841 {
17851842 //System.out.println("Invariants:");
17861843 PrintMemory();
17871844 } else
1788
- if (event.getSource() == pathItem)
1845
+ if (source == pathItem)
17891846 {
17901847 PrintPath();
17911848 } else
1792
- if (event.getSource() == analyzeItem)
1849
+ if (source == analyzeItem)
17931850 {
17941851 AnalyzeObject();
17951852 } else
1796
- if (event.getSource() == dumpItem)
1853
+ if (source == dumpItem)
17971854 {
17981855 DumpObject();
17991856 } else
1800
- if (event.getSource() == screenfitButton)
1857
+ if (source == screenfitButton)
18011858 {
18021859 //Reload(lastConverter, lastFilename, true);
18031860 ScreenFit();
18041861 } else
1805
- if (event.getSource() == screenfitpointButton)
1862
+ if (source == screenfitpointButton)
18061863 {
18071864 //Reload(lastConverter, lastFilename, true);
18081865 ScreenFitPoint();
18091866 } else
1810
- if (event.getSource() == snapobjectButton)
1867
+ if (source == snapobjectButton)
18111868 {
18121869 //Reload(lastConverter, lastFilename, true);
18131870 SnapObject();
....@@ -1818,13 +1875,13 @@
18181875 // Recompile();
18191876 // refreshContents();
18201877 // } else
1821
- if (event.getSource() == gcButton)
1878
+ if (source == gcButton)
18221879 {
18231880 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18241881 System.gc();
18251882 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18261883 } else
1827
- if (event.getSource() == editLeafItem)
1884
+ if (source == editLeafItem)
18281885 {
18291886 Object3D obj;
18301887 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1838,65 +1895,66 @@
18381895 }
18391896 refreshContents(true);
18401897 } else
1841
- if (event.getSource() == openWindowItem)
1898
+ if (source == openWindowItem)
18421899 {
18431900 EditSelection(true);
18441901 } else
1845
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1902
+ if (source == cutItem || source == clearButton)
18461903 {
18471904 loadClipboard(true);
18481905 } else
1849
- if (event.getSource() == duplicateItem)
1906
+ if (source == duplicateItem)
18501907 {
1851
- Object3D keep = GraphreeD.clipboard;
1908
+ Object3D keep = GrafreeD.clipboard;
18521909 loadClipboard(false);
18531910 paste(false);
1854
- GraphreeD.clipboard = keep;
1911
+ GrafreeD.clipboard = keep;
18551912 } else
1856
- if (event.getSource() == cloneItem)
1913
+ if (source == cloneItem)
18571914 {
18581915 CloneSelection(false);
18591916 } else
1860
- if (event.getSource() == cloneSupportItem)
1917
+ if (source == cloneSupportItem)
18611918 {
18621919 CloneSelection(true);
18631920 } else
1864
- if (event.getSource() == copyItem)
1921
+ if (source == copyItem)
18651922 {
18661923 loadClipboard(false);
18671924 } else
1868
- if (event.getSource() == pasteItem)
1925
+ if (source == pasteItem)
18691926 {
18701927 paste(false);
18711928 } else
1872
- if (event.getSource() == pasteLinkItem)
1929
+ if (source == pasteLinkItem)
18731930 {
18741931 pasteInto(false);
18751932 } else
1876
- if (event.getSource() == pasteCloneItem)
1933
+ if (source == pasteCloneItem)
18771934 {
18781935 pasteInto(true);
18791936 } else
1880
- if (event.getSource() == pasteExpandItem)
1937
+ if (source == pasteExpandItem)
18811938 {
18821939 paste(true);
18831940 } else
1884
- if (event.getSource() == synchronizeItem)
1941
+ if (source == synchronizeItem)
18851942 {
18861943 Overwrite(Object3D.TRANSFORM);
18871944 } else
1888
- if (event.getSource() == overwriteNameItem)
1945
+ if (source == overwriteNameItem)
18891946 {
18901947 Overwrite(Object3D.NAME);
18911948 } else
1892
- if (event.getSource() == overwriteUVItem)
1949
+ if (source == overwriteUVItem)
18931950 {
18941951 Overwrite(Object3D.UV);
18951952 } else
1896
- if (event.getSource() == overwriteMatItem)
1953
+ if (source == overwriteMatItem)
18971954 {
1955
+ /* july 2015
18981956 if ((dropAttributes & Object3D.TEXTURE) == 0)
1899
- Overwrite(Object3D.MATERIAL);
1957
+ Overwrite(Object3D.MATERIAL | Object3D.COLOR);
19001958 else
19011959 {
19021960 if ((dropAttributes & Object3D.COLOR) == 0 && (dropAttributes & Object3D.MATERIAL) == 0)
....@@ -1908,13 +1966,16 @@
19081966 Overwrite(Object3D.MATERIAL | Object3D.TEXTURE);
19091967 }
19101968 }
1969
+ */
1970
+
1971
+ Overwrite(dropAttributes);
19111972 }
1912
- if (event.getSource() == overwriteGeoItem)
1973
+ if (source == overwriteGeoItem)
19131974 {
19141975 Overwrite(Object3D.GEOMETRY);
1915
-// if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
1976
+// if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
19161977 // {
1917
-// Object3D content = GraphreeD.clipboard.get(0);
1978
+// Object3D content = GrafreeD.clipboard.get(0);
19181979 //
19191980 // if (content instanceof cGroup && ((cGroup)content).transientlink )
19201981 // content = ((cGroup)content).get(0);
....@@ -1926,7 +1987,7 @@
19261987 // refreshContents();
19271988 // }
19281989 } else
1929
- if (event.getSource() == generateMeshItem)
1990
+ if (source == generateMeshItem)
19301991 {
19311992 //if (group.selection.size() == 1)
19321993 // for (int i=0; i<group.selection.size(); i++)
....@@ -1937,7 +1998,7 @@
19371998 ResetModel();
19381999 refreshContents();
19392000 } else
1940
- if (event.getSource() == extractGeometriesItem)
2001
+ if (source == extractGeometriesItem)
19412002 {
19422003 boolean one = false;
19432004
....@@ -1964,7 +2025,7 @@
19642025 ResetModel();
19652026 refreshContents();
19662027 } else
1967
- if (event.getSource() == cloneGeometriesItem)
2028
+ if (source == cloneGeometriesItem)
19682029 {
19692030 boolean one = false;
19702031
....@@ -1990,32 +2051,37 @@
19902051 ResetModel();
19912052 refreshContents();
19922053 } else
1993
- if (event.getSource() == shareGeometriesItem)
2054
+ if (source == shareGeometriesItem)
19942055 {
19952056 boolean one = false;
19962057
19972058 if (group.selection.size() == 1)
19982059 one = true;
19992060
2061
+ Object3D merge = null;
2062
+
20002063 Object3D content = new cGroup();
20012064
20022065 for (int i=0; i<group.selection.size(); i++)
20032066 {
2004
- Object3D sel = new Merge(group.selection.get(i));
2067
+ merge = new Merge(group.selection.get(i));
20052068
20062069 if (one)
2007
- makeSomething(sel, false);
2070
+ makeSomething(merge, false);
20082071 else
2009
- content.addChild(sel);
2072
+ content.addChild(merge);
20102073 }
20112074
20122075 if (!one)
2013
- makeSomething(content, false);
2014
-
2015
- ResetModel();
2016
- refreshContents();
2076
+ makeSomething(content, true);
2077
+ else
2078
+ {
2079
+ ResetModel();
2080
+ Select(merge.GetTreePath(), true, false); // unselect... false);
2081
+ refreshContents();
2082
+ }
20172083 } else
2018
- if (event.getSource() == mergeGeometriesItem)
2084
+ if (source == mergeGeometriesItem)
20192085 {
20202086 boolean one = false;
20212087
....@@ -2045,11 +2111,11 @@
20452111 ResetModel();
20462112 refreshContents();
20472113 } else
2048
- if (event.getSource() == linkverticesItem)
2114
+ if (source == linkverticesItem)
20492115 {
2050
-// if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2116
+// if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20512117 // {
2052
-// Object3D content = GraphreeD.clipboard.get(0);
2118
+// Object3D content = GrafreeD.clipboard.get(0);
20532119 //
20542120 // if (content instanceof cGroup && ((cGroup)content).transientlink )
20552121 // content = ((cGroup)content).get(0);
....@@ -2058,14 +2124,14 @@
20582124 // group.selection.get(0).setMasterThis(content); // should be identity
20592125 // refreshContents();
20602126 // }
2061
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
2127
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
20622128 {
2063
- Object3D content = GraphreeD.clipboard.get(0);
2129
+ Object3D content = GrafreeD.clipboard.get(0);
20642130
20652131 if (content instanceof cGroup && ((cGroup)content).transientlink )
20662132 content = ((cGroup)content).get(0);
20672133
2068
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2134
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20692135 for (int i=0; i<group.selection.size(); i++)
20702136 {
20712137 boolean random = CameraPane.RANDOM;
....@@ -2074,11 +2140,11 @@
20742140 // group.selection.get(i).setMasterThis(content); // should be identity
20752141 CameraPane.RANDOM = random;
20762142 }
2077
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2143
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
20782144 refreshContents();
20792145 }
20802146 } else
2081
- if (event.getSource() == resetsupportItem)
2147
+ if (source == resetsupportItem)
20822148 {
20832149 for (int i=0; i<group.selection.size(); i++)
20842150 {
....@@ -2090,7 +2156,16 @@
20902156
20912157 refreshContents();
20922158 } else
2093
- if (event.getSource() == resetreferencesItem)
2159
+ if (source == relinkverticesItem)
2160
+ {
2161
+ boolean random = CameraPane.RANDOM;
2162
+ CameraPane.RANDOM = false; // parse all random nodes
2163
+ group.selection.RelinkToSupport();
2164
+ CameraPane.RANDOM = random;
2165
+
2166
+ refreshContents();
2167
+ } else
2168
+ if (source == resetreferencesItem)
20942169 {
20952170 for (int i=0; i<group.selection.size(); i++)
20962171 {
....@@ -2099,11 +2174,11 @@
20992174
21002175 refreshContents();
21012176 } else
2102
- if (event.getSource() == setMasterItem)
2177
+ if (source == setMasterItem)
21032178 {
2104
- if (group.selection.size() == 1 && GraphreeD.clipboard.size() == 1)
2179
+ if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21052180 {
2106
- Object3D content = GraphreeD.clipboard.get(0);
2181
+ Object3D content = GrafreeD.clipboard.get(0);
21072182
21082183 if (content instanceof cGroup && ((cGroup)content).transientlink )
21092184 content = ((cGroup)content).get(0);
....@@ -2112,13 +2187,13 @@
21122187 refreshContents();
21132188 }
21142189 } else
2115
- if (event.getSource() == poseMeshItem)
2190
+ if (source == poseMeshItem)
21162191 {
21172192 if (group.selection.size() == 1)
21182193 {
2119
- if (GraphreeD.clipboard.size() == 1)
2194
+ if (GrafreeD.clipboard.size() == 1)
21202195 {
2121
- Object3D content = GraphreeD.clipboard.get(0);
2196
+ Object3D content = GrafreeD.clipboard.get(0);
21222197
21232198 if (content instanceof cGroup && ((cGroup)content).transientlink )
21242199 content = ((cGroup)content).get(0);
....@@ -2131,19 +2206,19 @@
21312206 }
21322207
21332208 } else
2134
- if (event.getSource() == revertMeshItem)
2209
+ if (source == revertMeshItem)
21352210 {
21362211 RevertMeshes();
21372212 } else
2138
- if (event.getSource() == resetMeshItem)
2213
+ if (source == resetMeshItem)
21392214 {
21402215 ResetAll();
21412216 } else
2142
- if (event.getSource() == stepAllItem)
2217
+ if (source == stepAllItem)
21432218 {
21442219 StepAll();
21452220 } else
2146
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2221
+ if (source == clearItem) // || event.getSource() == clearButton)
21472222 {
21482223 //int indices[] = jList.getSelectedIndices();
21492224 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2151,42 +2226,46 @@
21512226
21522227 ClearSelection(false);
21532228 } else
2154
- if (event.getSource() == clearAllItem)
2229
+ if (source == clearAllItem)
21552230 {
21562231 ClearSelection(true);
21572232 } else
2158
- if (event.getSource() == grabItem)
2233
+ if (source == grabItem)
21592234 {
21602235 group(new cGroup(), true);
21612236 } else
2162
- if (event.getSource() == frontItem)
2237
+ if (source == hideItem)
2238
+ {
2239
+ group(new HiddenObject());
2240
+ } else
2241
+ if (source == frontItem)
21632242 {
21642243 front();
21652244 } else
2166
- if (event.getSource() == backItem)
2245
+ if (source == backItem)
21672246 {
21682247 back();
21692248 } else
2170
- if (event.getSource() == cameraItem)
2249
+ if (source == cameraItem)
21712250 {
21722251 makeSomething(new Camera());
21732252 } else
2174
- if (event.getSource() == compositeItem)
2253
+ if (source == compositeItem)
21752254 {
21762255 group(new Composite());
21772256 } else
2178
- if (event.getSource() == randomItem)
2257
+ if (source == randomItem)
21792258 {
21802259 RandomNode random = new RandomNode();
21812260 group(random);
21822261 if (random.size() > 0)
21832262 random.name = random.get(0).name + "Rnd";
21842263 } else
2185
- if (event.getSource() == physicsItem)
2264
+ if (source == physicsItem)
21862265 {
21872266 group(new PhysicsNode());
21882267 } else
2189
- if (event.getSource() == frameselectorItem)
2268
+ if (source == frameselectorItem)
21902269 {
21912270 for (int i=0; i<group.selection.size(); i++)
21922271 {
....@@ -2198,7 +2277,7 @@
21982277 ResetModel();
21992278 refreshContents();
22002279 } else
2201
- if (event.getSource() == switchGeoItem)
2280
+ if (source == switchGeoItem)
22022281 {
22032282 for (int i=0; i<group.selection.size(); i++)
22042283 {
....@@ -2210,7 +2289,7 @@
22102289 ResetModel();
22112290 refreshContents();
22122291 } else
2213
- if (event.getSource() == switchTransfoItem)
2292
+ if (source == switchTransfoItem)
22142293 {
22152294 for (int i=0; i<group.selection.size(); i++)
22162295 {
....@@ -2222,7 +2301,7 @@
22222301 ResetModel();
22232302 refreshContents();
22242303 } else
2225
- if (event.getSource() == morphItem)
2304
+ if (source == morphItem)
22262305 {
22272306 for (int i=0; i<group.selection.size(); i++)
22282307 {
....@@ -2234,7 +2313,7 @@
22342313 ResetModel();
22352314 refreshContents();
22362315 } else
2237
- if (event.getSource() == scriptNodeItem)
2316
+ if (source == scriptNodeItem)
22382317 {
22392318 boolean atleastone = false;
22402319
....@@ -2273,195 +2352,215 @@
22732352 }
22742353 }
22752354 } else
2276
- if (event.getSource() == linkerItem)
2355
+ if (source == linkerItem)
22772356 {
22782357 group(new cLinker());
22792358 } else
2280
- if (event.getSource() == textureItem)
2359
+ if (source == textureItem)
22812360 {
22822361 group(new TextureNode());
22832362 } else
2284
- if (event.getSource() == shadowXItem)
2363
+ if (source == billboardItem)
2364
+ {
2365
+ group(new BillboardNode());
2366
+ } else
2367
+ if (source == shadowXItem)
22852368 {
22862369 CastShadow(0);
22872370 } else
2288
- if (event.getSource() == shadowYItem)
2371
+ if (source == shadowYItem)
22892372 {
22902373 CastShadow(1);
22912374 } else
2292
- if (event.getSource() == shadowZItem)
2375
+ if (source == shadowZItem)
22932376 {
22942377 CastShadow(2);
22952378 } else
2296
- if (event.getSource() == ungroupItem)
2379
+ if (source == ungroupItem)
22972380 {
2298
- ungroup();
2381
+ //ungroup();
2382
+ for (int i=0; i<group.selection.size(); i++)
2383
+ {
2384
+ Ungroup(group.selection.get(i));
2385
+ }
2386
+
2387
+ ClearSelection(false);
2388
+
2389
+ refreshContents();
22992390 } else
2300
- if (event.getSource() == genUVItem)
2391
+ if (source == genUVItem)
23012392 {
23022393 GenUV();
23032394 } else
2304
- if (event.getSource() == genNormalsCADItem)
2395
+ if (source == genNormalsCADItem)
23052396 {
23062397 GenNormals(true);
23072398 } else
2308
- if (event.getSource() == genNormalsORGANItem)
2399
+ if (source == genNormalsMESHItem)
2400
+ {
2401
+ GenNormals(true); // TODO
2402
+ } else
2403
+ if (source == genNormalsORGANItem)
23092404 {
23102405 GenNormals(false);
23112406 } else
2312
- if (event.getSource() == stripifyItem)
2407
+ if (source == genNormalsMINEItem)
2408
+ {
2409
+ GenNormalsMINE();
2410
+ } else
2411
+ if (source == stripifyItem)
23132412 {
23142413 Stripify();
23152414 } else
2316
- if (event.getSource() == unstripifyItem)
2415
+ if (source == unstripifyItem)
23172416 {
23182417 Unstripify();
23192418 } else
2320
- if (event.getSource() == trimItem)
2419
+ if (source == trimItem)
23212420 {
23222421 Trim();
23232422 } else
2324
- if (event.getSource() == untrimItem)
2423
+ if (source == untrimItem)
23252424 {
23262425 Untrim();
23272426 } else
2328
- if (event.getSource() == clearColorsItem)
2427
+ if (source == clearColorsItem)
23292428 {
23302429 ClearColors();
23312430 } else
2332
- if (event.getSource() == clearMaterialsItem)
2431
+ if (source == clearMaterialsItem)
23332432 {
23342433 ClearMaterials();
23352434 } else
2336
- if (event.getSource() == liveleavesItem)
2435
+ if (source == liveleavesItem)
23372436 {
23382437 LiveLeaves(true);
23392438 } else
2340
- if (event.getSource() == unliveleavesItem)
2439
+ if (source == unliveleavesItem)
23412440 {
23422441 LiveLeaves(false);
23432442 } else
2344
- if (event.getSource() == supportleavesItem)
2443
+ if (source == supportleavesItem)
23452444 {
23462445 SupportLeaves(true);
23472446 } else
2348
- if (event.getSource() == unsupportleavesItem)
2447
+ if (source == unsupportleavesItem)
23492448 {
23502449 SupportLeaves(false);
23512450 } else
2352
- if (event.getSource() == hideleavesItem)
2451
+ if (source == hideleavesItem)
23532452 {
23542453 HideLeaves(true);
23552454 } else
2356
- if (event.getSource() == showleavesItem)
2455
+ if (source == showleavesItem)
23572456 {
23582457 HideLeaves(false);
23592458 } else
2360
- if (event.getSource() == markleavesItem)
2459
+ if (source == markleavesItem)
23612460 {
23622461 MarkLeaves(true);
23632462 } else
2364
- if (event.getSource() == unmarkleavesItem)
2463
+ if (source == unmarkleavesItem)
23652464 {
23662465 MarkLeaves(false);
23672466 } else
2368
- if (event.getSource() == flipVItem)
2467
+ if (source == flipVItem)
23692468 {
23702469 FlipV(true);
23712470 } else
2372
- if (event.getSource() == unflipVItem)
2471
+ if (source == unflipVItem)
23732472 {
23742473 FlipV(false);
23752474 } else
2376
- if (event.getSource() == lowTexturesItem)
2475
+ if (source == lowTexturesItem)
23772476 {
23782477 SetTexRes(0);
23792478 } else
2380
- if (event.getSource() == normalTexturesItem)
2479
+ if (source == normalTexturesItem)
23812480 {
23822481 SetTexRes(1);
23832482 } else
2384
- if (event.getSource() == highTexturesItem)
2483
+ if (source == highTexturesItem)
23852484 {
23862485 SetTexRes(2);
23872486 } else
2388
- if (event.getSource() == veryhighTexturesItem)
2487
+ if (source == veryhighTexturesItem)
23892488 {
23902489 SetTexRes(3);
23912490 } else
2392
- if (event.getSource() == maxTexturesItem)
2491
+ if (source == maxTexturesItem)
23932492 {
23942493 SetTexRes(4);
23952494 } else
2396
- if (event.getSource() == panoTexturesItem)
2495
+ if (source == panoTexturesItem)
23972496 {
23982497 SetTexRes(5);
23992498 } else
2400
- if (event.getSource() == reverseNormalsItem)
2499
+ if (source == reverseNormalsItem)
24012500 {
24022501 ReverseNormals();
24032502 } else
2404
- if (event.getSource() == parseverticesItem)
2503
+ if (source == parseverticesItem)
24052504 {
24062505 ParseVertices();
24072506 } else
2408
- if (event.getSource() == textureFieldItem)
2507
+ if (source == textureFieldItem)
24092508 {
24102509 TextureVertices();
24112510 } else
2412
- if (event.getSource() == alignItem)
2511
+ if (source == alignItem)
24132512 {
24142513 Align();
24152514 } else
2416
- if (event.getSource() == mirrorItem)
2515
+ if (source == mirrorItem)
24172516 {
24182517 MirrorPoses();
24192518 } else
2420
- if (event.getSource() == reduceMorphItem)
2519
+ if (source == reduceMorphItem)
24212520 {
24222521 MeshReduction(false);
24232522 } else
2424
- if (event.getSource() == reduce34MorphItem)
2523
+ if (source == reduce34MorphItem)
24252524 {
24262525 MeshReduction(true);
24272526 } else
2428
- if (event.getSource() == reverseTrianglesItem)
2527
+ if (source == reverseTrianglesItem)
24292528 {
24302529 ReverseTriangles();
24312530 } else
2432
- if (event.getSource() == reduceMeshItem)
2531
+ if (source == reduceMeshItem)
24332532 {
24342533 ReduceMesh(false);
24352534 } else
2436
- if (event.getSource() == reduce34MeshItem)
2535
+ if (source == reduce34MeshItem)
24372536 {
24382537 ReduceMesh(true);
24392538 } else
2440
- if (event.getSource() == increaseMeshItem)
2539
+ if (source == increaseMeshItem)
24412540 {
24422541 IncreaseMesh();
24432542 } else
2444
- if (event.getSource() == clipMeshItem)
2543
+ if (source == clipMeshItem)
24452544 {
24462545 ClipMesh();
24472546 } else
2448
- if (event.getSource() == smoothMeshItem)
2547
+ if (source == smoothMeshItem)
24492548 {
24502549 SmoothMesh();
24512550 } else
2452
- if (event.getSource() == transformgeometryItem)
2551
+ if (source == transformgeometryItem)
24532552 {
24542553 TransformGeometry();
24552554 } else
2456
- if (event.getSource() == resetTransformItem)
2555
+ if (source == resetTransformItem)
24572556 {
24582557 ResetTransform();
24592558 } else
2460
- if (event.getSource() == resetCentroidItem)
2559
+ if (source == resetCentroidItem)
24612560 {
24622561 ResetCentroid();
24632562 } else
2464
- if (event.getSource() == resetParentItem)
2563
+ if (source == resetParentItem)
24652564 {
24662565 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24672566 {
....@@ -2471,7 +2570,7 @@
24712570
24722571 refreshContents();
24732572 } else
2474
- if (event.getSource() == repairParentItem)
2573
+ if (source == repairParentItem)
24752574 {
24762575 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24772576 {
....@@ -2485,7 +2584,21 @@
24852584
24862585 refreshContents();
24872586 } else
2488
- if (event.getSource() == sortbysizeItem)
2587
+ if (source == repairShadowItem)
2588
+ {
2589
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2590
+ {
2591
+ Object3D obj = (Object3D)e.nextElement();
2592
+ obj.RepairShadow();
2593
+// for (int i=0; i<obj.size(); i++)
2594
+// {
2595
+// obj.get(i).parent = obj;
2596
+// }
2597
+ }
2598
+
2599
+ refreshContents();
2600
+ } else
2601
+ if (source == sortbysizeItem)
24892602 {
24902603 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
24912604 {
....@@ -2497,7 +2610,7 @@
24972610 ResetModel();
24982611 refreshContents();
24992612 } else
2500
- if (event.getSource() == sortbynameItem)
2613
+ if (source == sortbynameItem)
25012614 {
25022615 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25032616 {
....@@ -2509,7 +2622,7 @@
25092622 ResetModel();
25102623 refreshContents();
25112624 } else
2512
- if (event.getSource() == attachPigmentItem)
2625
+ if (source == attachPigmentItem)
25132626 {
25142627 String texture = GetFile("Attach pigment");
25152628 Object3D obj;
....@@ -2521,7 +2634,7 @@
25212634
25222635 refreshContents();
25232636 } else
2524
- if (event.getSource() == detachPigmentItem)
2637
+ if (source == detachPigmentItem)
25252638 {
25262639 Object3D obj;
25272640 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2532,7 +2645,7 @@
25322645
25332646 refreshContents();
25342647 } else
2535
- if (event.getSource() == attachBumpItem)
2648
+ if (source == attachBumpItem)
25362649 {
25372650 String texture = GetFile("Attach bump");
25382651 Object3D obj;
....@@ -2544,7 +2657,7 @@
25442657
25452658 refreshContents();
25462659 } else
2547
- if (event.getSource() == detachBumpItem)
2660
+ if (source == detachBumpItem)
25482661 {
25492662 Object3D obj;
25502663 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2555,7 +2668,7 @@
25552668
25562669 refreshContents();
25572670 } else
2558
- if (event.getSource() == pigmentBumpItem)
2671
+ if (source == pigmentBumpItem)
25592672 {
25602673 Object3D obj;
25612674 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2566,158 +2679,195 @@
25662679
25672680 refreshContents();
25682681 } else
2569
- if (event.getSource() == flashSelectionButton)
2682
+ if (source == flashSelectionButton)
25702683 {
25712684 CameraPane.flash = true;
25722685 refreshContents();
25732686 } else
2574
- if (event.getSource() == oneButton)
2687
+ if (source == oneButton)
25752688 {
25762689 } else
2577
- if (event.getSource() == twoButton)
2690
+ if (source == twoButton)
25782691 {
25792692 radio.layout = twoButton;
25802693 // bug
25812694 //gridPanel.setDividerLocation(1.0);
25822695 //bigPanel.setDividerLocation(0.0);
2583
- bigThree.remove(jtp);
2584
- bigThree.remove(cameraPanel);
2585
- bigThree.remove(XYZPanel);
2586
- aWindowConstraints.gridx = 0;
2587
- aWindowConstraints.gridy = 0;
2588
- aWindowConstraints.gridwidth = 1;
2589
- // aConstraints.gridheight = 3;
2590
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2591
- aWindowConstraints.weightx = 0;
2592
- aWindowConstraints.weighty = 1;
2593
- //bigThree.add(jtp, aWindowConstraints);
2594
- aWindowConstraints.weightx = 1;
2595
- aWindowConstraints.gridwidth = 3;
2596
- // aConstraints.gridheight = 3;
2597
- aWindowConstraints.gridx = 1;
2598
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2599
- bigThree.add(cameraPanel, aWindowConstraints);
2600
- aWindowConstraints.weightx = 0;
2601
- aWindowConstraints.gridx = 4;
2602
- aWindowConstraints.gridwidth = 1;
2603
- // aConstraints.gridheight = 3;
2604
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2605
- //bigThree.add(XYZPanel, aWindowConstraints);
2606
- bigThree.revalidate();
2696
+// bigThree.remove(scenePanel);
2697
+// bigThree.remove(centralPanel);
2698
+// bigThree.remove(XYZPanel);
2699
+// aWindowConstraints.gridx = 0;
2700
+// aWindowConstraints.gridy = 0;
2701
+// aWindowConstraints.gridwidth = 1;
2702
+// // aConstraints.gridheight = 3;
2703
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2704
+// aWindowConstraints.weightx = 0;
2705
+// aWindowConstraints.weighty = 1;
2706
+// //bigThree.add(jtp, aWindowConstraints);
2707
+// aWindowConstraints.weightx = 1;
2708
+// aWindowConstraints.gridwidth = 3;
2709
+// // aConstraints.gridheight = 3;
2710
+// aWindowConstraints.gridx = 1;
2711
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2712
+// bigThree.add(centralPanel, aWindowConstraints);
2713
+// aWindowConstraints.weightx = 0;
2714
+// aWindowConstraints.gridx = 4;
2715
+// aWindowConstraints.gridwidth = 1;
2716
+// // aConstraints.gridheight = 3;
2717
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2718
+// //bigThree.add(XYZPanel, aWindowConstraints);
2719
+// scenePanel.setVisible(false);
2720
+// centralPanel.setVisible(true);
2721
+// XYZPanel.setVisible(false);
2722
+ bigThree.ClearUI();
2723
+ bigThree.add(centralPanel);
2724
+ bigThree.FlushUI();
26072725 } else
2608
- if (event.getSource() == threeButton)
2726
+ if (source == threeButton)
26092727 {
26102728 radio.layout = threeButton;
2611
- bigThree.remove(jtp);
2612
- bigThree.remove(cameraPanel);
2613
- bigThree.remove(XYZPanel);
2614
- aWindowConstraints.gridx = 0;
2615
- aWindowConstraints.gridy = 0;
2616
- aWindowConstraints.gridwidth = 1;
2617
- // aConstraints.gridheight = 3;
2618
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2619
- aWindowConstraints.weightx = 0;
2620
- aWindowConstraints.weighty = 1;
2621
- //bigThree.add(jtp, aWindowConstraints);
2622
- aWindowConstraints.weightx = 1;
2623
- aWindowConstraints.gridwidth = 3;
2624
- // aConstraints.gridheight = 3;
2625
- aWindowConstraints.gridx = 1;
2626
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2627
- bigThree.add(cameraPanel, aWindowConstraints);
2628
- aWindowConstraints.weightx = 0;
2629
- aWindowConstraints.gridx = 4;
2630
- aWindowConstraints.gridwidth = 1;
2631
- // aConstraints.gridheight = 3;
2632
- aConstraints.fill = GridBagConstraints.VERTICAL;
2633
- bigThree.add(XYZPanel, aWindowConstraints);
2634
- bigThree.revalidate();
2729
+
2730
+// bigThree.remove(scenePanel);
2731
+// bigThree.remove(centralPanel);
2732
+// bigThree.remove(XYZPanel);
2733
+// aWindowConstraints.gridx = 0;
2734
+// aWindowConstraints.gridy = 0;
2735
+// aWindowConstraints.gridwidth = 1;
2736
+// // aConstraints.gridheight = 3;
2737
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2738
+// aWindowConstraints.weightx = 0;
2739
+// aWindowConstraints.weighty = 1;
2740
+// //bigThree.add(jtp, aWindowConstraints);
2741
+// aWindowConstraints.weightx = 1;
2742
+// aWindowConstraints.gridwidth = 3;
2743
+// // aConstraints.gridheight = 3;
2744
+// aWindowConstraints.gridx = 1;
2745
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2746
+// bigThree.add(centralPanel, aWindowConstraints);
2747
+// aWindowConstraints.weightx = 0;
2748
+// aWindowConstraints.gridx = 4;
2749
+// aWindowConstraints.gridwidth = 1;
2750
+// // aConstraints.gridheight = 3;
2751
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2752
+// bigThree.add(XYZPanel, aWindowConstraints);
2753
+// bigThree.validate();
2754
+// scenePanel.setVisible(false);
2755
+// centralPanel.setVisible(true);
2756
+// XYZPanel.setVisible(true);
2757
+ bigThree.ClearUI();
2758
+ bigThree.add(centralPanel);
2759
+ bigThree.add(XYZPanel);
2760
+ bigThree.FlushUI();
26352761 } else
2636
- if (event.getSource() == fourButton)
2762
+ if (source == fourButton)
26372763 {
26382764 radio.layout = fourButton;
2639
- bigThree.remove(jtp);
2640
- bigThree.remove(cameraPanel);
2641
- bigThree.remove(XYZPanel);
2642
- aWindowConstraints.gridx = 0;
2643
- aWindowConstraints.gridy = 0;
2644
- aWindowConstraints.gridwidth = 1;
2645
- // aWindowConstraints.gridheight = 3;
2646
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2647
- aWindowConstraints.weightx = 1;
2648
- aWindowConstraints.weighty = 1;
2649
- bigThree.add(jtp, aWindowConstraints);
2650
- aWindowConstraints.weightx = 1;
2651
- aWindowConstraints.gridwidth = 3;
2652
- // aConstraints.gridheight = 3;
2653
- aWindowConstraints.gridx = 1;
2654
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2655
- //bigThree.add(cameraPanel, aWindowConstraints);
2656
- aWindowConstraints.weightx = 0;
2657
- aWindowConstraints.gridx = 4;
2658
- aWindowConstraints.gridwidth = 1;
2659
- // aWindowConstraints.gridheight = 3;
2660
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2661
- //bigThree.add(XYZPanel, aWindowConstraints);
2662
- bigThree.revalidate();
2765
+
2766
+// bigThree.remove(scenePanel);
2767
+// bigThree.remove(centralPanel);
2768
+// bigThree.remove(XYZPanel);
2769
+// aWindowConstraints.gridx = 0;
2770
+// aWindowConstraints.gridy = 0;
2771
+// aWindowConstraints.gridwidth = 1;
2772
+// // aWindowConstraints.gridheight = 3;
2773
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2774
+// aWindowConstraints.weightx = 1;
2775
+// aWindowConstraints.weighty = 1;
2776
+// bigThree.add(scenePanel, aWindowConstraints);
2777
+// aWindowConstraints.weightx = 1;
2778
+// aWindowConstraints.gridwidth = 3;
2779
+// // aConstraints.gridheight = 3;
2780
+// aWindowConstraints.gridx = 1;
2781
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2782
+// //bigThree.add(cameraPanel, aWindowConstraints);
2783
+// aWindowConstraints.weightx = 0;
2784
+// aWindowConstraints.gridx = 4;
2785
+// aWindowConstraints.gridwidth = 1;
2786
+// // aWindowConstraints.gridheight = 3;
2787
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2788
+// //bigThree.add(XYZPanel, aWindowConstraints);
2789
+// bigThree.validate();
2790
+// scenePanel.setVisible(true);
2791
+// centralPanel.setVisible(false);
2792
+// XYZPanel.setVisible(false);
2793
+ bigThree.ClearUI();
2794
+ bigThree.add(scenePanel);
2795
+ bigThree.FlushUI();
26632796 } else
2664
- if (event.getSource() == sixButton)
2797
+ if (source == sixButton)
26652798 {
26662799 radio.layout = sixButton;
2667
- bigThree.remove(jtp);
2668
- bigThree.remove(cameraPanel);
2669
- bigThree.remove(XYZPanel);
2670
- aWindowConstraints.gridx = 0;
2671
- aWindowConstraints.gridy = 0;
2672
- aWindowConstraints.gridwidth = 1;
2673
- // aConstraints.gridheight = 3;
2674
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2675
- aWindowConstraints.weightx = 0;
2676
- aWindowConstraints.weighty = 1;
2677
- bigThree.add(jtp, aWindowConstraints);
2678
- aWindowConstraints.weightx = 1;
2679
- aWindowConstraints.gridwidth = 3;
2680
- // aWindowConstraints.gridheight = 3;
2681
- aWindowConstraints.gridx = 1;
2682
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2683
- bigThree.add(cameraPanel, aWindowConstraints);
2684
- aWindowConstraints.weightx = 0;
2685
- aWindowConstraints.gridx = 4;
2686
- aWindowConstraints.gridwidth = 1;
2687
- // aWindowConstraints.gridheight = 3;
2688
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2689
- //bigThree.add(XYZPanel, aConstraints);
2690
- bigThree.revalidate();
2800
+
2801
+// bigThree.remove(scenePanel);
2802
+// bigThree.remove(centralPanel);
2803
+// bigThree.remove(XYZPanel);
2804
+// aWindowConstraints.gridx = 0;
2805
+// aWindowConstraints.gridy = 0;
2806
+// aWindowConstraints.gridwidth = 1;
2807
+// // aConstraints.gridheight = 3;
2808
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2809
+// aWindowConstraints.weightx = 0;
2810
+// aWindowConstraints.weighty = 1;
2811
+// bigThree.add(scenePanel, aWindowConstraints);
2812
+// aWindowConstraints.weightx = 1;
2813
+// aWindowConstraints.gridwidth = 3;
2814
+// // aWindowConstraints.gridheight = 3;
2815
+// aWindowConstraints.gridx = 1;
2816
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2817
+// bigThree.add(centralPanel, aWindowConstraints);
2818
+// aWindowConstraints.weightx = 0;
2819
+// aWindowConstraints.gridx = 4;
2820
+// aWindowConstraints.gridwidth = 1;
2821
+// // aWindowConstraints.gridheight = 3;
2822
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2823
+// //bigThree.add(XYZPanel, aConstraints);
2824
+// bigThree.validate();
2825
+// scenePanel.setVisible(true);
2826
+// centralPanel.setVisible(true);
2827
+// XYZPanel.setVisible(false);
2828
+ bigThree.ClearUI();
2829
+ bigThree.add(scenePanel);
2830
+ bigThree.add(centralPanel);
2831
+ bigThree.FlushUI();
26912832 } else
2692
- if (event.getSource() == sevenButton)
2833
+ if (source == sevenButton)
26932834 {
26942835 radio.layout = sevenButton;
2695
- bigThree.remove(jtp);
2696
- bigThree.remove(cameraPanel);
2697
- bigThree.remove(XYZPanel);
2698
- aWindowConstraints.gridx = 0;
2699
- aWindowConstraints.gridy = 0;
2700
- aWindowConstraints.gridwidth = 1;
2701
- // aWindowConstraints.gridheight = 3;
2702
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2703
- aWindowConstraints.weightx = 0;
2704
- aWindowConstraints.weighty = 1;
2705
- bigThree.add(jtp, aWindowConstraints);
2706
- aWindowConstraints.weightx = 1;
2707
- aWindowConstraints.gridwidth = 3;
2708
- // aWindowConstraints.gridheight = 3;
2709
- aWindowConstraints.gridx = 1;
2710
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2711
- bigThree.add(cameraPanel, aWindowConstraints);
2712
- aWindowConstraints.weightx = 0;
2713
- aWindowConstraints.gridx = 4;
2714
- aWindowConstraints.gridwidth = 1;
2715
- // aConstraints.gridheight = 3;
2716
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2717
- bigThree.add(XYZPanel, aWindowConstraints);
2718
- bigThree.revalidate();
2836
+
2837
+// bigThree.remove(scenePanel);
2838
+// bigThree.remove(centralPanel);
2839
+// bigThree.remove(XYZPanel);
2840
+// aWindowConstraints.gridx = 0;
2841
+// aWindowConstraints.gridy = 0;
2842
+// aWindowConstraints.gridwidth = 1;
2843
+// // aWindowConstraints.gridheight = 3;
2844
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2845
+// aWindowConstraints.weightx = 0;
2846
+// aWindowConstraints.weighty = 1;
2847
+// bigThree.add(scenePanel, aWindowConstraints);
2848
+// aWindowConstraints.weightx = 1;
2849
+// aWindowConstraints.gridwidth = 3;
2850
+// // aWindowConstraints.gridheight = 3;
2851
+// aWindowConstraints.gridx = 1;
2852
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2853
+// bigThree.add(centralPanel, aWindowConstraints);
2854
+// aWindowConstraints.weightx = 0;
2855
+// aWindowConstraints.gridx = 4;
2856
+// aWindowConstraints.gridwidth = 1;
2857
+// // aConstraints.gridheight = 3;
2858
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2859
+// bigThree.add(XYZPanel, aWindowConstraints);
2860
+// bigThree.validate();
2861
+// scenePanel.setVisible(true);
2862
+// centralPanel.setVisible(true);
2863
+// XYZPanel.setVisible(true);
2864
+ bigThree.ClearUI();
2865
+ bigThree.add(scenePanel);
2866
+ bigThree.add(centralPanel);
2867
+ bigThree.add(XYZPanel);
2868
+ bigThree.FlushUI();
27192869 } else
2720
- if (event.getSource() == rootButton)
2870
+ if (source == rootButton)
27212871 {
27222872 Object3D obj;
27232873 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2729,7 +2879,7 @@
27292879
27302880 refreshContents(true);
27312881 } else
2732
- if (event.getSource() == closeButton)
2882
+ if (source == closeButton)
27332883 {
27342884 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27352885 cRadio ab;
....@@ -2750,11 +2900,11 @@
27502900 }
27512901 refreshContents(true);
27522902 } else
2753
- if (event.getSource() == editItem || event.getSource() == editButton)
2903
+ if (source == editItem || source == editButton)
27542904 {
27552905 EditSelection(false);
27562906 } else
2757
- if (event.getSource() == uneditButton)
2907
+ if (source == uneditButton)
27582908 {
27592909 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
27602910 {
....@@ -2771,7 +2921,7 @@
27712921 //objEditor.ResetSliders();
27722922 refreshContents(true);
27732923 } else
2774
- if (event.getSource() == clearPanelButton)
2924
+ if (source == clearPanelButton)
27752925 {
27762926 assert(copy == group);
27772927 //copy.ClearUI();
....@@ -2782,7 +2932,7 @@
27822932 listUI.clear();
27832933 refreshContents(true);
27842934 } else
2785
- if (event.getSource() == allParamsButton)
2935
+ if (source == allParamsButton)
27862936 {
27872937 assert(copy == group);
27882938
....@@ -2803,19 +2953,19 @@
28032953
28042954 refreshContents(true);
28052955 } else
2806
- if (event.getSource() == unselectButton)
2956
+ if (source == unselectButton)
28072957 {
28082958 objEditor.jTree.clearSelection();
2809
- // ?? oct 2012 GraphreeD.clipboard.clear();
2959
+ // ?? oct 2012 GrafreeD.clipboard.clear();
28102960 objEditor.ResetSliders();
28112961 refreshContents(true);
28122962 } else
2813
- if(event.getSource() instanceof cRadio)
2963
+ if(source instanceof cRadio)
28142964 {
28152965 group.parent = keepparent;
28162966 group.attributes = 0;
28172967 //group.editWindow = null;
2818
- /*cRadio*/ radio = (cRadio)event.getSource();
2968
+ /*cRadio*/ radio = (cRadio)source;
28192969 Object3D obj = radio.GetObject();
28202970 System.out.println("Edit " + obj);
28212971 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2835,7 +2985,7 @@
28352985 }
28362986
28372987 copy = group;
2838
- //CameraPane.theRenderer.object = group;
2988
+ //Globals.theRenderer.object = group;
28392989 if(!useclient)
28402990 {
28412991 cameraView.renderCamera = radio.camera;
....@@ -2844,7 +2994,8 @@
28442994 cameraView.cameras[cameraView.cameracount] = radio.camera;
28452995 cameraView.targetLookAt.set(radio.camera.lookAt);
28462996 cameraView.object = group;
2847
- cameraView.lighttouched = true;
2997
+ //cameraView.lighttouched = true;
2998
+ Globals.lighttouched = true;
28482999 topView.object = group;
28493000 frontView.object = group;
28503001 sideView.object = group;
....@@ -2880,7 +3031,7 @@
28803031 if (useclient)
28813032 {
28823033 cameraView.object = client;
2883
- cameraView.lighttouched = true;
3034
+ Globals.lighttouched = true;
28843035 //topView.object = client;
28853036 //frontView.object = client;
28863037 //sideView.object = client;
....@@ -2888,7 +3039,7 @@
28883039 else
28893040 {
28903041 cameraView.object = group;
2891
- cameraView.lighttouched = true;
3042
+ Globals.lighttouched = true;
28923043 //topView.object = group;
28933044 //frontView.object = group;
28943045 //sideView.object = group;
....@@ -3121,9 +3272,9 @@
31213272 obj = (Object3D)e.nextElement();
31223273
31233274 System.out.println("Object is: " + obj);
3124
- GraphreeD.AnalyzeObject(obj);
3275
+ GrafreeD.AnalyzeObject(obj);
31253276 System.out.println("Boundary rep: " + obj.bRep);
3126
- GraphreeD.AnalyzeObject(obj.bRep);
3277
+ GrafreeD.AnalyzeObject(obj.bRep);
31273278
31283279 // System.err.println((size/1024) + " KB is the size of " + obj);
31293280 }
....@@ -3165,6 +3316,13 @@
31653316 void GenNormals(boolean crease)
31663317 {
31673318 group.GenNormalsS(crease);
3319
+
3320
+ refreshContents();
3321
+ }
3322
+
3323
+ void GenNormalsMINE()
3324
+ {
3325
+ group.selection.GenNormalsMINE();
31683326
31693327 refreshContents();
31703328 }
....@@ -3250,7 +3408,7 @@
32503408 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
32513409 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
32523410 //
3253
-// g.add(GraphreeD.clipboard);
3411
+// g.add(GrafreeD.clipboard);
32543412 //
32553413 // buffer.add(g);
32563414 // }
....@@ -3269,8 +3427,8 @@
32693427 // nodes = new Object3D();
32703428 // vertices = new Vector<Vertex>();
32713429 //
3272
-// boolean epsequal = GraphreeD.epsequal;
3273
-// GraphreeD.epsequal = true;
3430
+// boolean epsequal = GrafreeD.epsequal;
3431
+// GrafreeD.epsequal = true;
32743432 //
32753433 // for (int i=0; i<group.selection.size(); i++)
32763434 // {
....@@ -3311,7 +3469,7 @@
33113469 // LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33123470 // LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33133471 //
3314
-// g.add(GraphreeD.clipboard);
3472
+// g.add(GrafreeD.clipboard);
33153473 //
33163474 // buffer.add(g);
33173475 // }
....@@ -3319,7 +3477,7 @@
33193477 // makeSomething(buffer, i==group.selection.size()-1);
33203478 // }
33213479 //
3322
-// GraphreeD.epsequal = epsequal;
3480
+// GrafreeD.epsequal = epsequal;
33233481 //
33243482 // //buffer = null;
33253483 // temprep = null;
....@@ -3330,8 +3488,8 @@
33303488
33313489 void ParseVertices()
33323490 {
3333
- boolean epsequal = GraphreeD.epsequal;
3334
- GraphreeD.epsequal = true;
3491
+ boolean epsequal = GrafreeD.epsequal;
3492
+ GrafreeD.epsequal = true;
33353493
33363494 for (int i=0; i<group.selection.size(); i++)
33373495 {
....@@ -3356,7 +3514,7 @@
33563514 LA.matTranslate(g.toParent, temp.x, temp.y, temp.z);
33573515 LA.matTranslate(g.fromParent, -temp.x, -temp.y, -temp.z);
33583516
3359
- g.add(GraphreeD.clipboard);
3517
+ g.add(GrafreeD.clipboard);
33603518
33613519 buffer.add(g);
33623520 }
....@@ -3371,7 +3529,7 @@
33713529 makeSomething(buffer, i==group.selection.size()-1);
33723530 }
33733531
3374
- GraphreeD.epsequal = epsequal;
3532
+ GrafreeD.epsequal = epsequal;
33753533
33763534 refreshContents();
33773535 }
....@@ -3389,7 +3547,7 @@
33893547 String pigment = Object3D.GetPigment(tex);
33903548 //String bump = Object3D.GetBump(tex);
33913549
3392
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3550
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
33933551
33943552 double s = v.s;
33953553
....@@ -3416,7 +3574,7 @@
34163574 scale /= 3;
34173575
34183576 scale /= 0xFF;
3419
- scale /= 4;
3577
+ // c'est quoi ca? scale /= 4;
34203578
34213579 //v.AO = scale;
34223580
....@@ -3437,12 +3595,26 @@
34373595
34383596 void Align()
34393597 {
3598
+ if (group.selection.size() == 0)
3599
+ return;
3600
+
3601
+ cVector bbmin = new cVector();
3602
+ cVector bbmax = new cVector();
3603
+
3604
+ group.selection.get(0).getBounds(bbmin, bbmax, true);
3605
+
3606
+ double dx = bbmax.x - bbmin.x;
3607
+ double dy = bbmax.y - bbmin.y;
3608
+ double dz = bbmax.z - bbmin.z;
3609
+
3610
+ double scale = Math.sqrt(dx*dx + dy*dy + dz*dz);
3611
+
34403612 for (int i=0; i<group.selection.size(); i++)
34413613 {
34423614 Object3D obj = group.selection.get(i);
34433615
3444
- LA.matTranslate(obj.toParent, i/2f, 0, 0);
3445
- LA.matTranslateInv(obj.fromParent, -i/2f, 0, 0);
3616
+ LA.matTranslate(obj.toParent, i * scale, 0, 0);
3617
+ LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0);
34463618 }
34473619
34483620 refreshContents();
....@@ -3455,7 +3627,7 @@
34553627 // ref.SaveSupports();
34563628 // Object3D par = ref.parent;
34573629 // ref.parent = null;
3458
-// Object3D lowres = (Object3D) GraphreeD.clone(ref);
3630
+// Object3D lowres = (Object3D) GrafreeD.clone(ref);
34593631 // ref.parent = par;
34603632 // ref.RestoreSupports();
34613633
....@@ -3485,7 +3657,7 @@
34853657 // lowres.SaveSupports();
34863658 // par = lowres.parent;
34873659 // lowres.parent = null;
3488
-// Object3D newlow = (Object3D) GraphreeD.clone(lowres);
3660
+// Object3D newlow = (Object3D) GrafreeD.clone(lowres);
34893661 Object3D newlow = CloneObject(lowres, false);
34903662 newlow.name = sn.switchobject.get(i).name;
34913663 System.out.println(" pose#" + i + " = " + newlow);
....@@ -3507,7 +3679,7 @@
35073679 return;
35083680
35093681 Object3D poses = group.selection.get(0);
3510
- Object3D ref = GraphreeD.clipboard.get(0);
3682
+ Object3D ref = GrafreeD.clipboard.get(0);
35113683
35123684 Object3D newgroup = new Object3D("Po:" + poses.name);
35133685
....@@ -3676,7 +3848,7 @@
36763848 group.selection.RelinkToSupport(); // july 2014
36773849 System.out.println("DONE.");
36783850 refreshContents();
3679
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3851
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
36803852 }
36813853
36823854 void ReduceMesh(boolean reduction34)
....@@ -3701,20 +3873,20 @@
37013873
37023874 void ClipMesh()
37033875 {
3704
- if (/*group.selection.size() == 1 &&*/ GraphreeD.clipboard.size() == 1)
3876
+ if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
37053877 {
3706
- Object3D content = GraphreeD.clipboard.get(0);
3878
+ Object3D content = GrafreeD.clipboard.get(0);
37073879
37083880 if (content instanceof cGroup && ((cGroup)content).transientlink )
37093881 content = ((cGroup)content).get(0);
37103882
37113883 // for (int i=0; i<group.selection.size(); i++)
37123884 // {
3713
-// group.selection.get(i).ClipMesh(GraphreeD.clipboard);
3885
+// group.selection.get(i).ClipMesh(GrafreeD.clipboard);
37143886 // }
3715
- group.selection.ClipMesh(GraphreeD.clipboard);
3887
+ group.selection.ClipMesh(GrafreeD.clipboard);
37163888 }
3717
-// group.selection.ClipMesh(GraphreeD.clipboard);
3889
+// group.selection.ClipMesh(GrafreeD.clipboard);
37183890 System.out.println("DONE.");
37193891 refreshContents();
37203892 }
....@@ -3961,16 +4133,16 @@
39614133
39624134 objEditor.SetText(); // jan 2014
39634135
3964
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4136
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
39654137 CameraPane.flash = true;
39664138
39674139 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
39684140 // a camera
39694141 {
39704142 CameraPane.camerachangeframe = 0; // don't refuse it
3971
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
3972
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
3973
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4143
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4144
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4145
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
39744146 }
39754147
39764148 refreshContents();
....@@ -4052,12 +4224,12 @@
40524224 {
40534225 if (group.selection.isEmpty())
40544226 return;
4055
- GraphreeD.clipboardIsTempGroup = false;
4227
+ GrafreeD.clipboardIsTempGroup = false;
40564228 Composite tGroup = null;
40574229 if (group.selection.size() > 0) // 1)
40584230 {
40594231 tGroup = new cGroup();
4060
- GraphreeD.clipboardIsTempGroup = true;
4232
+ GrafreeD.clipboardIsTempGroup = true;
40614233 }
40624234
40634235 if (cut)
....@@ -4097,16 +4269,16 @@
40974269 //System.out.println("cut " + child);
40984270 //System.out.println("parent = " + child.parent);
40994271 // tmp.addChild(child);
4100
- if (GraphreeD.clipboardIsTempGroup)
4272
+ if (GrafreeD.clipboardIsTempGroup)
41014273 tGroup.add/*Child*/(tmp);
41024274 else
4103
- GraphreeD.clipboard = tmp;
4275
+ GrafreeD.clipboard = tmp;
41044276 }
41054277 else
4106
- if (GraphreeD.clipboardIsTempGroup)
4278
+ if (GrafreeD.clipboardIsTempGroup)
41074279 tGroup.add/*Child*/(child);
41084280 else
4109
- GraphreeD.clipboard = child;
4281
+ GrafreeD.clipboard = child;
41104282 }
41114283
41124284 //ResetModel();
....@@ -4138,21 +4310,21 @@
41384310 //System.out.println("cut " + elem);
41394311 //System.out.println("parent = " + elem.parent);
41404312 // tmp.addChild(elem);
4141
- if (GraphreeD.clipboardIsTempGroup)
4313
+ if (GrafreeD.clipboardIsTempGroup)
41424314 tGroup.add/*Child*/(tmp);
41434315 else
4144
- GraphreeD.clipboard = tmp;
4316
+ GrafreeD.clipboard = tmp;
41454317 }
41464318 else
4147
- if (GraphreeD.clipboardIsTempGroup)
4319
+ if (GrafreeD.clipboardIsTempGroup)
41484320 tGroup.add/*Child*/(child);
41494321 else
4150
- GraphreeD.clipboard = child;
4322
+ GrafreeD.clipboard = child;
41514323 }
41524324
41534325 }
4154
- if (GraphreeD.clipboardIsTempGroup)
4155
- GraphreeD.clipboard = tGroup;
4326
+ if (GrafreeD.clipboardIsTempGroup)
4327
+ GrafreeD.clipboard = tGroup;
41564328 if (cut)
41574329 {
41584330 ResetModel();
....@@ -4162,11 +4334,11 @@
41624334
41634335 void paste(boolean expand)
41644336 {
4165
- // if (GraphreeD.clipboard == null)
4337
+ // if (GrafreeD.clipboard == null)
41664338 // return;
41674339 boolean first = true;
41684340
4169
- if (GraphreeD.clipboardIsTempGroup)
4341
+ if (GrafreeD.clipboardIsTempGroup)
41704342 {
41714343 Composite temp;
41724344
....@@ -4177,7 +4349,7 @@
41774349 temp = (Composite)Applet3D.clipboard.deepCopy();
41784350 */
41794351 Object3D elem;
4180
- for (Enumeration e = /*temp.children*/GraphreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
4352
+ for (Enumeration e = /*temp.children*/GrafreeD.clipboard.elements(); e.hasMoreElements();) // objList.add(copy.name))
41814353 {
41824354 Object3D child = (Object3D)e.nextElement();
41834355
....@@ -4191,7 +4363,7 @@
41914363 else
41924364 elem = child.deepCopy(); // ?
41934365 child.parent = keepparent;
4194
- //if (GraphreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
4366
+ //if (GrafreeD.clipboardIsTempGroup && LA.isIdentity(elem.fromParent))
41954367 // elem = elem.get(0);
41964368 makeSomething(elem, true); // ?? first);
41974369 //group.addChild(elem);
....@@ -4211,14 +4383,14 @@
42114383 //Object3D cb = Applet3D.clipboard;
42124384 //temp.addChild(cb);
42134385 //makeSomething((expand?temp.copyExpand():temp.deepCopy()).get(0));
4214
- assert(GraphreeD.clipboard.parent == null);
4215
- Object3D /*Composite*/ keepparent = GraphreeD.clipboard.get(0).parent;
4216
- GraphreeD.clipboard.get(0).parent = null; // Avoid copy?
4217
- if (LA.isIdentity(GraphreeD.clipboard.toParent))
4218
- makeSomething(expand?GraphreeD.clipboard.get(0).copyExpand():GraphreeD.clipboard.get(0).deepCopy());
4386
+ assert(GrafreeD.clipboard.parent == null);
4387
+ Object3D /*Composite*/ keepparent = GrafreeD.clipboard.get(0).parent;
4388
+ GrafreeD.clipboard.get(0).parent = null; // Avoid copy?
4389
+ if (LA.isIdentity(GrafreeD.clipboard.toParent))
4390
+ makeSomething(expand?GrafreeD.clipboard.get(0).copyExpand():GrafreeD.clipboard.get(0).deepCopy());
42194391 else
4220
- makeSomething(expand?GraphreeD.clipboard.copyExpand():GraphreeD.clipboard.deepCopy());
4221
- GraphreeD.clipboard.get(0).parent = keepparent;
4392
+ makeSomething(expand?GrafreeD.clipboard.copyExpand():GrafreeD.clipboard.deepCopy());
4393
+ GrafreeD.clipboard.get(0).parent = keepparent;
42224394 }
42234395
42244396 ResetModel();
....@@ -4227,7 +4399,7 @@
42274399
42284400 void pasteInto(boolean copyit)
42294401 {
4230
-// if (GraphreeD.clipboard == null)
4402
+// if (GrafreeD.clipboard == null)
42314403 // return;
42324404
42334405 if (group.selection.size() != 1)
....@@ -4260,9 +4432,9 @@
42604432 {
42614433 boolean first = true;
42624434
4263
- if (GraphreeD.clipboardIsTempGroup)
4435
+ if (GrafreeD.clipboardIsTempGroup)
42644436 {
4265
- Composite temp = (Composite)GraphreeD.clipboard;
4437
+ Composite temp = (Composite)GrafreeD.clipboard;
42664438 Object3D copy;
42674439 for (Enumeration e = temp.children.elements(); e.hasMoreElements();)
42684440 {
....@@ -4272,7 +4444,7 @@
42724444 }
42734445 } else
42744446 {
4275
- linkSomething(GraphreeD.clipboard); //.get(0));
4447
+ linkSomething(GrafreeD.clipboard); //.get(0));
42764448 }
42774449 }
42784450 }
....@@ -4464,6 +4636,26 @@
44644636 makeSomething(csg);
44654637 }
44664638
4639
+ void Ungroup(Object3D g)
4640
+ {
4641
+ if (g instanceof HiddenObject)
4642
+ {
4643
+ HiddenObject h = (HiddenObject) g;
4644
+
4645
+ for (int i=0; i<h.ActualSize(); i++)
4646
+ {
4647
+ objEditor.makeSomething(h.get(i), false);
4648
+ }
4649
+ }
4650
+ else
4651
+ {
4652
+ for (int i=0; i<g.Size(); i++)
4653
+ {
4654
+ objEditor.makeSomething(g.get(i), false);
4655
+ }
4656
+ }
4657
+ }
4658
+
44674659 void ungroup()
44684660 {
44694661 /*
....@@ -4659,7 +4851,7 @@
46594851
46604852 void ImportGFD()
46614853 {
4662
- FileDialog browser = new FileDialog(objEditor.frame, "Import GraphreeD", FileDialog.LOAD);
4854
+ FileDialog browser = new FileDialog(objEditor.frame, "Import GrafreeD", FileDialog.LOAD);
46634855 browser.show();
46644856 String filename = browser.getFile();
46654857 if (filename != null && filename.length() > 0)
....@@ -4697,7 +4889,7 @@
46974889
46984890 void ImportVRMLX3D()
46994891 {
4700
- if (GraphreeD.standAlone)
4892
+ if (GrafreeD.standAlone)
47014893 {
47024894 /**/
47034895 FileDialog browser = new FileDialog(objEditor.frame, "Import VRML/X3D", FileDialog.LOAD);
....@@ -4714,7 +4906,7 @@
47144906
47154907 String GetFile(String dialogName)
47164908 {
4717
- if (GraphreeD.standAlone)
4909
+ if (GrafreeD.standAlone)
47184910 {
47194911 FileDialog browser = new FileDialog(objEditor.frame, dialogName, FileDialog.LOAD);
47204912 browser.show();
....@@ -4823,6 +5015,7 @@
48235015 private MenuItem resetsupportItem;
48245016 private MenuItem resetreferencesItem;
48255017 private MenuItem linkverticesItem;
5018
+ private MenuItem relinkverticesItem;
48265019 private MenuItem setMasterItem;
48275020 private MenuItem resetMeshItem;
48285021 private MenuItem stepAllItem;
....@@ -4841,8 +5034,10 @@
48415034 private MenuItem clearItem;
48425035 private MenuItem clearAllItem;
48435036 private MenuItem genUVItem;
5037
+ private MenuItem genNormalsMESHItem;
48445038 private MenuItem genNormalsCADItem;
48455039 private MenuItem genNormalsORGANItem;
5040
+ private MenuItem genNormalsMINEItem;
48465041 private MenuItem stripifyItem;
48475042 private MenuItem unstripifyItem;
48485043 private MenuItem trimItem;
....@@ -4884,6 +5079,7 @@
48845079 private MenuItem resetCentroidItem;
48855080 private MenuItem transformgeometryItem;
48865081 private MenuItem resetTransformItem;
5082
+ private MenuItem hideItem;
48875083 private MenuItem grabItem;
48885084 private MenuItem backItem;
48895085 private MenuItem frontItem;
....@@ -4904,6 +5100,7 @@
49045100
49055101 private MenuItem resetParentItem;
49065102 private MenuItem repairParentItem;
5103
+ private MenuItem repairShadowItem;
49075104 private MenuItem sortbysizeItem;
49085105 private MenuItem sortbynameItem;
49095106
....@@ -4924,6 +5121,7 @@
49245121 private MenuItem coneItem;
49255122 private MenuItem torusItem;
49265123 private MenuItem superItem;
5124
+ private MenuItem kleinItem;
49275125 private MenuItem blobItem;
49285126 private MenuItem latheItem;
49295127 private MenuItem bezierItem;
....@@ -4936,6 +5134,7 @@
49365134 private MenuItem csgItem;
49375135 private MenuItem templateItem;
49385136 private MenuItem textureItem;
5137
+ private MenuItem billboardItem;
49395138 private MenuItem shadowXItem;
49405139 private MenuItem shadowYItem;
49415140 private MenuItem shadowZItem;