Normand Briere
2019-05-01 20c1a07b76c39462594aedfedfe6e6adb17cd552
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,
....@@ -433,84 +434,30 @@
433434 oe.radioPanel.add(dummyButton);
434435 oe.buttonGroup.add(dummyButton);
435436 */
436
- aConstraints.gridy += 1;
437
- oe.aConstraints.gridwidth = 1;
438
- oe.aConstraints.gridx = 0;
437
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439438
440
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
439
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
440
+ liveCB.setToolTipText("Enabled animation");
441441 liveCB.addItemListener(this);
442442
443
- oe.aConstraints.gridx += 1;
444
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
445
- supportCB.addItemListener(this);
446
-
447
- // oe.aConstraints.gridx += 1;
448
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
449
- // localCB.addItemListener(this);
450
-
451
- oe.aConstraints.gridx += 1;
452
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
453
- crowdCB.addItemListener(this);
454
-
455
- oe.aConstraints.gridx += 1;
456
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
457
- smoothCB.addItemListener(this);
458
-
459
- oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
443
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
444
+ fastCB.setToolTipText("Fast mode");
461445 fastCB.addItemListener(this);
462
- oe.aConstraints.gridx += 1;
463
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
464
- slowCB.addItemListener(this);
465
- oe.aConstraints.gridx += 1;
466
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
467
- boxCB.addItemListener(this);
468
-
469
-// oe.aConstraints.gridx += 1;
470
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
471
-// speakerMocapCB.addItemListener(this);
472
-
473
- if (false)
474
- {
475
- // handled in scripts
476
- oe.aConstraints.gridx += 1;
477
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
478
- speakerCameraCB.addItemListener(this);
479
-
480
- oe.aConstraints.gridx += 1;
481
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
482
- speakerFocusCB.addItemListener(this);
483
-
484
- oe.aConstraints.gridx += 1;
485
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
486
- smoothfocusCB.addItemListener(this);
487
- }
488
-
489
-//oe.aConstraints.gridx += 1;
490
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
491
-// debugCB.addItemListener(this);
492
-
493
- oe.aConstraints.gridx += 1;
494
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
495
- oeilCB.addItemListener(this);
496
-
497
- oe.aConstraints.gridx += 1;
498
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
499
- lookAtCB.addItemListener(this);
500
-
501
- oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
446
+
447
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
448
+ trackCB.setToolTipText("Enable tracking");
503449 trackCB.addItemListener(this);
504450
505
- oe.aConstraints.gridx += 1;
506
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
451
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
452
+ screenfitButton.setToolTipText("Screen fit");
507453 screenfitButton.addActionListener(this);
508
- oe.aConstraints.gridx += 1;
454
+
509455 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
510456 // screenfitpointButton.addActionListener(this);
511457 // oe.aConstraints.gridx += 1;
512
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
458
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
513459 snapobjectButton.addActionListener(this);
460
+ snapobjectButton.setToolTipText("Snap Object");
514461 oe.aConstraints.gridx += 1;
515462
516463 //aConstraints.gridx = 0;
....@@ -518,68 +465,66 @@
518465 oe.aConstraints.weighty = 0;
519466 oe.aConstraints.gridwidth = 1;
520467
521
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
468
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
469
+ flashSelectionButton.setToolTipText("Show selection");
522470 flashSelectionButton.addActionListener(this);
523471
524
- oe.toolbarPanel.add(new cButton(" ", false));
472
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525473
526
- oe.aConstraints.gridx += 1;
527
- oe.aConstraints.weighty = 0;
528
- oe.aConstraints.gridwidth = 1;
529
-
530
- //
531
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
474
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
475
+ twoButton.setToolTipText("Show center view only");
532476 twoButton.addActionListener(this);
533
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
477
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
534478 fourButton.addActionListener(this);
535
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
479
+ fourButton.setToolTipText("Show left panel only");
480
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
481
+ sixButton.setToolTipText("2-column layout left");
536482 sixButton.addActionListener(this);
537
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
483
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
484
+ threeButton.setToolTipText("2-column layout right");
538485 threeButton.addActionListener(this);
539
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
486
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
487
+ sevenButton.setToolTipText("3-column layout");
540488 sevenButton.addActionListener(this);
541489 //
542490
543
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
491
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492
+ rootButton.setToolTipText("Edit selection in new tab");
544493 rootButton.addActionListener(this);
545
- oe.aConstraints.gridx += 1;
546
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
494
+
495
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
496
+ closeButton.setToolTipText("Close tab");
547497 closeButton.addActionListener(this);
548498 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
549499 //clearButton.addActionListener(this);
550
- oe.aConstraints.gridx += 1;
551500
552
- oe.aConstraints.gridx = 1; //
553
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
501
+ cGridBag commandsPanel = new cGridBag();
502
+
503
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504
+ editButton.setToolTipText("Edit selection");
554505 editButton.addActionListener(this);
555
- oe.aConstraints.gridx += 1;
556
- oe.aConstraints.weighty = 0;
557
- oe.aConstraints.gridwidth = 1;
558506
559
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
507
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
508
+ uneditButton.setToolTipText("Unedit selection");
560509 uneditButton.addActionListener(this);
561510
562
- oe.aConstraints.gridx += 1;
563
- oe.aConstraints.weighty = 0;
564
- oe.aConstraints.gridwidth = 1;
565
-
566
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
511
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
512
+ clearPanelButton.setToolTipText("Clear edit panel");
567513 clearPanelButton.addActionListener(this);
568514
569
- oe.aConstraints.gridx += 1;
570
- oe.aConstraints.weighty = 0;
571
- oe.aConstraints.gridwidth = 1;
572
-
573
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
515
+ commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
516
+ allParamsButton.setToolTipText("All params??");
574517 allParamsButton.addActionListener(this);
575518
576
- oe.aConstraints.gridx += 1;
577
- oe.aConstraints.weighty = 0;
578
- oe.aConstraints.gridwidth = 1;
579
-
580
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
519
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
520
+ unselectButton.setToolTipText("Unselect");
581521 unselectButton.addActionListener(this);
582522
523
+ commandsPanel.preferredHeight = 1;
524
+
525
+ oe.treePanel.add(commandsPanel);
526
+ oe.treePanel.Return();
527
+
583528 // oe.aConstraints.gridx += 1;
584529 // oe.aConstraints.weighty = 0;
585530 // oe.aConstraints.gridwidth = 1;
....@@ -591,40 +536,37 @@
591536 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
592537 // gcButton.addActionListener(this);
593538
594
- oe.aConstraints.gridx = 0;
595
- oe.aConstraints.gridy += 1;
596
-
597
- //ctrlPanel.add(objList = new List(5, true));
598
- oe.aConstraints.gridwidth = 100;
599
- // oe.aConstraints.gridheight = 100;
600
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
601
- oe.aConstraints.gridheight = 1;
602
- oe.aConstraints.weighty = 0.5;
603
- oe.aConstraints.gridx = 0;
604
- JScrollPane jSP;
539
+ cGridBag jSPPanel = new cGridBag();
540
+
541
+ JScrollPane jSP;
605542 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
606
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
543
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
607544 ResetModel();
608
- oe.aConstraints.weighty = 0.5;
609
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
610
- oe.aConstraints.gridy += 1;
611
- oe.aConstraints.gridwidth = 1;
545
+
546
+ oe.treePanel.add(jSPPanel);
547
+ oe.treePanel.Return();
612548
613
- oe.aConstraints.weighty = 0;
614
- oe.aConstraints.gridwidth = 2;
615
-
616
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
549
+ cGridBag copyOptionsPanel = new cGridBag();
550
+
551
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
552
+ colorCB.setToolTipText("Copy color when dropped");
617553 colorCB.addItemListener(this);
618
- oe.aConstraints.gridx += 2;
619
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
554
+
555
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
556
+ materialCB.setToolTipText("Copy material when dropped");
620557 materialCB.addItemListener(this);
621
- oe.aConstraints.gridx += 2;
622
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
558
+
559
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
560
+ textureCB.setToolTipText("Copy texture when dropped");
623561 textureCB.addItemListener(this);
624562
625
- oe.aConstraints.gridx = 0;
626
- oe.aConstraints.gridy += 1;
563
+ copyOptionsPanel.preferredHeight = 1;
564
+ oe.treePanel.add(copyOptionsPanel);
565
+ oe.treePanel.Return();
627566
567
+// mainPanel.setDividerLocation(0.5); //1.0);
568
+// mainPanel.setResizeWeight(0.5);
569
+
628570 //jList.addListSelectionListener(this);
629571 oe.jTree.addTreeSelectionListener(this);
630572 //jTree.setRootVisible(false);
....@@ -646,6 +588,74 @@
646588 radio.layout = sevenButton;
647589 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
648590 }
591
+
592
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
593
+ {
594
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
595
+ supportCB.setToolTipText("Enabled rigging");
596
+ supportCB.addItemListener(this);
597
+
598
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
599
+ // localCB.addItemListener(this);
600
+
601
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
602
+ crowdCB.setToolTipText("Used for crowds");
603
+ crowdCB.addItemListener(this);
604
+
605
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
606
+ smoothCB.setToolTipText("Snapping delay");
607
+ smoothCB.addItemListener(this);
608
+
609
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
610
+ slowCB.setToolTipText("Smooth interpolation");
611
+ slowCB.addItemListener(this);
612
+
613
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
614
+ boxCB.setToolTipText("Display bounding boxes");
615
+ boxCB.addItemListener(this);
616
+
617
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
618
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
619
+ zoomBoxCB.addItemListener(this);
620
+
621
+// constraints.gridy += 1;
622
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
623
+// speakerMocapCB.addItemListener(this);
624
+
625
+ if (false)
626
+ {
627
+ // handled in scripts
628
+ //constraints.gridy += 1;
629
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
630
+ speakerCameraCB.addItemListener(this);
631
+
632
+ //constraints.gridy += 1;
633
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
634
+ speakerFocusCB.addItemListener(this);
635
+
636
+ //constraints.gridy += 1;
637
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
638
+ smoothfocusCB.addItemListener(this);
639
+ }
640
+
641
+//constraints.gridx += 1;
642
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
643
+// debugCB.addItemListener(this);
644
+
645
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
646
+ oeilCB.addItemListener(this);
647
+
648
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
649
+ lookAtCB.setToolTipText("Look-at target");
650
+ lookAtCB.addItemListener(this);
651
+
652
+ cGridBag fill = new cGridBag();
653
+
654
+ fill.preferredHeight = 200;
655
+
656
+ panel.add(fill);
657
+
658
+ }
649659
650660 void EditObject(Object3D obj)
651661 {
....@@ -676,6 +686,7 @@
676686 JCheckBox fastCB;
677687 JCheckBox slowCB;
678688 JCheckBox boxCB;
689
+ JCheckBox zoomBoxCB;
679690 JCheckBox trackCB;
680691 JCheckBox smoothfocusCB;
681692 // JCheckBox speakerMocapCB;
....@@ -755,6 +766,10 @@
755766 Recompile();
756767 cameraView.repaint();
757768 // refreshContents();
769
+ }
770
+ else if(e.getSource() == zoomBoxCB)
771
+ {
772
+ cameraView.ToggleZoomBoxMode();
758773 }
759774 else if(e.getSource() == smoothfocusCB)
760775 {
....@@ -1087,7 +1102,7 @@
10871102 {
10881103 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10891104 animationItem.addItemListener(this);
1090
- animationItem.setState(CameraPane.ANIMATION);
1105
+ animationItem.setState(Globals.ANIMATION);
10911106
10921107 menu.add("-");
10931108 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
....@@ -1120,6 +1135,8 @@
11201135 resetParentItem.addActionListener(this);
11211136 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11221137 repairParentItem.addActionListener(this);
1138
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1139
+ repairShadowItem.addActionListener(this);
11231140 menu.add(invariantsItem = new MenuItem("Invariants"));
11241141 invariantsItem.addActionListener(this);
11251142 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1480,6 +1497,7 @@
14801497 //
14811498 public void actionPerformed(ActionEvent event) // , Object arg)
14821499 {
1500
+ Object source = event.getSource();
14831501 /*
14841502 if (event.getSource() == nameField)
14851503 {
....@@ -1491,11 +1509,11 @@
14911509 }
14921510 else
14931511 */
1494
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1512
+ if (source == lookAtItem || source == lookFromItem)
14951513 {
14961514 ScreenFit();
14971515 } else
1498
- if (event.getSource() == switchItem)
1516
+ if (source == switchItem)
14991517 {
15001518 cVector v1 = new cVector();
15011519 cVector v2 = new cVector();
....@@ -1504,11 +1522,11 @@
15041522 objEditor.cameraView.renderCamera.setAim(v2, v1);
15051523 objEditor.cameraView.repaint();
15061524 } else
1507
- if (event.getSource() == rectoidItem)
1525
+ if (source == rectoidItem)
15081526 {
15091527 makeSomething(new Box());
15101528 } else
1511
- if (event.getSource() == particleItem)
1529
+ if (source == particleItem)
15121530 {
15131531 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15141532 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1529,9 +1547,9 @@
15291547 applyExample(particleGeom, "SMOKE");
15301548 makeSomething(particleGeom);
15311549 } else
1532
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1550
+ if (source == ragdollItem || source == ragdoll2Item)
15331551 {
1534
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1552
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15351553
15361554 ragdoll.toParent = LA.newMatrix();
15371555 ragdoll.fromParent = LA.newMatrix();
....@@ -1549,7 +1567,7 @@
15491567 } else
15501568 /*
15511569 */
1552
- if (event.getSource() == heightFieldItem)
1570
+ if (source == heightFieldItem)
15531571 {
15541572 Object3D obj = new Object3D();
15551573
....@@ -1587,31 +1605,31 @@
15871605
15881606 makeSomething(obj);
15891607 } else
1590
- if (event.getSource() == gridItem)
1608
+ if (source == gridItem)
15911609 {
15921610 makeSomething(new Grid());
15931611 } else
1594
- if (event.getSource() == ellipsoidItem)
1612
+ if (source == ellipsoidItem)
15951613 {
15961614 makeSomething(new Sphere());
15971615 } else
1598
- if (event.getSource() == coneItem)
1616
+ if (source == coneItem)
15991617 {
16001618 makeSomething(new Cone());
16011619 } else
1602
- if (event.getSource() == torusItem)
1620
+ if (source == torusItem)
16031621 {
16041622 makeSomething(new Torus());
16051623 } else
1606
- if (event.getSource() == superItem)
1624
+ if (source == superItem)
16071625 {
16081626 makeSomething(new Superellipsoid());
16091627 } else
1610
- if (event.getSource() == kleinItem)
1628
+ if (source == kleinItem)
16111629 {
16121630 makeSomething(new Klein());
16131631 } else
1614
- if (event.getSource() == blobItem)
1632
+ if (source == blobItem)
16151633 {
16161634 Blob blob = new Blob();
16171635 BlobComponent comp = new BlobComponent();
....@@ -1619,15 +1637,15 @@
16191637 //blob.retile();
16201638 makeSomething(blob);
16211639 } else
1622
- if (event.getSource() == latheItem)
1640
+ if (source == latheItem)
16231641 {
16241642 makeSomething(new Lathe());
16251643 } else
1626
- if (event.getSource() == bezierItem)
1644
+ if (source == bezierItem)
16271645 {
16281646 makeSomething(new BezierSurface());
16291647 } else
1630
- if (event.getSource() == checkerItem)
1648
+ if (source == checkerItem)
16311649 {
16321650 /*
16331651 Object3D obj = new BezierSurface(5,8);
....@@ -1642,7 +1660,7 @@
16421660 */
16431661 makeSomething(new Checker());
16441662 } else
1645
- if (event.getSource() == meshItem)
1663
+ if (source == meshItem)
16461664 {
16471665 Object3D itemtomake = new Object3D();
16481666 Object3D child;
....@@ -1663,35 +1681,35 @@
16631681 makeSomething(child);
16641682 }
16651683 } else
1666
- if (event.getSource() == springItem)
1684
+ if (source == springItem)
16671685 {
16681686 cSpring s = new cSpring();
16691687 s.setup();
16701688 makeSomething(s);
16711689 } else
1672
- if (event.getSource() == flagItem)
1690
+ if (source == flagItem)
16731691 {
16741692 cSpring s = new cFlag();
16751693 s.setup();
16761694 makeSomething(s);
16771695 } else
1678
- if (event.getSource() == lightItem)
1696
+ if (source == lightItem)
16791697 {
16801698 makeSomething(new Light());
16811699 } else
1682
- if (event.getSource() == csgItem)
1700
+ if (source == csgItem)
16831701 {
16841702 group(new CSG());
16851703 } else
1686
- if (event.getSource() == templateItem)
1704
+ if (source == templateItem)
16871705 {
16881706 group(new cTemplate());
16891707 } else
1690
- if (event.getSource() == attributeItem)
1708
+ if (source == attributeItem)
16911709 {
16921710 makeSomething(new Attribute());
16931711 } else
1694
- if (event.getSource() == pointflowItem)
1712
+ if (source == pointflowItem)
16951713 {
16961714 makeSomething(new PointFlow());
16971715 } else
....@@ -1703,7 +1721,7 @@
17031721 } else
17041722 */
17051723
1706
- if (event.getSource() == superLoopItem)
1724
+ if (source == superLoopItem)
17071725 {
17081726 Composite g = new cGroup();
17091727 for (int i=0; i<15; i++)
....@@ -1725,7 +1743,7 @@
17251743
17261744 group(g);
17271745 } else
1728
- if (event.getSource() == loopItem)
1746
+ if (source == loopItem)
17291747 {
17301748 Composite csg = new GroupLeaf();
17311749 csg.count = 5;
....@@ -1734,7 +1752,7 @@
17341752 csg.addChild(child);
17351753 child.addChild(csg);
17361754 } else
1737
- if (event.getSource() == doubleItem)
1755
+ if (source == doubleItem)
17381756 {
17391757 Composite csg = new GroupLeaf();
17401758 csg.count = 5;
....@@ -1746,7 +1764,7 @@
17461764 csg.addChild(child);
17471765 child.addChild(csg);
17481766 } else
1749
- if (event.getSource() == tripleItem)
1767
+ if (source == tripleItem)
17501768 {
17511769 Composite csg = new GroupLeaf();
17521770 csg.count = 4;
....@@ -1762,70 +1780,70 @@
17621780 child.addChild(csg);
17631781 } else
17641782
1765
- if (event.getSource() == importGFDItem)
1783
+ if (source == importGFDItem)
17661784 {
17671785 ImportGFD();
17681786 } else
1769
- if (event.getSource() == importVRMLX3DItem)
1787
+ if (source == importVRMLX3DItem)
17701788 {
17711789 ImportVRMLX3D();
17721790 } else
1773
- if (event.getSource() == import3DSItem)
1791
+ if (source == import3DSItem)
17741792 {
17751793 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17761794 } else
1777
- if (event.getSource() == importOBJItem)
1795
+ if (source == importOBJItem)
17781796 {
17791797 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17801798 } else
1781
- if (event.getSource() == computeAOItem)
1799
+ if (source == computeAOItem)
17821800 {
1783
- CameraPane.drawMode = CameraPane.OCCLUSION;
1784
- CameraPane.theRenderer.repaint();
1801
+ Globals.drawMode = CameraPane.OCCLUSION;
1802
+ Globals.theRenderer.repaint();
17851803 } else
1786
- if (event.getSource() == recompileItem)
1804
+ if (source == recompileItem)
17871805 {
17881806 Recompile();
17891807 refreshContents();
17901808 } else
1791
- if (event.getSource() == editScriptItem)
1809
+ if (source == editScriptItem)
17921810 {
17931811 OpenDialog();
17941812 refreshContents();
17951813 } else
1796
- if (event.getSource() == invariantsItem)
1814
+ if (source == invariantsItem)
17971815 {
17981816 System.out.println("Invariants:");
17991817 GrafreeD.grafreeD.universe.invariants();
18001818 } else
1801
- if (event.getSource() == memoryItem)
1819
+ if (source == memoryItem)
18021820 {
18031821 //System.out.println("Invariants:");
18041822 PrintMemory();
18051823 } else
1806
- if (event.getSource() == pathItem)
1824
+ if (source == pathItem)
18071825 {
18081826 PrintPath();
18091827 } else
1810
- if (event.getSource() == analyzeItem)
1828
+ if (source == analyzeItem)
18111829 {
18121830 AnalyzeObject();
18131831 } else
1814
- if (event.getSource() == dumpItem)
1832
+ if (source == dumpItem)
18151833 {
18161834 DumpObject();
18171835 } else
1818
- if (event.getSource() == screenfitButton)
1836
+ if (source == screenfitButton)
18191837 {
18201838 //Reload(lastConverter, lastFilename, true);
18211839 ScreenFit();
18221840 } else
1823
- if (event.getSource() == screenfitpointButton)
1841
+ if (source == screenfitpointButton)
18241842 {
18251843 //Reload(lastConverter, lastFilename, true);
18261844 ScreenFitPoint();
18271845 } else
1828
- if (event.getSource() == snapobjectButton)
1846
+ if (source == snapobjectButton)
18291847 {
18301848 //Reload(lastConverter, lastFilename, true);
18311849 SnapObject();
....@@ -1836,13 +1854,13 @@
18361854 // Recompile();
18371855 // refreshContents();
18381856 // } else
1839
- if (event.getSource() == gcButton)
1857
+ if (source == gcButton)
18401858 {
18411859 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18421860 System.gc();
18431861 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18441862 } else
1845
- if (event.getSource() == editLeafItem)
1863
+ if (source == editLeafItem)
18461864 {
18471865 Object3D obj;
18481866 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1856,62 +1874,62 @@
18561874 }
18571875 refreshContents(true);
18581876 } else
1859
- if (event.getSource() == openWindowItem)
1877
+ if (source == openWindowItem)
18601878 {
18611879 EditSelection(true);
18621880 } else
1863
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1881
+ if (source == cutItem || source == clearButton)
18641882 {
18651883 loadClipboard(true);
18661884 } else
1867
- if (event.getSource() == duplicateItem)
1885
+ if (source == duplicateItem)
18681886 {
18691887 Object3D keep = GrafreeD.clipboard;
18701888 loadClipboard(false);
18711889 paste(false);
18721890 GrafreeD.clipboard = keep;
18731891 } else
1874
- if (event.getSource() == cloneItem)
1892
+ if (source == cloneItem)
18751893 {
18761894 CloneSelection(false);
18771895 } else
1878
- if (event.getSource() == cloneSupportItem)
1896
+ if (source == cloneSupportItem)
18791897 {
18801898 CloneSelection(true);
18811899 } else
1882
- if (event.getSource() == copyItem)
1900
+ if (source == copyItem)
18831901 {
18841902 loadClipboard(false);
18851903 } else
1886
- if (event.getSource() == pasteItem)
1904
+ if (source == pasteItem)
18871905 {
18881906 paste(false);
18891907 } else
1890
- if (event.getSource() == pasteLinkItem)
1908
+ if (source == pasteLinkItem)
18911909 {
18921910 pasteInto(false);
18931911 } else
1894
- if (event.getSource() == pasteCloneItem)
1912
+ if (source == pasteCloneItem)
18951913 {
18961914 pasteInto(true);
18971915 } else
1898
- if (event.getSource() == pasteExpandItem)
1916
+ if (source == pasteExpandItem)
18991917 {
19001918 paste(true);
19011919 } else
1902
- if (event.getSource() == synchronizeItem)
1920
+ if (source == synchronizeItem)
19031921 {
19041922 Overwrite(Object3D.TRANSFORM);
19051923 } else
1906
- if (event.getSource() == overwriteNameItem)
1924
+ if (source == overwriteNameItem)
19071925 {
19081926 Overwrite(Object3D.NAME);
19091927 } else
1910
- if (event.getSource() == overwriteUVItem)
1928
+ if (source == overwriteUVItem)
19111929 {
19121930 Overwrite(Object3D.UV);
19131931 } else
1914
- if (event.getSource() == overwriteMatItem)
1932
+ if (source == overwriteMatItem)
19151933 {
19161934 /* july 2015
19171935 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1931,7 +1949,7 @@
19311949
19321950 Overwrite(dropAttributes);
19331951 }
1934
- if (event.getSource() == overwriteGeoItem)
1952
+ if (source == overwriteGeoItem)
19351953 {
19361954 Overwrite(Object3D.GEOMETRY);
19371955 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1948,7 +1966,7 @@
19481966 // refreshContents();
19491967 // }
19501968 } else
1951
- if (event.getSource() == generateMeshItem)
1969
+ if (source == generateMeshItem)
19521970 {
19531971 //if (group.selection.size() == 1)
19541972 // for (int i=0; i<group.selection.size(); i++)
....@@ -1959,7 +1977,7 @@
19591977 ResetModel();
19601978 refreshContents();
19611979 } else
1962
- if (event.getSource() == extractGeometriesItem)
1980
+ if (source == extractGeometriesItem)
19631981 {
19641982 boolean one = false;
19651983
....@@ -1986,7 +2004,7 @@
19862004 ResetModel();
19872005 refreshContents();
19882006 } else
1989
- if (event.getSource() == cloneGeometriesItem)
2007
+ if (source == cloneGeometriesItem)
19902008 {
19912009 boolean one = false;
19922010
....@@ -2012,7 +2030,7 @@
20122030 ResetModel();
20132031 refreshContents();
20142032 } else
2015
- if (event.getSource() == shareGeometriesItem)
2033
+ if (source == shareGeometriesItem)
20162034 {
20172035 boolean one = false;
20182036
....@@ -2042,7 +2060,7 @@
20422060 refreshContents();
20432061 }
20442062 } else
2045
- if (event.getSource() == mergeGeometriesItem)
2063
+ if (source == mergeGeometriesItem)
20462064 {
20472065 boolean one = false;
20482066
....@@ -2072,7 +2090,7 @@
20722090 ResetModel();
20732091 refreshContents();
20742092 } else
2075
- if (event.getSource() == linkverticesItem)
2093
+ if (source == linkverticesItem)
20762094 {
20772095 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20782096 // {
....@@ -2092,7 +2110,7 @@
20922110 if (content instanceof cGroup && ((cGroup)content).transientlink )
20932111 content = ((cGroup)content).get(0);
20942112
2095
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2113
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20962114 for (int i=0; i<group.selection.size(); i++)
20972115 {
20982116 boolean random = CameraPane.RANDOM;
....@@ -2101,11 +2119,11 @@
21012119 // group.selection.get(i).setMasterThis(content); // should be identity
21022120 CameraPane.RANDOM = random;
21032121 }
2104
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2122
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21052123 refreshContents();
21062124 }
21072125 } else
2108
- if (event.getSource() == resetsupportItem)
2126
+ if (source == resetsupportItem)
21092127 {
21102128 for (int i=0; i<group.selection.size(); i++)
21112129 {
....@@ -2117,7 +2135,7 @@
21172135
21182136 refreshContents();
21192137 } else
2120
- if (event.getSource() == relinkverticesItem)
2138
+ if (source == relinkverticesItem)
21212139 {
21222140 boolean random = CameraPane.RANDOM;
21232141 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2126,7 +2144,7 @@
21262144
21272145 refreshContents();
21282146 } else
2129
- if (event.getSource() == resetreferencesItem)
2147
+ if (source == resetreferencesItem)
21302148 {
21312149 for (int i=0; i<group.selection.size(); i++)
21322150 {
....@@ -2135,7 +2153,7 @@
21352153
21362154 refreshContents();
21372155 } else
2138
- if (event.getSource() == setMasterItem)
2156
+ if (source == setMasterItem)
21392157 {
21402158 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21412159 {
....@@ -2148,7 +2166,7 @@
21482166 refreshContents();
21492167 }
21502168 } else
2151
- if (event.getSource() == poseMeshItem)
2169
+ if (source == poseMeshItem)
21522170 {
21532171 if (group.selection.size() == 1)
21542172 {
....@@ -2167,19 +2185,19 @@
21672185 }
21682186
21692187 } else
2170
- if (event.getSource() == revertMeshItem)
2188
+ if (source == revertMeshItem)
21712189 {
21722190 RevertMeshes();
21732191 } else
2174
- if (event.getSource() == resetMeshItem)
2192
+ if (source == resetMeshItem)
21752193 {
21762194 ResetAll();
21772195 } else
2178
- if (event.getSource() == stepAllItem)
2196
+ if (source == stepAllItem)
21792197 {
21802198 StepAll();
21812199 } else
2182
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2200
+ if (source == clearItem) // || event.getSource() == clearButton)
21832201 {
21842202 //int indices[] = jList.getSelectedIndices();
21852203 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2187,46 +2205,46 @@
21872205
21882206 ClearSelection(false);
21892207 } else
2190
- if (event.getSource() == clearAllItem)
2208
+ if (source == clearAllItem)
21912209 {
21922210 ClearSelection(true);
21932211 } else
2194
- if (event.getSource() == grabItem)
2212
+ if (source == grabItem)
21952213 {
21962214 group(new cGroup(), true);
21972215 } else
2198
- if (event.getSource() == hideItem)
2216
+ if (source == hideItem)
21992217 {
22002218 group(new HiddenObject());
22012219 } else
2202
- if (event.getSource() == frontItem)
2220
+ if (source == frontItem)
22032221 {
22042222 front();
22052223 } else
2206
- if (event.getSource() == backItem)
2224
+ if (source == backItem)
22072225 {
22082226 back();
22092227 } else
2210
- if (event.getSource() == cameraItem)
2228
+ if (source == cameraItem)
22112229 {
22122230 makeSomething(new Camera());
22132231 } else
2214
- if (event.getSource() == compositeItem)
2232
+ if (source == compositeItem)
22152233 {
22162234 group(new Composite());
22172235 } else
2218
- if (event.getSource() == randomItem)
2236
+ if (source == randomItem)
22192237 {
22202238 RandomNode random = new RandomNode();
22212239 group(random);
22222240 if (random.size() > 0)
22232241 random.name = random.get(0).name + "Rnd";
22242242 } else
2225
- if (event.getSource() == physicsItem)
2243
+ if (source == physicsItem)
22262244 {
22272245 group(new PhysicsNode());
22282246 } else
2229
- if (event.getSource() == frameselectorItem)
2247
+ if (source == frameselectorItem)
22302248 {
22312249 for (int i=0; i<group.selection.size(); i++)
22322250 {
....@@ -2238,7 +2256,7 @@
22382256 ResetModel();
22392257 refreshContents();
22402258 } else
2241
- if (event.getSource() == switchGeoItem)
2259
+ if (source == switchGeoItem)
22422260 {
22432261 for (int i=0; i<group.selection.size(); i++)
22442262 {
....@@ -2250,7 +2268,7 @@
22502268 ResetModel();
22512269 refreshContents();
22522270 } else
2253
- if (event.getSource() == switchTransfoItem)
2271
+ if (source == switchTransfoItem)
22542272 {
22552273 for (int i=0; i<group.selection.size(); i++)
22562274 {
....@@ -2262,7 +2280,7 @@
22622280 ResetModel();
22632281 refreshContents();
22642282 } else
2265
- if (event.getSource() == morphItem)
2283
+ if (source == morphItem)
22662284 {
22672285 for (int i=0; i<group.selection.size(); i++)
22682286 {
....@@ -2274,7 +2292,7 @@
22742292 ResetModel();
22752293 refreshContents();
22762294 } else
2277
- if (event.getSource() == scriptNodeItem)
2295
+ if (source == scriptNodeItem)
22782296 {
22792297 boolean atleastone = false;
22802298
....@@ -2313,31 +2331,31 @@
23132331 }
23142332 }
23152333 } else
2316
- if (event.getSource() == linkerItem)
2334
+ if (source == linkerItem)
23172335 {
23182336 group(new cLinker());
23192337 } else
2320
- if (event.getSource() == textureItem)
2338
+ if (source == textureItem)
23212339 {
23222340 group(new TextureNode());
23232341 } else
2324
- if (event.getSource() == billboardItem)
2342
+ if (source == billboardItem)
23252343 {
23262344 group(new BillboardNode());
23272345 } else
2328
- if (event.getSource() == shadowXItem)
2346
+ if (source == shadowXItem)
23292347 {
23302348 CastShadow(0);
23312349 } else
2332
- if (event.getSource() == shadowYItem)
2350
+ if (source == shadowYItem)
23332351 {
23342352 CastShadow(1);
23352353 } else
2336
- if (event.getSource() == shadowZItem)
2354
+ if (source == shadowZItem)
23372355 {
23382356 CastShadow(2);
23392357 } else
2340
- if (event.getSource() == ungroupItem)
2358
+ if (source == ungroupItem)
23412359 {
23422360 //ungroup();
23432361 for (int i=0; i<group.selection.size(); i++)
....@@ -2349,179 +2367,179 @@
23492367
23502368 refreshContents();
23512369 } else
2352
- if (event.getSource() == genUVItem)
2370
+ if (source == genUVItem)
23532371 {
23542372 GenUV();
23552373 } else
2356
- if (event.getSource() == genNormalsCADItem)
2374
+ if (source == genNormalsCADItem)
23572375 {
23582376 GenNormals(true);
23592377 } else
2360
- if (event.getSource() == genNormalsMESHItem)
2378
+ if (source == genNormalsMESHItem)
23612379 {
23622380 GenNormals(true); // TODO
23632381 } else
2364
- if (event.getSource() == genNormalsORGANItem)
2382
+ if (source == genNormalsORGANItem)
23652383 {
23662384 GenNormals(false);
23672385 } else
2368
- if (event.getSource() == genNormalsMINEItem)
2386
+ if (source == genNormalsMINEItem)
23692387 {
23702388 GenNormalsMINE();
23712389 } else
2372
- if (event.getSource() == stripifyItem)
2390
+ if (source == stripifyItem)
23732391 {
23742392 Stripify();
23752393 } else
2376
- if (event.getSource() == unstripifyItem)
2394
+ if (source == unstripifyItem)
23772395 {
23782396 Unstripify();
23792397 } else
2380
- if (event.getSource() == trimItem)
2398
+ if (source == trimItem)
23812399 {
23822400 Trim();
23832401 } else
2384
- if (event.getSource() == untrimItem)
2402
+ if (source == untrimItem)
23852403 {
23862404 Untrim();
23872405 } else
2388
- if (event.getSource() == clearColorsItem)
2406
+ if (source == clearColorsItem)
23892407 {
23902408 ClearColors();
23912409 } else
2392
- if (event.getSource() == clearMaterialsItem)
2410
+ if (source == clearMaterialsItem)
23932411 {
23942412 ClearMaterials();
23952413 } else
2396
- if (event.getSource() == liveleavesItem)
2414
+ if (source == liveleavesItem)
23972415 {
23982416 LiveLeaves(true);
23992417 } else
2400
- if (event.getSource() == unliveleavesItem)
2418
+ if (source == unliveleavesItem)
24012419 {
24022420 LiveLeaves(false);
24032421 } else
2404
- if (event.getSource() == supportleavesItem)
2422
+ if (source == supportleavesItem)
24052423 {
24062424 SupportLeaves(true);
24072425 } else
2408
- if (event.getSource() == unsupportleavesItem)
2426
+ if (source == unsupportleavesItem)
24092427 {
24102428 SupportLeaves(false);
24112429 } else
2412
- if (event.getSource() == hideleavesItem)
2430
+ if (source == hideleavesItem)
24132431 {
24142432 HideLeaves(true);
24152433 } else
2416
- if (event.getSource() == showleavesItem)
2434
+ if (source == showleavesItem)
24172435 {
24182436 HideLeaves(false);
24192437 } else
2420
- if (event.getSource() == markleavesItem)
2438
+ if (source == markleavesItem)
24212439 {
24222440 MarkLeaves(true);
24232441 } else
2424
- if (event.getSource() == unmarkleavesItem)
2442
+ if (source == unmarkleavesItem)
24252443 {
24262444 MarkLeaves(false);
24272445 } else
2428
- if (event.getSource() == flipVItem)
2446
+ if (source == flipVItem)
24292447 {
24302448 FlipV(true);
24312449 } else
2432
- if (event.getSource() == unflipVItem)
2450
+ if (source == unflipVItem)
24332451 {
24342452 FlipV(false);
24352453 } else
2436
- if (event.getSource() == lowTexturesItem)
2454
+ if (source == lowTexturesItem)
24372455 {
24382456 SetTexRes(0);
24392457 } else
2440
- if (event.getSource() == normalTexturesItem)
2458
+ if (source == normalTexturesItem)
24412459 {
24422460 SetTexRes(1);
24432461 } else
2444
- if (event.getSource() == highTexturesItem)
2462
+ if (source == highTexturesItem)
24452463 {
24462464 SetTexRes(2);
24472465 } else
2448
- if (event.getSource() == veryhighTexturesItem)
2466
+ if (source == veryhighTexturesItem)
24492467 {
24502468 SetTexRes(3);
24512469 } else
2452
- if (event.getSource() == maxTexturesItem)
2470
+ if (source == maxTexturesItem)
24532471 {
24542472 SetTexRes(4);
24552473 } else
2456
- if (event.getSource() == panoTexturesItem)
2474
+ if (source == panoTexturesItem)
24572475 {
24582476 SetTexRes(5);
24592477 } else
2460
- if (event.getSource() == reverseNormalsItem)
2478
+ if (source == reverseNormalsItem)
24612479 {
24622480 ReverseNormals();
24632481 } else
2464
- if (event.getSource() == parseverticesItem)
2482
+ if (source == parseverticesItem)
24652483 {
24662484 ParseVertices();
24672485 } else
2468
- if (event.getSource() == textureFieldItem)
2486
+ if (source == textureFieldItem)
24692487 {
24702488 TextureVertices();
24712489 } else
2472
- if (event.getSource() == alignItem)
2490
+ if (source == alignItem)
24732491 {
24742492 Align();
24752493 } else
2476
- if (event.getSource() == mirrorItem)
2494
+ if (source == mirrorItem)
24772495 {
24782496 MirrorPoses();
24792497 } else
2480
- if (event.getSource() == reduceMorphItem)
2498
+ if (source == reduceMorphItem)
24812499 {
24822500 MeshReduction(false);
24832501 } else
2484
- if (event.getSource() == reduce34MorphItem)
2502
+ if (source == reduce34MorphItem)
24852503 {
24862504 MeshReduction(true);
24872505 } else
2488
- if (event.getSource() == reverseTrianglesItem)
2506
+ if (source == reverseTrianglesItem)
24892507 {
24902508 ReverseTriangles();
24912509 } else
2492
- if (event.getSource() == reduceMeshItem)
2510
+ if (source == reduceMeshItem)
24932511 {
24942512 ReduceMesh(false);
24952513 } else
2496
- if (event.getSource() == reduce34MeshItem)
2514
+ if (source == reduce34MeshItem)
24972515 {
24982516 ReduceMesh(true);
24992517 } else
2500
- if (event.getSource() == increaseMeshItem)
2518
+ if (source == increaseMeshItem)
25012519 {
25022520 IncreaseMesh();
25032521 } else
2504
- if (event.getSource() == clipMeshItem)
2522
+ if (source == clipMeshItem)
25052523 {
25062524 ClipMesh();
25072525 } else
2508
- if (event.getSource() == smoothMeshItem)
2526
+ if (source == smoothMeshItem)
25092527 {
25102528 SmoothMesh();
25112529 } else
2512
- if (event.getSource() == transformgeometryItem)
2530
+ if (source == transformgeometryItem)
25132531 {
25142532 TransformGeometry();
25152533 } else
2516
- if (event.getSource() == resetTransformItem)
2534
+ if (source == resetTransformItem)
25172535 {
25182536 ResetTransform();
25192537 } else
2520
- if (event.getSource() == resetCentroidItem)
2538
+ if (source == resetCentroidItem)
25212539 {
25222540 ResetCentroid();
25232541 } else
2524
- if (event.getSource() == resetParentItem)
2542
+ if (source == resetParentItem)
25252543 {
25262544 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25272545 {
....@@ -2531,7 +2549,7 @@
25312549
25322550 refreshContents();
25332551 } else
2534
- if (event.getSource() == repairParentItem)
2552
+ if (source == repairParentItem)
25352553 {
25362554 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25372555 {
....@@ -2545,7 +2563,21 @@
25452563
25462564 refreshContents();
25472565 } else
2548
- if (event.getSource() == sortbysizeItem)
2566
+ if (source == repairShadowItem)
2567
+ {
2568
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2569
+ {
2570
+ Object3D obj = (Object3D)e.nextElement();
2571
+ obj.RepairShadow();
2572
+// for (int i=0; i<obj.size(); i++)
2573
+// {
2574
+// obj.get(i).parent = obj;
2575
+// }
2576
+ }
2577
+
2578
+ refreshContents();
2579
+ } else
2580
+ if (source == sortbysizeItem)
25492581 {
25502582 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25512583 {
....@@ -2557,7 +2589,7 @@
25572589 ResetModel();
25582590 refreshContents();
25592591 } else
2560
- if (event.getSource() == sortbynameItem)
2592
+ if (source == sortbynameItem)
25612593 {
25622594 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25632595 {
....@@ -2569,7 +2601,7 @@
25692601 ResetModel();
25702602 refreshContents();
25712603 } else
2572
- if (event.getSource() == attachPigmentItem)
2604
+ if (source == attachPigmentItem)
25732605 {
25742606 String texture = GetFile("Attach pigment");
25752607 Object3D obj;
....@@ -2581,7 +2613,7 @@
25812613
25822614 refreshContents();
25832615 } else
2584
- if (event.getSource() == detachPigmentItem)
2616
+ if (source == detachPigmentItem)
25852617 {
25862618 Object3D obj;
25872619 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2592,7 +2624,7 @@
25922624
25932625 refreshContents();
25942626 } else
2595
- if (event.getSource() == attachBumpItem)
2627
+ if (source == attachBumpItem)
25962628 {
25972629 String texture = GetFile("Attach bump");
25982630 Object3D obj;
....@@ -2604,7 +2636,7 @@
26042636
26052637 refreshContents();
26062638 } else
2607
- if (event.getSource() == detachBumpItem)
2639
+ if (source == detachBumpItem)
26082640 {
26092641 Object3D obj;
26102642 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2615,7 +2647,7 @@
26152647
26162648 refreshContents();
26172649 } else
2618
- if (event.getSource() == pigmentBumpItem)
2650
+ if (source == pigmentBumpItem)
26192651 {
26202652 Object3D obj;
26212653 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2626,158 +2658,195 @@
26262658
26272659 refreshContents();
26282660 } else
2629
- if (event.getSource() == flashSelectionButton)
2661
+ if (source == flashSelectionButton)
26302662 {
26312663 CameraPane.flash = true;
26322664 refreshContents();
26332665 } else
2634
- if (event.getSource() == oneButton)
2666
+ if (source == oneButton)
26352667 {
26362668 } else
2637
- if (event.getSource() == twoButton)
2669
+ if (source == twoButton)
26382670 {
26392671 radio.layout = twoButton;
26402672 // bug
26412673 //gridPanel.setDividerLocation(1.0);
26422674 //bigPanel.setDividerLocation(0.0);
2643
- bigThree.remove(scenePanel);
2644
- bigThree.remove(centralPanel);
2645
- bigThree.remove(XYZPanel);
2646
- aWindowConstraints.gridx = 0;
2647
- aWindowConstraints.gridy = 0;
2648
- aWindowConstraints.gridwidth = 1;
2649
- // aConstraints.gridheight = 3;
2650
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2651
- aWindowConstraints.weightx = 0;
2652
- aWindowConstraints.weighty = 1;
2653
- //bigThree.add(jtp, aWindowConstraints);
2654
- aWindowConstraints.weightx = 1;
2655
- aWindowConstraints.gridwidth = 3;
2656
- // aConstraints.gridheight = 3;
2657
- aWindowConstraints.gridx = 1;
2658
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2659
- bigThree.add(centralPanel, aWindowConstraints);
2660
- aWindowConstraints.weightx = 0;
2661
- aWindowConstraints.gridx = 4;
2662
- aWindowConstraints.gridwidth = 1;
2663
- // aConstraints.gridheight = 3;
2664
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2665
- //bigThree.add(XYZPanel, aWindowConstraints);
2666
- bigThree.revalidate();
2675
+// bigThree.remove(scenePanel);
2676
+// bigThree.remove(centralPanel);
2677
+// bigThree.remove(XYZPanel);
2678
+// aWindowConstraints.gridx = 0;
2679
+// aWindowConstraints.gridy = 0;
2680
+// aWindowConstraints.gridwidth = 1;
2681
+// // aConstraints.gridheight = 3;
2682
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2683
+// aWindowConstraints.weightx = 0;
2684
+// aWindowConstraints.weighty = 1;
2685
+// //bigThree.add(jtp, aWindowConstraints);
2686
+// aWindowConstraints.weightx = 1;
2687
+// aWindowConstraints.gridwidth = 3;
2688
+// // aConstraints.gridheight = 3;
2689
+// aWindowConstraints.gridx = 1;
2690
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2691
+// bigThree.add(centralPanel, aWindowConstraints);
2692
+// aWindowConstraints.weightx = 0;
2693
+// aWindowConstraints.gridx = 4;
2694
+// aWindowConstraints.gridwidth = 1;
2695
+// // aConstraints.gridheight = 3;
2696
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2697
+// //bigThree.add(XYZPanel, aWindowConstraints);
2698
+// scenePanel.setVisible(false);
2699
+// centralPanel.setVisible(true);
2700
+// XYZPanel.setVisible(false);
2701
+ bigThree.ClearUI();
2702
+ bigThree.add(centralPanel);
2703
+ bigThree.FlushUI();
26672704 } else
2668
- if (event.getSource() == threeButton)
2705
+ if (source == threeButton)
26692706 {
26702707 radio.layout = threeButton;
2671
- bigThree.remove(scenePanel);
2672
- bigThree.remove(centralPanel);
2673
- bigThree.remove(XYZPanel);
2674
- aWindowConstraints.gridx = 0;
2675
- aWindowConstraints.gridy = 0;
2676
- aWindowConstraints.gridwidth = 1;
2677
- // aConstraints.gridheight = 3;
2678
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2679
- aWindowConstraints.weightx = 0;
2680
- aWindowConstraints.weighty = 1;
2681
- //bigThree.add(jtp, aWindowConstraints);
2682
- aWindowConstraints.weightx = 1;
2683
- aWindowConstraints.gridwidth = 3;
2684
- // aConstraints.gridheight = 3;
2685
- aWindowConstraints.gridx = 1;
2686
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2687
- bigThree.add(centralPanel, aWindowConstraints);
2688
- aWindowConstraints.weightx = 0;
2689
- aWindowConstraints.gridx = 4;
2690
- aWindowConstraints.gridwidth = 1;
2691
- // aConstraints.gridheight = 3;
2692
- aConstraints.fill = GridBagConstraints.VERTICAL;
2693
- bigThree.add(XYZPanel, aWindowConstraints);
2694
- bigThree.revalidate();
2708
+
2709
+// bigThree.remove(scenePanel);
2710
+// bigThree.remove(centralPanel);
2711
+// bigThree.remove(XYZPanel);
2712
+// aWindowConstraints.gridx = 0;
2713
+// aWindowConstraints.gridy = 0;
2714
+// aWindowConstraints.gridwidth = 1;
2715
+// // aConstraints.gridheight = 3;
2716
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2717
+// aWindowConstraints.weightx = 0;
2718
+// aWindowConstraints.weighty = 1;
2719
+// //bigThree.add(jtp, aWindowConstraints);
2720
+// aWindowConstraints.weightx = 1;
2721
+// aWindowConstraints.gridwidth = 3;
2722
+// // aConstraints.gridheight = 3;
2723
+// aWindowConstraints.gridx = 1;
2724
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2725
+// bigThree.add(centralPanel, aWindowConstraints);
2726
+// aWindowConstraints.weightx = 0;
2727
+// aWindowConstraints.gridx = 4;
2728
+// aWindowConstraints.gridwidth = 1;
2729
+// // aConstraints.gridheight = 3;
2730
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2731
+// bigThree.add(XYZPanel, aWindowConstraints);
2732
+// bigThree.validate();
2733
+// scenePanel.setVisible(false);
2734
+// centralPanel.setVisible(true);
2735
+// XYZPanel.setVisible(true);
2736
+ bigThree.ClearUI();
2737
+ bigThree.add(centralPanel);
2738
+ bigThree.add(XYZPanel);
2739
+ bigThree.FlushUI();
26952740 } else
2696
- if (event.getSource() == fourButton)
2741
+ if (source == fourButton)
26972742 {
26982743 radio.layout = fourButton;
2699
- bigThree.remove(scenePanel);
2700
- bigThree.remove(centralPanel);
2701
- bigThree.remove(XYZPanel);
2702
- aWindowConstraints.gridx = 0;
2703
- aWindowConstraints.gridy = 0;
2704
- aWindowConstraints.gridwidth = 1;
2705
- // aWindowConstraints.gridheight = 3;
2706
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2707
- aWindowConstraints.weightx = 1;
2708
- aWindowConstraints.weighty = 1;
2709
- bigThree.add(scenePanel, aWindowConstraints);
2710
- aWindowConstraints.weightx = 1;
2711
- aWindowConstraints.gridwidth = 3;
2712
- // aConstraints.gridheight = 3;
2713
- aWindowConstraints.gridx = 1;
2714
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2715
- //bigThree.add(cameraPanel, aWindowConstraints);
2716
- aWindowConstraints.weightx = 0;
2717
- aWindowConstraints.gridx = 4;
2718
- aWindowConstraints.gridwidth = 1;
2719
- // aWindowConstraints.gridheight = 3;
2720
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2721
- //bigThree.add(XYZPanel, aWindowConstraints);
2722
- bigThree.revalidate();
2744
+
2745
+// bigThree.remove(scenePanel);
2746
+// bigThree.remove(centralPanel);
2747
+// bigThree.remove(XYZPanel);
2748
+// aWindowConstraints.gridx = 0;
2749
+// aWindowConstraints.gridy = 0;
2750
+// aWindowConstraints.gridwidth = 1;
2751
+// // aWindowConstraints.gridheight = 3;
2752
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2753
+// aWindowConstraints.weightx = 1;
2754
+// aWindowConstraints.weighty = 1;
2755
+// bigThree.add(scenePanel, aWindowConstraints);
2756
+// aWindowConstraints.weightx = 1;
2757
+// aWindowConstraints.gridwidth = 3;
2758
+// // aConstraints.gridheight = 3;
2759
+// aWindowConstraints.gridx = 1;
2760
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2761
+// //bigThree.add(cameraPanel, aWindowConstraints);
2762
+// aWindowConstraints.weightx = 0;
2763
+// aWindowConstraints.gridx = 4;
2764
+// aWindowConstraints.gridwidth = 1;
2765
+// // aWindowConstraints.gridheight = 3;
2766
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2767
+// //bigThree.add(XYZPanel, aWindowConstraints);
2768
+// bigThree.validate();
2769
+// scenePanel.setVisible(true);
2770
+// centralPanel.setVisible(false);
2771
+// XYZPanel.setVisible(false);
2772
+ bigThree.ClearUI();
2773
+ bigThree.add(scenePanel);
2774
+ bigThree.FlushUI();
27232775 } else
2724
- if (event.getSource() == sixButton)
2776
+ if (source == sixButton)
27252777 {
27262778 radio.layout = sixButton;
2727
- bigThree.remove(scenePanel);
2728
- bigThree.remove(centralPanel);
2729
- bigThree.remove(XYZPanel);
2730
- aWindowConstraints.gridx = 0;
2731
- aWindowConstraints.gridy = 0;
2732
- aWindowConstraints.gridwidth = 1;
2733
- // aConstraints.gridheight = 3;
2734
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2735
- aWindowConstraints.weightx = 0;
2736
- aWindowConstraints.weighty = 1;
2737
- bigThree.add(scenePanel, aWindowConstraints);
2738
- aWindowConstraints.weightx = 1;
2739
- aWindowConstraints.gridwidth = 3;
2740
- // aWindowConstraints.gridheight = 3;
2741
- aWindowConstraints.gridx = 1;
2742
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2743
- bigThree.add(centralPanel, aWindowConstraints);
2744
- aWindowConstraints.weightx = 0;
2745
- aWindowConstraints.gridx = 4;
2746
- aWindowConstraints.gridwidth = 1;
2747
- // aWindowConstraints.gridheight = 3;
2748
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2749
- //bigThree.add(XYZPanel, aConstraints);
2750
- bigThree.revalidate();
2779
+
2780
+// bigThree.remove(scenePanel);
2781
+// bigThree.remove(centralPanel);
2782
+// bigThree.remove(XYZPanel);
2783
+// aWindowConstraints.gridx = 0;
2784
+// aWindowConstraints.gridy = 0;
2785
+// aWindowConstraints.gridwidth = 1;
2786
+// // aConstraints.gridheight = 3;
2787
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2788
+// aWindowConstraints.weightx = 0;
2789
+// aWindowConstraints.weighty = 1;
2790
+// bigThree.add(scenePanel, aWindowConstraints);
2791
+// aWindowConstraints.weightx = 1;
2792
+// aWindowConstraints.gridwidth = 3;
2793
+// // aWindowConstraints.gridheight = 3;
2794
+// aWindowConstraints.gridx = 1;
2795
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2796
+// bigThree.add(centralPanel, aWindowConstraints);
2797
+// aWindowConstraints.weightx = 0;
2798
+// aWindowConstraints.gridx = 4;
2799
+// aWindowConstraints.gridwidth = 1;
2800
+// // aWindowConstraints.gridheight = 3;
2801
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2802
+// //bigThree.add(XYZPanel, aConstraints);
2803
+// bigThree.validate();
2804
+// scenePanel.setVisible(true);
2805
+// centralPanel.setVisible(true);
2806
+// XYZPanel.setVisible(false);
2807
+ bigThree.ClearUI();
2808
+ bigThree.add(scenePanel);
2809
+ bigThree.add(centralPanel);
2810
+ bigThree.FlushUI();
27512811 } else
2752
- if (event.getSource() == sevenButton)
2812
+ if (source == sevenButton)
27532813 {
27542814 radio.layout = sevenButton;
2755
- bigThree.remove(scenePanel);
2756
- bigThree.remove(centralPanel);
2757
- bigThree.remove(XYZPanel);
2758
- aWindowConstraints.gridx = 0;
2759
- aWindowConstraints.gridy = 0;
2760
- aWindowConstraints.gridwidth = 1;
2761
- // aWindowConstraints.gridheight = 3;
2762
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2763
- aWindowConstraints.weightx = 0;
2764
- aWindowConstraints.weighty = 1;
2765
- bigThree.add(scenePanel, aWindowConstraints);
2766
- aWindowConstraints.weightx = 1;
2767
- aWindowConstraints.gridwidth = 3;
2768
- // aWindowConstraints.gridheight = 3;
2769
- aWindowConstraints.gridx = 1;
2770
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2771
- bigThree.add(centralPanel, aWindowConstraints);
2772
- aWindowConstraints.weightx = 0;
2773
- aWindowConstraints.gridx = 4;
2774
- aWindowConstraints.gridwidth = 1;
2775
- // aConstraints.gridheight = 3;
2776
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2777
- bigThree.add(XYZPanel, aWindowConstraints);
2778
- bigThree.revalidate();
2815
+
2816
+// bigThree.remove(scenePanel);
2817
+// bigThree.remove(centralPanel);
2818
+// bigThree.remove(XYZPanel);
2819
+// aWindowConstraints.gridx = 0;
2820
+// aWindowConstraints.gridy = 0;
2821
+// aWindowConstraints.gridwidth = 1;
2822
+// // aWindowConstraints.gridheight = 3;
2823
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2824
+// aWindowConstraints.weightx = 0;
2825
+// aWindowConstraints.weighty = 1;
2826
+// bigThree.add(scenePanel, aWindowConstraints);
2827
+// aWindowConstraints.weightx = 1;
2828
+// aWindowConstraints.gridwidth = 3;
2829
+// // aWindowConstraints.gridheight = 3;
2830
+// aWindowConstraints.gridx = 1;
2831
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2832
+// bigThree.add(centralPanel, aWindowConstraints);
2833
+// aWindowConstraints.weightx = 0;
2834
+// aWindowConstraints.gridx = 4;
2835
+// aWindowConstraints.gridwidth = 1;
2836
+// // aConstraints.gridheight = 3;
2837
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2838
+// bigThree.add(XYZPanel, aWindowConstraints);
2839
+// bigThree.validate();
2840
+// scenePanel.setVisible(true);
2841
+// centralPanel.setVisible(true);
2842
+// XYZPanel.setVisible(true);
2843
+ bigThree.ClearUI();
2844
+ bigThree.add(scenePanel);
2845
+ bigThree.add(centralPanel);
2846
+ bigThree.add(XYZPanel);
2847
+ bigThree.FlushUI();
27792848 } else
2780
- if (event.getSource() == rootButton)
2849
+ if (source == rootButton)
27812850 {
27822851 Object3D obj;
27832852 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2789,7 +2858,7 @@
27892858
27902859 refreshContents(true);
27912860 } else
2792
- if (event.getSource() == closeButton)
2861
+ if (source == closeButton)
27932862 {
27942863 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27952864 cRadio ab;
....@@ -2810,11 +2879,11 @@
28102879 }
28112880 refreshContents(true);
28122881 } else
2813
- if (event.getSource() == editItem || event.getSource() == editButton)
2882
+ if (source == editItem || source == editButton)
28142883 {
28152884 EditSelection(false);
28162885 } else
2817
- if (event.getSource() == uneditButton)
2886
+ if (source == uneditButton)
28182887 {
28192888 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28202889 {
....@@ -2826,12 +2895,12 @@
28262895
28272896 child.editWindow = null; // ???????????
28282897 }
2829
- objEditor.ctrlPanel.revalidate();
2898
+ objEditor.ctrlPanel.validate();
28302899 //objEditor.jTree.clearSelection();
28312900 //objEditor.ResetSliders();
28322901 refreshContents(true);
28332902 } else
2834
- if (event.getSource() == clearPanelButton)
2903
+ if (source == clearPanelButton)
28352904 {
28362905 assert(copy == group);
28372906 //copy.ClearUI();
....@@ -2842,7 +2911,7 @@
28422911 listUI.clear();
28432912 refreshContents(true);
28442913 } else
2845
- if (event.getSource() == allParamsButton)
2914
+ if (source == allParamsButton)
28462915 {
28472916 assert(copy == group);
28482917
....@@ -2863,19 +2932,19 @@
28632932
28642933 refreshContents(true);
28652934 } else
2866
- if (event.getSource() == unselectButton)
2935
+ if (source == unselectButton)
28672936 {
28682937 objEditor.jTree.clearSelection();
28692938 // ?? oct 2012 GrafreeD.clipboard.clear();
28702939 objEditor.ResetSliders();
28712940 refreshContents(true);
28722941 } else
2873
- if(event.getSource() instanceof cRadio)
2942
+ if(source instanceof cRadio)
28742943 {
28752944 group.parent = keepparent;
28762945 group.attributes = 0;
28772946 //group.editWindow = null;
2878
- /*cRadio*/ radio = (cRadio)event.getSource();
2947
+ /*cRadio*/ radio = (cRadio)source;
28792948 Object3D obj = radio.GetObject();
28802949 System.out.println("Edit " + obj);
28812950 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2895,7 +2964,7 @@
28952964 }
28962965
28972966 copy = group;
2898
- //CameraPane.theRenderer.object = group;
2967
+ //Globals.theRenderer.object = group;
28992968 if(!useclient)
29002969 {
29012970 cameraView.renderCamera = radio.camera;
....@@ -2904,7 +2973,8 @@
29042973 cameraView.cameras[cameraView.cameracount] = radio.camera;
29052974 cameraView.targetLookAt.set(radio.camera.lookAt);
29062975 cameraView.object = group;
2907
- cameraView.lighttouched = true;
2976
+ //cameraView.lighttouched = true;
2977
+ Globals.lighttouched = true;
29082978 topView.object = group;
29092979 frontView.object = group;
29102980 sideView.object = group;
....@@ -2940,7 +3010,7 @@
29403010 if (useclient)
29413011 {
29423012 cameraView.object = client;
2943
- cameraView.lighttouched = true;
3013
+ Globals.lighttouched = true;
29443014 //topView.object = client;
29453015 //frontView.object = client;
29463016 //sideView.object = client;
....@@ -2948,7 +3018,7 @@
29483018 else
29493019 {
29503020 cameraView.object = group;
2951
- cameraView.lighttouched = true;
3021
+ Globals.lighttouched = true;
29523022 //topView.object = group;
29533023 //frontView.object = group;
29543024 //sideView.object = group;
....@@ -3456,7 +3526,7 @@
34563526 String pigment = Object3D.GetPigment(tex);
34573527 //String bump = Object3D.GetBump(tex);
34583528
3459
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3529
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
34603530
34613531 double s = v.s;
34623532
....@@ -3757,7 +3827,7 @@
37573827 group.selection.RelinkToSupport(); // july 2014
37583828 System.out.println("DONE.");
37593829 refreshContents();
3760
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3830
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37613831 }
37623832
37633833 void ReduceMesh(boolean reduction34)
....@@ -4033,25 +4103,25 @@
40334103 System.err.println("info : " + child.GetPath());
40344104 }
40354105 }
4036
- else
4037
- {
4038
- objEditor.SetMaterial(group); // .GetMaterial());
4039
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4040
- System.err.println("info : " + group.GetPath());
4041
- }
4106
+// else
4107
+// {
4108
+// objEditor.SetMaterial(group); // .GetMaterial());
4109
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4110
+// System.err.println("info : " + group.GetPath());
4111
+// }
40424112
40434113 objEditor.SetText(); // jan 2014
40444114
4045
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4115
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
40464116 CameraPane.flash = true;
40474117
40484118 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
40494119 // a camera
40504120 {
40514121 CameraPane.camerachangeframe = 0; // don't refuse it
4052
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4053
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
4054
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4122
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4123
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4124
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40554125 }
40564126
40574127 refreshContents();
....@@ -5009,6 +5079,7 @@
50095079
50105080 private MenuItem resetParentItem;
50115081 private MenuItem repairParentItem;
5082
+ private MenuItem repairShadowItem;
50125083 private MenuItem sortbysizeItem;
50135084 private MenuItem sortbynameItem;
50145085