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 {
....@@ -1120,6 +1143,8 @@
11201143 resetParentItem.addActionListener(this);
11211144 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11221145 repairParentItem.addActionListener(this);
1146
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1147
+ repairShadowItem.addActionListener(this);
11231148 menu.add(invariantsItem = new MenuItem("Invariants"));
11241149 invariantsItem.addActionListener(this);
11251150 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1480,6 +1505,7 @@
14801505 //
14811506 public void actionPerformed(ActionEvent event) // , Object arg)
14821507 {
1508
+ Object source = event.getSource();
14831509 /*
14841510 if (event.getSource() == nameField)
14851511 {
....@@ -1491,11 +1517,11 @@
14911517 }
14921518 else
14931519 */
1494
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1520
+ if (source == lookAtItem || source == lookFromItem)
14951521 {
14961522 ScreenFit();
14971523 } else
1498
- if (event.getSource() == switchItem)
1524
+ if (source == switchItem)
14991525 {
15001526 cVector v1 = new cVector();
15011527 cVector v2 = new cVector();
....@@ -1504,11 +1530,11 @@
15041530 objEditor.cameraView.renderCamera.setAim(v2, v1);
15051531 objEditor.cameraView.repaint();
15061532 } else
1507
- if (event.getSource() == rectoidItem)
1533
+ if (source == rectoidItem)
15081534 {
15091535 makeSomething(new Box());
15101536 } else
1511
- if (event.getSource() == particleItem)
1537
+ if (source == particleItem)
15121538 {
15131539 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15141540 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1529,9 +1555,9 @@
15291555 applyExample(particleGeom, "SMOKE");
15301556 makeSomething(particleGeom);
15311557 } else
1532
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1558
+ if (source == ragdollItem || source == ragdoll2Item)
15331559 {
1534
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1560
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15351561
15361562 ragdoll.toParent = LA.newMatrix();
15371563 ragdoll.fromParent = LA.newMatrix();
....@@ -1549,7 +1575,7 @@
15491575 } else
15501576 /*
15511577 */
1552
- if (event.getSource() == heightFieldItem)
1578
+ if (source == heightFieldItem)
15531579 {
15541580 Object3D obj = new Object3D();
15551581
....@@ -1587,31 +1613,31 @@
15871613
15881614 makeSomething(obj);
15891615 } else
1590
- if (event.getSource() == gridItem)
1616
+ if (source == gridItem)
15911617 {
15921618 makeSomething(new Grid());
15931619 } else
1594
- if (event.getSource() == ellipsoidItem)
1620
+ if (source == ellipsoidItem)
15951621 {
15961622 makeSomething(new Sphere());
15971623 } else
1598
- if (event.getSource() == coneItem)
1624
+ if (source == coneItem)
15991625 {
16001626 makeSomething(new Cone());
16011627 } else
1602
- if (event.getSource() == torusItem)
1628
+ if (source == torusItem)
16031629 {
16041630 makeSomething(new Torus());
16051631 } else
1606
- if (event.getSource() == superItem)
1632
+ if (source == superItem)
16071633 {
16081634 makeSomething(new Superellipsoid());
16091635 } else
1610
- if (event.getSource() == kleinItem)
1636
+ if (source == kleinItem)
16111637 {
16121638 makeSomething(new Klein());
16131639 } else
1614
- if (event.getSource() == blobItem)
1640
+ if (source == blobItem)
16151641 {
16161642 Blob blob = new Blob();
16171643 BlobComponent comp = new BlobComponent();
....@@ -1619,15 +1645,15 @@
16191645 //blob.retile();
16201646 makeSomething(blob);
16211647 } else
1622
- if (event.getSource() == latheItem)
1648
+ if (source == latheItem)
16231649 {
16241650 makeSomething(new Lathe());
16251651 } else
1626
- if (event.getSource() == bezierItem)
1652
+ if (source == bezierItem)
16271653 {
16281654 makeSomething(new BezierSurface());
16291655 } else
1630
- if (event.getSource() == checkerItem)
1656
+ if (source == checkerItem)
16311657 {
16321658 /*
16331659 Object3D obj = new BezierSurface(5,8);
....@@ -1642,7 +1668,7 @@
16421668 */
16431669 makeSomething(new Checker());
16441670 } else
1645
- if (event.getSource() == meshItem)
1671
+ if (source == meshItem)
16461672 {
16471673 Object3D itemtomake = new Object3D();
16481674 Object3D child;
....@@ -1663,35 +1689,35 @@
16631689 makeSomething(child);
16641690 }
16651691 } else
1666
- if (event.getSource() == springItem)
1692
+ if (source == springItem)
16671693 {
16681694 cSpring s = new cSpring();
16691695 s.setup();
16701696 makeSomething(s);
16711697 } else
1672
- if (event.getSource() == flagItem)
1698
+ if (source == flagItem)
16731699 {
16741700 cSpring s = new cFlag();
16751701 s.setup();
16761702 makeSomething(s);
16771703 } else
1678
- if (event.getSource() == lightItem)
1704
+ if (source == lightItem)
16791705 {
16801706 makeSomething(new Light());
16811707 } else
1682
- if (event.getSource() == csgItem)
1708
+ if (source == csgItem)
16831709 {
16841710 group(new CSG());
16851711 } else
1686
- if (event.getSource() == templateItem)
1712
+ if (source == templateItem)
16871713 {
16881714 group(new cTemplate());
16891715 } else
1690
- if (event.getSource() == attributeItem)
1716
+ if (source == attributeItem)
16911717 {
16921718 makeSomething(new Attribute());
16931719 } else
1694
- if (event.getSource() == pointflowItem)
1720
+ if (source == pointflowItem)
16951721 {
16961722 makeSomething(new PointFlow());
16971723 } else
....@@ -1703,7 +1729,7 @@
17031729 } else
17041730 */
17051731
1706
- if (event.getSource() == superLoopItem)
1732
+ if (source == superLoopItem)
17071733 {
17081734 Composite g = new cGroup();
17091735 for (int i=0; i<15; i++)
....@@ -1725,7 +1751,7 @@
17251751
17261752 group(g);
17271753 } else
1728
- if (event.getSource() == loopItem)
1754
+ if (source == loopItem)
17291755 {
17301756 Composite csg = new GroupLeaf();
17311757 csg.count = 5;
....@@ -1734,7 +1760,7 @@
17341760 csg.addChild(child);
17351761 child.addChild(csg);
17361762 } else
1737
- if (event.getSource() == doubleItem)
1763
+ if (source == doubleItem)
17381764 {
17391765 Composite csg = new GroupLeaf();
17401766 csg.count = 5;
....@@ -1746,7 +1772,7 @@
17461772 csg.addChild(child);
17471773 child.addChild(csg);
17481774 } else
1749
- if (event.getSource() == tripleItem)
1775
+ if (source == tripleItem)
17501776 {
17511777 Composite csg = new GroupLeaf();
17521778 csg.count = 4;
....@@ -1762,70 +1788,70 @@
17621788 child.addChild(csg);
17631789 } else
17641790
1765
- if (event.getSource() == importGFDItem)
1791
+ if (source == importGFDItem)
17661792 {
17671793 ImportGFD();
17681794 } else
1769
- if (event.getSource() == importVRMLX3DItem)
1795
+ if (source == importVRMLX3DItem)
17701796 {
17711797 ImportVRMLX3D();
17721798 } else
1773
- if (event.getSource() == import3DSItem)
1799
+ if (source == import3DSItem)
17741800 {
17751801 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17761802 } else
1777
- if (event.getSource() == importOBJItem)
1803
+ if (source == importOBJItem)
17781804 {
17791805 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17801806 } else
1781
- if (event.getSource() == computeAOItem)
1807
+ if (source == computeAOItem)
17821808 {
1783
- CameraPane.drawMode = CameraPane.OCCLUSION;
1784
- CameraPane.theRenderer.repaint();
1809
+ Globals.drawMode = CameraPane.OCCLUSION;
1810
+ Globals.theRenderer.repaint();
17851811 } else
1786
- if (event.getSource() == recompileItem)
1812
+ if (source == recompileItem)
17871813 {
17881814 Recompile();
17891815 refreshContents();
17901816 } else
1791
- if (event.getSource() == editScriptItem)
1817
+ if (source == editScriptItem)
17921818 {
17931819 OpenDialog();
17941820 refreshContents();
17951821 } else
1796
- if (event.getSource() == invariantsItem)
1822
+ if (source == invariantsItem)
17971823 {
17981824 System.out.println("Invariants:");
17991825 GrafreeD.grafreeD.universe.invariants();
18001826 } else
1801
- if (event.getSource() == memoryItem)
1827
+ if (source == memoryItem)
18021828 {
18031829 //System.out.println("Invariants:");
18041830 PrintMemory();
18051831 } else
1806
- if (event.getSource() == pathItem)
1832
+ if (source == pathItem)
18071833 {
18081834 PrintPath();
18091835 } else
1810
- if (event.getSource() == analyzeItem)
1836
+ if (source == analyzeItem)
18111837 {
18121838 AnalyzeObject();
18131839 } else
1814
- if (event.getSource() == dumpItem)
1840
+ if (source == dumpItem)
18151841 {
18161842 DumpObject();
18171843 } else
1818
- if (event.getSource() == screenfitButton)
1844
+ if (source == screenfitButton)
18191845 {
18201846 //Reload(lastConverter, lastFilename, true);
18211847 ScreenFit();
18221848 } else
1823
- if (event.getSource() == screenfitpointButton)
1849
+ if (source == screenfitpointButton)
18241850 {
18251851 //Reload(lastConverter, lastFilename, true);
18261852 ScreenFitPoint();
18271853 } else
1828
- if (event.getSource() == snapobjectButton)
1854
+ if (source == snapobjectButton)
18291855 {
18301856 //Reload(lastConverter, lastFilename, true);
18311857 SnapObject();
....@@ -1836,13 +1862,13 @@
18361862 // Recompile();
18371863 // refreshContents();
18381864 // } else
1839
- if (event.getSource() == gcButton)
1865
+ if (source == gcButton)
18401866 {
18411867 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18421868 System.gc();
18431869 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18441870 } else
1845
- if (event.getSource() == editLeafItem)
1871
+ if (source == editLeafItem)
18461872 {
18471873 Object3D obj;
18481874 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1856,62 +1882,62 @@
18561882 }
18571883 refreshContents(true);
18581884 } else
1859
- if (event.getSource() == openWindowItem)
1885
+ if (source == openWindowItem)
18601886 {
18611887 EditSelection(true);
18621888 } else
1863
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1889
+ if (source == cutItem || source == clearButton)
18641890 {
18651891 loadClipboard(true);
18661892 } else
1867
- if (event.getSource() == duplicateItem)
1893
+ if (source == duplicateItem)
18681894 {
18691895 Object3D keep = GrafreeD.clipboard;
18701896 loadClipboard(false);
18711897 paste(false);
18721898 GrafreeD.clipboard = keep;
18731899 } else
1874
- if (event.getSource() == cloneItem)
1900
+ if (source == cloneItem)
18751901 {
18761902 CloneSelection(false);
18771903 } else
1878
- if (event.getSource() == cloneSupportItem)
1904
+ if (source == cloneSupportItem)
18791905 {
18801906 CloneSelection(true);
18811907 } else
1882
- if (event.getSource() == copyItem)
1908
+ if (source == copyItem)
18831909 {
18841910 loadClipboard(false);
18851911 } else
1886
- if (event.getSource() == pasteItem)
1912
+ if (source == pasteItem)
18871913 {
18881914 paste(false);
18891915 } else
1890
- if (event.getSource() == pasteLinkItem)
1916
+ if (source == pasteLinkItem)
18911917 {
18921918 pasteInto(false);
18931919 } else
1894
- if (event.getSource() == pasteCloneItem)
1920
+ if (source == pasteCloneItem)
18951921 {
18961922 pasteInto(true);
18971923 } else
1898
- if (event.getSource() == pasteExpandItem)
1924
+ if (source == pasteExpandItem)
18991925 {
19001926 paste(true);
19011927 } else
1902
- if (event.getSource() == synchronizeItem)
1928
+ if (source == synchronizeItem)
19031929 {
19041930 Overwrite(Object3D.TRANSFORM);
19051931 } else
1906
- if (event.getSource() == overwriteNameItem)
1932
+ if (source == overwriteNameItem)
19071933 {
19081934 Overwrite(Object3D.NAME);
19091935 } else
1910
- if (event.getSource() == overwriteUVItem)
1936
+ if (source == overwriteUVItem)
19111937 {
19121938 Overwrite(Object3D.UV);
19131939 } else
1914
- if (event.getSource() == overwriteMatItem)
1940
+ if (source == overwriteMatItem)
19151941 {
19161942 /* july 2015
19171943 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1931,7 +1957,7 @@
19311957
19321958 Overwrite(dropAttributes);
19331959 }
1934
- if (event.getSource() == overwriteGeoItem)
1960
+ if (source == overwriteGeoItem)
19351961 {
19361962 Overwrite(Object3D.GEOMETRY);
19371963 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1948,7 +1974,7 @@
19481974 // refreshContents();
19491975 // }
19501976 } else
1951
- if (event.getSource() == generateMeshItem)
1977
+ if (source == generateMeshItem)
19521978 {
19531979 //if (group.selection.size() == 1)
19541980 // for (int i=0; i<group.selection.size(); i++)
....@@ -1959,7 +1985,7 @@
19591985 ResetModel();
19601986 refreshContents();
19611987 } else
1962
- if (event.getSource() == extractGeometriesItem)
1988
+ if (source == extractGeometriesItem)
19631989 {
19641990 boolean one = false;
19651991
....@@ -1986,7 +2012,7 @@
19862012 ResetModel();
19872013 refreshContents();
19882014 } else
1989
- if (event.getSource() == cloneGeometriesItem)
2015
+ if (source == cloneGeometriesItem)
19902016 {
19912017 boolean one = false;
19922018
....@@ -2012,7 +2038,7 @@
20122038 ResetModel();
20132039 refreshContents();
20142040 } else
2015
- if (event.getSource() == shareGeometriesItem)
2041
+ if (source == shareGeometriesItem)
20162042 {
20172043 boolean one = false;
20182044
....@@ -2042,7 +2068,7 @@
20422068 refreshContents();
20432069 }
20442070 } else
2045
- if (event.getSource() == mergeGeometriesItem)
2071
+ if (source == mergeGeometriesItem)
20462072 {
20472073 boolean one = false;
20482074
....@@ -2072,7 +2098,7 @@
20722098 ResetModel();
20732099 refreshContents();
20742100 } else
2075
- if (event.getSource() == linkverticesItem)
2101
+ if (source == linkverticesItem)
20762102 {
20772103 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20782104 // {
....@@ -2092,7 +2118,7 @@
20922118 if (content instanceof cGroup && ((cGroup)content).transientlink )
20932119 content = ((cGroup)content).get(0);
20942120
2095
- 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));
20962122 for (int i=0; i<group.selection.size(); i++)
20972123 {
20982124 boolean random = CameraPane.RANDOM;
....@@ -2101,11 +2127,11 @@
21012127 // group.selection.get(i).setMasterThis(content); // should be identity
21022128 CameraPane.RANDOM = random;
21032129 }
2104
- 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));
21052131 refreshContents();
21062132 }
21072133 } else
2108
- if (event.getSource() == resetsupportItem)
2134
+ if (source == resetsupportItem)
21092135 {
21102136 for (int i=0; i<group.selection.size(); i++)
21112137 {
....@@ -2117,7 +2143,7 @@
21172143
21182144 refreshContents();
21192145 } else
2120
- if (event.getSource() == relinkverticesItem)
2146
+ if (source == relinkverticesItem)
21212147 {
21222148 boolean random = CameraPane.RANDOM;
21232149 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2126,7 +2152,7 @@
21262152
21272153 refreshContents();
21282154 } else
2129
- if (event.getSource() == resetreferencesItem)
2155
+ if (source == resetreferencesItem)
21302156 {
21312157 for (int i=0; i<group.selection.size(); i++)
21322158 {
....@@ -2135,7 +2161,7 @@
21352161
21362162 refreshContents();
21372163 } else
2138
- if (event.getSource() == setMasterItem)
2164
+ if (source == setMasterItem)
21392165 {
21402166 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21412167 {
....@@ -2148,7 +2174,7 @@
21482174 refreshContents();
21492175 }
21502176 } else
2151
- if (event.getSource() == poseMeshItem)
2177
+ if (source == poseMeshItem)
21522178 {
21532179 if (group.selection.size() == 1)
21542180 {
....@@ -2167,19 +2193,19 @@
21672193 }
21682194
21692195 } else
2170
- if (event.getSource() == revertMeshItem)
2196
+ if (source == revertMeshItem)
21712197 {
21722198 RevertMeshes();
21732199 } else
2174
- if (event.getSource() == resetMeshItem)
2200
+ if (source == resetMeshItem)
21752201 {
21762202 ResetAll();
21772203 } else
2178
- if (event.getSource() == stepAllItem)
2204
+ if (source == stepAllItem)
21792205 {
21802206 StepAll();
21812207 } else
2182
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2208
+ if (source == clearItem) // || event.getSource() == clearButton)
21832209 {
21842210 //int indices[] = jList.getSelectedIndices();
21852211 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2187,46 +2213,46 @@
21872213
21882214 ClearSelection(false);
21892215 } else
2190
- if (event.getSource() == clearAllItem)
2216
+ if (source == clearAllItem)
21912217 {
21922218 ClearSelection(true);
21932219 } else
2194
- if (event.getSource() == grabItem)
2220
+ if (source == grabItem)
21952221 {
21962222 group(new cGroup(), true);
21972223 } else
2198
- if (event.getSource() == hideItem)
2224
+ if (source == hideItem)
21992225 {
22002226 group(new HiddenObject());
22012227 } else
2202
- if (event.getSource() == frontItem)
2228
+ if (source == frontItem)
22032229 {
22042230 front();
22052231 } else
2206
- if (event.getSource() == backItem)
2232
+ if (source == backItem)
22072233 {
22082234 back();
22092235 } else
2210
- if (event.getSource() == cameraItem)
2236
+ if (source == cameraItem)
22112237 {
22122238 makeSomething(new Camera());
22132239 } else
2214
- if (event.getSource() == compositeItem)
2240
+ if (source == compositeItem)
22152241 {
22162242 group(new Composite());
22172243 } else
2218
- if (event.getSource() == randomItem)
2244
+ if (source == randomItem)
22192245 {
22202246 RandomNode random = new RandomNode();
22212247 group(random);
22222248 if (random.size() > 0)
22232249 random.name = random.get(0).name + "Rnd";
22242250 } else
2225
- if (event.getSource() == physicsItem)
2251
+ if (source == physicsItem)
22262252 {
22272253 group(new PhysicsNode());
22282254 } else
2229
- if (event.getSource() == frameselectorItem)
2255
+ if (source == frameselectorItem)
22302256 {
22312257 for (int i=0; i<group.selection.size(); i++)
22322258 {
....@@ -2238,7 +2264,7 @@
22382264 ResetModel();
22392265 refreshContents();
22402266 } else
2241
- if (event.getSource() == switchGeoItem)
2267
+ if (source == switchGeoItem)
22422268 {
22432269 for (int i=0; i<group.selection.size(); i++)
22442270 {
....@@ -2250,7 +2276,7 @@
22502276 ResetModel();
22512277 refreshContents();
22522278 } else
2253
- if (event.getSource() == switchTransfoItem)
2279
+ if (source == switchTransfoItem)
22542280 {
22552281 for (int i=0; i<group.selection.size(); i++)
22562282 {
....@@ -2262,7 +2288,7 @@
22622288 ResetModel();
22632289 refreshContents();
22642290 } else
2265
- if (event.getSource() == morphItem)
2291
+ if (source == morphItem)
22662292 {
22672293 for (int i=0; i<group.selection.size(); i++)
22682294 {
....@@ -2274,7 +2300,7 @@
22742300 ResetModel();
22752301 refreshContents();
22762302 } else
2277
- if (event.getSource() == scriptNodeItem)
2303
+ if (source == scriptNodeItem)
22782304 {
22792305 boolean atleastone = false;
22802306
....@@ -2313,31 +2339,31 @@
23132339 }
23142340 }
23152341 } else
2316
- if (event.getSource() == linkerItem)
2342
+ if (source == linkerItem)
23172343 {
23182344 group(new cLinker());
23192345 } else
2320
- if (event.getSource() == textureItem)
2346
+ if (source == textureItem)
23212347 {
23222348 group(new TextureNode());
23232349 } else
2324
- if (event.getSource() == billboardItem)
2350
+ if (source == billboardItem)
23252351 {
23262352 group(new BillboardNode());
23272353 } else
2328
- if (event.getSource() == shadowXItem)
2354
+ if (source == shadowXItem)
23292355 {
23302356 CastShadow(0);
23312357 } else
2332
- if (event.getSource() == shadowYItem)
2358
+ if (source == shadowYItem)
23332359 {
23342360 CastShadow(1);
23352361 } else
2336
- if (event.getSource() == shadowZItem)
2362
+ if (source == shadowZItem)
23372363 {
23382364 CastShadow(2);
23392365 } else
2340
- if (event.getSource() == ungroupItem)
2366
+ if (source == ungroupItem)
23412367 {
23422368 //ungroup();
23432369 for (int i=0; i<group.selection.size(); i++)
....@@ -2349,179 +2375,179 @@
23492375
23502376 refreshContents();
23512377 } else
2352
- if (event.getSource() == genUVItem)
2378
+ if (source == genUVItem)
23532379 {
23542380 GenUV();
23552381 } else
2356
- if (event.getSource() == genNormalsCADItem)
2382
+ if (source == genNormalsCADItem)
23572383 {
23582384 GenNormals(true);
23592385 } else
2360
- if (event.getSource() == genNormalsMESHItem)
2386
+ if (source == genNormalsMESHItem)
23612387 {
23622388 GenNormals(true); // TODO
23632389 } else
2364
- if (event.getSource() == genNormalsORGANItem)
2390
+ if (source == genNormalsORGANItem)
23652391 {
23662392 GenNormals(false);
23672393 } else
2368
- if (event.getSource() == genNormalsMINEItem)
2394
+ if (source == genNormalsMINEItem)
23692395 {
23702396 GenNormalsMINE();
23712397 } else
2372
- if (event.getSource() == stripifyItem)
2398
+ if (source == stripifyItem)
23732399 {
23742400 Stripify();
23752401 } else
2376
- if (event.getSource() == unstripifyItem)
2402
+ if (source == unstripifyItem)
23772403 {
23782404 Unstripify();
23792405 } else
2380
- if (event.getSource() == trimItem)
2406
+ if (source == trimItem)
23812407 {
23822408 Trim();
23832409 } else
2384
- if (event.getSource() == untrimItem)
2410
+ if (source == untrimItem)
23852411 {
23862412 Untrim();
23872413 } else
2388
- if (event.getSource() == clearColorsItem)
2414
+ if (source == clearColorsItem)
23892415 {
23902416 ClearColors();
23912417 } else
2392
- if (event.getSource() == clearMaterialsItem)
2418
+ if (source == clearMaterialsItem)
23932419 {
23942420 ClearMaterials();
23952421 } else
2396
- if (event.getSource() == liveleavesItem)
2422
+ if (source == liveleavesItem)
23972423 {
23982424 LiveLeaves(true);
23992425 } else
2400
- if (event.getSource() == unliveleavesItem)
2426
+ if (source == unliveleavesItem)
24012427 {
24022428 LiveLeaves(false);
24032429 } else
2404
- if (event.getSource() == supportleavesItem)
2430
+ if (source == supportleavesItem)
24052431 {
24062432 SupportLeaves(true);
24072433 } else
2408
- if (event.getSource() == unsupportleavesItem)
2434
+ if (source == unsupportleavesItem)
24092435 {
24102436 SupportLeaves(false);
24112437 } else
2412
- if (event.getSource() == hideleavesItem)
2438
+ if (source == hideleavesItem)
24132439 {
24142440 HideLeaves(true);
24152441 } else
2416
- if (event.getSource() == showleavesItem)
2442
+ if (source == showleavesItem)
24172443 {
24182444 HideLeaves(false);
24192445 } else
2420
- if (event.getSource() == markleavesItem)
2446
+ if (source == markleavesItem)
24212447 {
24222448 MarkLeaves(true);
24232449 } else
2424
- if (event.getSource() == unmarkleavesItem)
2450
+ if (source == unmarkleavesItem)
24252451 {
24262452 MarkLeaves(false);
24272453 } else
2428
- if (event.getSource() == flipVItem)
2454
+ if (source == flipVItem)
24292455 {
24302456 FlipV(true);
24312457 } else
2432
- if (event.getSource() == unflipVItem)
2458
+ if (source == unflipVItem)
24332459 {
24342460 FlipV(false);
24352461 } else
2436
- if (event.getSource() == lowTexturesItem)
2462
+ if (source == lowTexturesItem)
24372463 {
24382464 SetTexRes(0);
24392465 } else
2440
- if (event.getSource() == normalTexturesItem)
2466
+ if (source == normalTexturesItem)
24412467 {
24422468 SetTexRes(1);
24432469 } else
2444
- if (event.getSource() == highTexturesItem)
2470
+ if (source == highTexturesItem)
24452471 {
24462472 SetTexRes(2);
24472473 } else
2448
- if (event.getSource() == veryhighTexturesItem)
2474
+ if (source == veryhighTexturesItem)
24492475 {
24502476 SetTexRes(3);
24512477 } else
2452
- if (event.getSource() == maxTexturesItem)
2478
+ if (source == maxTexturesItem)
24532479 {
24542480 SetTexRes(4);
24552481 } else
2456
- if (event.getSource() == panoTexturesItem)
2482
+ if (source == panoTexturesItem)
24572483 {
24582484 SetTexRes(5);
24592485 } else
2460
- if (event.getSource() == reverseNormalsItem)
2486
+ if (source == reverseNormalsItem)
24612487 {
24622488 ReverseNormals();
24632489 } else
2464
- if (event.getSource() == parseverticesItem)
2490
+ if (source == parseverticesItem)
24652491 {
24662492 ParseVertices();
24672493 } else
2468
- if (event.getSource() == textureFieldItem)
2494
+ if (source == textureFieldItem)
24692495 {
24702496 TextureVertices();
24712497 } else
2472
- if (event.getSource() == alignItem)
2498
+ if (source == alignItem)
24732499 {
24742500 Align();
24752501 } else
2476
- if (event.getSource() == mirrorItem)
2502
+ if (source == mirrorItem)
24772503 {
24782504 MirrorPoses();
24792505 } else
2480
- if (event.getSource() == reduceMorphItem)
2506
+ if (source == reduceMorphItem)
24812507 {
24822508 MeshReduction(false);
24832509 } else
2484
- if (event.getSource() == reduce34MorphItem)
2510
+ if (source == reduce34MorphItem)
24852511 {
24862512 MeshReduction(true);
24872513 } else
2488
- if (event.getSource() == reverseTrianglesItem)
2514
+ if (source == reverseTrianglesItem)
24892515 {
24902516 ReverseTriangles();
24912517 } else
2492
- if (event.getSource() == reduceMeshItem)
2518
+ if (source == reduceMeshItem)
24932519 {
24942520 ReduceMesh(false);
24952521 } else
2496
- if (event.getSource() == reduce34MeshItem)
2522
+ if (source == reduce34MeshItem)
24972523 {
24982524 ReduceMesh(true);
24992525 } else
2500
- if (event.getSource() == increaseMeshItem)
2526
+ if (source == increaseMeshItem)
25012527 {
25022528 IncreaseMesh();
25032529 } else
2504
- if (event.getSource() == clipMeshItem)
2530
+ if (source == clipMeshItem)
25052531 {
25062532 ClipMesh();
25072533 } else
2508
- if (event.getSource() == smoothMeshItem)
2534
+ if (source == smoothMeshItem)
25092535 {
25102536 SmoothMesh();
25112537 } else
2512
- if (event.getSource() == transformgeometryItem)
2538
+ if (source == transformgeometryItem)
25132539 {
25142540 TransformGeometry();
25152541 } else
2516
- if (event.getSource() == resetTransformItem)
2542
+ if (source == resetTransformItem)
25172543 {
25182544 ResetTransform();
25192545 } else
2520
- if (event.getSource() == resetCentroidItem)
2546
+ if (source == resetCentroidItem)
25212547 {
25222548 ResetCentroid();
25232549 } else
2524
- if (event.getSource() == resetParentItem)
2550
+ if (source == resetParentItem)
25252551 {
25262552 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25272553 {
....@@ -2531,7 +2557,7 @@
25312557
25322558 refreshContents();
25332559 } else
2534
- if (event.getSource() == repairParentItem)
2560
+ if (source == repairParentItem)
25352561 {
25362562 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25372563 {
....@@ -2545,7 +2571,21 @@
25452571
25462572 refreshContents();
25472573 } else
2548
- if (event.getSource() == sortbysizeItem)
2574
+ if (source == repairShadowItem)
2575
+ {
2576
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2577
+ {
2578
+ Object3D obj = (Object3D)e.nextElement();
2579
+ obj.RepairShadow();
2580
+// for (int i=0; i<obj.size(); i++)
2581
+// {
2582
+// obj.get(i).parent = obj;
2583
+// }
2584
+ }
2585
+
2586
+ refreshContents();
2587
+ } else
2588
+ if (source == sortbysizeItem)
25492589 {
25502590 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25512591 {
....@@ -2557,7 +2597,7 @@
25572597 ResetModel();
25582598 refreshContents();
25592599 } else
2560
- if (event.getSource() == sortbynameItem)
2600
+ if (source == sortbynameItem)
25612601 {
25622602 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25632603 {
....@@ -2569,7 +2609,7 @@
25692609 ResetModel();
25702610 refreshContents();
25712611 } else
2572
- if (event.getSource() == attachPigmentItem)
2612
+ if (source == attachPigmentItem)
25732613 {
25742614 String texture = GetFile("Attach pigment");
25752615 Object3D obj;
....@@ -2581,7 +2621,7 @@
25812621
25822622 refreshContents();
25832623 } else
2584
- if (event.getSource() == detachPigmentItem)
2624
+ if (source == detachPigmentItem)
25852625 {
25862626 Object3D obj;
25872627 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2592,7 +2632,7 @@
25922632
25932633 refreshContents();
25942634 } else
2595
- if (event.getSource() == attachBumpItem)
2635
+ if (source == attachBumpItem)
25962636 {
25972637 String texture = GetFile("Attach bump");
25982638 Object3D obj;
....@@ -2604,7 +2644,7 @@
26042644
26052645 refreshContents();
26062646 } else
2607
- if (event.getSource() == detachBumpItem)
2647
+ if (source == detachBumpItem)
26082648 {
26092649 Object3D obj;
26102650 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2615,7 +2655,7 @@
26152655
26162656 refreshContents();
26172657 } else
2618
- if (event.getSource() == pigmentBumpItem)
2658
+ if (source == pigmentBumpItem)
26192659 {
26202660 Object3D obj;
26212661 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2626,158 +2666,195 @@
26262666
26272667 refreshContents();
26282668 } else
2629
- if (event.getSource() == flashSelectionButton)
2669
+ if (source == flashSelectionButton)
26302670 {
26312671 CameraPane.flash = true;
26322672 refreshContents();
26332673 } else
2634
- if (event.getSource() == oneButton)
2674
+ if (source == oneButton)
26352675 {
26362676 } else
2637
- if (event.getSource() == twoButton)
2677
+ if (source == twoButton)
26382678 {
26392679 radio.layout = twoButton;
26402680 // bug
26412681 //gridPanel.setDividerLocation(1.0);
26422682 //bigPanel.setDividerLocation(0.0);
2643
- bigThree.remove(scenePanel);
2644
- bigThree.remove(centralPanel);
2645
- bigThree.remove(XYZPanel);
2646
- aWindowConstraints.gridx = 0;
2647
- aWindowConstraints.gridy = 0;
2648
- aWindowConstraints.gridwidth = 1;
2649
- // aConstraints.gridheight = 3;
2650
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2651
- aWindowConstraints.weightx = 0;
2652
- aWindowConstraints.weighty = 1;
2653
- //bigThree.add(jtp, aWindowConstraints);
2654
- aWindowConstraints.weightx = 1;
2655
- aWindowConstraints.gridwidth = 3;
2656
- // aConstraints.gridheight = 3;
2657
- aWindowConstraints.gridx = 1;
2658
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2659
- bigThree.add(centralPanel, aWindowConstraints);
2660
- aWindowConstraints.weightx = 0;
2661
- aWindowConstraints.gridx = 4;
2662
- aWindowConstraints.gridwidth = 1;
2663
- // aConstraints.gridheight = 3;
2664
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2665
- //bigThree.add(XYZPanel, aWindowConstraints);
2666
- bigThree.revalidate();
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();
26672712 } else
2668
- if (event.getSource() == threeButton)
2713
+ if (source == threeButton)
26692714 {
26702715 radio.layout = threeButton;
2671
- bigThree.remove(scenePanel);
2672
- bigThree.remove(centralPanel);
2673
- bigThree.remove(XYZPanel);
2674
- aWindowConstraints.gridx = 0;
2675
- aWindowConstraints.gridy = 0;
2676
- aWindowConstraints.gridwidth = 1;
2677
- // aConstraints.gridheight = 3;
2678
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2679
- aWindowConstraints.weightx = 0;
2680
- aWindowConstraints.weighty = 1;
2681
- //bigThree.add(jtp, aWindowConstraints);
2682
- aWindowConstraints.weightx = 1;
2683
- aWindowConstraints.gridwidth = 3;
2684
- // aConstraints.gridheight = 3;
2685
- aWindowConstraints.gridx = 1;
2686
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2687
- bigThree.add(centralPanel, aWindowConstraints);
2688
- aWindowConstraints.weightx = 0;
2689
- aWindowConstraints.gridx = 4;
2690
- aWindowConstraints.gridwidth = 1;
2691
- // aConstraints.gridheight = 3;
2692
- aConstraints.fill = GridBagConstraints.VERTICAL;
2693
- bigThree.add(XYZPanel, aWindowConstraints);
2694
- bigThree.revalidate();
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();
26952748 } else
2696
- if (event.getSource() == fourButton)
2749
+ if (source == fourButton)
26972750 {
26982751 radio.layout = fourButton;
2699
- bigThree.remove(scenePanel);
2700
- bigThree.remove(centralPanel);
2701
- bigThree.remove(XYZPanel);
2702
- aWindowConstraints.gridx = 0;
2703
- aWindowConstraints.gridy = 0;
2704
- aWindowConstraints.gridwidth = 1;
2705
- // aWindowConstraints.gridheight = 3;
2706
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2707
- aWindowConstraints.weightx = 1;
2708
- aWindowConstraints.weighty = 1;
2709
- bigThree.add(scenePanel, aWindowConstraints);
2710
- aWindowConstraints.weightx = 1;
2711
- aWindowConstraints.gridwidth = 3;
2712
- // aConstraints.gridheight = 3;
2713
- aWindowConstraints.gridx = 1;
2714
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2715
- //bigThree.add(cameraPanel, aWindowConstraints);
2716
- aWindowConstraints.weightx = 0;
2717
- aWindowConstraints.gridx = 4;
2718
- aWindowConstraints.gridwidth = 1;
2719
- // aWindowConstraints.gridheight = 3;
2720
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2721
- //bigThree.add(XYZPanel, aWindowConstraints);
2722
- bigThree.revalidate();
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();
27232783 } else
2724
- if (event.getSource() == sixButton)
2784
+ if (source == sixButton)
27252785 {
27262786 radio.layout = sixButton;
2727
- bigThree.remove(scenePanel);
2728
- bigThree.remove(centralPanel);
2729
- bigThree.remove(XYZPanel);
2730
- aWindowConstraints.gridx = 0;
2731
- aWindowConstraints.gridy = 0;
2732
- aWindowConstraints.gridwidth = 1;
2733
- // aConstraints.gridheight = 3;
2734
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2735
- aWindowConstraints.weightx = 0;
2736
- aWindowConstraints.weighty = 1;
2737
- bigThree.add(scenePanel, aWindowConstraints);
2738
- aWindowConstraints.weightx = 1;
2739
- aWindowConstraints.gridwidth = 3;
2740
- // aWindowConstraints.gridheight = 3;
2741
- aWindowConstraints.gridx = 1;
2742
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2743
- bigThree.add(centralPanel, aWindowConstraints);
2744
- aWindowConstraints.weightx = 0;
2745
- aWindowConstraints.gridx = 4;
2746
- aWindowConstraints.gridwidth = 1;
2747
- // aWindowConstraints.gridheight = 3;
2748
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2749
- //bigThree.add(XYZPanel, aConstraints);
2750
- bigThree.revalidate();
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();
27512819 } else
2752
- if (event.getSource() == sevenButton)
2820
+ if (source == sevenButton)
27532821 {
27542822 radio.layout = sevenButton;
2755
- bigThree.remove(scenePanel);
2756
- bigThree.remove(centralPanel);
2757
- bigThree.remove(XYZPanel);
2758
- aWindowConstraints.gridx = 0;
2759
- aWindowConstraints.gridy = 0;
2760
- aWindowConstraints.gridwidth = 1;
2761
- // aWindowConstraints.gridheight = 3;
2762
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2763
- aWindowConstraints.weightx = 0;
2764
- aWindowConstraints.weighty = 1;
2765
- bigThree.add(scenePanel, aWindowConstraints);
2766
- aWindowConstraints.weightx = 1;
2767
- aWindowConstraints.gridwidth = 3;
2768
- // aWindowConstraints.gridheight = 3;
2769
- aWindowConstraints.gridx = 1;
2770
- aWindowConstraints.fill = GridBagConstraints.BOTH;
2771
- bigThree.add(centralPanel, aWindowConstraints);
2772
- aWindowConstraints.weightx = 0;
2773
- aWindowConstraints.gridx = 4;
2774
- aWindowConstraints.gridwidth = 1;
2775
- // aConstraints.gridheight = 3;
2776
- aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2777
- bigThree.add(XYZPanel, aWindowConstraints);
2778
- bigThree.revalidate();
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();
27792856 } else
2780
- if (event.getSource() == rootButton)
2857
+ if (source == rootButton)
27812858 {
27822859 Object3D obj;
27832860 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2789,7 +2866,7 @@
27892866
27902867 refreshContents(true);
27912868 } else
2792
- if (event.getSource() == closeButton)
2869
+ if (source == closeButton)
27932870 {
27942871 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27952872 cRadio ab;
....@@ -2810,11 +2887,11 @@
28102887 }
28112888 refreshContents(true);
28122889 } else
2813
- if (event.getSource() == editItem || event.getSource() == editButton)
2890
+ if (source == editItem || source == editButton)
28142891 {
28152892 EditSelection(false);
28162893 } else
2817
- if (event.getSource() == uneditButton)
2894
+ if (source == uneditButton)
28182895 {
28192896 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28202897 {
....@@ -2826,12 +2903,12 @@
28262903
28272904 child.editWindow = null; // ???????????
28282905 }
2829
- objEditor.ctrlPanel.revalidate();
2906
+ objEditor.ctrlPanel.validate();
28302907 //objEditor.jTree.clearSelection();
28312908 //objEditor.ResetSliders();
28322909 refreshContents(true);
28332910 } else
2834
- if (event.getSource() == clearPanelButton)
2911
+ if (source == clearPanelButton)
28352912 {
28362913 assert(copy == group);
28372914 //copy.ClearUI();
....@@ -2842,7 +2919,7 @@
28422919 listUI.clear();
28432920 refreshContents(true);
28442921 } else
2845
- if (event.getSource() == allParamsButton)
2922
+ if (source == allParamsButton)
28462923 {
28472924 assert(copy == group);
28482925
....@@ -2863,19 +2940,19 @@
28632940
28642941 refreshContents(true);
28652942 } else
2866
- if (event.getSource() == unselectButton)
2943
+ if (source == unselectButton)
28672944 {
28682945 objEditor.jTree.clearSelection();
28692946 // ?? oct 2012 GrafreeD.clipboard.clear();
28702947 objEditor.ResetSliders();
28712948 refreshContents(true);
28722949 } else
2873
- if(event.getSource() instanceof cRadio)
2950
+ if(source instanceof cRadio)
28742951 {
28752952 group.parent = keepparent;
28762953 group.attributes = 0;
28772954 //group.editWindow = null;
2878
- /*cRadio*/ radio = (cRadio)event.getSource();
2955
+ /*cRadio*/ radio = (cRadio)source;
28792956 Object3D obj = radio.GetObject();
28802957 System.out.println("Edit " + obj);
28812958 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2895,7 +2972,7 @@
28952972 }
28962973
28972974 copy = group;
2898
- //CameraPane.theRenderer.object = group;
2975
+ //Globals.theRenderer.object = group;
28992976 if(!useclient)
29002977 {
29012978 cameraView.renderCamera = radio.camera;
....@@ -2904,7 +2981,8 @@
29042981 cameraView.cameras[cameraView.cameracount] = radio.camera;
29052982 cameraView.targetLookAt.set(radio.camera.lookAt);
29062983 cameraView.object = group;
2907
- cameraView.lighttouched = true;
2984
+ //cameraView.lighttouched = true;
2985
+ Globals.lighttouched = true;
29082986 topView.object = group;
29092987 frontView.object = group;
29102988 sideView.object = group;
....@@ -2940,7 +3018,7 @@
29403018 if (useclient)
29413019 {
29423020 cameraView.object = client;
2943
- cameraView.lighttouched = true;
3021
+ Globals.lighttouched = true;
29443022 //topView.object = client;
29453023 //frontView.object = client;
29463024 //sideView.object = client;
....@@ -2948,7 +3026,7 @@
29483026 else
29493027 {
29503028 cameraView.object = group;
2951
- cameraView.lighttouched = true;
3029
+ Globals.lighttouched = true;
29523030 //topView.object = group;
29533031 //frontView.object = group;
29543032 //sideView.object = group;
....@@ -3456,7 +3534,7 @@
34563534 String pigment = Object3D.GetPigment(tex);
34573535 //String bump = Object3D.GetBump(tex);
34583536
3459
- 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);
34603538
34613539 double s = v.s;
34623540
....@@ -3757,7 +3835,7 @@
37573835 group.selection.RelinkToSupport(); // july 2014
37583836 System.out.println("DONE.");
37593837 refreshContents();
3760
- 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));
37613839 }
37623840
37633841 void ReduceMesh(boolean reduction34)
....@@ -4033,25 +4111,25 @@
40334111 System.err.println("info : " + child.GetPath());
40344112 }
40354113 }
4036
- else
4037
- {
4038
- objEditor.SetMaterial(group); // .GetMaterial());
4039
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4040
- System.err.println("info : " + group.GetPath());
4041
- }
4114
+// else
4115
+// {
4116
+// objEditor.SetMaterial(group); // .GetMaterial());
4117
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4118
+// System.err.println("info : " + group.GetPath());
4119
+// }
40424120
40434121 objEditor.SetText(); // jan 2014
40444122
4045
- 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))
40464124 CameraPane.flash = true;
40474125
40484126 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
40494127 // a camera
40504128 {
40514129 CameraPane.camerachangeframe = 0; // don't refuse it
4052
- CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4053
- // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera;
4054
- // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera;
4130
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4131
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4132
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40554133 }
40564134
40574135 refreshContents();
....@@ -5009,6 +5087,7 @@
50095087
50105088 private MenuItem resetParentItem;
50115089 private MenuItem repairParentItem;
5090
+ private MenuItem repairShadowItem;
50125091 private MenuItem sortbysizeItem;
50135092 private MenuItem sortbynameItem;
50145093