Normand Briere
2019-05-01 d1e1417edc8a6ccf195b6da3270f22234dda61e4
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,
....@@ -238,16 +239,16 @@
238239 ungroupItem = menu.add(new MenuItem("Ungroup"));
239240 ungroupItem.addActionListener(this);
240241 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
242
+ randomItem = menu.add(new MenuItem("Switch node"));
242243 randomItem.addActionListener(this);
243
- physicsItem = menu.add(new MenuItem("Physics"));
244
- physicsItem.addActionListener(this);
245
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
246
- frameselectorItem.addActionListener(this);
247244 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248245 switchGeoItem.addActionListener(this);
249246 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250247 switchTransfoItem.addActionListener(this);
248
+ physicsItem = menu.add(new MenuItem("Physics"));
249
+ physicsItem.addActionListener(this);
250
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
251
+ frameselectorItem.addActionListener(this);
251252 morphItem = menu.add(new MenuItem("Morph"));
252253 morphItem.addActionListener(this);
253254 scriptNodeItem = menu.add(new MenuItem("Script Node"));
....@@ -433,150 +434,94 @@
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);
511
-// oe.aConstraints.gridx += 1;
512
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
513
- snapobjectButton.addActionListener(this);
514
- oe.aConstraints.gridx += 1;
515457
516
- //aConstraints.gridx = 0;
517
- //aConstraints.gridy += 1;
518
- oe.aConstraints.weighty = 0;
519
- oe.aConstraints.gridwidth = 1;
520
-
521
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
458
+ if (Globals.ADVANCED)
459
+ {
460
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
461
+ snapobjectButton.addActionListener(this);
462
+ snapobjectButton.setToolTipText("Snap Object");
463
+ }
464
+
465
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
466
+ flashSelectionButton.setToolTipText("Show selection");
522467 flashSelectionButton.addActionListener(this);
523
- oe.aConstraints.gridx += 1;
524
- oe.aConstraints.weighty = 0;
525
- oe.aConstraints.gridwidth = 1;
526468
527
- //
528
- oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints);
469
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
470
+
471
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
472
+ twoButton.setToolTipText("Show center view only");
529473 twoButton.addActionListener(this);
530
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
474
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
531475 fourButton.addActionListener(this);
532
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
476
+ fourButton.setToolTipText("Show left panel only");
477
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
478
+ sixButton.setToolTipText("2-column layout left");
533479 sixButton.addActionListener(this);
534
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
480
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
481
+ threeButton.setToolTipText("2-column layout right");
535482 threeButton.addActionListener(this);
536
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
483
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
484
+ sevenButton.setToolTipText("3-column layout");
537485 sevenButton.addActionListener(this);
538486 //
539487
540
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
488
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
489
+ rootButton.setToolTipText("Edit selection in new tab");
541490 rootButton.addActionListener(this);
542
- oe.aConstraints.gridx += 1;
543
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
491
+
492
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
493
+ closeButton.setToolTipText("Close tab");
544494 closeButton.addActionListener(this);
545495 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
546496 //clearButton.addActionListener(this);
547
- oe.aConstraints.gridx += 1;
548497
549
- oe.aConstraints.gridx = 1; //
550
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
498
+ cGridBag commandsPanel = new cGridBag();
499
+
500
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
501
+ editButton.setToolTipText("Edit selection");
551502 editButton.addActionListener(this);
552
- oe.aConstraints.gridx += 1;
553
- oe.aConstraints.weighty = 0;
554
- oe.aConstraints.gridwidth = 1;
555503
556
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
504
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
505
+ uneditButton.setToolTipText("Unedit selection");
557506 uneditButton.addActionListener(this);
558507
559
- oe.aConstraints.gridx += 1;
560
- oe.aConstraints.weighty = 0;
561
- oe.aConstraints.gridwidth = 1;
562
-
563
- oe.treePanel.add(clearPanelButton = new cButton("C"), oe.aConstraints);
508
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
509
+ clearPanelButton.setToolTipText("Clear edit panel");
564510 clearPanelButton.addActionListener(this);
565511
566
- oe.aConstraints.gridx += 1;
567
- oe.aConstraints.weighty = 0;
568
- oe.aConstraints.gridwidth = 1;
569
-
570
- oe.treePanel.add(allParamsButton = new cButton("A"), oe.aConstraints);
512
+ commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
513
+ allParamsButton.setToolTipText("All params??");
571514 allParamsButton.addActionListener(this);
572515
573
- oe.aConstraints.gridx += 1;
574
- oe.aConstraints.weighty = 0;
575
- oe.aConstraints.gridwidth = 1;
576
-
577
- oe.treePanel.add(unselectButton = new cButton("U"), oe.aConstraints);
516
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
517
+ unselectButton.setToolTipText("Unselect");
578518 unselectButton.addActionListener(this);
579519
520
+ commandsPanel.preferredHeight = 1;
521
+
522
+ oe.treePanel.add(commandsPanel);
523
+ oe.treePanel.Return();
524
+
580525 // oe.aConstraints.gridx += 1;
581526 // oe.aConstraints.weighty = 0;
582527 // oe.aConstraints.gridwidth = 1;
....@@ -588,40 +533,37 @@
588533 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
589534 // gcButton.addActionListener(this);
590535
591
- oe.aConstraints.gridx = 0;
592
- oe.aConstraints.gridy += 1;
593
-
594
- //ctrlPanel.add(objList = new List(5, true));
595
- oe.aConstraints.gridwidth = 100;
596
- // oe.aConstraints.gridheight = 100;
597
- oe.aConstraints.fill = GridBagConstraints.BOTH; // HORIZONTAL;
598
- oe.aConstraints.gridheight = 1;
599
- oe.aConstraints.weighty = 0.5;
600
- oe.aConstraints.gridx = 0;
601
- JScrollPane jSP;
536
+ cGridBag jSPPanel = new cGridBag();
537
+
538
+ JScrollPane jSP;
602539 //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints);
603
- oe.treePanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null)), oe.aConstraints);
540
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
604541 ResetModel();
605
- oe.aConstraints.weighty = 0.5;
606
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
607
- oe.aConstraints.gridy += 1;
608
- oe.aConstraints.gridwidth = 1;
542
+
543
+ oe.treePanel.add(jSPPanel);
544
+ oe.treePanel.Return();
609545
610
- oe.aConstraints.weighty = 0;
611
- oe.aConstraints.gridwidth = 2;
612
-
613
- oe.treePanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0), oe.aConstraints);
546
+ cGridBag copyOptionsPanel = new cGridBag();
547
+
548
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
549
+ colorCB.setToolTipText("Copy color when dropped");
614550 colorCB.addItemListener(this);
615
- oe.aConstraints.gridx += 2;
616
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
551
+
552
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
553
+ materialCB.setToolTipText("Copy material when dropped");
617554 materialCB.addItemListener(this);
618
- oe.aConstraints.gridx += 2;
619
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
555
+
556
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
557
+ textureCB.setToolTipText("Copy texture when dropped");
620558 textureCB.addItemListener(this);
621559
622
- oe.aConstraints.gridx = 0;
623
- oe.aConstraints.gridy += 1;
560
+ copyOptionsPanel.preferredHeight = 1;
561
+ oe.treePanel.add(copyOptionsPanel);
562
+ oe.treePanel.Return();
624563
564
+// mainPanel.setDividerLocation(0.5); //1.0);
565
+// mainPanel.setResizeWeight(0.5);
566
+
625567 //jList.addListSelectionListener(this);
626568 oe.jTree.addTreeSelectionListener(this);
627569 //jTree.setRootVisible(false);
....@@ -643,17 +585,85 @@
643585 radio.layout = sevenButton;
644586 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
645587 }
588
+
589
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
590
+ {
591
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
592
+ supportCB.setToolTipText("Enabled rigging");
593
+ supportCB.addItemListener(this);
594
+
595
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
596
+ // localCB.addItemListener(this);
597
+
598
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
599
+ crowdCB.setToolTipText("Used for crowds");
600
+ crowdCB.addItemListener(this);
601
+
602
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
603
+ smoothCB.setToolTipText("Snapping delay");
604
+ smoothCB.addItemListener(this);
605
+
606
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
607
+ slowCB.setToolTipText("Smooth interpolation");
608
+ slowCB.addItemListener(this);
609
+
610
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
611
+ boxCB.setToolTipText("Display bounding boxes");
612
+ boxCB.addItemListener(this);
613
+
614
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
615
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
616
+ zoomBoxCB.addItemListener(this);
617
+
618
+// constraints.gridy += 1;
619
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
620
+// speakerMocapCB.addItemListener(this);
621
+
622
+ if (false)
623
+ {
624
+ // handled in scripts
625
+ //constraints.gridy += 1;
626
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
627
+ speakerCameraCB.addItemListener(this);
628
+
629
+ //constraints.gridy += 1;
630
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
631
+ speakerFocusCB.addItemListener(this);
632
+
633
+ //constraints.gridy += 1;
634
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
635
+ smoothfocusCB.addItemListener(this);
636
+ }
637
+
638
+//constraints.gridx += 1;
639
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
640
+// debugCB.addItemListener(this);
641
+
642
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
643
+ oeilCB.addItemListener(this);
644
+
645
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
646
+ lookAtCB.setToolTipText("Look-at target");
647
+ lookAtCB.addItemListener(this);
648
+
649
+ cGridBag fill = new cGridBag();
650
+
651
+ fill.preferredHeight = 200;
652
+
653
+ panel.add(fill);
654
+
655
+ }
646656
647657 void EditObject(Object3D obj)
648658 {
649
- cRadio dummyButton = new cRadio(obj.name);
650
- dummyButton.SetObject(obj);
651
- dummyButton.layout = sevenButton;
652
- dummyButton.SetCamera(cameraView.renderCamera, false);
653
- dummyButton.addActionListener(this);
654
- radioPanel.add(dummyButton);
655
- buttonGroup.add(dummyButton);
656
- dummyButton.doClick();
659
+ cRadio radioButton = new cRadio(obj.name);
660
+ radioButton.SetObject(obj);
661
+ radioButton.layout = sevenButton;
662
+ radioButton.SetCamera(cameraView.renderCamera, false);
663
+ radioButton.addActionListener(this);
664
+ radioPanel.add(radioButton);
665
+ buttonGroup.add(radioButton);
666
+ radioButton.doClick();
657667 }
658668 void SetupViews(ObjEditor oe)
659669 {
....@@ -673,6 +683,7 @@
673683 JCheckBox fastCB;
674684 JCheckBox slowCB;
675685 JCheckBox boxCB;
686
+ JCheckBox zoomBoxCB;
676687 JCheckBox trackCB;
677688 JCheckBox smoothfocusCB;
678689 // JCheckBox speakerMocapCB;
....@@ -715,8 +726,7 @@
715726 dropAttributes |= Object3D.TEXTURE;
716727 else
717728 dropAttributes &= ~Object3D.TEXTURE;
718
- }
719
- else if(e.getSource() == liveCB)
729
+ } else if(e.getSource() == liveCB)
720730 {
721731 cameraView.ToggleLive();
722732 }
....@@ -753,6 +763,10 @@
753763 Recompile();
754764 cameraView.repaint();
755765 // refreshContents();
766
+ }
767
+ else if(e.getSource() == zoomBoxCB)
768
+ {
769
+ cameraView.ToggleZoomBoxMode();
756770 }
757771 else if(e.getSource() == smoothfocusCB)
758772 {
....@@ -1085,7 +1099,7 @@
10851099 {
10861100 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10871101 animationItem.addItemListener(this);
1088
- animationItem.setState(CameraPane.ANIMATION);
1102
+ animationItem.setState(Globals.ANIMATION);
10891103
10901104 menu.add("-");
10911105 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
....@@ -1118,6 +1132,8 @@
11181132 resetParentItem.addActionListener(this);
11191133 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11201134 repairParentItem.addActionListener(this);
1135
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1136
+ repairShadowItem.addActionListener(this);
11211137 menu.add(invariantsItem = new MenuItem("Invariants"));
11221138 invariantsItem.addActionListener(this);
11231139 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1478,6 +1494,7 @@
14781494 //
14791495 public void actionPerformed(ActionEvent event) // , Object arg)
14801496 {
1497
+ Object source = event.getSource();
14811498 /*
14821499 if (event.getSource() == nameField)
14831500 {
....@@ -1489,11 +1506,11 @@
14891506 }
14901507 else
14911508 */
1492
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1509
+ if (source == lookAtItem || source == lookFromItem)
14931510 {
14941511 ScreenFit();
14951512 } else
1496
- if (event.getSource() == switchItem)
1513
+ if (source == switchItem)
14971514 {
14981515 cVector v1 = new cVector();
14991516 cVector v2 = new cVector();
....@@ -1502,11 +1519,11 @@
15021519 objEditor.cameraView.renderCamera.setAim(v2, v1);
15031520 objEditor.cameraView.repaint();
15041521 } else
1505
- if (event.getSource() == rectoidItem)
1522
+ if (source == rectoidItem)
15061523 {
15071524 makeSomething(new Box());
15081525 } else
1509
- if (event.getSource() == particleItem)
1526
+ if (source == particleItem)
15101527 {
15111528 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15121529 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1527,9 +1544,9 @@
15271544 applyExample(particleGeom, "SMOKE");
15281545 makeSomething(particleGeom);
15291546 } else
1530
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1547
+ if (source == ragdollItem || source == ragdoll2Item)
15311548 {
1532
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1549
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15331550
15341551 ragdoll.toParent = LA.newMatrix();
15351552 ragdoll.fromParent = LA.newMatrix();
....@@ -1547,7 +1564,7 @@
15471564 } else
15481565 /*
15491566 */
1550
- if (event.getSource() == heightFieldItem)
1567
+ if (source == heightFieldItem)
15511568 {
15521569 Object3D obj = new Object3D();
15531570
....@@ -1585,31 +1602,31 @@
15851602
15861603 makeSomething(obj);
15871604 } else
1588
- if (event.getSource() == gridItem)
1605
+ if (source == gridItem)
15891606 {
15901607 makeSomething(new Grid());
15911608 } else
1592
- if (event.getSource() == ellipsoidItem)
1609
+ if (source == ellipsoidItem)
15931610 {
15941611 makeSomething(new Sphere());
15951612 } else
1596
- if (event.getSource() == coneItem)
1613
+ if (source == coneItem)
15971614 {
15981615 makeSomething(new Cone());
15991616 } else
1600
- if (event.getSource() == torusItem)
1617
+ if (source == torusItem)
16011618 {
16021619 makeSomething(new Torus());
16031620 } else
1604
- if (event.getSource() == superItem)
1621
+ if (source == superItem)
16051622 {
16061623 makeSomething(new Superellipsoid());
16071624 } else
1608
- if (event.getSource() == kleinItem)
1625
+ if (source == kleinItem)
16091626 {
16101627 makeSomething(new Klein());
16111628 } else
1612
- if (event.getSource() == blobItem)
1629
+ if (source == blobItem)
16131630 {
16141631 Blob blob = new Blob();
16151632 BlobComponent comp = new BlobComponent();
....@@ -1617,15 +1634,15 @@
16171634 //blob.retile();
16181635 makeSomething(blob);
16191636 } else
1620
- if (event.getSource() == latheItem)
1637
+ if (source == latheItem)
16211638 {
16221639 makeSomething(new Lathe());
16231640 } else
1624
- if (event.getSource() == bezierItem)
1641
+ if (source == bezierItem)
16251642 {
16261643 makeSomething(new BezierSurface());
16271644 } else
1628
- if (event.getSource() == checkerItem)
1645
+ if (source == checkerItem)
16291646 {
16301647 /*
16311648 Object3D obj = new BezierSurface(5,8);
....@@ -1640,7 +1657,7 @@
16401657 */
16411658 makeSomething(new Checker());
16421659 } else
1643
- if (event.getSource() == meshItem)
1660
+ if (source == meshItem)
16441661 {
16451662 Object3D itemtomake = new Object3D();
16461663 Object3D child;
....@@ -1661,35 +1678,35 @@
16611678 makeSomething(child);
16621679 }
16631680 } else
1664
- if (event.getSource() == springItem)
1681
+ if (source == springItem)
16651682 {
16661683 cSpring s = new cSpring();
16671684 s.setup();
16681685 makeSomething(s);
16691686 } else
1670
- if (event.getSource() == flagItem)
1687
+ if (source == flagItem)
16711688 {
16721689 cSpring s = new cFlag();
16731690 s.setup();
16741691 makeSomething(s);
16751692 } else
1676
- if (event.getSource() == lightItem)
1693
+ if (source == lightItem)
16771694 {
16781695 makeSomething(new Light());
16791696 } else
1680
- if (event.getSource() == csgItem)
1697
+ if (source == csgItem)
16811698 {
16821699 group(new CSG());
16831700 } else
1684
- if (event.getSource() == templateItem)
1701
+ if (source == templateItem)
16851702 {
16861703 group(new cTemplate());
16871704 } else
1688
- if (event.getSource() == attributeItem)
1705
+ if (source == attributeItem)
16891706 {
16901707 makeSomething(new Attribute());
16911708 } else
1692
- if (event.getSource() == pointflowItem)
1709
+ if (source == pointflowItem)
16931710 {
16941711 makeSomething(new PointFlow());
16951712 } else
....@@ -1701,7 +1718,7 @@
17011718 } else
17021719 */
17031720
1704
- if (event.getSource() == superLoopItem)
1721
+ if (source == superLoopItem)
17051722 {
17061723 Composite g = new cGroup();
17071724 for (int i=0; i<15; i++)
....@@ -1723,7 +1740,7 @@
17231740
17241741 group(g);
17251742 } else
1726
- if (event.getSource() == loopItem)
1743
+ if (source == loopItem)
17271744 {
17281745 Composite csg = new GroupLeaf();
17291746 csg.count = 5;
....@@ -1732,7 +1749,7 @@
17321749 csg.addChild(child);
17331750 child.addChild(csg);
17341751 } else
1735
- if (event.getSource() == doubleItem)
1752
+ if (source == doubleItem)
17361753 {
17371754 Composite csg = new GroupLeaf();
17381755 csg.count = 5;
....@@ -1744,7 +1761,7 @@
17441761 csg.addChild(child);
17451762 child.addChild(csg);
17461763 } else
1747
- if (event.getSource() == tripleItem)
1764
+ if (source == tripleItem)
17481765 {
17491766 Composite csg = new GroupLeaf();
17501767 csg.count = 4;
....@@ -1760,70 +1777,70 @@
17601777 child.addChild(csg);
17611778 } else
17621779
1763
- if (event.getSource() == importGFDItem)
1780
+ if (source == importGFDItem)
17641781 {
17651782 ImportGFD();
17661783 } else
1767
- if (event.getSource() == importVRMLX3DItem)
1784
+ if (source == importVRMLX3DItem)
17681785 {
17691786 ImportVRMLX3D();
17701787 } else
1771
- if (event.getSource() == import3DSItem)
1788
+ if (source == import3DSItem)
17721789 {
17731790 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17741791 } else
1775
- if (event.getSource() == importOBJItem)
1792
+ if (source == importOBJItem)
17761793 {
17771794 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17781795 } else
1779
- if (event.getSource() == computeAOItem)
1796
+ if (source == computeAOItem)
17801797 {
1781
- CameraPane.drawMode = CameraPane.OCCLUSION;
1782
- CameraPane.theRenderer.repaint();
1798
+ Globals.drawMode = CameraPane.OCCLUSION;
1799
+ Globals.theRenderer.repaint();
17831800 } else
1784
- if (event.getSource() == recompileItem)
1801
+ if (source == recompileItem)
17851802 {
17861803 Recompile();
17871804 refreshContents();
17881805 } else
1789
- if (event.getSource() == editScriptItem)
1806
+ if (source == editScriptItem)
17901807 {
17911808 OpenDialog();
17921809 refreshContents();
17931810 } else
1794
- if (event.getSource() == invariantsItem)
1811
+ if (source == invariantsItem)
17951812 {
17961813 System.out.println("Invariants:");
17971814 GrafreeD.grafreeD.universe.invariants();
17981815 } else
1799
- if (event.getSource() == memoryItem)
1816
+ if (source == memoryItem)
18001817 {
18011818 //System.out.println("Invariants:");
18021819 PrintMemory();
18031820 } else
1804
- if (event.getSource() == pathItem)
1821
+ if (source == pathItem)
18051822 {
18061823 PrintPath();
18071824 } else
1808
- if (event.getSource() == analyzeItem)
1825
+ if (source == analyzeItem)
18091826 {
18101827 AnalyzeObject();
18111828 } else
1812
- if (event.getSource() == dumpItem)
1829
+ if (source == dumpItem)
18131830 {
18141831 DumpObject();
18151832 } else
1816
- if (event.getSource() == screenfitButton)
1833
+ if (source == screenfitButton)
18171834 {
18181835 //Reload(lastConverter, lastFilename, true);
18191836 ScreenFit();
18201837 } else
1821
- if (event.getSource() == screenfitpointButton)
1838
+ if (source == screenfitpointButton)
18221839 {
18231840 //Reload(lastConverter, lastFilename, true);
18241841 ScreenFitPoint();
18251842 } else
1826
- if (event.getSource() == snapobjectButton)
1843
+ if (source == snapobjectButton)
18271844 {
18281845 //Reload(lastConverter, lastFilename, true);
18291846 SnapObject();
....@@ -1834,13 +1851,13 @@
18341851 // Recompile();
18351852 // refreshContents();
18361853 // } else
1837
- if (event.getSource() == gcButton)
1854
+ if (source == gcButton)
18381855 {
18391856 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18401857 System.gc();
18411858 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18421859 } else
1843
- if (event.getSource() == editLeafItem)
1860
+ if (source == editLeafItem)
18441861 {
18451862 Object3D obj;
18461863 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1854,62 +1871,62 @@
18541871 }
18551872 refreshContents(true);
18561873 } else
1857
- if (event.getSource() == openWindowItem)
1874
+ if (source == openWindowItem)
18581875 {
18591876 EditSelection(true);
18601877 } else
1861
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1878
+ if (source == cutItem || source == clearButton)
18621879 {
18631880 loadClipboard(true);
18641881 } else
1865
- if (event.getSource() == duplicateItem)
1882
+ if (source == duplicateItem)
18661883 {
18671884 Object3D keep = GrafreeD.clipboard;
18681885 loadClipboard(false);
18691886 paste(false);
18701887 GrafreeD.clipboard = keep;
18711888 } else
1872
- if (event.getSource() == cloneItem)
1889
+ if (source == cloneItem)
18731890 {
18741891 CloneSelection(false);
18751892 } else
1876
- if (event.getSource() == cloneSupportItem)
1893
+ if (source == cloneSupportItem)
18771894 {
18781895 CloneSelection(true);
18791896 } else
1880
- if (event.getSource() == copyItem)
1897
+ if (source == copyItem)
18811898 {
18821899 loadClipboard(false);
18831900 } else
1884
- if (event.getSource() == pasteItem)
1901
+ if (source == pasteItem)
18851902 {
18861903 paste(false);
18871904 } else
1888
- if (event.getSource() == pasteLinkItem)
1905
+ if (source == pasteLinkItem)
18891906 {
18901907 pasteInto(false);
18911908 } else
1892
- if (event.getSource() == pasteCloneItem)
1909
+ if (source == pasteCloneItem)
18931910 {
18941911 pasteInto(true);
18951912 } else
1896
- if (event.getSource() == pasteExpandItem)
1913
+ if (source == pasteExpandItem)
18971914 {
18981915 paste(true);
18991916 } else
1900
- if (event.getSource() == synchronizeItem)
1917
+ if (source == synchronizeItem)
19011918 {
19021919 Overwrite(Object3D.TRANSFORM);
19031920 } else
1904
- if (event.getSource() == overwriteNameItem)
1921
+ if (source == overwriteNameItem)
19051922 {
19061923 Overwrite(Object3D.NAME);
19071924 } else
1908
- if (event.getSource() == overwriteUVItem)
1925
+ if (source == overwriteUVItem)
19091926 {
19101927 Overwrite(Object3D.UV);
19111928 } else
1912
- if (event.getSource() == overwriteMatItem)
1929
+ if (source == overwriteMatItem)
19131930 {
19141931 /* july 2015
19151932 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1929,7 +1946,7 @@
19291946
19301947 Overwrite(dropAttributes);
19311948 }
1932
- if (event.getSource() == overwriteGeoItem)
1949
+ if (source == overwriteGeoItem)
19331950 {
19341951 Overwrite(Object3D.GEOMETRY);
19351952 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1946,7 +1963,7 @@
19461963 // refreshContents();
19471964 // }
19481965 } else
1949
- if (event.getSource() == generateMeshItem)
1966
+ if (source == generateMeshItem)
19501967 {
19511968 //if (group.selection.size() == 1)
19521969 // for (int i=0; i<group.selection.size(); i++)
....@@ -1957,7 +1974,7 @@
19571974 ResetModel();
19581975 refreshContents();
19591976 } else
1960
- if (event.getSource() == extractGeometriesItem)
1977
+ if (source == extractGeometriesItem)
19611978 {
19621979 boolean one = false;
19631980
....@@ -1984,7 +2001,7 @@
19842001 ResetModel();
19852002 refreshContents();
19862003 } else
1987
- if (event.getSource() == cloneGeometriesItem)
2004
+ if (source == cloneGeometriesItem)
19882005 {
19892006 boolean one = false;
19902007
....@@ -2010,7 +2027,7 @@
20102027 ResetModel();
20112028 refreshContents();
20122029 } else
2013
- if (event.getSource() == shareGeometriesItem)
2030
+ if (source == shareGeometriesItem)
20142031 {
20152032 boolean one = false;
20162033
....@@ -2040,7 +2057,7 @@
20402057 refreshContents();
20412058 }
20422059 } else
2043
- if (event.getSource() == mergeGeometriesItem)
2060
+ if (source == mergeGeometriesItem)
20442061 {
20452062 boolean one = false;
20462063
....@@ -2070,7 +2087,7 @@
20702087 ResetModel();
20712088 refreshContents();
20722089 } else
2073
- if (event.getSource() == linkverticesItem)
2090
+ if (source == linkverticesItem)
20742091 {
20752092 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20762093 // {
....@@ -2090,7 +2107,7 @@
20902107 if (content instanceof cGroup && ((cGroup)content).transientlink )
20912108 content = ((cGroup)content).get(0);
20922109
2093
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2110
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20942111 for (int i=0; i<group.selection.size(); i++)
20952112 {
20962113 boolean random = CameraPane.RANDOM;
....@@ -2099,11 +2116,11 @@
20992116 // group.selection.get(i).setMasterThis(content); // should be identity
21002117 CameraPane.RANDOM = random;
21012118 }
2102
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2119
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21032120 refreshContents();
21042121 }
21052122 } else
2106
- if (event.getSource() == resetsupportItem)
2123
+ if (source == resetsupportItem)
21072124 {
21082125 for (int i=0; i<group.selection.size(); i++)
21092126 {
....@@ -2115,7 +2132,7 @@
21152132
21162133 refreshContents();
21172134 } else
2118
- if (event.getSource() == relinkverticesItem)
2135
+ if (source == relinkverticesItem)
21192136 {
21202137 boolean random = CameraPane.RANDOM;
21212138 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2124,7 +2141,7 @@
21242141
21252142 refreshContents();
21262143 } else
2127
- if (event.getSource() == resetreferencesItem)
2144
+ if (source == resetreferencesItem)
21282145 {
21292146 for (int i=0; i<group.selection.size(); i++)
21302147 {
....@@ -2133,7 +2150,7 @@
21332150
21342151 refreshContents();
21352152 } else
2136
- if (event.getSource() == setMasterItem)
2153
+ if (source == setMasterItem)
21372154 {
21382155 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21392156 {
....@@ -2146,7 +2163,7 @@
21462163 refreshContents();
21472164 }
21482165 } else
2149
- if (event.getSource() == poseMeshItem)
2166
+ if (source == poseMeshItem)
21502167 {
21512168 if (group.selection.size() == 1)
21522169 {
....@@ -2165,19 +2182,19 @@
21652182 }
21662183
21672184 } else
2168
- if (event.getSource() == revertMeshItem)
2185
+ if (source == revertMeshItem)
21692186 {
21702187 RevertMeshes();
21712188 } else
2172
- if (event.getSource() == resetMeshItem)
2189
+ if (source == resetMeshItem)
21732190 {
21742191 ResetAll();
21752192 } else
2176
- if (event.getSource() == stepAllItem)
2193
+ if (source == stepAllItem)
21772194 {
21782195 StepAll();
21792196 } else
2180
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2197
+ if (source == clearItem) // || event.getSource() == clearButton)
21812198 {
21822199 //int indices[] = jList.getSelectedIndices();
21832200 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2185,46 +2202,46 @@
21852202
21862203 ClearSelection(false);
21872204 } else
2188
- if (event.getSource() == clearAllItem)
2205
+ if (source == clearAllItem)
21892206 {
21902207 ClearSelection(true);
21912208 } else
2192
- if (event.getSource() == grabItem)
2209
+ if (source == grabItem)
21932210 {
21942211 group(new cGroup(), true);
21952212 } else
2196
- if (event.getSource() == hideItem)
2213
+ if (source == hideItem)
21972214 {
21982215 group(new HiddenObject());
21992216 } else
2200
- if (event.getSource() == frontItem)
2217
+ if (source == frontItem)
22012218 {
22022219 front();
22032220 } else
2204
- if (event.getSource() == backItem)
2221
+ if (source == backItem)
22052222 {
22062223 back();
22072224 } else
2208
- if (event.getSource() == cameraItem)
2225
+ if (source == cameraItem)
22092226 {
22102227 makeSomething(new Camera());
22112228 } else
2212
- if (event.getSource() == compositeItem)
2229
+ if (source == compositeItem)
22132230 {
22142231 group(new Composite());
22152232 } else
2216
- if (event.getSource() == randomItem)
2233
+ if (source == randomItem)
22172234 {
22182235 RandomNode random = new RandomNode();
22192236 group(random);
22202237 if (random.size() > 0)
2221
- random.name = random.get(0).name + "Rnd";
2238
+ random.name = random.get(0).name + "Switch";
22222239 } else
2223
- if (event.getSource() == physicsItem)
2240
+ if (source == physicsItem)
22242241 {
22252242 group(new PhysicsNode());
22262243 } else
2227
- if (event.getSource() == frameselectorItem)
2244
+ if (source == frameselectorItem)
22282245 {
22292246 for (int i=0; i<group.selection.size(); i++)
22302247 {
....@@ -2236,7 +2253,7 @@
22362253 ResetModel();
22372254 refreshContents();
22382255 } else
2239
- if (event.getSource() == switchGeoItem)
2256
+ if (source == switchGeoItem)
22402257 {
22412258 for (int i=0; i<group.selection.size(); i++)
22422259 {
....@@ -2248,7 +2265,7 @@
22482265 ResetModel();
22492266 refreshContents();
22502267 } else
2251
- if (event.getSource() == switchTransfoItem)
2268
+ if (source == switchTransfoItem)
22522269 {
22532270 for (int i=0; i<group.selection.size(); i++)
22542271 {
....@@ -2260,7 +2277,7 @@
22602277 ResetModel();
22612278 refreshContents();
22622279 } else
2263
- if (event.getSource() == morphItem)
2280
+ if (source == morphItem)
22642281 {
22652282 for (int i=0; i<group.selection.size(); i++)
22662283 {
....@@ -2272,7 +2289,7 @@
22722289 ResetModel();
22732290 refreshContents();
22742291 } else
2275
- if (event.getSource() == scriptNodeItem)
2292
+ if (source == scriptNodeItem)
22762293 {
22772294 boolean atleastone = false;
22782295
....@@ -2311,31 +2328,31 @@
23112328 }
23122329 }
23132330 } else
2314
- if (event.getSource() == linkerItem)
2331
+ if (source == linkerItem)
23152332 {
23162333 group(new cLinker());
23172334 } else
2318
- if (event.getSource() == textureItem)
2335
+ if (source == textureItem)
23192336 {
23202337 group(new TextureNode());
23212338 } else
2322
- if (event.getSource() == billboardItem)
2339
+ if (source == billboardItem)
23232340 {
23242341 group(new BillboardNode());
23252342 } else
2326
- if (event.getSource() == shadowXItem)
2343
+ if (source == shadowXItem)
23272344 {
23282345 CastShadow(0);
23292346 } else
2330
- if (event.getSource() == shadowYItem)
2347
+ if (source == shadowYItem)
23312348 {
23322349 CastShadow(1);
23332350 } else
2334
- if (event.getSource() == shadowZItem)
2351
+ if (source == shadowZItem)
23352352 {
23362353 CastShadow(2);
23372354 } else
2338
- if (event.getSource() == ungroupItem)
2355
+ if (source == ungroupItem)
23392356 {
23402357 //ungroup();
23412358 for (int i=0; i<group.selection.size(); i++)
....@@ -2347,179 +2364,179 @@
23472364
23482365 refreshContents();
23492366 } else
2350
- if (event.getSource() == genUVItem)
2367
+ if (source == genUVItem)
23512368 {
23522369 GenUV();
23532370 } else
2354
- if (event.getSource() == genNormalsCADItem)
2371
+ if (source == genNormalsCADItem)
23552372 {
23562373 GenNormals(true);
23572374 } else
2358
- if (event.getSource() == genNormalsMESHItem)
2375
+ if (source == genNormalsMESHItem)
23592376 {
23602377 GenNormals(true); // TODO
23612378 } else
2362
- if (event.getSource() == genNormalsORGANItem)
2379
+ if (source == genNormalsORGANItem)
23632380 {
23642381 GenNormals(false);
23652382 } else
2366
- if (event.getSource() == genNormalsMINEItem)
2383
+ if (source == genNormalsMINEItem)
23672384 {
23682385 GenNormalsMINE();
23692386 } else
2370
- if (event.getSource() == stripifyItem)
2387
+ if (source == stripifyItem)
23712388 {
23722389 Stripify();
23732390 } else
2374
- if (event.getSource() == unstripifyItem)
2391
+ if (source == unstripifyItem)
23752392 {
23762393 Unstripify();
23772394 } else
2378
- if (event.getSource() == trimItem)
2395
+ if (source == trimItem)
23792396 {
23802397 Trim();
23812398 } else
2382
- if (event.getSource() == untrimItem)
2399
+ if (source == untrimItem)
23832400 {
23842401 Untrim();
23852402 } else
2386
- if (event.getSource() == clearColorsItem)
2403
+ if (source == clearColorsItem)
23872404 {
23882405 ClearColors();
23892406 } else
2390
- if (event.getSource() == clearMaterialsItem)
2407
+ if (source == clearMaterialsItem)
23912408 {
23922409 ClearMaterials();
23932410 } else
2394
- if (event.getSource() == liveleavesItem)
2411
+ if (source == liveleavesItem)
23952412 {
23962413 LiveLeaves(true);
23972414 } else
2398
- if (event.getSource() == unliveleavesItem)
2415
+ if (source == unliveleavesItem)
23992416 {
24002417 LiveLeaves(false);
24012418 } else
2402
- if (event.getSource() == supportleavesItem)
2419
+ if (source == supportleavesItem)
24032420 {
24042421 SupportLeaves(true);
24052422 } else
2406
- if (event.getSource() == unsupportleavesItem)
2423
+ if (source == unsupportleavesItem)
24072424 {
24082425 SupportLeaves(false);
24092426 } else
2410
- if (event.getSource() == hideleavesItem)
2427
+ if (source == hideleavesItem)
24112428 {
24122429 HideLeaves(true);
24132430 } else
2414
- if (event.getSource() == showleavesItem)
2431
+ if (source == showleavesItem)
24152432 {
24162433 HideLeaves(false);
24172434 } else
2418
- if (event.getSource() == markleavesItem)
2435
+ if (source == markleavesItem)
24192436 {
24202437 MarkLeaves(true);
24212438 } else
2422
- if (event.getSource() == unmarkleavesItem)
2439
+ if (source == unmarkleavesItem)
24232440 {
24242441 MarkLeaves(false);
24252442 } else
2426
- if (event.getSource() == flipVItem)
2443
+ if (source == flipVItem)
24272444 {
24282445 FlipV(true);
24292446 } else
2430
- if (event.getSource() == unflipVItem)
2447
+ if (source == unflipVItem)
24312448 {
24322449 FlipV(false);
24332450 } else
2434
- if (event.getSource() == lowTexturesItem)
2451
+ if (source == lowTexturesItem)
24352452 {
24362453 SetTexRes(0);
24372454 } else
2438
- if (event.getSource() == normalTexturesItem)
2455
+ if (source == normalTexturesItem)
24392456 {
24402457 SetTexRes(1);
24412458 } else
2442
- if (event.getSource() == highTexturesItem)
2459
+ if (source == highTexturesItem)
24432460 {
24442461 SetTexRes(2);
24452462 } else
2446
- if (event.getSource() == veryhighTexturesItem)
2463
+ if (source == veryhighTexturesItem)
24472464 {
24482465 SetTexRes(3);
24492466 } else
2450
- if (event.getSource() == maxTexturesItem)
2467
+ if (source == maxTexturesItem)
24512468 {
24522469 SetTexRes(4);
24532470 } else
2454
- if (event.getSource() == panoTexturesItem)
2471
+ if (source == panoTexturesItem)
24552472 {
24562473 SetTexRes(5);
24572474 } else
2458
- if (event.getSource() == reverseNormalsItem)
2475
+ if (source == reverseNormalsItem)
24592476 {
24602477 ReverseNormals();
24612478 } else
2462
- if (event.getSource() == parseverticesItem)
2479
+ if (source == parseverticesItem)
24632480 {
24642481 ParseVertices();
24652482 } else
2466
- if (event.getSource() == textureFieldItem)
2483
+ if (source == textureFieldItem)
24672484 {
24682485 TextureVertices();
24692486 } else
2470
- if (event.getSource() == alignItem)
2487
+ if (source == alignItem)
24712488 {
24722489 Align();
24732490 } else
2474
- if (event.getSource() == mirrorItem)
2491
+ if (source == mirrorItem)
24752492 {
24762493 MirrorPoses();
24772494 } else
2478
- if (event.getSource() == reduceMorphItem)
2495
+ if (source == reduceMorphItem)
24792496 {
24802497 MeshReduction(false);
24812498 } else
2482
- if (event.getSource() == reduce34MorphItem)
2499
+ if (source == reduce34MorphItem)
24832500 {
24842501 MeshReduction(true);
24852502 } else
2486
- if (event.getSource() == reverseTrianglesItem)
2503
+ if (source == reverseTrianglesItem)
24872504 {
24882505 ReverseTriangles();
24892506 } else
2490
- if (event.getSource() == reduceMeshItem)
2507
+ if (source == reduceMeshItem)
24912508 {
24922509 ReduceMesh(false);
24932510 } else
2494
- if (event.getSource() == reduce34MeshItem)
2511
+ if (source == reduce34MeshItem)
24952512 {
24962513 ReduceMesh(true);
24972514 } else
2498
- if (event.getSource() == increaseMeshItem)
2515
+ if (source == increaseMeshItem)
24992516 {
25002517 IncreaseMesh();
25012518 } else
2502
- if (event.getSource() == clipMeshItem)
2519
+ if (source == clipMeshItem)
25032520 {
25042521 ClipMesh();
25052522 } else
2506
- if (event.getSource() == smoothMeshItem)
2523
+ if (source == smoothMeshItem)
25072524 {
25082525 SmoothMesh();
25092526 } else
2510
- if (event.getSource() == transformgeometryItem)
2527
+ if (source == transformgeometryItem)
25112528 {
25122529 TransformGeometry();
25132530 } else
2514
- if (event.getSource() == resetTransformItem)
2531
+ if (source == resetTransformItem)
25152532 {
25162533 ResetTransform();
25172534 } else
2518
- if (event.getSource() == resetCentroidItem)
2535
+ if (source == resetCentroidItem)
25192536 {
25202537 ResetCentroid();
25212538 } else
2522
- if (event.getSource() == resetParentItem)
2539
+ if (source == resetParentItem)
25232540 {
25242541 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25252542 {
....@@ -2529,7 +2546,7 @@
25292546
25302547 refreshContents();
25312548 } else
2532
- if (event.getSource() == repairParentItem)
2549
+ if (source == repairParentItem)
25332550 {
25342551 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25352552 {
....@@ -2543,7 +2560,21 @@
25432560
25442561 refreshContents();
25452562 } else
2546
- if (event.getSource() == sortbysizeItem)
2563
+ if (source == repairShadowItem)
2564
+ {
2565
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2566
+ {
2567
+ Object3D obj = (Object3D)e.nextElement();
2568
+ obj.RepairShadow();
2569
+// for (int i=0; i<obj.size(); i++)
2570
+// {
2571
+// obj.get(i).parent = obj;
2572
+// }
2573
+ }
2574
+
2575
+ refreshContents();
2576
+ } else
2577
+ if (source == sortbysizeItem)
25472578 {
25482579 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25492580 {
....@@ -2555,7 +2586,7 @@
25552586 ResetModel();
25562587 refreshContents();
25572588 } else
2558
- if (event.getSource() == sortbynameItem)
2589
+ if (source == sortbynameItem)
25592590 {
25602591 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25612592 {
....@@ -2567,7 +2598,7 @@
25672598 ResetModel();
25682599 refreshContents();
25692600 } else
2570
- if (event.getSource() == attachPigmentItem)
2601
+ if (source == attachPigmentItem)
25712602 {
25722603 String texture = GetFile("Attach pigment");
25732604 Object3D obj;
....@@ -2579,7 +2610,7 @@
25792610
25802611 refreshContents();
25812612 } else
2582
- if (event.getSource() == detachPigmentItem)
2613
+ if (source == detachPigmentItem)
25832614 {
25842615 Object3D obj;
25852616 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2590,7 +2621,7 @@
25902621
25912622 refreshContents();
25922623 } else
2593
- if (event.getSource() == attachBumpItem)
2624
+ if (source == attachBumpItem)
25942625 {
25952626 String texture = GetFile("Attach bump");
25962627 Object3D obj;
....@@ -2602,7 +2633,7 @@
26022633
26032634 refreshContents();
26042635 } else
2605
- if (event.getSource() == detachBumpItem)
2636
+ if (source == detachBumpItem)
26062637 {
26072638 Object3D obj;
26082639 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2613,7 +2644,7 @@
26132644
26142645 refreshContents();
26152646 } else
2616
- if (event.getSource() == pigmentBumpItem)
2647
+ if (source == pigmentBumpItem)
26172648 {
26182649 Object3D obj;
26192650 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2624,158 +2655,195 @@
26242655
26252656 refreshContents();
26262657 } else
2627
- if (event.getSource() == flashSelectionButton)
2658
+ if (source == flashSelectionButton)
26282659 {
26292660 CameraPane.flash = true;
26302661 refreshContents();
26312662 } else
2632
- if (event.getSource() == oneButton)
2663
+ if (source == oneButton)
26332664 {
26342665 } else
2635
- if (event.getSource() == twoButton)
2666
+ if (source == twoButton)
26362667 {
26372668 radio.layout = twoButton;
26382669 // bug
26392670 //gridPanel.setDividerLocation(1.0);
26402671 //bigPanel.setDividerLocation(0.0);
2641
- bigThree.remove(scenePanel);
2642
- bigThree.remove(cameraPanel);
2643
- bigThree.remove(XYZPanel);
2644
- aWindowConstraints.gridx = 0;
2645
- aWindowConstraints.gridy = 0;
2646
- aWindowConstraints.gridwidth = 1;
2647
- // aConstraints.gridheight = 3;
2648
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2649
- aWindowConstraints.weightx = 0;
2650
- aWindowConstraints.weighty = 1;
2651
- //bigThree.add(jtp, aWindowConstraints);
2652
- aWindowConstraints.weightx = 1;
2653
- aWindowConstraints.gridwidth = 3;
2654
- // aConstraints.gridheight = 3;
2655
- aWindowConstraints.gridx = 1;
2656
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2657
- bigThree.add(cameraPanel, aWindowConstraints);
2658
- aWindowConstraints.weightx = 0;
2659
- aWindowConstraints.gridx = 4;
2660
- aWindowConstraints.gridwidth = 1;
2661
- // aConstraints.gridheight = 3;
2662
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2663
- //bigThree.add(XYZPanel, aWindowConstraints);
2664
- bigThree.revalidate();
2672
+// bigThree.remove(scenePanel);
2673
+// bigThree.remove(centralPanel);
2674
+// bigThree.remove(XYZPanel);
2675
+// aWindowConstraints.gridx = 0;
2676
+// aWindowConstraints.gridy = 0;
2677
+// aWindowConstraints.gridwidth = 1;
2678
+// // aConstraints.gridheight = 3;
2679
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2680
+// aWindowConstraints.weightx = 0;
2681
+// aWindowConstraints.weighty = 1;
2682
+// //bigThree.add(jtp, aWindowConstraints);
2683
+// aWindowConstraints.weightx = 1;
2684
+// aWindowConstraints.gridwidth = 3;
2685
+// // aConstraints.gridheight = 3;
2686
+// aWindowConstraints.gridx = 1;
2687
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2688
+// bigThree.add(centralPanel, aWindowConstraints);
2689
+// aWindowConstraints.weightx = 0;
2690
+// aWindowConstraints.gridx = 4;
2691
+// aWindowConstraints.gridwidth = 1;
2692
+// // aConstraints.gridheight = 3;
2693
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2694
+// //bigThree.add(XYZPanel, aWindowConstraints);
2695
+// scenePanel.setVisible(false);
2696
+// centralPanel.setVisible(true);
2697
+// XYZPanel.setVisible(false);
2698
+ bigThree.ClearUI();
2699
+ bigThree.add(centralPanel);
2700
+ bigThree.FlushUI();
26652701 } else
2666
- if (event.getSource() == threeButton)
2702
+ if (source == threeButton)
26672703 {
26682704 radio.layout = threeButton;
2669
- bigThree.remove(scenePanel);
2670
- bigThree.remove(cameraPanel);
2671
- bigThree.remove(XYZPanel);
2672
- aWindowConstraints.gridx = 0;
2673
- aWindowConstraints.gridy = 0;
2674
- aWindowConstraints.gridwidth = 1;
2675
- // aConstraints.gridheight = 3;
2676
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2677
- aWindowConstraints.weightx = 0;
2678
- aWindowConstraints.weighty = 1;
2679
- //bigThree.add(jtp, aWindowConstraints);
2680
- aWindowConstraints.weightx = 1;
2681
- aWindowConstraints.gridwidth = 3;
2682
- // aConstraints.gridheight = 3;
2683
- aWindowConstraints.gridx = 1;
2684
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2685
- bigThree.add(cameraPanel, aWindowConstraints);
2686
- aWindowConstraints.weightx = 0;
2687
- aWindowConstraints.gridx = 4;
2688
- aWindowConstraints.gridwidth = 1;
2689
- // aConstraints.gridheight = 3;
2690
- aConstraints.fill = GridBagConstraints.VERTICAL;
2691
- bigThree.add(XYZPanel, aWindowConstraints);
2692
- bigThree.revalidate();
2705
+
2706
+// bigThree.remove(scenePanel);
2707
+// bigThree.remove(centralPanel);
2708
+// bigThree.remove(XYZPanel);
2709
+// aWindowConstraints.gridx = 0;
2710
+// aWindowConstraints.gridy = 0;
2711
+// aWindowConstraints.gridwidth = 1;
2712
+// // aConstraints.gridheight = 3;
2713
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2714
+// aWindowConstraints.weightx = 0;
2715
+// aWindowConstraints.weighty = 1;
2716
+// //bigThree.add(jtp, aWindowConstraints);
2717
+// aWindowConstraints.weightx = 1;
2718
+// aWindowConstraints.gridwidth = 3;
2719
+// // aConstraints.gridheight = 3;
2720
+// aWindowConstraints.gridx = 1;
2721
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2722
+// bigThree.add(centralPanel, aWindowConstraints);
2723
+// aWindowConstraints.weightx = 0;
2724
+// aWindowConstraints.gridx = 4;
2725
+// aWindowConstraints.gridwidth = 1;
2726
+// // aConstraints.gridheight = 3;
2727
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2728
+// bigThree.add(XYZPanel, aWindowConstraints);
2729
+// bigThree.validate();
2730
+// scenePanel.setVisible(false);
2731
+// centralPanel.setVisible(true);
2732
+// XYZPanel.setVisible(true);
2733
+ bigThree.ClearUI();
2734
+ bigThree.add(centralPanel);
2735
+ bigThree.add(XYZPanel);
2736
+ bigThree.FlushUI();
26932737 } else
2694
- if (event.getSource() == fourButton)
2738
+ if (source == fourButton)
26952739 {
26962740 radio.layout = fourButton;
2697
- bigThree.remove(scenePanel);
2698
- bigThree.remove(cameraPanel);
2699
- bigThree.remove(XYZPanel);
2700
- aWindowConstraints.gridx = 0;
2701
- aWindowConstraints.gridy = 0;
2702
- aWindowConstraints.gridwidth = 1;
2703
- // aWindowConstraints.gridheight = 3;
2704
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2705
- aWindowConstraints.weightx = 1;
2706
- aWindowConstraints.weighty = 1;
2707
- bigThree.add(scenePanel, aWindowConstraints);
2708
- aWindowConstraints.weightx = 1;
2709
- aWindowConstraints.gridwidth = 3;
2710
- // aConstraints.gridheight = 3;
2711
- aWindowConstraints.gridx = 1;
2712
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2713
- //bigThree.add(cameraPanel, aWindowConstraints);
2714
- aWindowConstraints.weightx = 0;
2715
- aWindowConstraints.gridx = 4;
2716
- aWindowConstraints.gridwidth = 1;
2717
- // aWindowConstraints.gridheight = 3;
2718
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2719
- //bigThree.add(XYZPanel, aWindowConstraints);
2720
- bigThree.revalidate();
2741
+
2742
+// bigThree.remove(scenePanel);
2743
+// bigThree.remove(centralPanel);
2744
+// bigThree.remove(XYZPanel);
2745
+// aWindowConstraints.gridx = 0;
2746
+// aWindowConstraints.gridy = 0;
2747
+// aWindowConstraints.gridwidth = 1;
2748
+// // aWindowConstraints.gridheight = 3;
2749
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2750
+// aWindowConstraints.weightx = 1;
2751
+// aWindowConstraints.weighty = 1;
2752
+// bigThree.add(scenePanel, aWindowConstraints);
2753
+// aWindowConstraints.weightx = 1;
2754
+// aWindowConstraints.gridwidth = 3;
2755
+// // aConstraints.gridheight = 3;
2756
+// aWindowConstraints.gridx = 1;
2757
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2758
+// //bigThree.add(cameraPanel, aWindowConstraints);
2759
+// aWindowConstraints.weightx = 0;
2760
+// aWindowConstraints.gridx = 4;
2761
+// aWindowConstraints.gridwidth = 1;
2762
+// // aWindowConstraints.gridheight = 3;
2763
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2764
+// //bigThree.add(XYZPanel, aWindowConstraints);
2765
+// bigThree.validate();
2766
+// scenePanel.setVisible(true);
2767
+// centralPanel.setVisible(false);
2768
+// XYZPanel.setVisible(false);
2769
+ bigThree.ClearUI();
2770
+ bigThree.add(scenePanel);
2771
+ bigThree.FlushUI();
27212772 } else
2722
- if (event.getSource() == sixButton)
2773
+ if (source == sixButton)
27232774 {
27242775 radio.layout = sixButton;
2725
- bigThree.remove(scenePanel);
2726
- bigThree.remove(cameraPanel);
2727
- bigThree.remove(XYZPanel);
2728
- aWindowConstraints.gridx = 0;
2729
- aWindowConstraints.gridy = 0;
2730
- aWindowConstraints.gridwidth = 1;
2731
- // aConstraints.gridheight = 3;
2732
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2733
- aWindowConstraints.weightx = 0;
2734
- aWindowConstraints.weighty = 1;
2735
- bigThree.add(scenePanel, aWindowConstraints);
2736
- aWindowConstraints.weightx = 1;
2737
- aWindowConstraints.gridwidth = 3;
2738
- // aWindowConstraints.gridheight = 3;
2739
- aWindowConstraints.gridx = 1;
2740
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2741
- bigThree.add(cameraPanel, aWindowConstraints);
2742
- aWindowConstraints.weightx = 0;
2743
- aWindowConstraints.gridx = 4;
2744
- aWindowConstraints.gridwidth = 1;
2745
- // aWindowConstraints.gridheight = 3;
2746
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2747
- //bigThree.add(XYZPanel, aConstraints);
2748
- bigThree.revalidate();
2776
+
2777
+// bigThree.remove(scenePanel);
2778
+// bigThree.remove(centralPanel);
2779
+// bigThree.remove(XYZPanel);
2780
+// aWindowConstraints.gridx = 0;
2781
+// aWindowConstraints.gridy = 0;
2782
+// aWindowConstraints.gridwidth = 1;
2783
+// // aConstraints.gridheight = 3;
2784
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2785
+// aWindowConstraints.weightx = 0;
2786
+// aWindowConstraints.weighty = 1;
2787
+// bigThree.add(scenePanel, aWindowConstraints);
2788
+// aWindowConstraints.weightx = 1;
2789
+// aWindowConstraints.gridwidth = 3;
2790
+// // aWindowConstraints.gridheight = 3;
2791
+// aWindowConstraints.gridx = 1;
2792
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2793
+// bigThree.add(centralPanel, aWindowConstraints);
2794
+// aWindowConstraints.weightx = 0;
2795
+// aWindowConstraints.gridx = 4;
2796
+// aWindowConstraints.gridwidth = 1;
2797
+// // aWindowConstraints.gridheight = 3;
2798
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2799
+// //bigThree.add(XYZPanel, aConstraints);
2800
+// bigThree.validate();
2801
+// scenePanel.setVisible(true);
2802
+// centralPanel.setVisible(true);
2803
+// XYZPanel.setVisible(false);
2804
+ bigThree.ClearUI();
2805
+ bigThree.add(scenePanel);
2806
+ bigThree.add(centralPanel);
2807
+ bigThree.FlushUI();
27492808 } else
2750
- if (event.getSource() == sevenButton)
2809
+ if (source == sevenButton)
27512810 {
27522811 radio.layout = sevenButton;
2753
- bigThree.remove(scenePanel);
2754
- bigThree.remove(cameraPanel);
2755
- bigThree.remove(XYZPanel);
2756
- aWindowConstraints.gridx = 0;
2757
- aWindowConstraints.gridy = 0;
2758
- aWindowConstraints.gridwidth = 1;
2759
- // aWindowConstraints.gridheight = 3;
2760
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2761
- aWindowConstraints.weightx = 0;
2762
- aWindowConstraints.weighty = 1;
2763
- bigThree.add(scenePanel, aWindowConstraints);
2764
- aWindowConstraints.weightx = 1;
2765
- aWindowConstraints.gridwidth = 3;
2766
- // aWindowConstraints.gridheight = 3;
2767
- aWindowConstraints.gridx = 1;
2768
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2769
- bigThree.add(cameraPanel, aWindowConstraints);
2770
- aWindowConstraints.weightx = 0;
2771
- aWindowConstraints.gridx = 4;
2772
- aWindowConstraints.gridwidth = 1;
2773
- // aConstraints.gridheight = 3;
2774
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2775
- bigThree.add(XYZPanel, aWindowConstraints);
2776
- bigThree.revalidate();
2812
+
2813
+// bigThree.remove(scenePanel);
2814
+// bigThree.remove(centralPanel);
2815
+// bigThree.remove(XYZPanel);
2816
+// aWindowConstraints.gridx = 0;
2817
+// aWindowConstraints.gridy = 0;
2818
+// aWindowConstraints.gridwidth = 1;
2819
+// // aWindowConstraints.gridheight = 3;
2820
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2821
+// aWindowConstraints.weightx = 0;
2822
+// aWindowConstraints.weighty = 1;
2823
+// bigThree.add(scenePanel, aWindowConstraints);
2824
+// aWindowConstraints.weightx = 1;
2825
+// aWindowConstraints.gridwidth = 3;
2826
+// // aWindowConstraints.gridheight = 3;
2827
+// aWindowConstraints.gridx = 1;
2828
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2829
+// bigThree.add(centralPanel, aWindowConstraints);
2830
+// aWindowConstraints.weightx = 0;
2831
+// aWindowConstraints.gridx = 4;
2832
+// aWindowConstraints.gridwidth = 1;
2833
+// // aConstraints.gridheight = 3;
2834
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2835
+// bigThree.add(XYZPanel, aWindowConstraints);
2836
+// bigThree.validate();
2837
+// scenePanel.setVisible(true);
2838
+// centralPanel.setVisible(true);
2839
+// XYZPanel.setVisible(true);
2840
+ bigThree.ClearUI();
2841
+ bigThree.add(scenePanel);
2842
+ bigThree.add(centralPanel);
2843
+ bigThree.add(XYZPanel);
2844
+ bigThree.FlushUI();
27772845 } else
2778
- if (event.getSource() == rootButton)
2846
+ if (source == rootButton)
27792847 {
27802848 Object3D obj;
27812849 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2787,7 +2855,7 @@
27872855
27882856 refreshContents(true);
27892857 } else
2790
- if (event.getSource() == closeButton)
2858
+ if (source == closeButton)
27912859 {
27922860 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27932861 cRadio ab;
....@@ -2808,11 +2876,11 @@
28082876 }
28092877 refreshContents(true);
28102878 } else
2811
- if (event.getSource() == editItem || event.getSource() == editButton)
2879
+ if (source == editItem || source == editButton)
28122880 {
28132881 EditSelection(false);
28142882 } else
2815
- if (event.getSource() == uneditButton)
2883
+ if (source == uneditButton)
28162884 {
28172885 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28182886 {
....@@ -2824,12 +2892,12 @@
28242892
28252893 child.editWindow = null; // ???????????
28262894 }
2827
- objEditor.ctrlPanel.revalidate();
2895
+ objEditor.ctrlPanel.validate();
28282896 //objEditor.jTree.clearSelection();
28292897 //objEditor.ResetSliders();
28302898 refreshContents(true);
28312899 } else
2832
- if (event.getSource() == clearPanelButton)
2900
+ if (source == clearPanelButton)
28332901 {
28342902 assert(copy == group);
28352903 //copy.ClearUI();
....@@ -2840,7 +2908,7 @@
28402908 listUI.clear();
28412909 refreshContents(true);
28422910 } else
2843
- if (event.getSource() == allParamsButton)
2911
+ if (source == allParamsButton)
28442912 {
28452913 assert(copy == group);
28462914
....@@ -2861,19 +2929,19 @@
28612929
28622930 refreshContents(true);
28632931 } else
2864
- if (event.getSource() == unselectButton)
2932
+ if (source == unselectButton)
28652933 {
28662934 objEditor.jTree.clearSelection();
28672935 // ?? oct 2012 GrafreeD.clipboard.clear();
28682936 objEditor.ResetSliders();
28692937 refreshContents(true);
28702938 } else
2871
- if(event.getSource() instanceof cRadio)
2939
+ if(source instanceof cRadio)
28722940 {
28732941 group.parent = keepparent;
28742942 group.attributes = 0;
28752943 //group.editWindow = null;
2876
- /*cRadio*/ radio = (cRadio)event.getSource();
2944
+ /*cRadio*/ radio = (cRadio)source;
28772945 Object3D obj = radio.GetObject();
28782946 System.out.println("Edit " + obj);
28792947 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2893,7 +2961,7 @@
28932961 }
28942962
28952963 copy = group;
2896
- //CameraPane.theRenderer.object = group;
2964
+ //Globals.theRenderer.object = group;
28972965 if(!useclient)
28982966 {
28992967 cameraView.renderCamera = radio.camera;
....@@ -2902,7 +2970,8 @@
29022970 cameraView.cameras[cameraView.cameracount] = radio.camera;
29032971 cameraView.targetLookAt.set(radio.camera.lookAt);
29042972 cameraView.object = group;
2905
- cameraView.lighttouched = true;
2973
+ //cameraView.lighttouched = true;
2974
+ Globals.lighttouched = true;
29062975 topView.object = group;
29072976 frontView.object = group;
29082977 sideView.object = group;
....@@ -2938,7 +3007,7 @@
29383007 if (useclient)
29393008 {
29403009 cameraView.object = client;
2941
- cameraView.lighttouched = true;
3010
+ Globals.lighttouched = true;
29423011 //topView.object = client;
29433012 //frontView.object = client;
29443013 //sideView.object = client;
....@@ -2946,7 +3015,7 @@
29463015 else
29473016 {
29483017 cameraView.object = group;
2949
- cameraView.lighttouched = true;
3018
+ Globals.lighttouched = true;
29503019 //topView.object = group;
29513020 //frontView.object = group;
29523021 //sideView.object = group;
....@@ -3454,7 +3523,7 @@
34543523 String pigment = Object3D.GetPigment(tex);
34553524 //String bump = Object3D.GetBump(tex);
34563525
3457
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3526
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
34583527
34593528 double s = v.s;
34603529
....@@ -3755,7 +3824,7 @@
37553824 group.selection.RelinkToSupport(); // july 2014
37563825 System.out.println("DONE.");
37573826 refreshContents();
3758
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3827
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37593828 }
37603829
37613830 void ReduceMesh(boolean reduction34)
....@@ -4031,25 +4100,25 @@
40314100 System.err.println("info : " + child.GetPath());
40324101 }
40334102 }
4034
- else
4035
- {
4036
- objEditor.SetMaterial(group); // .GetMaterial());
4037
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4038
- System.err.println("info : " + group.GetPath());
4039
- }
4103
+// else
4104
+// {
4105
+// objEditor.SetMaterial(group); // .GetMaterial());
4106
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4107
+// System.err.println("info : " + group.GetPath());
4108
+// }
40404109
40414110 objEditor.SetText(); // jan 2014
40424111
4043
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4112
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
40444113 CameraPane.flash = true;
40454114
40464115 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
40474116 // a camera
40484117 {
40494118 CameraPane.camerachangeframe = 0; // don't refuse it
4050
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4051
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
4052
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4119
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4120
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4121
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40534122 }
40544123
40554124 refreshContents();
....@@ -5007,6 +5076,7 @@
50075076
50085077 private MenuItem resetParentItem;
50095078 private MenuItem repairParentItem;
5079
+ private MenuItem repairShadowItem;
50105080 private MenuItem sortbysizeItem;
50115081 private MenuItem sortbynameItem;
50125082