Normand Briere
2019-05-01 b1585b5b2b60c4165be400636c787fae24428c6a
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,26 @@
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);
461
- 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);
443
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
444
+ trackCB.setToolTipText("Enable tracking");
503445 trackCB.addItemListener(this);
504446
505
- oe.aConstraints.gridx += 1;
506
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
447
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
448
+ screenfitButton.setToolTipText("Screen fit");
507449 screenfitButton.addActionListener(this);
508
- oe.aConstraints.gridx += 1;
450
+
509451 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
510452 // screenfitpointButton.addActionListener(this);
511453 // oe.aConstraints.gridx += 1;
512
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
454
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
513455 snapobjectButton.addActionListener(this);
456
+ snapobjectButton.setToolTipText("Snap Object");
514457 oe.aConstraints.gridx += 1;
515458
516459 //aConstraints.gridx = 0;
....@@ -518,68 +461,66 @@
518461 oe.aConstraints.weighty = 0;
519462 oe.aConstraints.gridwidth = 1;
520463
521
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
464
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
465
+ flashSelectionButton.setToolTipText("Show selection");
522466 flashSelectionButton.addActionListener(this);
523467
524
- oe.toolbarPanel.add(new cButton(" ", false));
468
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525469
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);
470
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
471
+ twoButton.setToolTipText("Show center view only");
532472 twoButton.addActionListener(this);
533
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
473
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
534474 fourButton.addActionListener(this);
535
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
475
+ fourButton.setToolTipText("Show left panel only");
476
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
477
+ sixButton.setToolTipText("2-column layout left");
536478 sixButton.addActionListener(this);
537
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
479
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
480
+ threeButton.setToolTipText("2-column layout right");
538481 threeButton.addActionListener(this);
539
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
482
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
483
+ sevenButton.setToolTipText("3-column layout");
540484 sevenButton.addActionListener(this);
541485 //
542486
543
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
487
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
488
+ rootButton.setToolTipText("Edit selection in new tab");
544489 rootButton.addActionListener(this);
545
- oe.aConstraints.gridx += 1;
546
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
490
+
491
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
492
+ closeButton.setToolTipText("Close tab");
547493 closeButton.addActionListener(this);
548494 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
549495 //clearButton.addActionListener(this);
550
- oe.aConstraints.gridx += 1;
551496
552
- oe.aConstraints.gridx = 1; //
553
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
497
+ cGridBag commandsPanel = new cGridBag();
498
+
499
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
500
+ editButton.setToolTipText("Edit selection");
554501 editButton.addActionListener(this);
555
- oe.aConstraints.gridx += 1;
556
- oe.aConstraints.weighty = 0;
557
- oe.aConstraints.gridwidth = 1;
558502
559
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
503
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
504
+ uneditButton.setToolTipText("Unedit selection");
560505 uneditButton.addActionListener(this);
561506
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);
507
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
508
+ clearPanelButton.setToolTipText("Clear edit panel");
567509 clearPanelButton.addActionListener(this);
568510
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);
511
+ commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
512
+ allParamsButton.setToolTipText("All params??");
574513 allParamsButton.addActionListener(this);
575514
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);
515
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
516
+ unselectButton.setToolTipText("Unselect");
581517 unselectButton.addActionListener(this);
582518
519
+ commandsPanel.preferredHeight = 1;
520
+
521
+ oe.treePanel.add(commandsPanel);
522
+ oe.treePanel.Return();
523
+
583524 // oe.aConstraints.gridx += 1;
584525 // oe.aConstraints.weighty = 0;
585526 // oe.aConstraints.gridwidth = 1;
....@@ -591,40 +532,37 @@
591532 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
592533 // gcButton.addActionListener(this);
593534
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;
535
+ cGridBag jSPPanel = new cGridBag();
536
+
537
+ JScrollPane jSP;
605538 //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);
539
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
607540 ResetModel();
608
- oe.aConstraints.weighty = 0.5;
609
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
610
- oe.aConstraints.gridy += 1;
611
- oe.aConstraints.gridwidth = 1;
541
+
542
+ oe.treePanel.add(jSPPanel);
543
+ oe.treePanel.Return();
612544
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);
545
+ cGridBag copyOptionsPanel = new cGridBag();
546
+
547
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
548
+ colorCB.setToolTipText("Copy color when dropped");
617549 colorCB.addItemListener(this);
618
- oe.aConstraints.gridx += 2;
619
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
550
+
551
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
552
+ materialCB.setToolTipText("Copy material when dropped");
620553 materialCB.addItemListener(this);
621
- oe.aConstraints.gridx += 2;
622
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
554
+
555
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
556
+ textureCB.setToolTipText("Copy texture when dropped");
623557 textureCB.addItemListener(this);
624558
625
- oe.aConstraints.gridx = 0;
626
- oe.aConstraints.gridy += 1;
559
+ copyOptionsPanel.preferredHeight = 1;
560
+ oe.treePanel.add(copyOptionsPanel);
561
+ oe.treePanel.Return();
627562
563
+// mainPanel.setDividerLocation(0.5); //1.0);
564
+// mainPanel.setResizeWeight(0.5);
565
+
628566 //jList.addListSelectionListener(this);
629567 oe.jTree.addTreeSelectionListener(this);
630568 //jTree.setRootVisible(false);
....@@ -646,6 +584,86 @@
646584 radio.layout = sevenButton;
647585 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
648586 }
587
+
588
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
589
+ {
590
+ //constraints.gridx = 0;
591
+ //constraints.gridy = 0;
592
+ panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
593
+ fastCB.setToolTipText("Fast mode");
594
+ fastCB.addItemListener(this);
595
+ //constraints.gridy += 1;
596
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
597
+ supportCB.setToolTipText("Enabled rigging");
598
+ supportCB.addItemListener(this);
599
+
600
+ // constraints.gridy += 1;
601
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
602
+ // localCB.addItemListener(this);
603
+
604
+ //constraints.gridy += 1;
605
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
606
+ crowdCB.setToolTipText("Used for crowds");
607
+ crowdCB.addItemListener(this);
608
+
609
+ //constraints.gridy += 1;
610
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
611
+ smoothCB.setToolTipText("Snapping delay");
612
+ smoothCB.addItemListener(this);
613
+
614
+ //constraints.gridy += 1;
615
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
616
+ slowCB.setToolTipText("Smooth interpolation");
617
+ slowCB.addItemListener(this);
618
+ //constraints.gridy += 1;
619
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
620
+ boxCB.setToolTipText("Display bounding boxes");
621
+ boxCB.addItemListener(this);
622
+ //constraints.gridy += 1;
623
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
624
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
625
+ zoomBoxCB.addItemListener(this);
626
+
627
+// constraints.gridy += 1;
628
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
629
+// speakerMocapCB.addItemListener(this);
630
+
631
+ if (false)
632
+ {
633
+ // handled in scripts
634
+ //constraints.gridy += 1;
635
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
636
+ speakerCameraCB.addItemListener(this);
637
+
638
+ //constraints.gridy += 1;
639
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
640
+ speakerFocusCB.addItemListener(this);
641
+
642
+ //constraints.gridy += 1;
643
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
644
+ smoothfocusCB.addItemListener(this);
645
+ }
646
+
647
+//constraints.gridx += 1;
648
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
649
+// debugCB.addItemListener(this);
650
+
651
+ //constraints.gridy += 1;
652
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
653
+ oeilCB.addItemListener(this);
654
+
655
+ //constraints.gridy += 1;
656
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
657
+ lookAtCB.setToolTipText("Look-at target");
658
+ lookAtCB.addItemListener(this);
659
+
660
+ cGridBag fill = new cGridBag();
661
+
662
+ fill.preferredHeight = 200;
663
+
664
+ panel.add(fill);
665
+
666
+ }
649667
650668 void EditObject(Object3D obj)
651669 {
....@@ -676,6 +694,7 @@
676694 JCheckBox fastCB;
677695 JCheckBox slowCB;
678696 JCheckBox boxCB;
697
+ JCheckBox zoomBoxCB;
679698 JCheckBox trackCB;
680699 JCheckBox smoothfocusCB;
681700 // JCheckBox speakerMocapCB;
....@@ -755,6 +774,10 @@
755774 Recompile();
756775 cameraView.repaint();
757776 // refreshContents();
777
+ }
778
+ else if(e.getSource() == zoomBoxCB)
779
+ {
780
+ cameraView.ToggleZoomBoxMode();
758781 }
759782 else if(e.getSource() == smoothfocusCB)
760783 {
....@@ -1482,6 +1505,7 @@
14821505 //
14831506 public void actionPerformed(ActionEvent event) // , Object arg)
14841507 {
1508
+ Object source = event.getSource();
14851509 /*
14861510 if (event.getSource() == nameField)
14871511 {
....@@ -1493,11 +1517,11 @@
14931517 }
14941518 else
14951519 */
1496
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1520
+ if (source == lookAtItem || source == lookFromItem)
14971521 {
14981522 ScreenFit();
14991523 } else
1500
- if (event.getSource() == switchItem)
1524
+ if (source == switchItem)
15011525 {
15021526 cVector v1 = new cVector();
15031527 cVector v2 = new cVector();
....@@ -1506,11 +1530,11 @@
15061530 objEditor.cameraView.renderCamera.setAim(v2, v1);
15071531 objEditor.cameraView.repaint();
15081532 } else
1509
- if (event.getSource() == rectoidItem)
1533
+ if (source == rectoidItem)
15101534 {
15111535 makeSomething(new Box());
15121536 } else
1513
- if (event.getSource() == particleItem)
1537
+ if (source == particleItem)
15141538 {
15151539 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15161540 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1531,9 +1555,9 @@
15311555 applyExample(particleGeom, "SMOKE");
15321556 makeSomething(particleGeom);
15331557 } else
1534
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1558
+ if (source == ragdollItem || source == ragdoll2Item)
15351559 {
1536
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1560
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15371561
15381562 ragdoll.toParent = LA.newMatrix();
15391563 ragdoll.fromParent = LA.newMatrix();
....@@ -1551,7 +1575,7 @@
15511575 } else
15521576 /*
15531577 */
1554
- if (event.getSource() == heightFieldItem)
1578
+ if (source == heightFieldItem)
15551579 {
15561580 Object3D obj = new Object3D();
15571581
....@@ -1589,31 +1613,31 @@
15891613
15901614 makeSomething(obj);
15911615 } else
1592
- if (event.getSource() == gridItem)
1616
+ if (source == gridItem)
15931617 {
15941618 makeSomething(new Grid());
15951619 } else
1596
- if (event.getSource() == ellipsoidItem)
1620
+ if (source == ellipsoidItem)
15971621 {
15981622 makeSomething(new Sphere());
15991623 } else
1600
- if (event.getSource() == coneItem)
1624
+ if (source == coneItem)
16011625 {
16021626 makeSomething(new Cone());
16031627 } else
1604
- if (event.getSource() == torusItem)
1628
+ if (source == torusItem)
16051629 {
16061630 makeSomething(new Torus());
16071631 } else
1608
- if (event.getSource() == superItem)
1632
+ if (source == superItem)
16091633 {
16101634 makeSomething(new Superellipsoid());
16111635 } else
1612
- if (event.getSource() == kleinItem)
1636
+ if (source == kleinItem)
16131637 {
16141638 makeSomething(new Klein());
16151639 } else
1616
- if (event.getSource() == blobItem)
1640
+ if (source == blobItem)
16171641 {
16181642 Blob blob = new Blob();
16191643 BlobComponent comp = new BlobComponent();
....@@ -1621,15 +1645,15 @@
16211645 //blob.retile();
16221646 makeSomething(blob);
16231647 } else
1624
- if (event.getSource() == latheItem)
1648
+ if (source == latheItem)
16251649 {
16261650 makeSomething(new Lathe());
16271651 } else
1628
- if (event.getSource() == bezierItem)
1652
+ if (source == bezierItem)
16291653 {
16301654 makeSomething(new BezierSurface());
16311655 } else
1632
- if (event.getSource() == checkerItem)
1656
+ if (source == checkerItem)
16331657 {
16341658 /*
16351659 Object3D obj = new BezierSurface(5,8);
....@@ -1644,7 +1668,7 @@
16441668 */
16451669 makeSomething(new Checker());
16461670 } else
1647
- if (event.getSource() == meshItem)
1671
+ if (source == meshItem)
16481672 {
16491673 Object3D itemtomake = new Object3D();
16501674 Object3D child;
....@@ -1665,35 +1689,35 @@
16651689 makeSomething(child);
16661690 }
16671691 } else
1668
- if (event.getSource() == springItem)
1692
+ if (source == springItem)
16691693 {
16701694 cSpring s = new cSpring();
16711695 s.setup();
16721696 makeSomething(s);
16731697 } else
1674
- if (event.getSource() == flagItem)
1698
+ if (source == flagItem)
16751699 {
16761700 cSpring s = new cFlag();
16771701 s.setup();
16781702 makeSomething(s);
16791703 } else
1680
- if (event.getSource() == lightItem)
1704
+ if (source == lightItem)
16811705 {
16821706 makeSomething(new Light());
16831707 } else
1684
- if (event.getSource() == csgItem)
1708
+ if (source == csgItem)
16851709 {
16861710 group(new CSG());
16871711 } else
1688
- if (event.getSource() == templateItem)
1712
+ if (source == templateItem)
16891713 {
16901714 group(new cTemplate());
16911715 } else
1692
- if (event.getSource() == attributeItem)
1716
+ if (source == attributeItem)
16931717 {
16941718 makeSomething(new Attribute());
16951719 } else
1696
- if (event.getSource() == pointflowItem)
1720
+ if (source == pointflowItem)
16971721 {
16981722 makeSomething(new PointFlow());
16991723 } else
....@@ -1705,7 +1729,7 @@
17051729 } else
17061730 */
17071731
1708
- if (event.getSource() == superLoopItem)
1732
+ if (source == superLoopItem)
17091733 {
17101734 Composite g = new cGroup();
17111735 for (int i=0; i<15; i++)
....@@ -1727,7 +1751,7 @@
17271751
17281752 group(g);
17291753 } else
1730
- if (event.getSource() == loopItem)
1754
+ if (source == loopItem)
17311755 {
17321756 Composite csg = new GroupLeaf();
17331757 csg.count = 5;
....@@ -1736,7 +1760,7 @@
17361760 csg.addChild(child);
17371761 child.addChild(csg);
17381762 } else
1739
- if (event.getSource() == doubleItem)
1763
+ if (source == doubleItem)
17401764 {
17411765 Composite csg = new GroupLeaf();
17421766 csg.count = 5;
....@@ -1748,7 +1772,7 @@
17481772 csg.addChild(child);
17491773 child.addChild(csg);
17501774 } else
1751
- if (event.getSource() == tripleItem)
1775
+ if (source == tripleItem)
17521776 {
17531777 Composite csg = new GroupLeaf();
17541778 csg.count = 4;
....@@ -1764,70 +1788,70 @@
17641788 child.addChild(csg);
17651789 } else
17661790
1767
- if (event.getSource() == importGFDItem)
1791
+ if (source == importGFDItem)
17681792 {
17691793 ImportGFD();
17701794 } else
1771
- if (event.getSource() == importVRMLX3DItem)
1795
+ if (source == importVRMLX3DItem)
17721796 {
17731797 ImportVRMLX3D();
17741798 } else
1775
- if (event.getSource() == import3DSItem)
1799
+ if (source == import3DSItem)
17761800 {
17771801 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17781802 } else
1779
- if (event.getSource() == importOBJItem)
1803
+ if (source == importOBJItem)
17801804 {
17811805 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17821806 } else
1783
- if (event.getSource() == computeAOItem)
1807
+ if (source == computeAOItem)
17841808 {
1785
- CameraPane.drawMode = CameraPane.OCCLUSION;
1786
- CameraPane.theRenderer.repaint();
1809
+ Globals.drawMode = CameraPane.OCCLUSION;
1810
+ Globals.theRenderer.repaint();
17871811 } else
1788
- if (event.getSource() == recompileItem)
1812
+ if (source == recompileItem)
17891813 {
17901814 Recompile();
17911815 refreshContents();
17921816 } else
1793
- if (event.getSource() == editScriptItem)
1817
+ if (source == editScriptItem)
17941818 {
17951819 OpenDialog();
17961820 refreshContents();
17971821 } else
1798
- if (event.getSource() == invariantsItem)
1822
+ if (source == invariantsItem)
17991823 {
18001824 System.out.println("Invariants:");
18011825 GrafreeD.grafreeD.universe.invariants();
18021826 } else
1803
- if (event.getSource() == memoryItem)
1827
+ if (source == memoryItem)
18041828 {
18051829 //System.out.println("Invariants:");
18061830 PrintMemory();
18071831 } else
1808
- if (event.getSource() == pathItem)
1832
+ if (source == pathItem)
18091833 {
18101834 PrintPath();
18111835 } else
1812
- if (event.getSource() == analyzeItem)
1836
+ if (source == analyzeItem)
18131837 {
18141838 AnalyzeObject();
18151839 } else
1816
- if (event.getSource() == dumpItem)
1840
+ if (source == dumpItem)
18171841 {
18181842 DumpObject();
18191843 } else
1820
- if (event.getSource() == screenfitButton)
1844
+ if (source == screenfitButton)
18211845 {
18221846 //Reload(lastConverter, lastFilename, true);
18231847 ScreenFit();
18241848 } else
1825
- if (event.getSource() == screenfitpointButton)
1849
+ if (source == screenfitpointButton)
18261850 {
18271851 //Reload(lastConverter, lastFilename, true);
18281852 ScreenFitPoint();
18291853 } else
1830
- if (event.getSource() == snapobjectButton)
1854
+ if (source == snapobjectButton)
18311855 {
18321856 //Reload(lastConverter, lastFilename, true);
18331857 SnapObject();
....@@ -1838,13 +1862,13 @@
18381862 // Recompile();
18391863 // refreshContents();
18401864 // } else
1841
- if (event.getSource() == gcButton)
1865
+ if (source == gcButton)
18421866 {
18431867 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18441868 System.gc();
18451869 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18461870 } else
1847
- if (event.getSource() == editLeafItem)
1871
+ if (source == editLeafItem)
18481872 {
18491873 Object3D obj;
18501874 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1858,62 +1882,62 @@
18581882 }
18591883 refreshContents(true);
18601884 } else
1861
- if (event.getSource() == openWindowItem)
1885
+ if (source == openWindowItem)
18621886 {
18631887 EditSelection(true);
18641888 } else
1865
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1889
+ if (source == cutItem || source == clearButton)
18661890 {
18671891 loadClipboard(true);
18681892 } else
1869
- if (event.getSource() == duplicateItem)
1893
+ if (source == duplicateItem)
18701894 {
18711895 Object3D keep = GrafreeD.clipboard;
18721896 loadClipboard(false);
18731897 paste(false);
18741898 GrafreeD.clipboard = keep;
18751899 } else
1876
- if (event.getSource() == cloneItem)
1900
+ if (source == cloneItem)
18771901 {
18781902 CloneSelection(false);
18791903 } else
1880
- if (event.getSource() == cloneSupportItem)
1904
+ if (source == cloneSupportItem)
18811905 {
18821906 CloneSelection(true);
18831907 } else
1884
- if (event.getSource() == copyItem)
1908
+ if (source == copyItem)
18851909 {
18861910 loadClipboard(false);
18871911 } else
1888
- if (event.getSource() == pasteItem)
1912
+ if (source == pasteItem)
18891913 {
18901914 paste(false);
18911915 } else
1892
- if (event.getSource() == pasteLinkItem)
1916
+ if (source == pasteLinkItem)
18931917 {
18941918 pasteInto(false);
18951919 } else
1896
- if (event.getSource() == pasteCloneItem)
1920
+ if (source == pasteCloneItem)
18971921 {
18981922 pasteInto(true);
18991923 } else
1900
- if (event.getSource() == pasteExpandItem)
1924
+ if (source == pasteExpandItem)
19011925 {
19021926 paste(true);
19031927 } else
1904
- if (event.getSource() == synchronizeItem)
1928
+ if (source == synchronizeItem)
19051929 {
19061930 Overwrite(Object3D.TRANSFORM);
19071931 } else
1908
- if (event.getSource() == overwriteNameItem)
1932
+ if (source == overwriteNameItem)
19091933 {
19101934 Overwrite(Object3D.NAME);
19111935 } else
1912
- if (event.getSource() == overwriteUVItem)
1936
+ if (source == overwriteUVItem)
19131937 {
19141938 Overwrite(Object3D.UV);
19151939 } else
1916
- if (event.getSource() == overwriteMatItem)
1940
+ if (source == overwriteMatItem)
19171941 {
19181942 /* july 2015
19191943 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1933,7 +1957,7 @@
19331957
19341958 Overwrite(dropAttributes);
19351959 }
1936
- if (event.getSource() == overwriteGeoItem)
1960
+ if (source == overwriteGeoItem)
19371961 {
19381962 Overwrite(Object3D.GEOMETRY);
19391963 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1950,7 +1974,7 @@
19501974 // refreshContents();
19511975 // }
19521976 } else
1953
- if (event.getSource() == generateMeshItem)
1977
+ if (source == generateMeshItem)
19541978 {
19551979 //if (group.selection.size() == 1)
19561980 // for (int i=0; i<group.selection.size(); i++)
....@@ -1961,7 +1985,7 @@
19611985 ResetModel();
19621986 refreshContents();
19631987 } else
1964
- if (event.getSource() == extractGeometriesItem)
1988
+ if (source == extractGeometriesItem)
19651989 {
19661990 boolean one = false;
19671991
....@@ -1988,7 +2012,7 @@
19882012 ResetModel();
19892013 refreshContents();
19902014 } else
1991
- if (event.getSource() == cloneGeometriesItem)
2015
+ if (source == cloneGeometriesItem)
19922016 {
19932017 boolean one = false;
19942018
....@@ -2014,7 +2038,7 @@
20142038 ResetModel();
20152039 refreshContents();
20162040 } else
2017
- if (event.getSource() == shareGeometriesItem)
2041
+ if (source == shareGeometriesItem)
20182042 {
20192043 boolean one = false;
20202044
....@@ -2044,7 +2068,7 @@
20442068 refreshContents();
20452069 }
20462070 } else
2047
- if (event.getSource() == mergeGeometriesItem)
2071
+ if (source == mergeGeometriesItem)
20482072 {
20492073 boolean one = false;
20502074
....@@ -2074,7 +2098,7 @@
20742098 ResetModel();
20752099 refreshContents();
20762100 } else
2077
- if (event.getSource() == linkverticesItem)
2101
+ if (source == linkverticesItem)
20782102 {
20792103 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20802104 // {
....@@ -2094,7 +2118,7 @@
20942118 if (content instanceof cGroup && ((cGroup)content).transientlink )
20952119 content = ((cGroup)content).get(0);
20962120
2097
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2121
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20982122 for (int i=0; i<group.selection.size(); i++)
20992123 {
21002124 boolean random = CameraPane.RANDOM;
....@@ -2103,11 +2127,11 @@
21032127 // group.selection.get(i).setMasterThis(content); // should be identity
21042128 CameraPane.RANDOM = random;
21052129 }
2106
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2130
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21072131 refreshContents();
21082132 }
21092133 } else
2110
- if (event.getSource() == resetsupportItem)
2134
+ if (source == resetsupportItem)
21112135 {
21122136 for (int i=0; i<group.selection.size(); i++)
21132137 {
....@@ -2119,7 +2143,7 @@
21192143
21202144 refreshContents();
21212145 } else
2122
- if (event.getSource() == relinkverticesItem)
2146
+ if (source == relinkverticesItem)
21232147 {
21242148 boolean random = CameraPane.RANDOM;
21252149 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2128,7 +2152,7 @@
21282152
21292153 refreshContents();
21302154 } else
2131
- if (event.getSource() == resetreferencesItem)
2155
+ if (source == resetreferencesItem)
21322156 {
21332157 for (int i=0; i<group.selection.size(); i++)
21342158 {
....@@ -2137,7 +2161,7 @@
21372161
21382162 refreshContents();
21392163 } else
2140
- if (event.getSource() == setMasterItem)
2164
+ if (source == setMasterItem)
21412165 {
21422166 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21432167 {
....@@ -2150,7 +2174,7 @@
21502174 refreshContents();
21512175 }
21522176 } else
2153
- if (event.getSource() == poseMeshItem)
2177
+ if (source == poseMeshItem)
21542178 {
21552179 if (group.selection.size() == 1)
21562180 {
....@@ -2169,19 +2193,19 @@
21692193 }
21702194
21712195 } else
2172
- if (event.getSource() == revertMeshItem)
2196
+ if (source == revertMeshItem)
21732197 {
21742198 RevertMeshes();
21752199 } else
2176
- if (event.getSource() == resetMeshItem)
2200
+ if (source == resetMeshItem)
21772201 {
21782202 ResetAll();
21792203 } else
2180
- if (event.getSource() == stepAllItem)
2204
+ if (source == stepAllItem)
21812205 {
21822206 StepAll();
21832207 } else
2184
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2208
+ if (source == clearItem) // || event.getSource() == clearButton)
21852209 {
21862210 //int indices[] = jList.getSelectedIndices();
21872211 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2189,46 +2213,46 @@
21892213
21902214 ClearSelection(false);
21912215 } else
2192
- if (event.getSource() == clearAllItem)
2216
+ if (source == clearAllItem)
21932217 {
21942218 ClearSelection(true);
21952219 } else
2196
- if (event.getSource() == grabItem)
2220
+ if (source == grabItem)
21972221 {
21982222 group(new cGroup(), true);
21992223 } else
2200
- if (event.getSource() == hideItem)
2224
+ if (source == hideItem)
22012225 {
22022226 group(new HiddenObject());
22032227 } else
2204
- if (event.getSource() == frontItem)
2228
+ if (source == frontItem)
22052229 {
22062230 front();
22072231 } else
2208
- if (event.getSource() == backItem)
2232
+ if (source == backItem)
22092233 {
22102234 back();
22112235 } else
2212
- if (event.getSource() == cameraItem)
2236
+ if (source == cameraItem)
22132237 {
22142238 makeSomething(new Camera());
22152239 } else
2216
- if (event.getSource() == compositeItem)
2240
+ if (source == compositeItem)
22172241 {
22182242 group(new Composite());
22192243 } else
2220
- if (event.getSource() == randomItem)
2244
+ if (source == randomItem)
22212245 {
22222246 RandomNode random = new RandomNode();
22232247 group(random);
22242248 if (random.size() > 0)
22252249 random.name = random.get(0).name + "Rnd";
22262250 } else
2227
- if (event.getSource() == physicsItem)
2251
+ if (source == physicsItem)
22282252 {
22292253 group(new PhysicsNode());
22302254 } else
2231
- if (event.getSource() == frameselectorItem)
2255
+ if (source == frameselectorItem)
22322256 {
22332257 for (int i=0; i<group.selection.size(); i++)
22342258 {
....@@ -2240,7 +2264,7 @@
22402264 ResetModel();
22412265 refreshContents();
22422266 } else
2243
- if (event.getSource() == switchGeoItem)
2267
+ if (source == switchGeoItem)
22442268 {
22452269 for (int i=0; i<group.selection.size(); i++)
22462270 {
....@@ -2252,7 +2276,7 @@
22522276 ResetModel();
22532277 refreshContents();
22542278 } else
2255
- if (event.getSource() == switchTransfoItem)
2279
+ if (source == switchTransfoItem)
22562280 {
22572281 for (int i=0; i<group.selection.size(); i++)
22582282 {
....@@ -2264,7 +2288,7 @@
22642288 ResetModel();
22652289 refreshContents();
22662290 } else
2267
- if (event.getSource() == morphItem)
2291
+ if (source == morphItem)
22682292 {
22692293 for (int i=0; i<group.selection.size(); i++)
22702294 {
....@@ -2276,7 +2300,7 @@
22762300 ResetModel();
22772301 refreshContents();
22782302 } else
2279
- if (event.getSource() == scriptNodeItem)
2303
+ if (source == scriptNodeItem)
22802304 {
22812305 boolean atleastone = false;
22822306
....@@ -2315,31 +2339,31 @@
23152339 }
23162340 }
23172341 } else
2318
- if (event.getSource() == linkerItem)
2342
+ if (source == linkerItem)
23192343 {
23202344 group(new cLinker());
23212345 } else
2322
- if (event.getSource() == textureItem)
2346
+ if (source == textureItem)
23232347 {
23242348 group(new TextureNode());
23252349 } else
2326
- if (event.getSource() == billboardItem)
2350
+ if (source == billboardItem)
23272351 {
23282352 group(new BillboardNode());
23292353 } else
2330
- if (event.getSource() == shadowXItem)
2354
+ if (source == shadowXItem)
23312355 {
23322356 CastShadow(0);
23332357 } else
2334
- if (event.getSource() == shadowYItem)
2358
+ if (source == shadowYItem)
23352359 {
23362360 CastShadow(1);
23372361 } else
2338
- if (event.getSource() == shadowZItem)
2362
+ if (source == shadowZItem)
23392363 {
23402364 CastShadow(2);
23412365 } else
2342
- if (event.getSource() == ungroupItem)
2366
+ if (source == ungroupItem)
23432367 {
23442368 //ungroup();
23452369 for (int i=0; i<group.selection.size(); i++)
....@@ -2351,179 +2375,179 @@
23512375
23522376 refreshContents();
23532377 } else
2354
- if (event.getSource() == genUVItem)
2378
+ if (source == genUVItem)
23552379 {
23562380 GenUV();
23572381 } else
2358
- if (event.getSource() == genNormalsCADItem)
2382
+ if (source == genNormalsCADItem)
23592383 {
23602384 GenNormals(true);
23612385 } else
2362
- if (event.getSource() == genNormalsMESHItem)
2386
+ if (source == genNormalsMESHItem)
23632387 {
23642388 GenNormals(true); // TODO
23652389 } else
2366
- if (event.getSource() == genNormalsORGANItem)
2390
+ if (source == genNormalsORGANItem)
23672391 {
23682392 GenNormals(false);
23692393 } else
2370
- if (event.getSource() == genNormalsMINEItem)
2394
+ if (source == genNormalsMINEItem)
23712395 {
23722396 GenNormalsMINE();
23732397 } else
2374
- if (event.getSource() == stripifyItem)
2398
+ if (source == stripifyItem)
23752399 {
23762400 Stripify();
23772401 } else
2378
- if (event.getSource() == unstripifyItem)
2402
+ if (source == unstripifyItem)
23792403 {
23802404 Unstripify();
23812405 } else
2382
- if (event.getSource() == trimItem)
2406
+ if (source == trimItem)
23832407 {
23842408 Trim();
23852409 } else
2386
- if (event.getSource() == untrimItem)
2410
+ if (source == untrimItem)
23872411 {
23882412 Untrim();
23892413 } else
2390
- if (event.getSource() == clearColorsItem)
2414
+ if (source == clearColorsItem)
23912415 {
23922416 ClearColors();
23932417 } else
2394
- if (event.getSource() == clearMaterialsItem)
2418
+ if (source == clearMaterialsItem)
23952419 {
23962420 ClearMaterials();
23972421 } else
2398
- if (event.getSource() == liveleavesItem)
2422
+ if (source == liveleavesItem)
23992423 {
24002424 LiveLeaves(true);
24012425 } else
2402
- if (event.getSource() == unliveleavesItem)
2426
+ if (source == unliveleavesItem)
24032427 {
24042428 LiveLeaves(false);
24052429 } else
2406
- if (event.getSource() == supportleavesItem)
2430
+ if (source == supportleavesItem)
24072431 {
24082432 SupportLeaves(true);
24092433 } else
2410
- if (event.getSource() == unsupportleavesItem)
2434
+ if (source == unsupportleavesItem)
24112435 {
24122436 SupportLeaves(false);
24132437 } else
2414
- if (event.getSource() == hideleavesItem)
2438
+ if (source == hideleavesItem)
24152439 {
24162440 HideLeaves(true);
24172441 } else
2418
- if (event.getSource() == showleavesItem)
2442
+ if (source == showleavesItem)
24192443 {
24202444 HideLeaves(false);
24212445 } else
2422
- if (event.getSource() == markleavesItem)
2446
+ if (source == markleavesItem)
24232447 {
24242448 MarkLeaves(true);
24252449 } else
2426
- if (event.getSource() == unmarkleavesItem)
2450
+ if (source == unmarkleavesItem)
24272451 {
24282452 MarkLeaves(false);
24292453 } else
2430
- if (event.getSource() == flipVItem)
2454
+ if (source == flipVItem)
24312455 {
24322456 FlipV(true);
24332457 } else
2434
- if (event.getSource() == unflipVItem)
2458
+ if (source == unflipVItem)
24352459 {
24362460 FlipV(false);
24372461 } else
2438
- if (event.getSource() == lowTexturesItem)
2462
+ if (source == lowTexturesItem)
24392463 {
24402464 SetTexRes(0);
24412465 } else
2442
- if (event.getSource() == normalTexturesItem)
2466
+ if (source == normalTexturesItem)
24432467 {
24442468 SetTexRes(1);
24452469 } else
2446
- if (event.getSource() == highTexturesItem)
2470
+ if (source == highTexturesItem)
24472471 {
24482472 SetTexRes(2);
24492473 } else
2450
- if (event.getSource() == veryhighTexturesItem)
2474
+ if (source == veryhighTexturesItem)
24512475 {
24522476 SetTexRes(3);
24532477 } else
2454
- if (event.getSource() == maxTexturesItem)
2478
+ if (source == maxTexturesItem)
24552479 {
24562480 SetTexRes(4);
24572481 } else
2458
- if (event.getSource() == panoTexturesItem)
2482
+ if (source == panoTexturesItem)
24592483 {
24602484 SetTexRes(5);
24612485 } else
2462
- if (event.getSource() == reverseNormalsItem)
2486
+ if (source == reverseNormalsItem)
24632487 {
24642488 ReverseNormals();
24652489 } else
2466
- if (event.getSource() == parseverticesItem)
2490
+ if (source == parseverticesItem)
24672491 {
24682492 ParseVertices();
24692493 } else
2470
- if (event.getSource() == textureFieldItem)
2494
+ if (source == textureFieldItem)
24712495 {
24722496 TextureVertices();
24732497 } else
2474
- if (event.getSource() == alignItem)
2498
+ if (source == alignItem)
24752499 {
24762500 Align();
24772501 } else
2478
- if (event.getSource() == mirrorItem)
2502
+ if (source == mirrorItem)
24792503 {
24802504 MirrorPoses();
24812505 } else
2482
- if (event.getSource() == reduceMorphItem)
2506
+ if (source == reduceMorphItem)
24832507 {
24842508 MeshReduction(false);
24852509 } else
2486
- if (event.getSource() == reduce34MorphItem)
2510
+ if (source == reduce34MorphItem)
24872511 {
24882512 MeshReduction(true);
24892513 } else
2490
- if (event.getSource() == reverseTrianglesItem)
2514
+ if (source == reverseTrianglesItem)
24912515 {
24922516 ReverseTriangles();
24932517 } else
2494
- if (event.getSource() == reduceMeshItem)
2518
+ if (source == reduceMeshItem)
24952519 {
24962520 ReduceMesh(false);
24972521 } else
2498
- if (event.getSource() == reduce34MeshItem)
2522
+ if (source == reduce34MeshItem)
24992523 {
25002524 ReduceMesh(true);
25012525 } else
2502
- if (event.getSource() == increaseMeshItem)
2526
+ if (source == increaseMeshItem)
25032527 {
25042528 IncreaseMesh();
25052529 } else
2506
- if (event.getSource() == clipMeshItem)
2530
+ if (source == clipMeshItem)
25072531 {
25082532 ClipMesh();
25092533 } else
2510
- if (event.getSource() == smoothMeshItem)
2534
+ if (source == smoothMeshItem)
25112535 {
25122536 SmoothMesh();
25132537 } else
2514
- if (event.getSource() == transformgeometryItem)
2538
+ if (source == transformgeometryItem)
25152539 {
25162540 TransformGeometry();
25172541 } else
2518
- if (event.getSource() == resetTransformItem)
2542
+ if (source == resetTransformItem)
25192543 {
25202544 ResetTransform();
25212545 } else
2522
- if (event.getSource() == resetCentroidItem)
2546
+ if (source == resetCentroidItem)
25232547 {
25242548 ResetCentroid();
25252549 } else
2526
- if (event.getSource() == resetParentItem)
2550
+ if (source == resetParentItem)
25272551 {
25282552 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25292553 {
....@@ -2533,7 +2557,7 @@
25332557
25342558 refreshContents();
25352559 } else
2536
- if (event.getSource() == repairParentItem)
2560
+ if (source == repairParentItem)
25372561 {
25382562 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25392563 {
....@@ -2547,7 +2571,7 @@
25472571
25482572 refreshContents();
25492573 } else
2550
- if (event.getSource() == repairShadowItem)
2574
+ if (source == repairShadowItem)
25512575 {
25522576 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25532577 {
....@@ -2561,7 +2585,7 @@
25612585
25622586 refreshContents();
25632587 } else
2564
- if (event.getSource() == sortbysizeItem)
2588
+ if (source == sortbysizeItem)
25652589 {
25662590 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25672591 {
....@@ -2573,7 +2597,7 @@
25732597 ResetModel();
25742598 refreshContents();
25752599 } else
2576
- if (event.getSource() == sortbynameItem)
2600
+ if (source == sortbynameItem)
25772601 {
25782602 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25792603 {
....@@ -2585,7 +2609,7 @@
25852609 ResetModel();
25862610 refreshContents();
25872611 } else
2588
- if (event.getSource() == attachPigmentItem)
2612
+ if (source == attachPigmentItem)
25892613 {
25902614 String texture = GetFile("Attach pigment");
25912615 Object3D obj;
....@@ -2597,7 +2621,7 @@
25972621
25982622 refreshContents();
25992623 } else
2600
- if (event.getSource() == detachPigmentItem)
2624
+ if (source == detachPigmentItem)
26012625 {
26022626 Object3D obj;
26032627 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2608,7 +2632,7 @@
26082632
26092633 refreshContents();
26102634 } else
2611
- if (event.getSource() == attachBumpItem)
2635
+ if (source == attachBumpItem)
26122636 {
26132637 String texture = GetFile("Attach bump");
26142638 Object3D obj;
....@@ -2620,7 +2644,7 @@
26202644
26212645 refreshContents();
26222646 } else
2623
- if (event.getSource() == detachBumpItem)
2647
+ if (source == detachBumpItem)
26242648 {
26252649 Object3D obj;
26262650 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2631,7 +2655,7 @@
26312655
26322656 refreshContents();
26332657 } else
2634
- if (event.getSource() == pigmentBumpItem)
2658
+ if (source == pigmentBumpItem)
26352659 {
26362660 Object3D obj;
26372661 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2642,158 +2666,195 @@
26422666
26432667 refreshContents();
26442668 } else
2645
- if (event.getSource() == flashSelectionButton)
2669
+ if (source == flashSelectionButton)
26462670 {
26472671 CameraPane.flash = true;
26482672 refreshContents();
26492673 } else
2650
- if (event.getSource() == oneButton)
2674
+ if (source == oneButton)
26512675 {
26522676 } else
2653
- if (event.getSource() == twoButton)
2677
+ if (source == twoButton)
26542678 {
26552679 radio.layout = twoButton;
26562680 // bug
26572681 //gridPanel.setDividerLocation(1.0);
26582682 //bigPanel.setDividerLocation(0.0);
2659
- bigThree.remove(scenePanel);
2660
- bigThree.remove(centralPanel);
2661
- bigThree.remove(XYZPanel);
2662
- aWindowConstraints.gridx = 0;
2663
- aWindowConstraints.gridy = 0;
2664
- aWindowConstraints.gridwidth = 1;
2665
- // aConstraints.gridheight = 3;
2666
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2667
- aWindowConstraints.weightx = 0;
2668
- aWindowConstraints.weighty = 1;
2669
- //bigThree.add(jtp, aWindowConstraints);
2670
- aWindowConstraints.weightx = 1;
2671
- aWindowConstraints.gridwidth = 3;
2672
- // aConstraints.gridheight = 3;
2673
- aWindowConstraints.gridx = 1;
2674
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2675
- bigThree.add(centralPanel, aWindowConstraints);
2676
- aWindowConstraints.weightx = 0;
2677
- aWindowConstraints.gridx = 4;
2678
- aWindowConstraints.gridwidth = 1;
2679
- // aConstraints.gridheight = 3;
2680
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2681
- //bigThree.add(XYZPanel, aWindowConstraints);
2682
- bigThree.revalidate();
2683
+// bigThree.remove(scenePanel);
2684
+// bigThree.remove(centralPanel);
2685
+// bigThree.remove(XYZPanel);
2686
+// aWindowConstraints.gridx = 0;
2687
+// aWindowConstraints.gridy = 0;
2688
+// aWindowConstraints.gridwidth = 1;
2689
+// // aConstraints.gridheight = 3;
2690
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2691
+// aWindowConstraints.weightx = 0;
2692
+// aWindowConstraints.weighty = 1;
2693
+// //bigThree.add(jtp, aWindowConstraints);
2694
+// aWindowConstraints.weightx = 1;
2695
+// aWindowConstraints.gridwidth = 3;
2696
+// // aConstraints.gridheight = 3;
2697
+// aWindowConstraints.gridx = 1;
2698
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2699
+// bigThree.add(centralPanel, aWindowConstraints);
2700
+// aWindowConstraints.weightx = 0;
2701
+// aWindowConstraints.gridx = 4;
2702
+// aWindowConstraints.gridwidth = 1;
2703
+// // aConstraints.gridheight = 3;
2704
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2705
+// //bigThree.add(XYZPanel, aWindowConstraints);
2706
+// scenePanel.setVisible(false);
2707
+// centralPanel.setVisible(true);
2708
+// XYZPanel.setVisible(false);
2709
+ bigThree.ClearUI();
2710
+ bigThree.add(centralPanel);
2711
+ bigThree.FlushUI();
26832712 } else
2684
- if (event.getSource() == threeButton)
2713
+ if (source == threeButton)
26852714 {
26862715 radio.layout = threeButton;
2687
- bigThree.remove(scenePanel);
2688
- bigThree.remove(centralPanel);
2689
- bigThree.remove(XYZPanel);
2690
- aWindowConstraints.gridx = 0;
2691
- aWindowConstraints.gridy = 0;
2692
- aWindowConstraints.gridwidth = 1;
2693
- // aConstraints.gridheight = 3;
2694
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2695
- aWindowConstraints.weightx = 0;
2696
- aWindowConstraints.weighty = 1;
2697
- //bigThree.add(jtp, aWindowConstraints);
2698
- aWindowConstraints.weightx = 1;
2699
- aWindowConstraints.gridwidth = 3;
2700
- // aConstraints.gridheight = 3;
2701
- aWindowConstraints.gridx = 1;
2702
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2703
- bigThree.add(centralPanel, aWindowConstraints);
2704
- aWindowConstraints.weightx = 0;
2705
- aWindowConstraints.gridx = 4;
2706
- aWindowConstraints.gridwidth = 1;
2707
- // aConstraints.gridheight = 3;
2708
- aConstraints.fill = GridBagConstraints.VERTICAL;
2709
- bigThree.add(XYZPanel, aWindowConstraints);
2710
- bigThree.revalidate();
2716
+
2717
+// bigThree.remove(scenePanel);
2718
+// bigThree.remove(centralPanel);
2719
+// bigThree.remove(XYZPanel);
2720
+// aWindowConstraints.gridx = 0;
2721
+// aWindowConstraints.gridy = 0;
2722
+// aWindowConstraints.gridwidth = 1;
2723
+// // aConstraints.gridheight = 3;
2724
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2725
+// aWindowConstraints.weightx = 0;
2726
+// aWindowConstraints.weighty = 1;
2727
+// //bigThree.add(jtp, aWindowConstraints);
2728
+// aWindowConstraints.weightx = 1;
2729
+// aWindowConstraints.gridwidth = 3;
2730
+// // aConstraints.gridheight = 3;
2731
+// aWindowConstraints.gridx = 1;
2732
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2733
+// bigThree.add(centralPanel, aWindowConstraints);
2734
+// aWindowConstraints.weightx = 0;
2735
+// aWindowConstraints.gridx = 4;
2736
+// aWindowConstraints.gridwidth = 1;
2737
+// // aConstraints.gridheight = 3;
2738
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2739
+// bigThree.add(XYZPanel, aWindowConstraints);
2740
+// bigThree.validate();
2741
+// scenePanel.setVisible(false);
2742
+// centralPanel.setVisible(true);
2743
+// XYZPanel.setVisible(true);
2744
+ bigThree.ClearUI();
2745
+ bigThree.add(centralPanel);
2746
+ bigThree.add(XYZPanel);
2747
+ bigThree.FlushUI();
27112748 } else
2712
- if (event.getSource() == fourButton)
2749
+ if (source == fourButton)
27132750 {
27142751 radio.layout = fourButton;
2715
- bigThree.remove(scenePanel);
2716
- bigThree.remove(centralPanel);
2717
- bigThree.remove(XYZPanel);
2718
- aWindowConstraints.gridx = 0;
2719
- aWindowConstraints.gridy = 0;
2720
- aWindowConstraints.gridwidth = 1;
2721
- // aWindowConstraints.gridheight = 3;
2722
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2723
- aWindowConstraints.weightx = 1;
2724
- aWindowConstraints.weighty = 1;
2725
- bigThree.add(scenePanel, aWindowConstraints);
2726
- aWindowConstraints.weightx = 1;
2727
- aWindowConstraints.gridwidth = 3;
2728
- // aConstraints.gridheight = 3;
2729
- aWindowConstraints.gridx = 1;
2730
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2731
- //bigThree.add(cameraPanel, aWindowConstraints);
2732
- aWindowConstraints.weightx = 0;
2733
- aWindowConstraints.gridx = 4;
2734
- aWindowConstraints.gridwidth = 1;
2735
- // aWindowConstraints.gridheight = 3;
2736
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2737
- //bigThree.add(XYZPanel, aWindowConstraints);
2738
- bigThree.revalidate();
2752
+
2753
+// bigThree.remove(scenePanel);
2754
+// bigThree.remove(centralPanel);
2755
+// bigThree.remove(XYZPanel);
2756
+// aWindowConstraints.gridx = 0;
2757
+// aWindowConstraints.gridy = 0;
2758
+// aWindowConstraints.gridwidth = 1;
2759
+// // aWindowConstraints.gridheight = 3;
2760
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2761
+// aWindowConstraints.weightx = 1;
2762
+// aWindowConstraints.weighty = 1;
2763
+// bigThree.add(scenePanel, aWindowConstraints);
2764
+// aWindowConstraints.weightx = 1;
2765
+// aWindowConstraints.gridwidth = 3;
2766
+// // aConstraints.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
+// // aWindowConstraints.gridheight = 3;
2774
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2775
+// //bigThree.add(XYZPanel, aWindowConstraints);
2776
+// bigThree.validate();
2777
+// scenePanel.setVisible(true);
2778
+// centralPanel.setVisible(false);
2779
+// XYZPanel.setVisible(false);
2780
+ bigThree.ClearUI();
2781
+ bigThree.add(scenePanel);
2782
+ bigThree.FlushUI();
27392783 } else
2740
- if (event.getSource() == sixButton)
2784
+ if (source == sixButton)
27412785 {
27422786 radio.layout = sixButton;
2743
- bigThree.remove(scenePanel);
2744
- bigThree.remove(centralPanel);
2745
- bigThree.remove(XYZPanel);
2746
- aWindowConstraints.gridx = 0;
2747
- aWindowConstraints.gridy = 0;
2748
- aWindowConstraints.gridwidth = 1;
2749
- // aConstraints.gridheight = 3;
2750
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2751
- aWindowConstraints.weightx = 0;
2752
- aWindowConstraints.weighty = 1;
2753
- bigThree.add(scenePanel, aWindowConstraints);
2754
- aWindowConstraints.weightx = 1;
2755
- aWindowConstraints.gridwidth = 3;
2756
- // aWindowConstraints.gridheight = 3;
2757
- aWindowConstraints.gridx = 1;
2758
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2759
- bigThree.add(centralPanel, aWindowConstraints);
2760
- aWindowConstraints.weightx = 0;
2761
- aWindowConstraints.gridx = 4;
2762
- aWindowConstraints.gridwidth = 1;
2763
- // aWindowConstraints.gridheight = 3;
2764
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2765
- //bigThree.add(XYZPanel, aConstraints);
2766
- bigThree.revalidate();
2787
+
2788
+// bigThree.remove(scenePanel);
2789
+// bigThree.remove(centralPanel);
2790
+// bigThree.remove(XYZPanel);
2791
+// aWindowConstraints.gridx = 0;
2792
+// aWindowConstraints.gridy = 0;
2793
+// aWindowConstraints.gridwidth = 1;
2794
+// // aConstraints.gridheight = 3;
2795
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2796
+// aWindowConstraints.weightx = 0;
2797
+// aWindowConstraints.weighty = 1;
2798
+// bigThree.add(scenePanel, aWindowConstraints);
2799
+// aWindowConstraints.weightx = 1;
2800
+// aWindowConstraints.gridwidth = 3;
2801
+// // aWindowConstraints.gridheight = 3;
2802
+// aWindowConstraints.gridx = 1;
2803
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2804
+// bigThree.add(centralPanel, aWindowConstraints);
2805
+// aWindowConstraints.weightx = 0;
2806
+// aWindowConstraints.gridx = 4;
2807
+// aWindowConstraints.gridwidth = 1;
2808
+// // aWindowConstraints.gridheight = 3;
2809
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2810
+// //bigThree.add(XYZPanel, aConstraints);
2811
+// bigThree.validate();
2812
+// scenePanel.setVisible(true);
2813
+// centralPanel.setVisible(true);
2814
+// XYZPanel.setVisible(false);
2815
+ bigThree.ClearUI();
2816
+ bigThree.add(scenePanel);
2817
+ bigThree.add(centralPanel);
2818
+ bigThree.FlushUI();
27672819 } else
2768
- if (event.getSource() == sevenButton)
2820
+ if (source == sevenButton)
27692821 {
27702822 radio.layout = sevenButton;
2771
- bigThree.remove(scenePanel);
2772
- bigThree.remove(centralPanel);
2773
- bigThree.remove(XYZPanel);
2774
- aWindowConstraints.gridx = 0;
2775
- aWindowConstraints.gridy = 0;
2776
- aWindowConstraints.gridwidth = 1;
2777
- // aWindowConstraints.gridheight = 3;
2778
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2779
- aWindowConstraints.weightx = 0;
2780
- aWindowConstraints.weighty = 1;
2781
- bigThree.add(scenePanel, aWindowConstraints);
2782
- aWindowConstraints.weightx = 1;
2783
- aWindowConstraints.gridwidth = 3;
2784
- // aWindowConstraints.gridheight = 3;
2785
- aWindowConstraints.gridx = 1;
2786
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2787
- bigThree.add(centralPanel, aWindowConstraints);
2788
- aWindowConstraints.weightx = 0;
2789
- aWindowConstraints.gridx = 4;
2790
- aWindowConstraints.gridwidth = 1;
2791
- // aConstraints.gridheight = 3;
2792
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2793
- bigThree.add(XYZPanel, aWindowConstraints);
2794
- bigThree.revalidate();
2823
+
2824
+// bigThree.remove(scenePanel);
2825
+// bigThree.remove(centralPanel);
2826
+// bigThree.remove(XYZPanel);
2827
+// aWindowConstraints.gridx = 0;
2828
+// aWindowConstraints.gridy = 0;
2829
+// aWindowConstraints.gridwidth = 1;
2830
+// // aWindowConstraints.gridheight = 3;
2831
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2832
+// aWindowConstraints.weightx = 0;
2833
+// aWindowConstraints.weighty = 1;
2834
+// bigThree.add(scenePanel, aWindowConstraints);
2835
+// aWindowConstraints.weightx = 1;
2836
+// aWindowConstraints.gridwidth = 3;
2837
+// // aWindowConstraints.gridheight = 3;
2838
+// aWindowConstraints.gridx = 1;
2839
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2840
+// bigThree.add(centralPanel, aWindowConstraints);
2841
+// aWindowConstraints.weightx = 0;
2842
+// aWindowConstraints.gridx = 4;
2843
+// aWindowConstraints.gridwidth = 1;
2844
+// // aConstraints.gridheight = 3;
2845
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2846
+// bigThree.add(XYZPanel, aWindowConstraints);
2847
+// bigThree.validate();
2848
+// scenePanel.setVisible(true);
2849
+// centralPanel.setVisible(true);
2850
+// XYZPanel.setVisible(true);
2851
+ bigThree.ClearUI();
2852
+ bigThree.add(scenePanel);
2853
+ bigThree.add(centralPanel);
2854
+ bigThree.add(XYZPanel);
2855
+ bigThree.FlushUI();
27952856 } else
2796
- if (event.getSource() == rootButton)
2857
+ if (source == rootButton)
27972858 {
27982859 Object3D obj;
27992860 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2805,7 +2866,7 @@
28052866
28062867 refreshContents(true);
28072868 } else
2808
- if (event.getSource() == closeButton)
2869
+ if (source == closeButton)
28092870 {
28102871 //System.out.println("CLOSE: " + buttonGroup.getSelection());
28112872 cRadio ab;
....@@ -2826,11 +2887,11 @@
28262887 }
28272888 refreshContents(true);
28282889 } else
2829
- if (event.getSource() == editItem || event.getSource() == editButton)
2890
+ if (source == editItem || source == editButton)
28302891 {
28312892 EditSelection(false);
28322893 } else
2833
- if (event.getSource() == uneditButton)
2894
+ if (source == uneditButton)
28342895 {
28352896 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28362897 {
....@@ -2842,12 +2903,12 @@
28422903
28432904 child.editWindow = null; // ???????????
28442905 }
2845
- objEditor.ctrlPanel.revalidate();
2906
+ objEditor.ctrlPanel.validate();
28462907 //objEditor.jTree.clearSelection();
28472908 //objEditor.ResetSliders();
28482909 refreshContents(true);
28492910 } else
2850
- if (event.getSource() == clearPanelButton)
2911
+ if (source == clearPanelButton)
28512912 {
28522913 assert(copy == group);
28532914 //copy.ClearUI();
....@@ -2858,7 +2919,7 @@
28582919 listUI.clear();
28592920 refreshContents(true);
28602921 } else
2861
- if (event.getSource() == allParamsButton)
2922
+ if (source == allParamsButton)
28622923 {
28632924 assert(copy == group);
28642925
....@@ -2879,19 +2940,19 @@
28792940
28802941 refreshContents(true);
28812942 } else
2882
- if (event.getSource() == unselectButton)
2943
+ if (source == unselectButton)
28832944 {
28842945 objEditor.jTree.clearSelection();
28852946 // ?? oct 2012 GrafreeD.clipboard.clear();
28862947 objEditor.ResetSliders();
28872948 refreshContents(true);
28882949 } else
2889
- if(event.getSource() instanceof cRadio)
2950
+ if(source instanceof cRadio)
28902951 {
28912952 group.parent = keepparent;
28922953 group.attributes = 0;
28932954 //group.editWindow = null;
2894
- /*cRadio*/ radio = (cRadio)event.getSource();
2955
+ /*cRadio*/ radio = (cRadio)source;
28952956 Object3D obj = radio.GetObject();
28962957 System.out.println("Edit " + obj);
28972958 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2911,7 +2972,7 @@
29112972 }
29122973
29132974 copy = group;
2914
- //CameraPane.theRenderer.object = group;
2975
+ //Globals.theRenderer.object = group;
29152976 if(!useclient)
29162977 {
29172978 cameraView.renderCamera = radio.camera;
....@@ -2920,7 +2981,8 @@
29202981 cameraView.cameras[cameraView.cameracount] = radio.camera;
29212982 cameraView.targetLookAt.set(radio.camera.lookAt);
29222983 cameraView.object = group;
2923
- cameraView.lighttouched = true;
2984
+ //cameraView.lighttouched = true;
2985
+ Globals.lighttouched = true;
29242986 topView.object = group;
29252987 frontView.object = group;
29262988 sideView.object = group;
....@@ -2956,7 +3018,7 @@
29563018 if (useclient)
29573019 {
29583020 cameraView.object = client;
2959
- cameraView.lighttouched = true;
3021
+ Globals.lighttouched = true;
29603022 //topView.object = client;
29613023 //frontView.object = client;
29623024 //sideView.object = client;
....@@ -2964,7 +3026,7 @@
29643026 else
29653027 {
29663028 cameraView.object = group;
2967
- cameraView.lighttouched = true;
3029
+ Globals.lighttouched = true;
29683030 //topView.object = group;
29693031 //frontView.object = group;
29703032 //sideView.object = group;
....@@ -3472,7 +3534,7 @@
34723534 String pigment = Object3D.GetPigment(tex);
34733535 //String bump = Object3D.GetBump(tex);
34743536
3475
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3537
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
34763538
34773539 double s = v.s;
34783540
....@@ -3773,7 +3835,7 @@
37733835 group.selection.RelinkToSupport(); // july 2014
37743836 System.out.println("DONE.");
37753837 refreshContents();
3776
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3838
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37773839 }
37783840
37793841 void ReduceMesh(boolean reduction34)
....@@ -4049,25 +4111,25 @@
40494111 System.err.println("info : " + child.GetPath());
40504112 }
40514113 }
4052
- else
4053
- {
4054
- objEditor.SetMaterial(group); // .GetMaterial());
4055
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4056
- System.err.println("info : " + group.GetPath());
4057
- }
4114
+// else
4115
+// {
4116
+// objEditor.SetMaterial(group); // .GetMaterial());
4117
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4118
+// System.err.println("info : " + group.GetPath());
4119
+// }
40584120
40594121 objEditor.SetText(); // jan 2014
40604122
4061
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4123
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
40624124 CameraPane.flash = true;
40634125
40644126 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
40654127 // a camera
40664128 {
40674129 CameraPane.camerachangeframe = 0; // don't refuse it
4068
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4069
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
4070
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4130
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4131
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4132
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40714133 }
40724134
40734135 refreshContents();