Normand Briere
2019-05-01 d1e1417edc8a6ccf195b6da3270f22234dda61e4
GroupEditor.java
....@@ -12,6 +12,7 @@
1212 import com.jme.math.Vector3f;
1313 import com.jme.renderer.ColorRGBA;
1414
15
+import grafeme.ui.*;
1516 //import buoy.widget.BFileChooser;
1617
1718 class GroupEditor extends ObjEditor implements //iParse, //iCallBack,
....@@ -238,16 +239,16 @@
238239 ungroupItem = menu.add(new MenuItem("Ungroup"));
239240 ungroupItem.addActionListener(this);
240241 menu.add("-");
241
- randomItem = menu.add(new MenuItem("Random"));
242
+ randomItem = menu.add(new MenuItem("Switch node"));
242243 randomItem.addActionListener(this);
243
- physicsItem = menu.add(new MenuItem("Physics"));
244
- physicsItem.addActionListener(this);
245
- frameselectorItem = menu.add(new MenuItem("Frame Selector"));
246
- frameselectorItem.addActionListener(this);
247244 switchGeoItem = menu.add(new MenuItem("Switch Geometry"));
248245 switchGeoItem.addActionListener(this);
249246 switchTransfoItem = menu.add(new MenuItem("Switch Transform"));
250247 switchTransfoItem.addActionListener(this);
248
+ physicsItem = menu.add(new MenuItem("Physics"));
249
+ physicsItem.addActionListener(this);
250
+ frameselectorItem = menu.add(new MenuItem("Frame Selector"));
251
+ frameselectorItem.addActionListener(this);
251252 morphItem = menu.add(new MenuItem("Morph"));
252253 morphItem.addActionListener(this);
253254 scriptNodeItem = menu.add(new MenuItem("Script Node"));
....@@ -433,153 +434,94 @@
433434 oe.radioPanel.add(dummyButton);
434435 oe.buttonGroup.add(dummyButton);
435436 */
436
- aConstraints.gridy += 1;
437
- oe.aConstraints.gridwidth = 1;
438
- oe.aConstraints.gridx = 0;
437
+ //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
439438
440
- oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints);
439
+ oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE())); //, oe.aConstraints);
440
+ liveCB.setToolTipText("Enabled animation");
441441 liveCB.addItemListener(this);
442442
443
- oe.aConstraints.gridx += 1;
444
- oe.toolbarPanel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), oe.aConstraints);
445
- supportCB.addItemListener(this);
446
-
447
- // oe.aConstraints.gridx += 1;
448
- // oe.toolbarPanel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), oe.aConstraints);
449
- // localCB.addItemListener(this);
450
-
451
- oe.aConstraints.gridx += 1;
452
- oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints);
453
- crowdCB.addItemListener(this);
454
-
455
- oe.aConstraints.gridx += 1;
456
- oe.toolbarPanel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), oe.aConstraints);
457
- smoothCB.addItemListener(this);
458
-
459
- oe.aConstraints.gridx += 1;
460
- oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), oe.aConstraints);
443
+ oe.toolbarPanel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST)); //, constraints);
444
+ fastCB.setToolTipText("Fast mode");
461445 fastCB.addItemListener(this);
462
- oe.aConstraints.gridx += 1;
463
- oe.toolbarPanel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), oe.aConstraints);
464
- slowCB.addItemListener(this);
465
- oe.aConstraints.gridx += 1;
466
- oe.toolbarPanel.add(boxCB = new cCheckBox("Box", CameraPane.FAST), oe.aConstraints);
467
- boxCB.addItemListener(this);
468
-
469
-// oe.aConstraints.gridx += 1;
470
-// oe.toolbarPanel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), oe.aConstraints);
471
-// speakerMocapCB.addItemListener(this);
472
-
473
- if (false)
474
- {
475
- // handled in scripts
476
- oe.aConstraints.gridx += 1;
477
- oe.toolbarPanel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), oe.aConstraints);
478
- speakerCameraCB.addItemListener(this);
479
-
480
- oe.aConstraints.gridx += 1;
481
- oe.toolbarPanel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), oe.aConstraints);
482
- speakerFocusCB.addItemListener(this);
483
-
484
- oe.aConstraints.gridx += 1;
485
- oe.toolbarPanel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), oe.aConstraints);
486
- smoothfocusCB.addItemListener(this);
487
- }
488
-
489
-//oe.aConstraints.gridx += 1;
490
-//oe.toolbarPanel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), oe.aConstraints);
491
-// debugCB.addItemListener(this);
492
-
493
- oe.aConstraints.gridx += 1;
494
- oe.toolbarPanel.add(oeilCB = new cCheckBox("O", CameraPane.OEIL), oe.aConstraints);
495
- oeilCB.addItemListener(this);
496
-
497
- oe.aConstraints.gridx += 1;
498
- oe.toolbarPanel.add(lookAtCB = new cCheckBox("T", CameraPane.LOOKAT), oe.aConstraints);
499
- lookAtCB.addItemListener(this);
500
-
501
- oe.aConstraints.gridx += 1;
502
- oe.toolbarPanel.add(trackCB = new cCheckBox(":", CameraPane.TRACK), oe.aConstraints);
446
+
447
+ oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK)); //, oe.aConstraints);
448
+ trackCB.setToolTipText("Enable tracking");
503449 trackCB.addItemListener(this);
504450
505
- oe.aConstraints.gridx += 1;
506
- oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints);
451
+ oe.toolbarPanel.add(screenfitButton = new cButton("@", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
452
+ screenfitButton.setToolTipText("Screen fit");
507453 screenfitButton.addActionListener(this);
508
- oe.aConstraints.gridx += 1;
454
+
509455 // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints);
510456 // screenfitpointButton.addActionListener(this);
511
-// oe.aConstraints.gridx += 1;
512
- oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints);
513
- snapobjectButton.addActionListener(this);
514
- oe.aConstraints.gridx += 1;
515457
516
- //aConstraints.gridx = 0;
517
- //aConstraints.gridy += 1;
518
- oe.aConstraints.weighty = 0;
519
- oe.aConstraints.gridwidth = 1;
520
-
521
- oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints);
458
+ if (Globals.ADVANCED)
459
+ {
460
+ oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
461
+ snapobjectButton.addActionListener(this);
462
+ snapobjectButton.setToolTipText("Snap Object");
463
+ }
464
+
465
+ oe.toolbarPanel.add(flashSelectionButton = new cButton("?", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
466
+ flashSelectionButton.setToolTipText("Show selection");
522467 flashSelectionButton.addActionListener(this);
523468
524
- oe.toolbarPanel.add(new cButton(" ", false));
469
+ oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
525470
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);
471
+ oe.toolbarPanel.add(twoButton = new cButton("|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
472
+ twoButton.setToolTipText("Show center view only");
532473 twoButton.addActionListener(this);
533
- oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints);
474
+ oe.toolbarPanel.add(fourButton = new cButton("+||", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
534475 fourButton.addActionListener(this);
535
- oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints);
476
+ fourButton.setToolTipText("Show left panel only");
477
+ oe.toolbarPanel.add(sixButton = new cButton("+|+|", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
478
+ sixButton.setToolTipText("2-column layout left");
536479 sixButton.addActionListener(this);
537
- oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints);
480
+ oe.toolbarPanel.add(threeButton = new cButton("|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
481
+ threeButton.setToolTipText("2-column layout right");
538482 threeButton.addActionListener(this);
539
- oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints);
483
+ oe.toolbarPanel.add(sevenButton = new cButton("+|+|+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
484
+ sevenButton.setToolTipText("3-column layout");
540485 sevenButton.addActionListener(this);
541486 //
542487
543
- oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints);
488
+ oe.toolbarPanel.add(rootButton = new cButton("o o o", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
489
+ rootButton.setToolTipText("Edit selection in new tab");
544490 rootButton.addActionListener(this);
545
- oe.aConstraints.gridx += 1;
546
- oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints);
491
+
492
+ oe.toolbarPanel.add(closeButton = new cButton("X", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
493
+ closeButton.setToolTipText("Close tab");
547494 closeButton.addActionListener(this);
548495 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
549496 //clearButton.addActionListener(this);
550
- oe.aConstraints.gridx += 1;
551497
552
- oe.aConstraints.gridx = 1; //
553
- oe.treePanel.add(editButton = new cButton("+"), oe.aConstraints);
498
+ cGridBag commandsPanel = new cGridBag();
499
+
500
+ commandsPanel.add(editButton = new cButton("+", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
501
+ editButton.setToolTipText("Edit selection");
554502 editButton.addActionListener(this);
555
- oe.aConstraints.gridx += 1;
556
- oe.aConstraints.weighty = 0;
557
- oe.aConstraints.gridwidth = 1;
558503
559
- oe.treePanel.add(uneditButton = new cButton("-"), oe.aConstraints);
504
+ commandsPanel.add(uneditButton = new cButton("-", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
505
+ uneditButton.setToolTipText("Unedit selection");
560506 uneditButton.addActionListener(this);
561507
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);
508
+ commandsPanel.add(clearPanelButton = new cButton("C", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
509
+ clearPanelButton.setToolTipText("Clear edit panel");
567510 clearPanelButton.addActionListener(this);
568511
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);
512
+ commandsPanel.add(allParamsButton = new cButton("A", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
513
+ allParamsButton.setToolTipText("All params??");
574514 allParamsButton.addActionListener(this);
575515
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);
516
+ commandsPanel.add(unselectButton = new cButton("U", !GrafreeD.NIMBUSLAF)); //, oe.aConstraints);
517
+ unselectButton.setToolTipText("Unselect");
581518 unselectButton.addActionListener(this);
582519
520
+ commandsPanel.preferredHeight = 1;
521
+
522
+ oe.treePanel.add(commandsPanel);
523
+ oe.treePanel.Return();
524
+
583525 // oe.aConstraints.gridx += 1;
584526 // oe.aConstraints.weighty = 0;
585527 // oe.aConstraints.gridwidth = 1;
....@@ -591,40 +533,37 @@
591533 // oe.treePanel.add(gcButton = new cButton("GC"), oe.aConstraints);
592534 // gcButton.addActionListener(this);
593535
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;
536
+ cGridBag jSPPanel = new cGridBag();
537
+
538
+ JScrollPane jSP;
605539 //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);
540
+ jSPPanel.add(jSP = new JScrollPane(oe.jTree = new cTree(null))); //, oe.aConstraints);
607541 ResetModel();
608
- oe.aConstraints.weighty = 0.5;
609
- oe.aConstraints.fill = GridBagConstraints.HORIZONTAL;
610
- oe.aConstraints.gridy += 1;
611
- oe.aConstraints.gridwidth = 1;
542
+
543
+ oe.treePanel.add(jSPPanel);
544
+ oe.treePanel.Return();
612545
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);
546
+ cGridBag copyOptionsPanel = new cGridBag();
547
+
548
+ copyOptionsPanel.add(colorCB = new cCheckBox("Color", (dropAttributes&Object3D.COLOR)!=0)); //, oe.aConstraints);
549
+ colorCB.setToolTipText("Copy color when dropped");
617550 colorCB.addItemListener(this);
618
- oe.aConstraints.gridx += 2;
619
- oe.treePanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0), oe.aConstraints);
551
+
552
+ copyOptionsPanel.add(materialCB = new cCheckBox("Material", (dropAttributes&Object3D.MATERIAL)!=0)); //, oe.aConstraints);
553
+ materialCB.setToolTipText("Copy material when dropped");
620554 materialCB.addItemListener(this);
621
- oe.aConstraints.gridx += 2;
622
- oe.treePanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0), oe.aConstraints);
555
+
556
+ copyOptionsPanel.add(textureCB = new cCheckBox("Texture", (dropAttributes&Object3D.TEXTURE)!=0)); //, oe.aConstraints);
557
+ textureCB.setToolTipText("Copy texture when dropped");
623558 textureCB.addItemListener(this);
624559
625
- oe.aConstraints.gridx = 0;
626
- oe.aConstraints.gridy += 1;
560
+ copyOptionsPanel.preferredHeight = 1;
561
+ oe.treePanel.add(copyOptionsPanel);
562
+ oe.treePanel.Return();
627563
564
+// mainPanel.setDividerLocation(0.5); //1.0);
565
+// mainPanel.setResizeWeight(0.5);
566
+
628567 //jList.addListSelectionListener(this);
629568 oe.jTree.addTreeSelectionListener(this);
630569 //jTree.setRootVisible(false);
....@@ -646,6 +585,74 @@
646585 radio.layout = sevenButton;
647586 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
648587 }
588
+
589
+ void AddOptions(cGridBag panel) //, GridBagConstraints constraints)
590
+ {
591
+ panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT)); //, constraints);
592
+ supportCB.setToolTipText("Enabled rigging");
593
+ supportCB.addItemListener(this);
594
+
595
+ // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints);
596
+ // localCB.addItemListener(this);
597
+
598
+ panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD)); //, constraints);
599
+ crowdCB.setToolTipText("Used for crowds");
600
+ crowdCB.addItemListener(this);
601
+
602
+ panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA)); //, constraints);
603
+ smoothCB.setToolTipText("Snapping delay");
604
+ smoothCB.addItemListener(this);
605
+
606
+ panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE)); //, constraints);
607
+ slowCB.setToolTipText("Smooth interpolation");
608
+ slowCB.addItemListener(this);
609
+
610
+ panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE)); //, constraints);
611
+ boxCB.setToolTipText("Display bounding boxes");
612
+ boxCB.addItemListener(this);
613
+
614
+ panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE)); //, constraints);
615
+ zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel");
616
+ zoomBoxCB.addItemListener(this);
617
+
618
+// constraints.gridy += 1;
619
+// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints);
620
+// speakerMocapCB.addItemListener(this);
621
+
622
+ if (false)
623
+ {
624
+ // handled in scripts
625
+ //constraints.gridy += 1;
626
+ panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA)); //, constraints);
627
+ speakerCameraCB.addItemListener(this);
628
+
629
+ //constraints.gridy += 1;
630
+ panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS)); //, constraints);
631
+ speakerFocusCB.addItemListener(this);
632
+
633
+ //constraints.gridy += 1;
634
+ panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS)); //, constraints);
635
+ smoothfocusCB.addItemListener(this);
636
+ }
637
+
638
+//constraints.gridx += 1;
639
+//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints);
640
+// debugCB.addItemListener(this);
641
+
642
+ panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL)); //, constraints);
643
+ oeilCB.addItemListener(this);
644
+
645
+ panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT)); //, constraints);
646
+ lookAtCB.setToolTipText("Look-at target");
647
+ lookAtCB.addItemListener(this);
648
+
649
+ cGridBag fill = new cGridBag();
650
+
651
+ fill.preferredHeight = 200;
652
+
653
+ panel.add(fill);
654
+
655
+ }
649656
650657 void EditObject(Object3D obj)
651658 {
....@@ -676,6 +683,7 @@
676683 JCheckBox fastCB;
677684 JCheckBox slowCB;
678685 JCheckBox boxCB;
686
+ JCheckBox zoomBoxCB;
679687 JCheckBox trackCB;
680688 JCheckBox smoothfocusCB;
681689 // JCheckBox speakerMocapCB;
....@@ -755,6 +763,10 @@
755763 Recompile();
756764 cameraView.repaint();
757765 // refreshContents();
766
+ }
767
+ else if(e.getSource() == zoomBoxCB)
768
+ {
769
+ cameraView.ToggleZoomBoxMode();
758770 }
759771 else if(e.getSource() == smoothfocusCB)
760772 {
....@@ -1087,7 +1099,7 @@
10871099 {
10881100 menu.add(animationItem = new CheckboxMenuItem("Animation..."));
10891101 animationItem.addItemListener(this);
1090
- animationItem.setState(CameraPane.ANIMATION);
1102
+ animationItem.setState(Globals.ANIMATION);
10911103
10921104 menu.add("-");
10931105 parseverticesItem = menu.add(new MenuItem("Multiplicity"));
....@@ -1120,6 +1132,8 @@
11201132 resetParentItem.addActionListener(this);
11211133 repairParentItem = menu.add(new MenuItem("Repair Parent"));
11221134 repairParentItem.addActionListener(this);
1135
+ repairShadowItem = menu.add(new MenuItem("Repair Shadow"));
1136
+ repairShadowItem.addActionListener(this);
11231137 menu.add(invariantsItem = new MenuItem("Invariants"));
11241138 invariantsItem.addActionListener(this);
11251139 menu.add(recompileItem = new MenuItem("Recompile"));
....@@ -1480,6 +1494,7 @@
14801494 //
14811495 public void actionPerformed(ActionEvent event) // , Object arg)
14821496 {
1497
+ Object source = event.getSource();
14831498 /*
14841499 if (event.getSource() == nameField)
14851500 {
....@@ -1491,11 +1506,11 @@
14911506 }
14921507 else
14931508 */
1494
- if (event.getSource() == lookAtItem || event.getSource() == lookFromItem)
1509
+ if (source == lookAtItem || source == lookFromItem)
14951510 {
14961511 ScreenFit();
14971512 } else
1498
- if (event.getSource() == switchItem)
1513
+ if (source == switchItem)
14991514 {
15001515 cVector v1 = new cVector();
15011516 cVector v2 = new cVector();
....@@ -1504,11 +1519,11 @@
15041519 objEditor.cameraView.renderCamera.setAim(v2, v1);
15051520 objEditor.cameraView.repaint();
15061521 } else
1507
- if (event.getSource() == rectoidItem)
1522
+ if (source == rectoidItem)
15081523 {
15091524 makeSomething(new Box());
15101525 } else
1511
- if (event.getSource() == particleItem)
1526
+ if (source == particleItem)
15121527 {
15131528 ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType);
15141529 ParticleController particleController = new ParticleController(particleGeom);
....@@ -1529,9 +1544,9 @@
15291544 applyExample(particleGeom, "SMOKE");
15301545 makeSomething(particleGeom);
15311546 } else
1532
- if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item)
1547
+ if (source == ragdollItem || source == ragdoll2Item)
15331548 {
1534
- GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem);
1549
+ GenericJoint ragdoll = new GenericJoint(source == ragdollItem);
15351550
15361551 ragdoll.toParent = LA.newMatrix();
15371552 ragdoll.fromParent = LA.newMatrix();
....@@ -1549,7 +1564,7 @@
15491564 } else
15501565 /*
15511566 */
1552
- if (event.getSource() == heightFieldItem)
1567
+ if (source == heightFieldItem)
15531568 {
15541569 Object3D obj = new Object3D();
15551570
....@@ -1587,31 +1602,31 @@
15871602
15881603 makeSomething(obj);
15891604 } else
1590
- if (event.getSource() == gridItem)
1605
+ if (source == gridItem)
15911606 {
15921607 makeSomething(new Grid());
15931608 } else
1594
- if (event.getSource() == ellipsoidItem)
1609
+ if (source == ellipsoidItem)
15951610 {
15961611 makeSomething(new Sphere());
15971612 } else
1598
- if (event.getSource() == coneItem)
1613
+ if (source == coneItem)
15991614 {
16001615 makeSomething(new Cone());
16011616 } else
1602
- if (event.getSource() == torusItem)
1617
+ if (source == torusItem)
16031618 {
16041619 makeSomething(new Torus());
16051620 } else
1606
- if (event.getSource() == superItem)
1621
+ if (source == superItem)
16071622 {
16081623 makeSomething(new Superellipsoid());
16091624 } else
1610
- if (event.getSource() == kleinItem)
1625
+ if (source == kleinItem)
16111626 {
16121627 makeSomething(new Klein());
16131628 } else
1614
- if (event.getSource() == blobItem)
1629
+ if (source == blobItem)
16151630 {
16161631 Blob blob = new Blob();
16171632 BlobComponent comp = new BlobComponent();
....@@ -1619,15 +1634,15 @@
16191634 //blob.retile();
16201635 makeSomething(blob);
16211636 } else
1622
- if (event.getSource() == latheItem)
1637
+ if (source == latheItem)
16231638 {
16241639 makeSomething(new Lathe());
16251640 } else
1626
- if (event.getSource() == bezierItem)
1641
+ if (source == bezierItem)
16271642 {
16281643 makeSomething(new BezierSurface());
16291644 } else
1630
- if (event.getSource() == checkerItem)
1645
+ if (source == checkerItem)
16311646 {
16321647 /*
16331648 Object3D obj = new BezierSurface(5,8);
....@@ -1642,7 +1657,7 @@
16421657 */
16431658 makeSomething(new Checker());
16441659 } else
1645
- if (event.getSource() == meshItem)
1660
+ if (source == meshItem)
16461661 {
16471662 Object3D itemtomake = new Object3D();
16481663 Object3D child;
....@@ -1663,35 +1678,35 @@
16631678 makeSomething(child);
16641679 }
16651680 } else
1666
- if (event.getSource() == springItem)
1681
+ if (source == springItem)
16671682 {
16681683 cSpring s = new cSpring();
16691684 s.setup();
16701685 makeSomething(s);
16711686 } else
1672
- if (event.getSource() == flagItem)
1687
+ if (source == flagItem)
16731688 {
16741689 cSpring s = new cFlag();
16751690 s.setup();
16761691 makeSomething(s);
16771692 } else
1678
- if (event.getSource() == lightItem)
1693
+ if (source == lightItem)
16791694 {
16801695 makeSomething(new Light());
16811696 } else
1682
- if (event.getSource() == csgItem)
1697
+ if (source == csgItem)
16831698 {
16841699 group(new CSG());
16851700 } else
1686
- if (event.getSource() == templateItem)
1701
+ if (source == templateItem)
16871702 {
16881703 group(new cTemplate());
16891704 } else
1690
- if (event.getSource() == attributeItem)
1705
+ if (source == attributeItem)
16911706 {
16921707 makeSomething(new Attribute());
16931708 } else
1694
- if (event.getSource() == pointflowItem)
1709
+ if (source == pointflowItem)
16951710 {
16961711 makeSomething(new PointFlow());
16971712 } else
....@@ -1703,7 +1718,7 @@
17031718 } else
17041719 */
17051720
1706
- if (event.getSource() == superLoopItem)
1721
+ if (source == superLoopItem)
17071722 {
17081723 Composite g = new cGroup();
17091724 for (int i=0; i<15; i++)
....@@ -1725,7 +1740,7 @@
17251740
17261741 group(g);
17271742 } else
1728
- if (event.getSource() == loopItem)
1743
+ if (source == loopItem)
17291744 {
17301745 Composite csg = new GroupLeaf();
17311746 csg.count = 5;
....@@ -1734,7 +1749,7 @@
17341749 csg.addChild(child);
17351750 child.addChild(csg);
17361751 } else
1737
- if (event.getSource() == doubleItem)
1752
+ if (source == doubleItem)
17381753 {
17391754 Composite csg = new GroupLeaf();
17401755 csg.count = 5;
....@@ -1746,7 +1761,7 @@
17461761 csg.addChild(child);
17471762 child.addChild(csg);
17481763 } else
1749
- if (event.getSource() == tripleItem)
1764
+ if (source == tripleItem)
17501765 {
17511766 Composite csg = new GroupLeaf();
17521767 csg.count = 4;
....@@ -1762,70 +1777,70 @@
17621777 child.addChild(csg);
17631778 } else
17641779
1765
- if (event.getSource() == importGFDItem)
1780
+ if (source == importGFDItem)
17661781 {
17671782 ImportGFD();
17681783 } else
1769
- if (event.getSource() == importVRMLX3DItem)
1784
+ if (source == importVRMLX3DItem)
17701785 {
17711786 ImportVRMLX3D();
17721787 } else
1773
- if (event.getSource() == import3DSItem)
1788
+ if (source == import3DSItem)
17741789 {
17751790 objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS");
17761791 } else
1777
- if (event.getSource() == importOBJItem)
1792
+ if (source == importOBJItem)
17781793 {
17791794 objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ");
17801795 } else
1781
- if (event.getSource() == computeAOItem)
1796
+ if (source == computeAOItem)
17821797 {
1783
- CameraPane.drawMode = CameraPane.OCCLUSION;
1784
- CameraPane.theRenderer.repaint();
1798
+ Globals.drawMode = CameraPane.OCCLUSION;
1799
+ Globals.theRenderer.repaint();
17851800 } else
1786
- if (event.getSource() == recompileItem)
1801
+ if (source == recompileItem)
17871802 {
17881803 Recompile();
17891804 refreshContents();
17901805 } else
1791
- if (event.getSource() == editScriptItem)
1806
+ if (source == editScriptItem)
17921807 {
17931808 OpenDialog();
17941809 refreshContents();
17951810 } else
1796
- if (event.getSource() == invariantsItem)
1811
+ if (source == invariantsItem)
17971812 {
17981813 System.out.println("Invariants:");
17991814 GrafreeD.grafreeD.universe.invariants();
18001815 } else
1801
- if (event.getSource() == memoryItem)
1816
+ if (source == memoryItem)
18021817 {
18031818 //System.out.println("Invariants:");
18041819 PrintMemory();
18051820 } else
1806
- if (event.getSource() == pathItem)
1821
+ if (source == pathItem)
18071822 {
18081823 PrintPath();
18091824 } else
1810
- if (event.getSource() == analyzeItem)
1825
+ if (source == analyzeItem)
18111826 {
18121827 AnalyzeObject();
18131828 } else
1814
- if (event.getSource() == dumpItem)
1829
+ if (source == dumpItem)
18151830 {
18161831 DumpObject();
18171832 } else
1818
- if (event.getSource() == screenfitButton)
1833
+ if (source == screenfitButton)
18191834 {
18201835 //Reload(lastConverter, lastFilename, true);
18211836 ScreenFit();
18221837 } else
1823
- if (event.getSource() == screenfitpointButton)
1838
+ if (source == screenfitpointButton)
18241839 {
18251840 //Reload(lastConverter, lastFilename, true);
18261841 ScreenFitPoint();
18271842 } else
1828
- if (event.getSource() == snapobjectButton)
1843
+ if (source == snapobjectButton)
18291844 {
18301845 //Reload(lastConverter, lastFilename, true);
18311846 SnapObject();
....@@ -1836,13 +1851,13 @@
18361851 // Recompile();
18371852 // refreshContents();
18381853 // } else
1839
- if (event.getSource() == gcButton)
1854
+ if (source == gcButton)
18401855 {
18411856 System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18421857 System.gc();
18431858 System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory());
18441859 } else
1845
- if (event.getSource() == editLeafItem)
1860
+ if (source == editLeafItem)
18461861 {
18471862 Object3D obj;
18481863 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -1856,62 +1871,62 @@
18561871 }
18571872 refreshContents(true);
18581873 } else
1859
- if (event.getSource() == openWindowItem)
1874
+ if (source == openWindowItem)
18601875 {
18611876 EditSelection(true);
18621877 } else
1863
- if (event.getSource() == cutItem || event.getSource() == clearButton)
1878
+ if (source == cutItem || source == clearButton)
18641879 {
18651880 loadClipboard(true);
18661881 } else
1867
- if (event.getSource() == duplicateItem)
1882
+ if (source == duplicateItem)
18681883 {
18691884 Object3D keep = GrafreeD.clipboard;
18701885 loadClipboard(false);
18711886 paste(false);
18721887 GrafreeD.clipboard = keep;
18731888 } else
1874
- if (event.getSource() == cloneItem)
1889
+ if (source == cloneItem)
18751890 {
18761891 CloneSelection(false);
18771892 } else
1878
- if (event.getSource() == cloneSupportItem)
1893
+ if (source == cloneSupportItem)
18791894 {
18801895 CloneSelection(true);
18811896 } else
1882
- if (event.getSource() == copyItem)
1897
+ if (source == copyItem)
18831898 {
18841899 loadClipboard(false);
18851900 } else
1886
- if (event.getSource() == pasteItem)
1901
+ if (source == pasteItem)
18871902 {
18881903 paste(false);
18891904 } else
1890
- if (event.getSource() == pasteLinkItem)
1905
+ if (source == pasteLinkItem)
18911906 {
18921907 pasteInto(false);
18931908 } else
1894
- if (event.getSource() == pasteCloneItem)
1909
+ if (source == pasteCloneItem)
18951910 {
18961911 pasteInto(true);
18971912 } else
1898
- if (event.getSource() == pasteExpandItem)
1913
+ if (source == pasteExpandItem)
18991914 {
19001915 paste(true);
19011916 } else
1902
- if (event.getSource() == synchronizeItem)
1917
+ if (source == synchronizeItem)
19031918 {
19041919 Overwrite(Object3D.TRANSFORM);
19051920 } else
1906
- if (event.getSource() == overwriteNameItem)
1921
+ if (source == overwriteNameItem)
19071922 {
19081923 Overwrite(Object3D.NAME);
19091924 } else
1910
- if (event.getSource() == overwriteUVItem)
1925
+ if (source == overwriteUVItem)
19111926 {
19121927 Overwrite(Object3D.UV);
19131928 } else
1914
- if (event.getSource() == overwriteMatItem)
1929
+ if (source == overwriteMatItem)
19151930 {
19161931 /* july 2015
19171932 if ((dropAttributes & Object3D.TEXTURE) == 0)
....@@ -1931,7 +1946,7 @@
19311946
19321947 Overwrite(dropAttributes);
19331948 }
1934
- if (event.getSource() == overwriteGeoItem)
1949
+ if (source == overwriteGeoItem)
19351950 {
19361951 Overwrite(Object3D.GEOMETRY);
19371952 // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1)
....@@ -1948,7 +1963,7 @@
19481963 // refreshContents();
19491964 // }
19501965 } else
1951
- if (event.getSource() == generateMeshItem)
1966
+ if (source == generateMeshItem)
19521967 {
19531968 //if (group.selection.size() == 1)
19541969 // for (int i=0; i<group.selection.size(); i++)
....@@ -1959,7 +1974,7 @@
19591974 ResetModel();
19601975 refreshContents();
19611976 } else
1962
- if (event.getSource() == extractGeometriesItem)
1977
+ if (source == extractGeometriesItem)
19631978 {
19641979 boolean one = false;
19651980
....@@ -1986,7 +2001,7 @@
19862001 ResetModel();
19872002 refreshContents();
19882003 } else
1989
- if (event.getSource() == cloneGeometriesItem)
2004
+ if (source == cloneGeometriesItem)
19902005 {
19912006 boolean one = false;
19922007
....@@ -2012,7 +2027,7 @@
20122027 ResetModel();
20132028 refreshContents();
20142029 } else
2015
- if (event.getSource() == shareGeometriesItem)
2030
+ if (source == shareGeometriesItem)
20162031 {
20172032 boolean one = false;
20182033
....@@ -2042,7 +2057,7 @@
20422057 refreshContents();
20432058 }
20442059 } else
2045
- if (event.getSource() == mergeGeometriesItem)
2060
+ if (source == mergeGeometriesItem)
20462061 {
20472062 boolean one = false;
20482063
....@@ -2072,7 +2087,7 @@
20722087 ResetModel();
20732088 refreshContents();
20742089 } else
2075
- if (event.getSource() == linkverticesItem)
2090
+ if (source == linkverticesItem)
20762091 {
20772092 // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
20782093 // {
....@@ -2092,7 +2107,7 @@
20922107 if (content instanceof cGroup && ((cGroup)content).transientlink )
20932108 content = ((cGroup)content).get(0);
20942109
2095
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
2110
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR));
20962111 for (int i=0; i<group.selection.size(); i++)
20972112 {
20982113 boolean random = CameraPane.RANDOM;
....@@ -2101,11 +2116,11 @@
21012116 // group.selection.get(i).setMasterThis(content); // should be identity
21022117 CameraPane.RANDOM = random;
21032118 }
2104
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
2119
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
21052120 refreshContents();
21062121 }
21072122 } else
2108
- if (event.getSource() == resetsupportItem)
2123
+ if (source == resetsupportItem)
21092124 {
21102125 for (int i=0; i<group.selection.size(); i++)
21112126 {
....@@ -2117,7 +2132,7 @@
21172132
21182133 refreshContents();
21192134 } else
2120
- if (event.getSource() == relinkverticesItem)
2135
+ if (source == relinkverticesItem)
21212136 {
21222137 boolean random = CameraPane.RANDOM;
21232138 CameraPane.RANDOM = false; // parse all random nodes
....@@ -2126,7 +2141,7 @@
21262141
21272142 refreshContents();
21282143 } else
2129
- if (event.getSource() == resetreferencesItem)
2144
+ if (source == resetreferencesItem)
21302145 {
21312146 for (int i=0; i<group.selection.size(); i++)
21322147 {
....@@ -2135,7 +2150,7 @@
21352150
21362151 refreshContents();
21372152 } else
2138
- if (event.getSource() == setMasterItem)
2153
+ if (source == setMasterItem)
21392154 {
21402155 if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1)
21412156 {
....@@ -2148,7 +2163,7 @@
21482163 refreshContents();
21492164 }
21502165 } else
2151
- if (event.getSource() == poseMeshItem)
2166
+ if (source == poseMeshItem)
21522167 {
21532168 if (group.selection.size() == 1)
21542169 {
....@@ -2167,19 +2182,19 @@
21672182 }
21682183
21692184 } else
2170
- if (event.getSource() == revertMeshItem)
2185
+ if (source == revertMeshItem)
21712186 {
21722187 RevertMeshes();
21732188 } else
2174
- if (event.getSource() == resetMeshItem)
2189
+ if (source == resetMeshItem)
21752190 {
21762191 ResetAll();
21772192 } else
2178
- if (event.getSource() == stepAllItem)
2193
+ if (source == stepAllItem)
21792194 {
21802195 StepAll();
21812196 } else
2182
- if (event.getSource() == clearItem) // || event.getSource() == clearButton)
2197
+ if (source == clearItem) // || event.getSource() == clearButton)
21832198 {
21842199 //int indices[] = jList.getSelectedIndices();
21852200 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -2187,46 +2202,46 @@
21872202
21882203 ClearSelection(false);
21892204 } else
2190
- if (event.getSource() == clearAllItem)
2205
+ if (source == clearAllItem)
21912206 {
21922207 ClearSelection(true);
21932208 } else
2194
- if (event.getSource() == grabItem)
2209
+ if (source == grabItem)
21952210 {
21962211 group(new cGroup(), true);
21972212 } else
2198
- if (event.getSource() == hideItem)
2213
+ if (source == hideItem)
21992214 {
22002215 group(new HiddenObject());
22012216 } else
2202
- if (event.getSource() == frontItem)
2217
+ if (source == frontItem)
22032218 {
22042219 front();
22052220 } else
2206
- if (event.getSource() == backItem)
2221
+ if (source == backItem)
22072222 {
22082223 back();
22092224 } else
2210
- if (event.getSource() == cameraItem)
2225
+ if (source == cameraItem)
22112226 {
22122227 makeSomething(new Camera());
22132228 } else
2214
- if (event.getSource() == compositeItem)
2229
+ if (source == compositeItem)
22152230 {
22162231 group(new Composite());
22172232 } else
2218
- if (event.getSource() == randomItem)
2233
+ if (source == randomItem)
22192234 {
22202235 RandomNode random = new RandomNode();
22212236 group(random);
22222237 if (random.size() > 0)
2223
- random.name = random.get(0).name + "Rnd";
2238
+ random.name = random.get(0).name + "Switch";
22242239 } else
2225
- if (event.getSource() == physicsItem)
2240
+ if (source == physicsItem)
22262241 {
22272242 group(new PhysicsNode());
22282243 } else
2229
- if (event.getSource() == frameselectorItem)
2244
+ if (source == frameselectorItem)
22302245 {
22312246 for (int i=0; i<group.selection.size(); i++)
22322247 {
....@@ -2238,7 +2253,7 @@
22382253 ResetModel();
22392254 refreshContents();
22402255 } else
2241
- if (event.getSource() == switchGeoItem)
2256
+ if (source == switchGeoItem)
22422257 {
22432258 for (int i=0; i<group.selection.size(); i++)
22442259 {
....@@ -2250,7 +2265,7 @@
22502265 ResetModel();
22512266 refreshContents();
22522267 } else
2253
- if (event.getSource() == switchTransfoItem)
2268
+ if (source == switchTransfoItem)
22542269 {
22552270 for (int i=0; i<group.selection.size(); i++)
22562271 {
....@@ -2262,7 +2277,7 @@
22622277 ResetModel();
22632278 refreshContents();
22642279 } else
2265
- if (event.getSource() == morphItem)
2280
+ if (source == morphItem)
22662281 {
22672282 for (int i=0; i<group.selection.size(); i++)
22682283 {
....@@ -2274,7 +2289,7 @@
22742289 ResetModel();
22752290 refreshContents();
22762291 } else
2277
- if (event.getSource() == scriptNodeItem)
2292
+ if (source == scriptNodeItem)
22782293 {
22792294 boolean atleastone = false;
22802295
....@@ -2313,31 +2328,31 @@
23132328 }
23142329 }
23152330 } else
2316
- if (event.getSource() == linkerItem)
2331
+ if (source == linkerItem)
23172332 {
23182333 group(new cLinker());
23192334 } else
2320
- if (event.getSource() == textureItem)
2335
+ if (source == textureItem)
23212336 {
23222337 group(new TextureNode());
23232338 } else
2324
- if (event.getSource() == billboardItem)
2339
+ if (source == billboardItem)
23252340 {
23262341 group(new BillboardNode());
23272342 } else
2328
- if (event.getSource() == shadowXItem)
2343
+ if (source == shadowXItem)
23292344 {
23302345 CastShadow(0);
23312346 } else
2332
- if (event.getSource() == shadowYItem)
2347
+ if (source == shadowYItem)
23332348 {
23342349 CastShadow(1);
23352350 } else
2336
- if (event.getSource() == shadowZItem)
2351
+ if (source == shadowZItem)
23372352 {
23382353 CastShadow(2);
23392354 } else
2340
- if (event.getSource() == ungroupItem)
2355
+ if (source == ungroupItem)
23412356 {
23422357 //ungroup();
23432358 for (int i=0; i<group.selection.size(); i++)
....@@ -2349,179 +2364,179 @@
23492364
23502365 refreshContents();
23512366 } else
2352
- if (event.getSource() == genUVItem)
2367
+ if (source == genUVItem)
23532368 {
23542369 GenUV();
23552370 } else
2356
- if (event.getSource() == genNormalsCADItem)
2371
+ if (source == genNormalsCADItem)
23572372 {
23582373 GenNormals(true);
23592374 } else
2360
- if (event.getSource() == genNormalsMESHItem)
2375
+ if (source == genNormalsMESHItem)
23612376 {
23622377 GenNormals(true); // TODO
23632378 } else
2364
- if (event.getSource() == genNormalsORGANItem)
2379
+ if (source == genNormalsORGANItem)
23652380 {
23662381 GenNormals(false);
23672382 } else
2368
- if (event.getSource() == genNormalsMINEItem)
2383
+ if (source == genNormalsMINEItem)
23692384 {
23702385 GenNormalsMINE();
23712386 } else
2372
- if (event.getSource() == stripifyItem)
2387
+ if (source == stripifyItem)
23732388 {
23742389 Stripify();
23752390 } else
2376
- if (event.getSource() == unstripifyItem)
2391
+ if (source == unstripifyItem)
23772392 {
23782393 Unstripify();
23792394 } else
2380
- if (event.getSource() == trimItem)
2395
+ if (source == trimItem)
23812396 {
23822397 Trim();
23832398 } else
2384
- if (event.getSource() == untrimItem)
2399
+ if (source == untrimItem)
23852400 {
23862401 Untrim();
23872402 } else
2388
- if (event.getSource() == clearColorsItem)
2403
+ if (source == clearColorsItem)
23892404 {
23902405 ClearColors();
23912406 } else
2392
- if (event.getSource() == clearMaterialsItem)
2407
+ if (source == clearMaterialsItem)
23932408 {
23942409 ClearMaterials();
23952410 } else
2396
- if (event.getSource() == liveleavesItem)
2411
+ if (source == liveleavesItem)
23972412 {
23982413 LiveLeaves(true);
23992414 } else
2400
- if (event.getSource() == unliveleavesItem)
2415
+ if (source == unliveleavesItem)
24012416 {
24022417 LiveLeaves(false);
24032418 } else
2404
- if (event.getSource() == supportleavesItem)
2419
+ if (source == supportleavesItem)
24052420 {
24062421 SupportLeaves(true);
24072422 } else
2408
- if (event.getSource() == unsupportleavesItem)
2423
+ if (source == unsupportleavesItem)
24092424 {
24102425 SupportLeaves(false);
24112426 } else
2412
- if (event.getSource() == hideleavesItem)
2427
+ if (source == hideleavesItem)
24132428 {
24142429 HideLeaves(true);
24152430 } else
2416
- if (event.getSource() == showleavesItem)
2431
+ if (source == showleavesItem)
24172432 {
24182433 HideLeaves(false);
24192434 } else
2420
- if (event.getSource() == markleavesItem)
2435
+ if (source == markleavesItem)
24212436 {
24222437 MarkLeaves(true);
24232438 } else
2424
- if (event.getSource() == unmarkleavesItem)
2439
+ if (source == unmarkleavesItem)
24252440 {
24262441 MarkLeaves(false);
24272442 } else
2428
- if (event.getSource() == flipVItem)
2443
+ if (source == flipVItem)
24292444 {
24302445 FlipV(true);
24312446 } else
2432
- if (event.getSource() == unflipVItem)
2447
+ if (source == unflipVItem)
24332448 {
24342449 FlipV(false);
24352450 } else
2436
- if (event.getSource() == lowTexturesItem)
2451
+ if (source == lowTexturesItem)
24372452 {
24382453 SetTexRes(0);
24392454 } else
2440
- if (event.getSource() == normalTexturesItem)
2455
+ if (source == normalTexturesItem)
24412456 {
24422457 SetTexRes(1);
24432458 } else
2444
- if (event.getSource() == highTexturesItem)
2459
+ if (source == highTexturesItem)
24452460 {
24462461 SetTexRes(2);
24472462 } else
2448
- if (event.getSource() == veryhighTexturesItem)
2463
+ if (source == veryhighTexturesItem)
24492464 {
24502465 SetTexRes(3);
24512466 } else
2452
- if (event.getSource() == maxTexturesItem)
2467
+ if (source == maxTexturesItem)
24532468 {
24542469 SetTexRes(4);
24552470 } else
2456
- if (event.getSource() == panoTexturesItem)
2471
+ if (source == panoTexturesItem)
24572472 {
24582473 SetTexRes(5);
24592474 } else
2460
- if (event.getSource() == reverseNormalsItem)
2475
+ if (source == reverseNormalsItem)
24612476 {
24622477 ReverseNormals();
24632478 } else
2464
- if (event.getSource() == parseverticesItem)
2479
+ if (source == parseverticesItem)
24652480 {
24662481 ParseVertices();
24672482 } else
2468
- if (event.getSource() == textureFieldItem)
2483
+ if (source == textureFieldItem)
24692484 {
24702485 TextureVertices();
24712486 } else
2472
- if (event.getSource() == alignItem)
2487
+ if (source == alignItem)
24732488 {
24742489 Align();
24752490 } else
2476
- if (event.getSource() == mirrorItem)
2491
+ if (source == mirrorItem)
24772492 {
24782493 MirrorPoses();
24792494 } else
2480
- if (event.getSource() == reduceMorphItem)
2495
+ if (source == reduceMorphItem)
24812496 {
24822497 MeshReduction(false);
24832498 } else
2484
- if (event.getSource() == reduce34MorphItem)
2499
+ if (source == reduce34MorphItem)
24852500 {
24862501 MeshReduction(true);
24872502 } else
2488
- if (event.getSource() == reverseTrianglesItem)
2503
+ if (source == reverseTrianglesItem)
24892504 {
24902505 ReverseTriangles();
24912506 } else
2492
- if (event.getSource() == reduceMeshItem)
2507
+ if (source == reduceMeshItem)
24932508 {
24942509 ReduceMesh(false);
24952510 } else
2496
- if (event.getSource() == reduce34MeshItem)
2511
+ if (source == reduce34MeshItem)
24972512 {
24982513 ReduceMesh(true);
24992514 } else
2500
- if (event.getSource() == increaseMeshItem)
2515
+ if (source == increaseMeshItem)
25012516 {
25022517 IncreaseMesh();
25032518 } else
2504
- if (event.getSource() == clipMeshItem)
2519
+ if (source == clipMeshItem)
25052520 {
25062521 ClipMesh();
25072522 } else
2508
- if (event.getSource() == smoothMeshItem)
2523
+ if (source == smoothMeshItem)
25092524 {
25102525 SmoothMesh();
25112526 } else
2512
- if (event.getSource() == transformgeometryItem)
2527
+ if (source == transformgeometryItem)
25132528 {
25142529 TransformGeometry();
25152530 } else
2516
- if (event.getSource() == resetTransformItem)
2531
+ if (source == resetTransformItem)
25172532 {
25182533 ResetTransform();
25192534 } else
2520
- if (event.getSource() == resetCentroidItem)
2535
+ if (source == resetCentroidItem)
25212536 {
25222537 ResetCentroid();
25232538 } else
2524
- if (event.getSource() == resetParentItem)
2539
+ if (source == resetParentItem)
25252540 {
25262541 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25272542 {
....@@ -2531,7 +2546,7 @@
25312546
25322547 refreshContents();
25332548 } else
2534
- if (event.getSource() == repairParentItem)
2549
+ if (source == repairParentItem)
25352550 {
25362551 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25372552 {
....@@ -2545,7 +2560,21 @@
25452560
25462561 refreshContents();
25472562 } else
2548
- if (event.getSource() == sortbysizeItem)
2563
+ if (source == repairShadowItem)
2564
+ {
2565
+ for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
2566
+ {
2567
+ Object3D obj = (Object3D)e.nextElement();
2568
+ obj.RepairShadow();
2569
+// for (int i=0; i<obj.size(); i++)
2570
+// {
2571
+// obj.get(i).parent = obj;
2572
+// }
2573
+ }
2574
+
2575
+ refreshContents();
2576
+ } else
2577
+ if (source == sortbysizeItem)
25492578 {
25502579 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25512580 {
....@@ -2557,7 +2586,7 @@
25572586 ResetModel();
25582587 refreshContents();
25592588 } else
2560
- if (event.getSource() == sortbynameItem)
2589
+ if (source == sortbynameItem)
25612590 {
25622591 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
25632592 {
....@@ -2569,7 +2598,7 @@
25692598 ResetModel();
25702599 refreshContents();
25712600 } else
2572
- if (event.getSource() == attachPigmentItem)
2601
+ if (source == attachPigmentItem)
25732602 {
25742603 String texture = GetFile("Attach pigment");
25752604 Object3D obj;
....@@ -2581,7 +2610,7 @@
25812610
25822611 refreshContents();
25832612 } else
2584
- if (event.getSource() == detachPigmentItem)
2613
+ if (source == detachPigmentItem)
25852614 {
25862615 Object3D obj;
25872616 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2592,7 +2621,7 @@
25922621
25932622 refreshContents();
25942623 } else
2595
- if (event.getSource() == attachBumpItem)
2624
+ if (source == attachBumpItem)
25962625 {
25972626 String texture = GetFile("Attach bump");
25982627 Object3D obj;
....@@ -2604,7 +2633,7 @@
26042633
26052634 refreshContents();
26062635 } else
2607
- if (event.getSource() == detachBumpItem)
2636
+ if (source == detachBumpItem)
26082637 {
26092638 Object3D obj;
26102639 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2615,7 +2644,7 @@
26152644
26162645 refreshContents();
26172646 } else
2618
- if (event.getSource() == pigmentBumpItem)
2647
+ if (source == pigmentBumpItem)
26192648 {
26202649 Object3D obj;
26212650 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2626,158 +2655,195 @@
26262655
26272656 refreshContents();
26282657 } else
2629
- if (event.getSource() == flashSelectionButton)
2658
+ if (source == flashSelectionButton)
26302659 {
26312660 CameraPane.flash = true;
26322661 refreshContents();
26332662 } else
2634
- if (event.getSource() == oneButton)
2663
+ if (source == oneButton)
26352664 {
26362665 } else
2637
- if (event.getSource() == twoButton)
2666
+ if (source == twoButton)
26382667 {
26392668 radio.layout = twoButton;
26402669 // bug
26412670 //gridPanel.setDividerLocation(1.0);
26422671 //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();
2672
+// bigThree.remove(scenePanel);
2673
+// bigThree.remove(centralPanel);
2674
+// bigThree.remove(XYZPanel);
2675
+// aWindowConstraints.gridx = 0;
2676
+// aWindowConstraints.gridy = 0;
2677
+// aWindowConstraints.gridwidth = 1;
2678
+// // aConstraints.gridheight = 3;
2679
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2680
+// aWindowConstraints.weightx = 0;
2681
+// aWindowConstraints.weighty = 1;
2682
+// //bigThree.add(jtp, aWindowConstraints);
2683
+// aWindowConstraints.weightx = 1;
2684
+// aWindowConstraints.gridwidth = 3;
2685
+// // aConstraints.gridheight = 3;
2686
+// aWindowConstraints.gridx = 1;
2687
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2688
+// bigThree.add(centralPanel, aWindowConstraints);
2689
+// aWindowConstraints.weightx = 0;
2690
+// aWindowConstraints.gridx = 4;
2691
+// aWindowConstraints.gridwidth = 1;
2692
+// // aConstraints.gridheight = 3;
2693
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2694
+// //bigThree.add(XYZPanel, aWindowConstraints);
2695
+// scenePanel.setVisible(false);
2696
+// centralPanel.setVisible(true);
2697
+// XYZPanel.setVisible(false);
2698
+ bigThree.ClearUI();
2699
+ bigThree.add(centralPanel);
2700
+ bigThree.FlushUI();
26672701 } else
2668
- if (event.getSource() == threeButton)
2702
+ if (source == threeButton)
26692703 {
26702704 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();
2705
+
2706
+// bigThree.remove(scenePanel);
2707
+// bigThree.remove(centralPanel);
2708
+// bigThree.remove(XYZPanel);
2709
+// aWindowConstraints.gridx = 0;
2710
+// aWindowConstraints.gridy = 0;
2711
+// aWindowConstraints.gridwidth = 1;
2712
+// // aConstraints.gridheight = 3;
2713
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2714
+// aWindowConstraints.weightx = 0;
2715
+// aWindowConstraints.weighty = 1;
2716
+// //bigThree.add(jtp, aWindowConstraints);
2717
+// aWindowConstraints.weightx = 1;
2718
+// aWindowConstraints.gridwidth = 3;
2719
+// // aConstraints.gridheight = 3;
2720
+// aWindowConstraints.gridx = 1;
2721
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2722
+// bigThree.add(centralPanel, aWindowConstraints);
2723
+// aWindowConstraints.weightx = 0;
2724
+// aWindowConstraints.gridx = 4;
2725
+// aWindowConstraints.gridwidth = 1;
2726
+// // aConstraints.gridheight = 3;
2727
+// aConstraints.fill = GridBagConstraints.VERTICAL;
2728
+// bigThree.add(XYZPanel, aWindowConstraints);
2729
+// bigThree.validate();
2730
+// scenePanel.setVisible(false);
2731
+// centralPanel.setVisible(true);
2732
+// XYZPanel.setVisible(true);
2733
+ bigThree.ClearUI();
2734
+ bigThree.add(centralPanel);
2735
+ bigThree.add(XYZPanel);
2736
+ bigThree.FlushUI();
26952737 } else
2696
- if (event.getSource() == fourButton)
2738
+ if (source == fourButton)
26972739 {
26982740 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();
2741
+
2742
+// bigThree.remove(scenePanel);
2743
+// bigThree.remove(centralPanel);
2744
+// bigThree.remove(XYZPanel);
2745
+// aWindowConstraints.gridx = 0;
2746
+// aWindowConstraints.gridy = 0;
2747
+// aWindowConstraints.gridwidth = 1;
2748
+// // aWindowConstraints.gridheight = 3;
2749
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2750
+// aWindowConstraints.weightx = 1;
2751
+// aWindowConstraints.weighty = 1;
2752
+// bigThree.add(scenePanel, aWindowConstraints);
2753
+// aWindowConstraints.weightx = 1;
2754
+// aWindowConstraints.gridwidth = 3;
2755
+// // aConstraints.gridheight = 3;
2756
+// aWindowConstraints.gridx = 1;
2757
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2758
+// //bigThree.add(cameraPanel, aWindowConstraints);
2759
+// aWindowConstraints.weightx = 0;
2760
+// aWindowConstraints.gridx = 4;
2761
+// aWindowConstraints.gridwidth = 1;
2762
+// // aWindowConstraints.gridheight = 3;
2763
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2764
+// //bigThree.add(XYZPanel, aWindowConstraints);
2765
+// bigThree.validate();
2766
+// scenePanel.setVisible(true);
2767
+// centralPanel.setVisible(false);
2768
+// XYZPanel.setVisible(false);
2769
+ bigThree.ClearUI();
2770
+ bigThree.add(scenePanel);
2771
+ bigThree.FlushUI();
27232772 } else
2724
- if (event.getSource() == sixButton)
2773
+ if (source == sixButton)
27252774 {
27262775 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();
2776
+
2777
+// bigThree.remove(scenePanel);
2778
+// bigThree.remove(centralPanel);
2779
+// bigThree.remove(XYZPanel);
2780
+// aWindowConstraints.gridx = 0;
2781
+// aWindowConstraints.gridy = 0;
2782
+// aWindowConstraints.gridwidth = 1;
2783
+// // aConstraints.gridheight = 3;
2784
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2785
+// aWindowConstraints.weightx = 0;
2786
+// aWindowConstraints.weighty = 1;
2787
+// bigThree.add(scenePanel, aWindowConstraints);
2788
+// aWindowConstraints.weightx = 1;
2789
+// aWindowConstraints.gridwidth = 3;
2790
+// // aWindowConstraints.gridheight = 3;
2791
+// aWindowConstraints.gridx = 1;
2792
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2793
+// bigThree.add(centralPanel, aWindowConstraints);
2794
+// aWindowConstraints.weightx = 0;
2795
+// aWindowConstraints.gridx = 4;
2796
+// aWindowConstraints.gridwidth = 1;
2797
+// // aWindowConstraints.gridheight = 3;
2798
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2799
+// //bigThree.add(XYZPanel, aConstraints);
2800
+// bigThree.validate();
2801
+// scenePanel.setVisible(true);
2802
+// centralPanel.setVisible(true);
2803
+// XYZPanel.setVisible(false);
2804
+ bigThree.ClearUI();
2805
+ bigThree.add(scenePanel);
2806
+ bigThree.add(centralPanel);
2807
+ bigThree.FlushUI();
27512808 } else
2752
- if (event.getSource() == sevenButton)
2809
+ if (source == sevenButton)
27532810 {
27542811 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();
2812
+
2813
+// bigThree.remove(scenePanel);
2814
+// bigThree.remove(centralPanel);
2815
+// bigThree.remove(XYZPanel);
2816
+// aWindowConstraints.gridx = 0;
2817
+// aWindowConstraints.gridy = 0;
2818
+// aWindowConstraints.gridwidth = 1;
2819
+// // aWindowConstraints.gridheight = 3;
2820
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2821
+// aWindowConstraints.weightx = 0;
2822
+// aWindowConstraints.weighty = 1;
2823
+// bigThree.add(scenePanel, aWindowConstraints);
2824
+// aWindowConstraints.weightx = 1;
2825
+// aWindowConstraints.gridwidth = 3;
2826
+// // aWindowConstraints.gridheight = 3;
2827
+// aWindowConstraints.gridx = 1;
2828
+// aWindowConstraints.fill = GridBagConstraints.BOTH;
2829
+// bigThree.add(centralPanel, aWindowConstraints);
2830
+// aWindowConstraints.weightx = 0;
2831
+// aWindowConstraints.gridx = 4;
2832
+// aWindowConstraints.gridwidth = 1;
2833
+// // aConstraints.gridheight = 3;
2834
+// aWindowConstraints.fill = GridBagConstraints.VERTICAL;
2835
+// bigThree.add(XYZPanel, aWindowConstraints);
2836
+// bigThree.validate();
2837
+// scenePanel.setVisible(true);
2838
+// centralPanel.setVisible(true);
2839
+// XYZPanel.setVisible(true);
2840
+ bigThree.ClearUI();
2841
+ bigThree.add(scenePanel);
2842
+ bigThree.add(centralPanel);
2843
+ bigThree.add(XYZPanel);
2844
+ bigThree.FlushUI();
27792845 } else
2780
- if (event.getSource() == rootButton)
2846
+ if (source == rootButton)
27812847 {
27822848 Object3D obj;
27832849 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
....@@ -2789,7 +2855,7 @@
27892855
27902856 refreshContents(true);
27912857 } else
2792
- if (event.getSource() == closeButton)
2858
+ if (source == closeButton)
27932859 {
27942860 //System.out.println("CLOSE: " + buttonGroup.getSelection());
27952861 cRadio ab;
....@@ -2810,11 +2876,11 @@
28102876 }
28112877 refreshContents(true);
28122878 } else
2813
- if (event.getSource() == editItem || event.getSource() == editButton)
2879
+ if (source == editItem || source == editButton)
28142880 {
28152881 EditSelection(false);
28162882 } else
2817
- if (event.getSource() == uneditButton)
2883
+ if (source == uneditButton)
28182884 {
28192885 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
28202886 {
....@@ -2826,12 +2892,12 @@
28262892
28272893 child.editWindow = null; // ???????????
28282894 }
2829
- objEditor.ctrlPanel.revalidate();
2895
+ objEditor.ctrlPanel.validate();
28302896 //objEditor.jTree.clearSelection();
28312897 //objEditor.ResetSliders();
28322898 refreshContents(true);
28332899 } else
2834
- if (event.getSource() == clearPanelButton)
2900
+ if (source == clearPanelButton)
28352901 {
28362902 assert(copy == group);
28372903 //copy.ClearUI();
....@@ -2842,7 +2908,7 @@
28422908 listUI.clear();
28432909 refreshContents(true);
28442910 } else
2845
- if (event.getSource() == allParamsButton)
2911
+ if (source == allParamsButton)
28462912 {
28472913 assert(copy == group);
28482914
....@@ -2863,19 +2929,19 @@
28632929
28642930 refreshContents(true);
28652931 } else
2866
- if (event.getSource() == unselectButton)
2932
+ if (source == unselectButton)
28672933 {
28682934 objEditor.jTree.clearSelection();
28692935 // ?? oct 2012 GrafreeD.clipboard.clear();
28702936 objEditor.ResetSliders();
28712937 refreshContents(true);
28722938 } else
2873
- if(event.getSource() instanceof cRadio)
2939
+ if(source instanceof cRadio)
28742940 {
28752941 group.parent = keepparent;
28762942 group.attributes = 0;
28772943 //group.editWindow = null;
2878
- /*cRadio*/ radio = (cRadio)event.getSource();
2944
+ /*cRadio*/ radio = (cRadio)source;
28792945 Object3D obj = radio.GetObject();
28802946 System.out.println("Edit " + obj);
28812947 if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite)
....@@ -2895,7 +2961,7 @@
28952961 }
28962962
28972963 copy = group;
2898
- //CameraPane.theRenderer.object = group;
2964
+ //Globals.theRenderer.object = group;
28992965 if(!useclient)
29002966 {
29012967 cameraView.renderCamera = radio.camera;
....@@ -2904,7 +2970,8 @@
29042970 cameraView.cameras[cameraView.cameracount] = radio.camera;
29052971 cameraView.targetLookAt.set(radio.camera.lookAt);
29062972 cameraView.object = group;
2907
- cameraView.lighttouched = true;
2973
+ //cameraView.lighttouched = true;
2974
+ Globals.lighttouched = true;
29082975 topView.object = group;
29092976 frontView.object = group;
29102977 sideView.object = group;
....@@ -2940,7 +3007,7 @@
29403007 if (useclient)
29413008 {
29423009 cameraView.object = client;
2943
- cameraView.lighttouched = true;
3010
+ Globals.lighttouched = true;
29443011 //topView.object = client;
29453012 //frontView.object = client;
29463013 //sideView.object = client;
....@@ -2948,7 +3015,7 @@
29483015 else
29493016 {
29503017 cameraView.object = group;
2951
- cameraView.lighttouched = true;
3018
+ Globals.lighttouched = true;
29523019 //topView.object = group;
29533020 //frontView.object = group;
29543021 //sideView.object = group;
....@@ -3456,7 +3523,7 @@
34563523 String pigment = Object3D.GetPigment(tex);
34573524 //String bump = Object3D.GetBump(tex);
34583525
3459
- com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres);
3526
+ com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
34603527
34613528 double s = v.s;
34623529
....@@ -3757,7 +3824,7 @@
37573824 group.selection.RelinkToSupport(); // july 2014
37583825 System.out.println("DONE.");
37593826 refreshContents();
3760
- CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
3827
+ Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR));
37613828 }
37623829
37633830 void ReduceMesh(boolean reduction34)
....@@ -4033,25 +4100,25 @@
40334100 System.err.println("info : " + child.GetPath());
40344101 }
40354102 }
4036
- else
4037
- {
4038
- objEditor.SetMaterial(group); // .GetMaterial());
4039
- objEditor.AddInfo(group, this, true); // .GetMaterial());
4040
- System.err.println("info : " + group.GetPath());
4041
- }
4103
+// else
4104
+// {
4105
+// objEditor.SetMaterial(group); // .GetMaterial());
4106
+// objEditor.AddInfo(group, this, true); // .GetMaterial());
4107
+// System.err.println("info : " + group.GetPath());
4108
+// }
40424109
40434110 objEditor.SetText(); // jan 2014
40444111
4045
- if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
4112
+ if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera))
40464113 CameraPane.flash = true;
40474114
40484115 if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera)
40494116 // a camera
40504117 {
40514118 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;
4119
+ Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent());
4120
+ // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera;
4121
+ // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera;
40554122 }
40564123
40574124 refreshContents();
....@@ -5009,6 +5076,7 @@
50095076
50105077 private MenuItem resetParentItem;
50115078 private MenuItem repairParentItem;
5079
+ private MenuItem repairShadowItem;
50125080 private MenuItem sortbysizeItem;
50135081 private MenuItem sortbynameItem;
50145082