.. | .. |
---|
434 | 434 | oe.buttonGroup.add(dummyButton); |
---|
435 | 435 | */ |
---|
436 | 436 | aConstraints.gridy += 1; |
---|
| 437 | + |
---|
| 438 | + //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
| 439 | + |
---|
437 | 440 | oe.aConstraints.gridwidth = 1; |
---|
438 | 441 | oe.aConstraints.gridx = 0; |
---|
439 | 442 | |
---|
440 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints); |
---|
| 443 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints); |
---|
| 444 | + liveCB.setToolTipText("Enabled animation"); |
---|
441 | 445 | liveCB.addItemListener(this); |
---|
442 | 446 | |
---|
443 | 447 | 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); |
---|
| 448 | + oe.toolbarPanel.add(trackCB = new cCheckBox("Track", CameraPane.TRACK), oe.aConstraints); |
---|
| 449 | + trackCB.setToolTipText("Enable tracking"); |
---|
503 | 450 | trackCB.addItemListener(this); |
---|
504 | 451 | |
---|
505 | 452 | oe.aConstraints.gridx += 1; |
---|
506 | 453 | oe.toolbarPanel.add(screenfitButton = new cButton("@ ")); //, oe.aConstraints); |
---|
| 454 | + screenfitButton.setToolTipText("Screen fit"); |
---|
507 | 455 | screenfitButton.addActionListener(this); |
---|
508 | 456 | oe.aConstraints.gridx += 1; |
---|
509 | 457 | // oe.toolbarPanel.add(screenfitpointButton = new cButton(" @+ ")); //, oe.aConstraints); |
---|
.. | .. |
---|
511 | 459 | // oe.aConstraints.gridx += 1; |
---|
512 | 460 | oe.toolbarPanel.add(snapobjectButton = new cButton(" O+ ")); //, oe.aConstraints); |
---|
513 | 461 | snapobjectButton.addActionListener(this); |
---|
| 462 | + snapobjectButton.setToolTipText("Snap Object"); |
---|
514 | 463 | oe.aConstraints.gridx += 1; |
---|
515 | 464 | |
---|
516 | 465 | //aConstraints.gridx = 0; |
---|
.. | .. |
---|
519 | 468 | oe.aConstraints.gridwidth = 1; |
---|
520 | 469 | |
---|
521 | 470 | oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
| 471 | + flashSelectionButton.setToolTipText("Show selection"); |
---|
522 | 472 | flashSelectionButton.addActionListener(this); |
---|
| 473 | + |
---|
| 474 | + oe.toolbarPanel.add(new cButton(" ", false)); |
---|
| 475 | + |
---|
523 | 476 | oe.aConstraints.gridx += 1; |
---|
524 | 477 | oe.aConstraints.weighty = 0; |
---|
525 | 478 | oe.aConstraints.gridwidth = 1; |
---|
526 | 479 | |
---|
527 | 480 | // |
---|
528 | 481 | oe.toolbarPanel.add(twoButton = new cButton(" |+| ")); //, oe.aConstraints); |
---|
| 482 | + twoButton.setToolTipText("Show center view only"); |
---|
529 | 483 | twoButton.addActionListener(this); |
---|
530 | 484 | oe.toolbarPanel.add(fourButton = new cButton("+|| ")); //, oe.aConstraints); |
---|
531 | 485 | fourButton.addActionListener(this); |
---|
| 486 | + fourButton.setToolTipText("Show left panel only"); |
---|
532 | 487 | oe.toolbarPanel.add(sixButton = new cButton("+|+| ")); //, oe.aConstraints); |
---|
| 488 | + sixButton.setToolTipText("2-column layout left"); |
---|
533 | 489 | sixButton.addActionListener(this); |
---|
534 | 490 | oe.toolbarPanel.add(threeButton = new cButton(" |+|+")); //, oe.aConstraints); |
---|
| 491 | + threeButton.setToolTipText("2-column layout right"); |
---|
535 | 492 | threeButton.addActionListener(this); |
---|
536 | 493 | oe.toolbarPanel.add(sevenButton = new cButton("+|+|+")); //, oe.aConstraints); |
---|
| 494 | + sevenButton.setToolTipText("3-column layout"); |
---|
537 | 495 | sevenButton.addActionListener(this); |
---|
538 | 496 | // |
---|
539 | 497 | |
---|
540 | | - oe.toolbarPanel.add(rootButton = new cButton(" o o o E ")); //, oe.aConstraints); |
---|
| 498 | + oe.toolbarPanel.add(rootButton = new cButton(" o o o ")); //, oe.aConstraints); |
---|
| 499 | + rootButton.setToolTipText("Edit object in new tab"); |
---|
541 | 500 | rootButton.addActionListener(this); |
---|
542 | 501 | oe.aConstraints.gridx += 1; |
---|
543 | 502 | oe.toolbarPanel.add(closeButton = new cButton(" X ")); //, oe.aConstraints); |
---|
| 503 | + closeButton.setToolTipText("Close tab"); |
---|
544 | 504 | closeButton.addActionListener(this); |
---|
545 | 505 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
546 | 506 | //clearButton.addActionListener(this); |
---|
.. | .. |
---|
643 | 603 | radio.layout = sevenButton; |
---|
644 | 604 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
645 | 605 | } |
---|
| 606 | + |
---|
| 607 | + void AddOptions(JPanel panel, GridBagConstraints constraints) |
---|
| 608 | + { |
---|
| 609 | + constraints.gridx = 0; |
---|
| 610 | + constraints.gridy = 0; |
---|
| 611 | + panel.add(fastCB = new cCheckBox("Fast", CameraPane.FAST), constraints); |
---|
| 612 | + fastCB.setToolTipText("Fast mode"); |
---|
| 613 | + fastCB.addItemListener(this); |
---|
| 614 | + constraints.gridy += 1; |
---|
| 615 | + panel.add(supportCB = new cCheckBox("Support", CameraPane.SUPPORT), constraints); |
---|
| 616 | + supportCB.setToolTipText("Enabled rigging"); |
---|
| 617 | + supportCB.addItemListener(this); |
---|
| 618 | + |
---|
| 619 | + // constraints.gridy += 1; |
---|
| 620 | + // panel.add(localCB = new cCheckBox("Local", CameraPane.LOCALTRANSFORM), constraints); |
---|
| 621 | + // localCB.addItemListener(this); |
---|
| 622 | + |
---|
| 623 | + constraints.gridy += 1; |
---|
| 624 | + panel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), constraints); |
---|
| 625 | + crowdCB.setToolTipText("Used for crowds"); |
---|
| 626 | + crowdCB.addItemListener(this); |
---|
| 627 | + |
---|
| 628 | + constraints.gridy += 1; |
---|
| 629 | + panel.add(smoothCB = new cCheckBox("Inertia", CameraPane.INERTIA), constraints); |
---|
| 630 | + smoothCB.setToolTipText("Snapping delay"); |
---|
| 631 | + smoothCB.addItemListener(this); |
---|
| 632 | + |
---|
| 633 | + constraints.gridy += 1; |
---|
| 634 | + panel.add(slowCB = new cCheckBox("Slow", CameraPane.SLOWPOSE), constraints); |
---|
| 635 | + slowCB.setToolTipText("Smooth interpolation"); |
---|
| 636 | + slowCB.addItemListener(this); |
---|
| 637 | + constraints.gridy += 1; |
---|
| 638 | + panel.add(boxCB = new cCheckBox("Box", CameraPane.BOXMODE), constraints); |
---|
| 639 | + boxCB.setToolTipText("Display bounding boxes"); |
---|
| 640 | + boxCB.addItemListener(this); |
---|
| 641 | + constraints.gridy += 1; |
---|
| 642 | + panel.add(zoomBoxCB = new cCheckBox("Zoom", CameraPane.ZOOMBOXMODE), constraints); |
---|
| 643 | + zoomBoxCB.setToolTipText("Display bounding boxes when moving the wheel"); |
---|
| 644 | + zoomBoxCB.addItemListener(this); |
---|
| 645 | + |
---|
| 646 | +// constraints.gridy += 1; |
---|
| 647 | +// panel.add(speakerMocapCB = new cCheckBox("Mocap", CameraPane.SPEAKERMOCAP), constraints); |
---|
| 648 | +// speakerMocapCB.addItemListener(this); |
---|
| 649 | + |
---|
| 650 | + if (false) |
---|
| 651 | + { |
---|
| 652 | + // handled in scripts |
---|
| 653 | + constraints.gridy += 1; |
---|
| 654 | + panel.add(speakerCameraCB = new cCheckBox("Cam", CameraPane.SPEAKERCAMERA), constraints); |
---|
| 655 | + speakerCameraCB.addItemListener(this); |
---|
| 656 | + |
---|
| 657 | + constraints.gridy += 1; |
---|
| 658 | + panel.add(speakerFocusCB = new cCheckBox("Focus", CameraPane.SPEAKERFOCUS), constraints); |
---|
| 659 | + speakerFocusCB.addItemListener(this); |
---|
| 660 | + |
---|
| 661 | + constraints.gridy += 1; |
---|
| 662 | + panel.add(smoothfocusCB = new cCheckBox("Smooth", CameraPane.SMOOTHFOCUS), constraints); |
---|
| 663 | + smoothfocusCB.addItemListener(this); |
---|
| 664 | + } |
---|
| 665 | + |
---|
| 666 | +//constraints.gridx += 1; |
---|
| 667 | +//panel.add(debugCB = new cCheckBox("Debug", CameraPane.DEBUG), constraints); |
---|
| 668 | +// debugCB.addItemListener(this); |
---|
| 669 | + |
---|
| 670 | + constraints.gridy += 1; |
---|
| 671 | + panel.add(oeilCB = new cCheckBox("Eye", CameraPane.OEIL), constraints); |
---|
| 672 | + oeilCB.addItemListener(this); |
---|
| 673 | + |
---|
| 674 | + constraints.gridy += 1; |
---|
| 675 | + panel.add(lookAtCB = new cCheckBox("Target", CameraPane.LOOKAT), constraints); |
---|
| 676 | + lookAtCB.setToolTipText("Look-at target"); |
---|
| 677 | + lookAtCB.addItemListener(this); |
---|
| 678 | + |
---|
| 679 | + } |
---|
646 | 680 | |
---|
647 | 681 | void EditObject(Object3D obj) |
---|
648 | 682 | { |
---|
649 | | - cRadio dummyButton = new cRadio(obj.name); |
---|
650 | | - dummyButton.SetObject(obj); |
---|
651 | | - dummyButton.layout = sevenButton; |
---|
652 | | - dummyButton.SetCamera(cameraView.renderCamera, false); |
---|
653 | | - dummyButton.addActionListener(this); |
---|
654 | | - radioPanel.add(dummyButton); |
---|
655 | | - buttonGroup.add(dummyButton); |
---|
656 | | - dummyButton.doClick(); |
---|
| 683 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 684 | + radioButton.SetObject(obj); |
---|
| 685 | + radioButton.layout = sevenButton; |
---|
| 686 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 687 | + radioButton.addActionListener(this); |
---|
| 688 | + radioPanel.add(radioButton); |
---|
| 689 | + buttonGroup.add(radioButton); |
---|
| 690 | + radioButton.doClick(); |
---|
657 | 691 | } |
---|
658 | 692 | void SetupViews(ObjEditor oe) |
---|
659 | 693 | { |
---|
.. | .. |
---|
673 | 707 | JCheckBox fastCB; |
---|
674 | 708 | JCheckBox slowCB; |
---|
675 | 709 | JCheckBox boxCB; |
---|
| 710 | + JCheckBox zoomBoxCB; |
---|
676 | 711 | JCheckBox trackCB; |
---|
677 | 712 | JCheckBox smoothfocusCB; |
---|
678 | 713 | // JCheckBox speakerMocapCB; |
---|
.. | .. |
---|
715 | 750 | dropAttributes |= Object3D.TEXTURE; |
---|
716 | 751 | else |
---|
717 | 752 | dropAttributes &= ~Object3D.TEXTURE; |
---|
718 | | - } |
---|
719 | | - else if(e.getSource() == liveCB) |
---|
| 753 | + } else if(e.getSource() == liveCB) |
---|
720 | 754 | { |
---|
721 | 755 | cameraView.ToggleLive(); |
---|
722 | 756 | } |
---|
.. | .. |
---|
753 | 787 | Recompile(); |
---|
754 | 788 | cameraView.repaint(); |
---|
755 | 789 | // refreshContents(); |
---|
| 790 | + } |
---|
| 791 | + else if(e.getSource() == zoomBoxCB) |
---|
| 792 | + { |
---|
| 793 | + cameraView.ToggleZoomBoxMode(); |
---|
756 | 794 | } |
---|
757 | 795 | else if(e.getSource() == smoothfocusCB) |
---|
758 | 796 | { |
---|
.. | .. |
---|
1118 | 1156 | resetParentItem.addActionListener(this); |
---|
1119 | 1157 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1120 | 1158 | repairParentItem.addActionListener(this); |
---|
| 1159 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1160 | + repairShadowItem.addActionListener(this); |
---|
1121 | 1161 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1122 | 1162 | invariantsItem.addActionListener(this); |
---|
1123 | 1163 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1478 | 1518 | // |
---|
1479 | 1519 | public void actionPerformed(ActionEvent event) // , Object arg) |
---|
1480 | 1520 | { |
---|
| 1521 | + Object source = event.getSource(); |
---|
1481 | 1522 | /* |
---|
1482 | 1523 | if (event.getSource() == nameField) |
---|
1483 | 1524 | { |
---|
.. | .. |
---|
1489 | 1530 | } |
---|
1490 | 1531 | else |
---|
1491 | 1532 | */ |
---|
1492 | | - if (event.getSource() == lookAtItem || event.getSource() == lookFromItem) |
---|
| 1533 | + if (source == lookAtItem || source == lookFromItem) |
---|
1493 | 1534 | { |
---|
1494 | 1535 | ScreenFit(); |
---|
1495 | 1536 | } else |
---|
1496 | | - if (event.getSource() == switchItem) |
---|
| 1537 | + if (source == switchItem) |
---|
1497 | 1538 | { |
---|
1498 | 1539 | cVector v1 = new cVector(); |
---|
1499 | 1540 | cVector v2 = new cVector(); |
---|
.. | .. |
---|
1502 | 1543 | objEditor.cameraView.renderCamera.setAim(v2, v1); |
---|
1503 | 1544 | objEditor.cameraView.repaint(); |
---|
1504 | 1545 | } else |
---|
1505 | | - if (event.getSource() == rectoidItem) |
---|
| 1546 | + if (source == rectoidItem) |
---|
1506 | 1547 | { |
---|
1507 | 1548 | makeSomething(new Box()); |
---|
1508 | 1549 | } else |
---|
1509 | | - if (event.getSource() == particleItem) |
---|
| 1550 | + if (source == particleItem) |
---|
1510 | 1551 | { |
---|
1511 | 1552 | ParticleNode particleGeom = new ParticleNode("Particles", 1000); //, particleType); |
---|
1512 | 1553 | ParticleController particleController = new ParticleController(particleGeom); |
---|
.. | .. |
---|
1527 | 1568 | applyExample(particleGeom, "SMOKE"); |
---|
1528 | 1569 | makeSomething(particleGeom); |
---|
1529 | 1570 | } else |
---|
1530 | | - if (event.getSource() == ragdollItem || event.getSource() == ragdoll2Item) |
---|
| 1571 | + if (source == ragdollItem || source == ragdoll2Item) |
---|
1531 | 1572 | { |
---|
1532 | | - GenericJoint ragdoll = new GenericJoint(event.getSource() == ragdollItem); |
---|
| 1573 | + GenericJoint ragdoll = new GenericJoint(source == ragdollItem); |
---|
1533 | 1574 | |
---|
1534 | 1575 | ragdoll.toParent = LA.newMatrix(); |
---|
1535 | 1576 | ragdoll.fromParent = LA.newMatrix(); |
---|
.. | .. |
---|
1547 | 1588 | } else |
---|
1548 | 1589 | /* |
---|
1549 | 1590 | */ |
---|
1550 | | - if (event.getSource() == heightFieldItem) |
---|
| 1591 | + if (source == heightFieldItem) |
---|
1551 | 1592 | { |
---|
1552 | 1593 | Object3D obj = new Object3D(); |
---|
1553 | 1594 | |
---|
.. | .. |
---|
1585 | 1626 | |
---|
1586 | 1627 | makeSomething(obj); |
---|
1587 | 1628 | } else |
---|
1588 | | - if (event.getSource() == gridItem) |
---|
| 1629 | + if (source == gridItem) |
---|
1589 | 1630 | { |
---|
1590 | 1631 | makeSomething(new Grid()); |
---|
1591 | 1632 | } else |
---|
1592 | | - if (event.getSource() == ellipsoidItem) |
---|
| 1633 | + if (source == ellipsoidItem) |
---|
1593 | 1634 | { |
---|
1594 | 1635 | makeSomething(new Sphere()); |
---|
1595 | 1636 | } else |
---|
1596 | | - if (event.getSource() == coneItem) |
---|
| 1637 | + if (source == coneItem) |
---|
1597 | 1638 | { |
---|
1598 | 1639 | makeSomething(new Cone()); |
---|
1599 | 1640 | } else |
---|
1600 | | - if (event.getSource() == torusItem) |
---|
| 1641 | + if (source == torusItem) |
---|
1601 | 1642 | { |
---|
1602 | 1643 | makeSomething(new Torus()); |
---|
1603 | 1644 | } else |
---|
1604 | | - if (event.getSource() == superItem) |
---|
| 1645 | + if (source == superItem) |
---|
1605 | 1646 | { |
---|
1606 | 1647 | makeSomething(new Superellipsoid()); |
---|
1607 | 1648 | } else |
---|
1608 | | - if (event.getSource() == kleinItem) |
---|
| 1649 | + if (source == kleinItem) |
---|
1609 | 1650 | { |
---|
1610 | 1651 | makeSomething(new Klein()); |
---|
1611 | 1652 | } else |
---|
1612 | | - if (event.getSource() == blobItem) |
---|
| 1653 | + if (source == blobItem) |
---|
1613 | 1654 | { |
---|
1614 | 1655 | Blob blob = new Blob(); |
---|
1615 | 1656 | BlobComponent comp = new BlobComponent(); |
---|
.. | .. |
---|
1617 | 1658 | //blob.retile(); |
---|
1618 | 1659 | makeSomething(blob); |
---|
1619 | 1660 | } else |
---|
1620 | | - if (event.getSource() == latheItem) |
---|
| 1661 | + if (source == latheItem) |
---|
1621 | 1662 | { |
---|
1622 | 1663 | makeSomething(new Lathe()); |
---|
1623 | 1664 | } else |
---|
1624 | | - if (event.getSource() == bezierItem) |
---|
| 1665 | + if (source == bezierItem) |
---|
1625 | 1666 | { |
---|
1626 | 1667 | makeSomething(new BezierSurface()); |
---|
1627 | 1668 | } else |
---|
1628 | | - if (event.getSource() == checkerItem) |
---|
| 1669 | + if (source == checkerItem) |
---|
1629 | 1670 | { |
---|
1630 | 1671 | /* |
---|
1631 | 1672 | Object3D obj = new BezierSurface(5,8); |
---|
.. | .. |
---|
1640 | 1681 | */ |
---|
1641 | 1682 | makeSomething(new Checker()); |
---|
1642 | 1683 | } else |
---|
1643 | | - if (event.getSource() == meshItem) |
---|
| 1684 | + if (source == meshItem) |
---|
1644 | 1685 | { |
---|
1645 | 1686 | Object3D itemtomake = new Object3D(); |
---|
1646 | 1687 | Object3D child; |
---|
.. | .. |
---|
1661 | 1702 | makeSomething(child); |
---|
1662 | 1703 | } |
---|
1663 | 1704 | } else |
---|
1664 | | - if (event.getSource() == springItem) |
---|
| 1705 | + if (source == springItem) |
---|
1665 | 1706 | { |
---|
1666 | 1707 | cSpring s = new cSpring(); |
---|
1667 | 1708 | s.setup(); |
---|
1668 | 1709 | makeSomething(s); |
---|
1669 | 1710 | } else |
---|
1670 | | - if (event.getSource() == flagItem) |
---|
| 1711 | + if (source == flagItem) |
---|
1671 | 1712 | { |
---|
1672 | 1713 | cSpring s = new cFlag(); |
---|
1673 | 1714 | s.setup(); |
---|
1674 | 1715 | makeSomething(s); |
---|
1675 | 1716 | } else |
---|
1676 | | - if (event.getSource() == lightItem) |
---|
| 1717 | + if (source == lightItem) |
---|
1677 | 1718 | { |
---|
1678 | 1719 | makeSomething(new Light()); |
---|
1679 | 1720 | } else |
---|
1680 | | - if (event.getSource() == csgItem) |
---|
| 1721 | + if (source == csgItem) |
---|
1681 | 1722 | { |
---|
1682 | 1723 | group(new CSG()); |
---|
1683 | 1724 | } else |
---|
1684 | | - if (event.getSource() == templateItem) |
---|
| 1725 | + if (source == templateItem) |
---|
1685 | 1726 | { |
---|
1686 | 1727 | group(new cTemplate()); |
---|
1687 | 1728 | } else |
---|
1688 | | - if (event.getSource() == attributeItem) |
---|
| 1729 | + if (source == attributeItem) |
---|
1689 | 1730 | { |
---|
1690 | 1731 | makeSomething(new Attribute()); |
---|
1691 | 1732 | } else |
---|
1692 | | - if (event.getSource() == pointflowItem) |
---|
| 1733 | + if (source == pointflowItem) |
---|
1693 | 1734 | { |
---|
1694 | 1735 | makeSomething(new PointFlow()); |
---|
1695 | 1736 | } else |
---|
.. | .. |
---|
1701 | 1742 | } else |
---|
1702 | 1743 | */ |
---|
1703 | 1744 | |
---|
1704 | | - if (event.getSource() == superLoopItem) |
---|
| 1745 | + if (source == superLoopItem) |
---|
1705 | 1746 | { |
---|
1706 | 1747 | Composite g = new cGroup(); |
---|
1707 | 1748 | for (int i=0; i<15; i++) |
---|
.. | .. |
---|
1723 | 1764 | |
---|
1724 | 1765 | group(g); |
---|
1725 | 1766 | } else |
---|
1726 | | - if (event.getSource() == loopItem) |
---|
| 1767 | + if (source == loopItem) |
---|
1727 | 1768 | { |
---|
1728 | 1769 | Composite csg = new GroupLeaf(); |
---|
1729 | 1770 | csg.count = 5; |
---|
.. | .. |
---|
1732 | 1773 | csg.addChild(child); |
---|
1733 | 1774 | child.addChild(csg); |
---|
1734 | 1775 | } else |
---|
1735 | | - if (event.getSource() == doubleItem) |
---|
| 1776 | + if (source == doubleItem) |
---|
1736 | 1777 | { |
---|
1737 | 1778 | Composite csg = new GroupLeaf(); |
---|
1738 | 1779 | csg.count = 5; |
---|
.. | .. |
---|
1744 | 1785 | csg.addChild(child); |
---|
1745 | 1786 | child.addChild(csg); |
---|
1746 | 1787 | } else |
---|
1747 | | - if (event.getSource() == tripleItem) |
---|
| 1788 | + if (source == tripleItem) |
---|
1748 | 1789 | { |
---|
1749 | 1790 | Composite csg = new GroupLeaf(); |
---|
1750 | 1791 | csg.count = 4; |
---|
.. | .. |
---|
1760 | 1801 | child.addChild(csg); |
---|
1761 | 1802 | } else |
---|
1762 | 1803 | |
---|
1763 | | - if (event.getSource() == importGFDItem) |
---|
| 1804 | + if (source == importGFDItem) |
---|
1764 | 1805 | { |
---|
1765 | 1806 | ImportGFD(); |
---|
1766 | 1807 | } else |
---|
1767 | | - if (event.getSource() == importVRMLX3DItem) |
---|
| 1808 | + if (source == importVRMLX3DItem) |
---|
1768 | 1809 | { |
---|
1769 | 1810 | ImportVRMLX3D(); |
---|
1770 | 1811 | } else |
---|
1771 | | - if (event.getSource() == import3DSItem) |
---|
| 1812 | + if (source == import3DSItem) |
---|
1772 | 1813 | { |
---|
1773 | 1814 | objEditor.ImportJME(new com.jmex.model.converters.MaxToJme(), "3ds", "Import 3DS"); |
---|
1774 | 1815 | } else |
---|
1775 | | - if (event.getSource() == importOBJItem) |
---|
| 1816 | + if (source == importOBJItem) |
---|
1776 | 1817 | { |
---|
1777 | 1818 | objEditor.ImportJME(new com.jmex.model.converters.ObjToJme(), "obj", "Import OBJ"); |
---|
1778 | 1819 | } else |
---|
1779 | | - if (event.getSource() == computeAOItem) |
---|
| 1820 | + if (source == computeAOItem) |
---|
1780 | 1821 | { |
---|
1781 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
1782 | | - CameraPane.theRenderer.repaint(); |
---|
| 1822 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
| 1823 | + Globals.theRenderer.repaint(); |
---|
1783 | 1824 | } else |
---|
1784 | | - if (event.getSource() == recompileItem) |
---|
| 1825 | + if (source == recompileItem) |
---|
1785 | 1826 | { |
---|
1786 | 1827 | Recompile(); |
---|
1787 | 1828 | refreshContents(); |
---|
1788 | 1829 | } else |
---|
1789 | | - if (event.getSource() == editScriptItem) |
---|
| 1830 | + if (source == editScriptItem) |
---|
1790 | 1831 | { |
---|
1791 | 1832 | OpenDialog(); |
---|
1792 | 1833 | refreshContents(); |
---|
1793 | 1834 | } else |
---|
1794 | | - if (event.getSource() == invariantsItem) |
---|
| 1835 | + if (source == invariantsItem) |
---|
1795 | 1836 | { |
---|
1796 | 1837 | System.out.println("Invariants:"); |
---|
1797 | | - GrafreeD.theApplet3D.universe.invariants(); |
---|
| 1838 | + GrafreeD.grafreeD.universe.invariants(); |
---|
1798 | 1839 | } else |
---|
1799 | | - if (event.getSource() == memoryItem) |
---|
| 1840 | + if (source == memoryItem) |
---|
1800 | 1841 | { |
---|
1801 | 1842 | //System.out.println("Invariants:"); |
---|
1802 | 1843 | PrintMemory(); |
---|
1803 | 1844 | } else |
---|
1804 | | - if (event.getSource() == pathItem) |
---|
| 1845 | + if (source == pathItem) |
---|
1805 | 1846 | { |
---|
1806 | 1847 | PrintPath(); |
---|
1807 | 1848 | } else |
---|
1808 | | - if (event.getSource() == analyzeItem) |
---|
| 1849 | + if (source == analyzeItem) |
---|
1809 | 1850 | { |
---|
1810 | 1851 | AnalyzeObject(); |
---|
1811 | 1852 | } else |
---|
1812 | | - if (event.getSource() == dumpItem) |
---|
| 1853 | + if (source == dumpItem) |
---|
1813 | 1854 | { |
---|
1814 | 1855 | DumpObject(); |
---|
1815 | 1856 | } else |
---|
1816 | | - if (event.getSource() == screenfitButton) |
---|
| 1857 | + if (source == screenfitButton) |
---|
1817 | 1858 | { |
---|
1818 | 1859 | //Reload(lastConverter, lastFilename, true); |
---|
1819 | 1860 | ScreenFit(); |
---|
1820 | 1861 | } else |
---|
1821 | | - if (event.getSource() == screenfitpointButton) |
---|
| 1862 | + if (source == screenfitpointButton) |
---|
1822 | 1863 | { |
---|
1823 | 1864 | //Reload(lastConverter, lastFilename, true); |
---|
1824 | 1865 | ScreenFitPoint(); |
---|
1825 | 1866 | } else |
---|
1826 | | - if (event.getSource() == snapobjectButton) |
---|
| 1867 | + if (source == snapobjectButton) |
---|
1827 | 1868 | { |
---|
1828 | 1869 | //Reload(lastConverter, lastFilename, true); |
---|
1829 | 1870 | SnapObject(); |
---|
.. | .. |
---|
1834 | 1875 | // Recompile(); |
---|
1835 | 1876 | // refreshContents(); |
---|
1836 | 1877 | // } else |
---|
1837 | | - if (event.getSource() == gcButton) |
---|
| 1878 | + if (source == gcButton) |
---|
1838 | 1879 | { |
---|
1839 | 1880 | System.out.println("Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1840 | 1881 | System.gc(); |
---|
1841 | 1882 | System.out.println("GC Memory (F/T/M) : " + Runtime.getRuntime().freeMemory() + "/" + Runtime.getRuntime().totalMemory() + "/" + Runtime.getRuntime().maxMemory()); |
---|
1842 | 1883 | } else |
---|
1843 | | - if (event.getSource() == editLeafItem) |
---|
| 1884 | + if (source == editLeafItem) |
---|
1844 | 1885 | { |
---|
1845 | 1886 | Object3D obj; |
---|
1846 | 1887 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
1854 | 1895 | } |
---|
1855 | 1896 | refreshContents(true); |
---|
1856 | 1897 | } else |
---|
1857 | | - if (event.getSource() == openWindowItem) |
---|
| 1898 | + if (source == openWindowItem) |
---|
1858 | 1899 | { |
---|
1859 | 1900 | EditSelection(true); |
---|
1860 | 1901 | } else |
---|
1861 | | - if (event.getSource() == cutItem || event.getSource() == clearButton) |
---|
| 1902 | + if (source == cutItem || source == clearButton) |
---|
1862 | 1903 | { |
---|
1863 | 1904 | loadClipboard(true); |
---|
1864 | 1905 | } else |
---|
1865 | | - if (event.getSource() == duplicateItem) |
---|
| 1906 | + if (source == duplicateItem) |
---|
1866 | 1907 | { |
---|
1867 | 1908 | Object3D keep = GrafreeD.clipboard; |
---|
1868 | 1909 | loadClipboard(false); |
---|
1869 | 1910 | paste(false); |
---|
1870 | 1911 | GrafreeD.clipboard = keep; |
---|
1871 | 1912 | } else |
---|
1872 | | - if (event.getSource() == cloneItem) |
---|
| 1913 | + if (source == cloneItem) |
---|
1873 | 1914 | { |
---|
1874 | 1915 | CloneSelection(false); |
---|
1875 | 1916 | } else |
---|
1876 | | - if (event.getSource() == cloneSupportItem) |
---|
| 1917 | + if (source == cloneSupportItem) |
---|
1877 | 1918 | { |
---|
1878 | 1919 | CloneSelection(true); |
---|
1879 | 1920 | } else |
---|
1880 | | - if (event.getSource() == copyItem) |
---|
| 1921 | + if (source == copyItem) |
---|
1881 | 1922 | { |
---|
1882 | 1923 | loadClipboard(false); |
---|
1883 | 1924 | } else |
---|
1884 | | - if (event.getSource() == pasteItem) |
---|
| 1925 | + if (source == pasteItem) |
---|
1885 | 1926 | { |
---|
1886 | 1927 | paste(false); |
---|
1887 | 1928 | } else |
---|
1888 | | - if (event.getSource() == pasteLinkItem) |
---|
| 1929 | + if (source == pasteLinkItem) |
---|
1889 | 1930 | { |
---|
1890 | 1931 | pasteInto(false); |
---|
1891 | 1932 | } else |
---|
1892 | | - if (event.getSource() == pasteCloneItem) |
---|
| 1933 | + if (source == pasteCloneItem) |
---|
1893 | 1934 | { |
---|
1894 | 1935 | pasteInto(true); |
---|
1895 | 1936 | } else |
---|
1896 | | - if (event.getSource() == pasteExpandItem) |
---|
| 1937 | + if (source == pasteExpandItem) |
---|
1897 | 1938 | { |
---|
1898 | 1939 | paste(true); |
---|
1899 | 1940 | } else |
---|
1900 | | - if (event.getSource() == synchronizeItem) |
---|
| 1941 | + if (source == synchronizeItem) |
---|
1901 | 1942 | { |
---|
1902 | 1943 | Overwrite(Object3D.TRANSFORM); |
---|
1903 | 1944 | } else |
---|
1904 | | - if (event.getSource() == overwriteNameItem) |
---|
| 1945 | + if (source == overwriteNameItem) |
---|
1905 | 1946 | { |
---|
1906 | 1947 | Overwrite(Object3D.NAME); |
---|
1907 | 1948 | } else |
---|
1908 | | - if (event.getSource() == overwriteUVItem) |
---|
| 1949 | + if (source == overwriteUVItem) |
---|
1909 | 1950 | { |
---|
1910 | 1951 | Overwrite(Object3D.UV); |
---|
1911 | 1952 | } else |
---|
1912 | | - if (event.getSource() == overwriteMatItem) |
---|
| 1953 | + if (source == overwriteMatItem) |
---|
1913 | 1954 | { |
---|
1914 | 1955 | /* july 2015 |
---|
1915 | 1956 | if ((dropAttributes & Object3D.TEXTURE) == 0) |
---|
.. | .. |
---|
1929 | 1970 | |
---|
1930 | 1971 | Overwrite(dropAttributes); |
---|
1931 | 1972 | } |
---|
1932 | | - if (event.getSource() == overwriteGeoItem) |
---|
| 1973 | + if (source == overwriteGeoItem) |
---|
1933 | 1974 | { |
---|
1934 | 1975 | Overwrite(Object3D.GEOMETRY); |
---|
1935 | 1976 | // if (/*group.selection.size() == 1 &&*/ GrafreeD.clipboard.size() == 1) |
---|
.. | .. |
---|
1946 | 1987 | // refreshContents(); |
---|
1947 | 1988 | // } |
---|
1948 | 1989 | } else |
---|
1949 | | - if (event.getSource() == generateMeshItem) |
---|
| 1990 | + if (source == generateMeshItem) |
---|
1950 | 1991 | { |
---|
1951 | 1992 | //if (group.selection.size() == 1) |
---|
1952 | 1993 | // for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
1957 | 1998 | ResetModel(); |
---|
1958 | 1999 | refreshContents(); |
---|
1959 | 2000 | } else |
---|
1960 | | - if (event.getSource() == extractGeometriesItem) |
---|
| 2001 | + if (source == extractGeometriesItem) |
---|
1961 | 2002 | { |
---|
1962 | 2003 | boolean one = false; |
---|
1963 | 2004 | |
---|
.. | .. |
---|
1984 | 2025 | ResetModel(); |
---|
1985 | 2026 | refreshContents(); |
---|
1986 | 2027 | } else |
---|
1987 | | - if (event.getSource() == cloneGeometriesItem) |
---|
| 2028 | + if (source == cloneGeometriesItem) |
---|
1988 | 2029 | { |
---|
1989 | 2030 | boolean one = false; |
---|
1990 | 2031 | |
---|
.. | .. |
---|
2010 | 2051 | ResetModel(); |
---|
2011 | 2052 | refreshContents(); |
---|
2012 | 2053 | } else |
---|
2013 | | - if (event.getSource() == shareGeometriesItem) |
---|
| 2054 | + if (source == shareGeometriesItem) |
---|
2014 | 2055 | { |
---|
2015 | 2056 | boolean one = false; |
---|
2016 | 2057 | |
---|
.. | .. |
---|
2040 | 2081 | refreshContents(); |
---|
2041 | 2082 | } |
---|
2042 | 2083 | } else |
---|
2043 | | - if (event.getSource() == mergeGeometriesItem) |
---|
| 2084 | + if (source == mergeGeometriesItem) |
---|
2044 | 2085 | { |
---|
2045 | 2086 | boolean one = false; |
---|
2046 | 2087 | |
---|
.. | .. |
---|
2070 | 2111 | ResetModel(); |
---|
2071 | 2112 | refreshContents(); |
---|
2072 | 2113 | } else |
---|
2073 | | - if (event.getSource() == linkverticesItem) |
---|
| 2114 | + if (source == linkverticesItem) |
---|
2074 | 2115 | { |
---|
2075 | 2116 | // if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2076 | 2117 | // { |
---|
.. | .. |
---|
2090 | 2131 | if (content instanceof cGroup && ((cGroup)content).transientlink ) |
---|
2091 | 2132 | content = ((cGroup)content).get(0); |
---|
2092 | 2133 | |
---|
2093 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 2134 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
2094 | 2135 | for (int i=0; i<group.selection.size(); i++) |
---|
2095 | 2136 | { |
---|
2096 | 2137 | boolean random = CameraPane.RANDOM; |
---|
.. | .. |
---|
2099 | 2140 | // group.selection.get(i).setMasterThis(content); // should be identity |
---|
2100 | 2141 | CameraPane.RANDOM = random; |
---|
2101 | 2142 | } |
---|
2102 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 2143 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
2103 | 2144 | refreshContents(); |
---|
2104 | 2145 | } |
---|
2105 | 2146 | } else |
---|
2106 | | - if (event.getSource() == resetsupportItem) |
---|
| 2147 | + if (source == resetsupportItem) |
---|
2107 | 2148 | { |
---|
2108 | 2149 | for (int i=0; i<group.selection.size(); i++) |
---|
2109 | 2150 | { |
---|
.. | .. |
---|
2115 | 2156 | |
---|
2116 | 2157 | refreshContents(); |
---|
2117 | 2158 | } else |
---|
2118 | | - if (event.getSource() == relinkverticesItem) |
---|
| 2159 | + if (source == relinkverticesItem) |
---|
2119 | 2160 | { |
---|
2120 | 2161 | boolean random = CameraPane.RANDOM; |
---|
2121 | 2162 | CameraPane.RANDOM = false; // parse all random nodes |
---|
.. | .. |
---|
2124 | 2165 | |
---|
2125 | 2166 | refreshContents(); |
---|
2126 | 2167 | } else |
---|
2127 | | - if (event.getSource() == resetreferencesItem) |
---|
| 2168 | + if (source == resetreferencesItem) |
---|
2128 | 2169 | { |
---|
2129 | 2170 | for (int i=0; i<group.selection.size(); i++) |
---|
2130 | 2171 | { |
---|
.. | .. |
---|
2133 | 2174 | |
---|
2134 | 2175 | refreshContents(); |
---|
2135 | 2176 | } else |
---|
2136 | | - if (event.getSource() == setMasterItem) |
---|
| 2177 | + if (source == setMasterItem) |
---|
2137 | 2178 | { |
---|
2138 | 2179 | if (group.selection.size() == 1 && GrafreeD.clipboard.size() == 1) |
---|
2139 | 2180 | { |
---|
.. | .. |
---|
2146 | 2187 | refreshContents(); |
---|
2147 | 2188 | } |
---|
2148 | 2189 | } else |
---|
2149 | | - if (event.getSource() == poseMeshItem) |
---|
| 2190 | + if (source == poseMeshItem) |
---|
2150 | 2191 | { |
---|
2151 | 2192 | if (group.selection.size() == 1) |
---|
2152 | 2193 | { |
---|
.. | .. |
---|
2165 | 2206 | } |
---|
2166 | 2207 | |
---|
2167 | 2208 | } else |
---|
2168 | | - if (event.getSource() == revertMeshItem) |
---|
| 2209 | + if (source == revertMeshItem) |
---|
2169 | 2210 | { |
---|
2170 | 2211 | RevertMeshes(); |
---|
2171 | 2212 | } else |
---|
2172 | | - if (event.getSource() == resetMeshItem) |
---|
| 2213 | + if (source == resetMeshItem) |
---|
2173 | 2214 | { |
---|
2174 | 2215 | ResetAll(); |
---|
2175 | 2216 | } else |
---|
2176 | | - if (event.getSource() == stepAllItem) |
---|
| 2217 | + if (source == stepAllItem) |
---|
2177 | 2218 | { |
---|
2178 | 2219 | StepAll(); |
---|
2179 | 2220 | } else |
---|
2180 | | - if (event.getSource() == clearItem) // || event.getSource() == clearButton) |
---|
| 2221 | + if (source == clearItem) // || event.getSource() == clearButton) |
---|
2181 | 2222 | { |
---|
2182 | 2223 | //int indices[] = jList.getSelectedIndices(); |
---|
2183 | 2224 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
2185 | 2226 | |
---|
2186 | 2227 | ClearSelection(false); |
---|
2187 | 2228 | } else |
---|
2188 | | - if (event.getSource() == clearAllItem) |
---|
| 2229 | + if (source == clearAllItem) |
---|
2189 | 2230 | { |
---|
2190 | 2231 | ClearSelection(true); |
---|
2191 | 2232 | } else |
---|
2192 | | - if (event.getSource() == grabItem) |
---|
| 2233 | + if (source == grabItem) |
---|
2193 | 2234 | { |
---|
2194 | 2235 | group(new cGroup(), true); |
---|
2195 | 2236 | } else |
---|
2196 | | - if (event.getSource() == hideItem) |
---|
| 2237 | + if (source == hideItem) |
---|
2197 | 2238 | { |
---|
2198 | 2239 | group(new HiddenObject()); |
---|
2199 | 2240 | } else |
---|
2200 | | - if (event.getSource() == frontItem) |
---|
| 2241 | + if (source == frontItem) |
---|
2201 | 2242 | { |
---|
2202 | 2243 | front(); |
---|
2203 | 2244 | } else |
---|
2204 | | - if (event.getSource() == backItem) |
---|
| 2245 | + if (source == backItem) |
---|
2205 | 2246 | { |
---|
2206 | 2247 | back(); |
---|
2207 | 2248 | } else |
---|
2208 | | - if (event.getSource() == cameraItem) |
---|
| 2249 | + if (source == cameraItem) |
---|
2209 | 2250 | { |
---|
2210 | 2251 | makeSomething(new Camera()); |
---|
2211 | 2252 | } else |
---|
2212 | | - if (event.getSource() == compositeItem) |
---|
| 2253 | + if (source == compositeItem) |
---|
2213 | 2254 | { |
---|
2214 | 2255 | group(new Composite()); |
---|
2215 | 2256 | } else |
---|
2216 | | - if (event.getSource() == randomItem) |
---|
| 2257 | + if (source == randomItem) |
---|
2217 | 2258 | { |
---|
2218 | 2259 | RandomNode random = new RandomNode(); |
---|
2219 | 2260 | group(random); |
---|
2220 | 2261 | if (random.size() > 0) |
---|
2221 | 2262 | random.name = random.get(0).name + "Rnd"; |
---|
2222 | 2263 | } else |
---|
2223 | | - if (event.getSource() == physicsItem) |
---|
| 2264 | + if (source == physicsItem) |
---|
2224 | 2265 | { |
---|
2225 | 2266 | group(new PhysicsNode()); |
---|
2226 | 2267 | } else |
---|
2227 | | - if (event.getSource() == frameselectorItem) |
---|
| 2268 | + if (source == frameselectorItem) |
---|
2228 | 2269 | { |
---|
2229 | 2270 | for (int i=0; i<group.selection.size(); i++) |
---|
2230 | 2271 | { |
---|
.. | .. |
---|
2236 | 2277 | ResetModel(); |
---|
2237 | 2278 | refreshContents(); |
---|
2238 | 2279 | } else |
---|
2239 | | - if (event.getSource() == switchGeoItem) |
---|
| 2280 | + if (source == switchGeoItem) |
---|
2240 | 2281 | { |
---|
2241 | 2282 | for (int i=0; i<group.selection.size(); i++) |
---|
2242 | 2283 | { |
---|
.. | .. |
---|
2248 | 2289 | ResetModel(); |
---|
2249 | 2290 | refreshContents(); |
---|
2250 | 2291 | } else |
---|
2251 | | - if (event.getSource() == switchTransfoItem) |
---|
| 2292 | + if (source == switchTransfoItem) |
---|
2252 | 2293 | { |
---|
2253 | 2294 | for (int i=0; i<group.selection.size(); i++) |
---|
2254 | 2295 | { |
---|
.. | .. |
---|
2260 | 2301 | ResetModel(); |
---|
2261 | 2302 | refreshContents(); |
---|
2262 | 2303 | } else |
---|
2263 | | - if (event.getSource() == morphItem) |
---|
| 2304 | + if (source == morphItem) |
---|
2264 | 2305 | { |
---|
2265 | 2306 | for (int i=0; i<group.selection.size(); i++) |
---|
2266 | 2307 | { |
---|
.. | .. |
---|
2272 | 2313 | ResetModel(); |
---|
2273 | 2314 | refreshContents(); |
---|
2274 | 2315 | } else |
---|
2275 | | - if (event.getSource() == scriptNodeItem) |
---|
| 2316 | + if (source == scriptNodeItem) |
---|
2276 | 2317 | { |
---|
2277 | 2318 | boolean atleastone = false; |
---|
2278 | 2319 | |
---|
.. | .. |
---|
2311 | 2352 | } |
---|
2312 | 2353 | } |
---|
2313 | 2354 | } else |
---|
2314 | | - if (event.getSource() == linkerItem) |
---|
| 2355 | + if (source == linkerItem) |
---|
2315 | 2356 | { |
---|
2316 | 2357 | group(new cLinker()); |
---|
2317 | 2358 | } else |
---|
2318 | | - if (event.getSource() == textureItem) |
---|
| 2359 | + if (source == textureItem) |
---|
2319 | 2360 | { |
---|
2320 | 2361 | group(new TextureNode()); |
---|
2321 | 2362 | } else |
---|
2322 | | - if (event.getSource() == billboardItem) |
---|
| 2363 | + if (source == billboardItem) |
---|
2323 | 2364 | { |
---|
2324 | 2365 | group(new BillboardNode()); |
---|
2325 | 2366 | } else |
---|
2326 | | - if (event.getSource() == shadowXItem) |
---|
| 2367 | + if (source == shadowXItem) |
---|
2327 | 2368 | { |
---|
2328 | 2369 | CastShadow(0); |
---|
2329 | 2370 | } else |
---|
2330 | | - if (event.getSource() == shadowYItem) |
---|
| 2371 | + if (source == shadowYItem) |
---|
2331 | 2372 | { |
---|
2332 | 2373 | CastShadow(1); |
---|
2333 | 2374 | } else |
---|
2334 | | - if (event.getSource() == shadowZItem) |
---|
| 2375 | + if (source == shadowZItem) |
---|
2335 | 2376 | { |
---|
2336 | 2377 | CastShadow(2); |
---|
2337 | 2378 | } else |
---|
2338 | | - if (event.getSource() == ungroupItem) |
---|
| 2379 | + if (source == ungroupItem) |
---|
2339 | 2380 | { |
---|
2340 | 2381 | //ungroup(); |
---|
2341 | 2382 | for (int i=0; i<group.selection.size(); i++) |
---|
.. | .. |
---|
2347 | 2388 | |
---|
2348 | 2389 | refreshContents(); |
---|
2349 | 2390 | } else |
---|
2350 | | - if (event.getSource() == genUVItem) |
---|
| 2391 | + if (source == genUVItem) |
---|
2351 | 2392 | { |
---|
2352 | 2393 | GenUV(); |
---|
2353 | 2394 | } else |
---|
2354 | | - if (event.getSource() == genNormalsCADItem) |
---|
| 2395 | + if (source == genNormalsCADItem) |
---|
2355 | 2396 | { |
---|
2356 | 2397 | GenNormals(true); |
---|
2357 | 2398 | } else |
---|
2358 | | - if (event.getSource() == genNormalsMESHItem) |
---|
| 2399 | + if (source == genNormalsMESHItem) |
---|
2359 | 2400 | { |
---|
2360 | 2401 | GenNormals(true); // TODO |
---|
2361 | 2402 | } else |
---|
2362 | | - if (event.getSource() == genNormalsORGANItem) |
---|
| 2403 | + if (source == genNormalsORGANItem) |
---|
2363 | 2404 | { |
---|
2364 | 2405 | GenNormals(false); |
---|
2365 | 2406 | } else |
---|
2366 | | - if (event.getSource() == genNormalsMINEItem) |
---|
| 2407 | + if (source == genNormalsMINEItem) |
---|
2367 | 2408 | { |
---|
2368 | 2409 | GenNormalsMINE(); |
---|
2369 | 2410 | } else |
---|
2370 | | - if (event.getSource() == stripifyItem) |
---|
| 2411 | + if (source == stripifyItem) |
---|
2371 | 2412 | { |
---|
2372 | 2413 | Stripify(); |
---|
2373 | 2414 | } else |
---|
2374 | | - if (event.getSource() == unstripifyItem) |
---|
| 2415 | + if (source == unstripifyItem) |
---|
2375 | 2416 | { |
---|
2376 | 2417 | Unstripify(); |
---|
2377 | 2418 | } else |
---|
2378 | | - if (event.getSource() == trimItem) |
---|
| 2419 | + if (source == trimItem) |
---|
2379 | 2420 | { |
---|
2380 | 2421 | Trim(); |
---|
2381 | 2422 | } else |
---|
2382 | | - if (event.getSource() == untrimItem) |
---|
| 2423 | + if (source == untrimItem) |
---|
2383 | 2424 | { |
---|
2384 | 2425 | Untrim(); |
---|
2385 | 2426 | } else |
---|
2386 | | - if (event.getSource() == clearColorsItem) |
---|
| 2427 | + if (source == clearColorsItem) |
---|
2387 | 2428 | { |
---|
2388 | 2429 | ClearColors(); |
---|
2389 | 2430 | } else |
---|
2390 | | - if (event.getSource() == clearMaterialsItem) |
---|
| 2431 | + if (source == clearMaterialsItem) |
---|
2391 | 2432 | { |
---|
2392 | 2433 | ClearMaterials(); |
---|
2393 | 2434 | } else |
---|
2394 | | - if (event.getSource() == liveleavesItem) |
---|
| 2435 | + if (source == liveleavesItem) |
---|
2395 | 2436 | { |
---|
2396 | 2437 | LiveLeaves(true); |
---|
2397 | 2438 | } else |
---|
2398 | | - if (event.getSource() == unliveleavesItem) |
---|
| 2439 | + if (source == unliveleavesItem) |
---|
2399 | 2440 | { |
---|
2400 | 2441 | LiveLeaves(false); |
---|
2401 | 2442 | } else |
---|
2402 | | - if (event.getSource() == supportleavesItem) |
---|
| 2443 | + if (source == supportleavesItem) |
---|
2403 | 2444 | { |
---|
2404 | 2445 | SupportLeaves(true); |
---|
2405 | 2446 | } else |
---|
2406 | | - if (event.getSource() == unsupportleavesItem) |
---|
| 2447 | + if (source == unsupportleavesItem) |
---|
2407 | 2448 | { |
---|
2408 | 2449 | SupportLeaves(false); |
---|
2409 | 2450 | } else |
---|
2410 | | - if (event.getSource() == hideleavesItem) |
---|
| 2451 | + if (source == hideleavesItem) |
---|
2411 | 2452 | { |
---|
2412 | 2453 | HideLeaves(true); |
---|
2413 | 2454 | } else |
---|
2414 | | - if (event.getSource() == showleavesItem) |
---|
| 2455 | + if (source == showleavesItem) |
---|
2415 | 2456 | { |
---|
2416 | 2457 | HideLeaves(false); |
---|
2417 | 2458 | } else |
---|
2418 | | - if (event.getSource() == markleavesItem) |
---|
| 2459 | + if (source == markleavesItem) |
---|
2419 | 2460 | { |
---|
2420 | 2461 | MarkLeaves(true); |
---|
2421 | 2462 | } else |
---|
2422 | | - if (event.getSource() == unmarkleavesItem) |
---|
| 2463 | + if (source == unmarkleavesItem) |
---|
2423 | 2464 | { |
---|
2424 | 2465 | MarkLeaves(false); |
---|
2425 | 2466 | } else |
---|
2426 | | - if (event.getSource() == flipVItem) |
---|
| 2467 | + if (source == flipVItem) |
---|
2427 | 2468 | { |
---|
2428 | 2469 | FlipV(true); |
---|
2429 | 2470 | } else |
---|
2430 | | - if (event.getSource() == unflipVItem) |
---|
| 2471 | + if (source == unflipVItem) |
---|
2431 | 2472 | { |
---|
2432 | 2473 | FlipV(false); |
---|
2433 | 2474 | } else |
---|
2434 | | - if (event.getSource() == lowTexturesItem) |
---|
| 2475 | + if (source == lowTexturesItem) |
---|
2435 | 2476 | { |
---|
2436 | 2477 | SetTexRes(0); |
---|
2437 | 2478 | } else |
---|
2438 | | - if (event.getSource() == normalTexturesItem) |
---|
| 2479 | + if (source == normalTexturesItem) |
---|
2439 | 2480 | { |
---|
2440 | 2481 | SetTexRes(1); |
---|
2441 | 2482 | } else |
---|
2442 | | - if (event.getSource() == highTexturesItem) |
---|
| 2483 | + if (source == highTexturesItem) |
---|
2443 | 2484 | { |
---|
2444 | 2485 | SetTexRes(2); |
---|
2445 | 2486 | } else |
---|
2446 | | - if (event.getSource() == veryhighTexturesItem) |
---|
| 2487 | + if (source == veryhighTexturesItem) |
---|
2447 | 2488 | { |
---|
2448 | 2489 | SetTexRes(3); |
---|
2449 | 2490 | } else |
---|
2450 | | - if (event.getSource() == maxTexturesItem) |
---|
| 2491 | + if (source == maxTexturesItem) |
---|
2451 | 2492 | { |
---|
2452 | 2493 | SetTexRes(4); |
---|
2453 | 2494 | } else |
---|
2454 | | - if (event.getSource() == panoTexturesItem) |
---|
| 2495 | + if (source == panoTexturesItem) |
---|
2455 | 2496 | { |
---|
2456 | 2497 | SetTexRes(5); |
---|
2457 | 2498 | } else |
---|
2458 | | - if (event.getSource() == reverseNormalsItem) |
---|
| 2499 | + if (source == reverseNormalsItem) |
---|
2459 | 2500 | { |
---|
2460 | 2501 | ReverseNormals(); |
---|
2461 | 2502 | } else |
---|
2462 | | - if (event.getSource() == parseverticesItem) |
---|
| 2503 | + if (source == parseverticesItem) |
---|
2463 | 2504 | { |
---|
2464 | 2505 | ParseVertices(); |
---|
2465 | 2506 | } else |
---|
2466 | | - if (event.getSource() == textureFieldItem) |
---|
| 2507 | + if (source == textureFieldItem) |
---|
2467 | 2508 | { |
---|
2468 | 2509 | TextureVertices(); |
---|
2469 | 2510 | } else |
---|
2470 | | - if (event.getSource() == alignItem) |
---|
| 2511 | + if (source == alignItem) |
---|
2471 | 2512 | { |
---|
2472 | 2513 | Align(); |
---|
2473 | 2514 | } else |
---|
2474 | | - if (event.getSource() == mirrorItem) |
---|
| 2515 | + if (source == mirrorItem) |
---|
2475 | 2516 | { |
---|
2476 | 2517 | MirrorPoses(); |
---|
2477 | 2518 | } else |
---|
2478 | | - if (event.getSource() == reduceMorphItem) |
---|
| 2519 | + if (source == reduceMorphItem) |
---|
2479 | 2520 | { |
---|
2480 | 2521 | MeshReduction(false); |
---|
2481 | 2522 | } else |
---|
2482 | | - if (event.getSource() == reduce34MorphItem) |
---|
| 2523 | + if (source == reduce34MorphItem) |
---|
2483 | 2524 | { |
---|
2484 | 2525 | MeshReduction(true); |
---|
2485 | 2526 | } else |
---|
2486 | | - if (event.getSource() == reverseTrianglesItem) |
---|
| 2527 | + if (source == reverseTrianglesItem) |
---|
2487 | 2528 | { |
---|
2488 | 2529 | ReverseTriangles(); |
---|
2489 | 2530 | } else |
---|
2490 | | - if (event.getSource() == reduceMeshItem) |
---|
| 2531 | + if (source == reduceMeshItem) |
---|
2491 | 2532 | { |
---|
2492 | 2533 | ReduceMesh(false); |
---|
2493 | 2534 | } else |
---|
2494 | | - if (event.getSource() == reduce34MeshItem) |
---|
| 2535 | + if (source == reduce34MeshItem) |
---|
2495 | 2536 | { |
---|
2496 | 2537 | ReduceMesh(true); |
---|
2497 | 2538 | } else |
---|
2498 | | - if (event.getSource() == increaseMeshItem) |
---|
| 2539 | + if (source == increaseMeshItem) |
---|
2499 | 2540 | { |
---|
2500 | 2541 | IncreaseMesh(); |
---|
2501 | 2542 | } else |
---|
2502 | | - if (event.getSource() == clipMeshItem) |
---|
| 2543 | + if (source == clipMeshItem) |
---|
2503 | 2544 | { |
---|
2504 | 2545 | ClipMesh(); |
---|
2505 | 2546 | } else |
---|
2506 | | - if (event.getSource() == smoothMeshItem) |
---|
| 2547 | + if (source == smoothMeshItem) |
---|
2507 | 2548 | { |
---|
2508 | 2549 | SmoothMesh(); |
---|
2509 | 2550 | } else |
---|
2510 | | - if (event.getSource() == transformgeometryItem) |
---|
| 2551 | + if (source == transformgeometryItem) |
---|
2511 | 2552 | { |
---|
2512 | 2553 | TransformGeometry(); |
---|
2513 | 2554 | } else |
---|
2514 | | - if (event.getSource() == resetTransformItem) |
---|
| 2555 | + if (source == resetTransformItem) |
---|
2515 | 2556 | { |
---|
2516 | 2557 | ResetTransform(); |
---|
2517 | 2558 | } else |
---|
2518 | | - if (event.getSource() == resetCentroidItem) |
---|
| 2559 | + if (source == resetCentroidItem) |
---|
2519 | 2560 | { |
---|
2520 | 2561 | ResetCentroid(); |
---|
2521 | 2562 | } else |
---|
2522 | | - if (event.getSource() == resetParentItem) |
---|
| 2563 | + if (source == resetParentItem) |
---|
2523 | 2564 | { |
---|
2524 | 2565 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2525 | 2566 | { |
---|
.. | .. |
---|
2529 | 2570 | |
---|
2530 | 2571 | refreshContents(); |
---|
2531 | 2572 | } else |
---|
2532 | | - if (event.getSource() == repairParentItem) |
---|
| 2573 | + if (source == repairParentItem) |
---|
2533 | 2574 | { |
---|
2534 | 2575 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2535 | 2576 | { |
---|
.. | .. |
---|
2543 | 2584 | |
---|
2544 | 2585 | refreshContents(); |
---|
2545 | 2586 | } else |
---|
2546 | | - if (event.getSource() == sortbysizeItem) |
---|
| 2587 | + if (source == repairShadowItem) |
---|
| 2588 | + { |
---|
| 2589 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2590 | + { |
---|
| 2591 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2592 | + obj.RepairShadow(); |
---|
| 2593 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2594 | +// { |
---|
| 2595 | +// obj.get(i).parent = obj; |
---|
| 2596 | +// } |
---|
| 2597 | + } |
---|
| 2598 | + |
---|
| 2599 | + refreshContents(); |
---|
| 2600 | + } else |
---|
| 2601 | + if (source == sortbysizeItem) |
---|
2547 | 2602 | { |
---|
2548 | 2603 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2549 | 2604 | { |
---|
.. | .. |
---|
2555 | 2610 | ResetModel(); |
---|
2556 | 2611 | refreshContents(); |
---|
2557 | 2612 | } else |
---|
2558 | | - if (event.getSource() == sortbynameItem) |
---|
| 2613 | + if (source == sortbynameItem) |
---|
2559 | 2614 | { |
---|
2560 | 2615 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2561 | 2616 | { |
---|
.. | .. |
---|
2567 | 2622 | ResetModel(); |
---|
2568 | 2623 | refreshContents(); |
---|
2569 | 2624 | } else |
---|
2570 | | - if (event.getSource() == attachPigmentItem) |
---|
| 2625 | + if (source == attachPigmentItem) |
---|
2571 | 2626 | { |
---|
2572 | 2627 | String texture = GetFile("Attach pigment"); |
---|
2573 | 2628 | Object3D obj; |
---|
.. | .. |
---|
2579 | 2634 | |
---|
2580 | 2635 | refreshContents(); |
---|
2581 | 2636 | } else |
---|
2582 | | - if (event.getSource() == detachPigmentItem) |
---|
| 2637 | + if (source == detachPigmentItem) |
---|
2583 | 2638 | { |
---|
2584 | 2639 | Object3D obj; |
---|
2585 | 2640 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2590 | 2645 | |
---|
2591 | 2646 | refreshContents(); |
---|
2592 | 2647 | } else |
---|
2593 | | - if (event.getSource() == attachBumpItem) |
---|
| 2648 | + if (source == attachBumpItem) |
---|
2594 | 2649 | { |
---|
2595 | 2650 | String texture = GetFile("Attach bump"); |
---|
2596 | 2651 | Object3D obj; |
---|
.. | .. |
---|
2602 | 2657 | |
---|
2603 | 2658 | refreshContents(); |
---|
2604 | 2659 | } else |
---|
2605 | | - if (event.getSource() == detachBumpItem) |
---|
| 2660 | + if (source == detachBumpItem) |
---|
2606 | 2661 | { |
---|
2607 | 2662 | Object3D obj; |
---|
2608 | 2663 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2613 | 2668 | |
---|
2614 | 2669 | refreshContents(); |
---|
2615 | 2670 | } else |
---|
2616 | | - if (event.getSource() == pigmentBumpItem) |
---|
| 2671 | + if (source == pigmentBumpItem) |
---|
2617 | 2672 | { |
---|
2618 | 2673 | Object3D obj; |
---|
2619 | 2674 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2624 | 2679 | |
---|
2625 | 2680 | refreshContents(); |
---|
2626 | 2681 | } else |
---|
2627 | | - if (event.getSource() == flashSelectionButton) |
---|
| 2682 | + if (source == flashSelectionButton) |
---|
2628 | 2683 | { |
---|
2629 | 2684 | CameraPane.flash = true; |
---|
2630 | 2685 | refreshContents(); |
---|
2631 | 2686 | } else |
---|
2632 | | - if (event.getSource() == oneButton) |
---|
| 2687 | + if (source == oneButton) |
---|
2633 | 2688 | { |
---|
2634 | 2689 | } else |
---|
2635 | | - if (event.getSource() == twoButton) |
---|
| 2690 | + if (source == twoButton) |
---|
2636 | 2691 | { |
---|
2637 | 2692 | radio.layout = twoButton; |
---|
2638 | 2693 | // bug |
---|
2639 | 2694 | //gridPanel.setDividerLocation(1.0); |
---|
2640 | 2695 | //bigPanel.setDividerLocation(0.0); |
---|
2641 | | - bigThree.remove(jtp); |
---|
2642 | | - bigThree.remove(cameraPanel); |
---|
2643 | | - bigThree.remove(XYZPanel); |
---|
2644 | | - aWindowConstraints.gridx = 0; |
---|
2645 | | - aWindowConstraints.gridy = 0; |
---|
2646 | | - aWindowConstraints.gridwidth = 1; |
---|
2647 | | - // aConstraints.gridheight = 3; |
---|
2648 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2649 | | - aWindowConstraints.weightx = 0; |
---|
2650 | | - aWindowConstraints.weighty = 1; |
---|
2651 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2652 | | - aWindowConstraints.weightx = 1; |
---|
2653 | | - aWindowConstraints.gridwidth = 3; |
---|
2654 | | - // aConstraints.gridheight = 3; |
---|
2655 | | - aWindowConstraints.gridx = 1; |
---|
2656 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2657 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2658 | | - aWindowConstraints.weightx = 0; |
---|
2659 | | - aWindowConstraints.gridx = 4; |
---|
2660 | | - aWindowConstraints.gridwidth = 1; |
---|
2661 | | - // aConstraints.gridheight = 3; |
---|
2662 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2663 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2664 | | - bigThree.revalidate(); |
---|
| 2696 | +// bigThree.remove(scenePanel); |
---|
| 2697 | +// bigThree.remove(centralPanel); |
---|
| 2698 | +// bigThree.remove(XYZPanel); |
---|
| 2699 | +// aWindowConstraints.gridx = 0; |
---|
| 2700 | +// aWindowConstraints.gridy = 0; |
---|
| 2701 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2702 | +// // aConstraints.gridheight = 3; |
---|
| 2703 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2704 | +// aWindowConstraints.weightx = 0; |
---|
| 2705 | +// aWindowConstraints.weighty = 1; |
---|
| 2706 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2707 | +// aWindowConstraints.weightx = 1; |
---|
| 2708 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2709 | +// // aConstraints.gridheight = 3; |
---|
| 2710 | +// aWindowConstraints.gridx = 1; |
---|
| 2711 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2712 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2713 | +// aWindowConstraints.weightx = 0; |
---|
| 2714 | +// aWindowConstraints.gridx = 4; |
---|
| 2715 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2716 | +// // aConstraints.gridheight = 3; |
---|
| 2717 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2718 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2719 | +// scenePanel.setVisible(false); |
---|
| 2720 | +// centralPanel.setVisible(true); |
---|
| 2721 | +// XYZPanel.setVisible(false); |
---|
| 2722 | + bigThree.ClearUI(); |
---|
| 2723 | + bigThree.addComponent(centralPanel); |
---|
| 2724 | + bigThree.FlushUI(); |
---|
2665 | 2725 | } else |
---|
2666 | | - if (event.getSource() == threeButton) |
---|
| 2726 | + if (source == threeButton) |
---|
2667 | 2727 | { |
---|
2668 | 2728 | radio.layout = threeButton; |
---|
2669 | | - bigThree.remove(jtp); |
---|
2670 | | - bigThree.remove(cameraPanel); |
---|
2671 | | - bigThree.remove(XYZPanel); |
---|
2672 | | - aWindowConstraints.gridx = 0; |
---|
2673 | | - aWindowConstraints.gridy = 0; |
---|
2674 | | - aWindowConstraints.gridwidth = 1; |
---|
2675 | | - // aConstraints.gridheight = 3; |
---|
2676 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2677 | | - aWindowConstraints.weightx = 0; |
---|
2678 | | - aWindowConstraints.weighty = 1; |
---|
2679 | | - //bigThree.add(jtp, aWindowConstraints); |
---|
2680 | | - aWindowConstraints.weightx = 1; |
---|
2681 | | - aWindowConstraints.gridwidth = 3; |
---|
2682 | | - // aConstraints.gridheight = 3; |
---|
2683 | | - aWindowConstraints.gridx = 1; |
---|
2684 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2685 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2686 | | - aWindowConstraints.weightx = 0; |
---|
2687 | | - aWindowConstraints.gridx = 4; |
---|
2688 | | - aWindowConstraints.gridwidth = 1; |
---|
2689 | | - // aConstraints.gridheight = 3; |
---|
2690 | | - aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2691 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2692 | | - bigThree.revalidate(); |
---|
| 2729 | + |
---|
| 2730 | +// bigThree.remove(scenePanel); |
---|
| 2731 | +// bigThree.remove(centralPanel); |
---|
| 2732 | +// bigThree.remove(XYZPanel); |
---|
| 2733 | +// aWindowConstraints.gridx = 0; |
---|
| 2734 | +// aWindowConstraints.gridy = 0; |
---|
| 2735 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2736 | +// // aConstraints.gridheight = 3; |
---|
| 2737 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2738 | +// aWindowConstraints.weightx = 0; |
---|
| 2739 | +// aWindowConstraints.weighty = 1; |
---|
| 2740 | +// //bigThree.add(jtp, aWindowConstraints); |
---|
| 2741 | +// aWindowConstraints.weightx = 1; |
---|
| 2742 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2743 | +// // aConstraints.gridheight = 3; |
---|
| 2744 | +// aWindowConstraints.gridx = 1; |
---|
| 2745 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2746 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2747 | +// aWindowConstraints.weightx = 0; |
---|
| 2748 | +// aWindowConstraints.gridx = 4; |
---|
| 2749 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2750 | +// // aConstraints.gridheight = 3; |
---|
| 2751 | +// aConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2752 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2753 | +// bigThree.validate(); |
---|
| 2754 | +// scenePanel.setVisible(false); |
---|
| 2755 | +// centralPanel.setVisible(true); |
---|
| 2756 | +// XYZPanel.setVisible(true); |
---|
| 2757 | + bigThree.ClearUI(); |
---|
| 2758 | + bigThree.addComponent(centralPanel); |
---|
| 2759 | + bigThree.addComponent(XYZPanel); |
---|
| 2760 | + bigThree.FlushUI(); |
---|
2693 | 2761 | } else |
---|
2694 | | - if (event.getSource() == fourButton) |
---|
| 2762 | + if (source == fourButton) |
---|
2695 | 2763 | { |
---|
2696 | 2764 | radio.layout = fourButton; |
---|
2697 | | - bigThree.remove(jtp); |
---|
2698 | | - bigThree.remove(cameraPanel); |
---|
2699 | | - bigThree.remove(XYZPanel); |
---|
2700 | | - aWindowConstraints.gridx = 0; |
---|
2701 | | - aWindowConstraints.gridy = 0; |
---|
2702 | | - aWindowConstraints.gridwidth = 1; |
---|
2703 | | - // aWindowConstraints.gridheight = 3; |
---|
2704 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2705 | | - aWindowConstraints.weightx = 1; |
---|
2706 | | - aWindowConstraints.weighty = 1; |
---|
2707 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2708 | | - aWindowConstraints.weightx = 1; |
---|
2709 | | - aWindowConstraints.gridwidth = 3; |
---|
2710 | | - // aConstraints.gridheight = 3; |
---|
2711 | | - aWindowConstraints.gridx = 1; |
---|
2712 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2713 | | - //bigThree.add(cameraPanel, aWindowConstraints); |
---|
2714 | | - aWindowConstraints.weightx = 0; |
---|
2715 | | - aWindowConstraints.gridx = 4; |
---|
2716 | | - aWindowConstraints.gridwidth = 1; |
---|
2717 | | - // aWindowConstraints.gridheight = 3; |
---|
2718 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2719 | | - //bigThree.add(XYZPanel, aWindowConstraints); |
---|
2720 | | - bigThree.revalidate(); |
---|
| 2765 | + |
---|
| 2766 | +// bigThree.remove(scenePanel); |
---|
| 2767 | +// bigThree.remove(centralPanel); |
---|
| 2768 | +// bigThree.remove(XYZPanel); |
---|
| 2769 | +// aWindowConstraints.gridx = 0; |
---|
| 2770 | +// aWindowConstraints.gridy = 0; |
---|
| 2771 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2772 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2773 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2774 | +// aWindowConstraints.weightx = 1; |
---|
| 2775 | +// aWindowConstraints.weighty = 1; |
---|
| 2776 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2777 | +// aWindowConstraints.weightx = 1; |
---|
| 2778 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2779 | +// // aConstraints.gridheight = 3; |
---|
| 2780 | +// aWindowConstraints.gridx = 1; |
---|
| 2781 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2782 | +// //bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2783 | +// aWindowConstraints.weightx = 0; |
---|
| 2784 | +// aWindowConstraints.gridx = 4; |
---|
| 2785 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2786 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2787 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2788 | +// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2789 | +// bigThree.validate(); |
---|
| 2790 | +// scenePanel.setVisible(true); |
---|
| 2791 | +// centralPanel.setVisible(false); |
---|
| 2792 | +// XYZPanel.setVisible(false); |
---|
| 2793 | + bigThree.ClearUI(); |
---|
| 2794 | + bigThree.addComponent(scenePanel); |
---|
| 2795 | + bigThree.FlushUI(); |
---|
2721 | 2796 | } else |
---|
2722 | | - if (event.getSource() == sixButton) |
---|
| 2797 | + if (source == sixButton) |
---|
2723 | 2798 | { |
---|
2724 | 2799 | radio.layout = sixButton; |
---|
2725 | | - bigThree.remove(jtp); |
---|
2726 | | - bigThree.remove(cameraPanel); |
---|
2727 | | - bigThree.remove(XYZPanel); |
---|
2728 | | - aWindowConstraints.gridx = 0; |
---|
2729 | | - aWindowConstraints.gridy = 0; |
---|
2730 | | - aWindowConstraints.gridwidth = 1; |
---|
2731 | | - // aConstraints.gridheight = 3; |
---|
2732 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2733 | | - aWindowConstraints.weightx = 0; |
---|
2734 | | - aWindowConstraints.weighty = 1; |
---|
2735 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2736 | | - aWindowConstraints.weightx = 1; |
---|
2737 | | - aWindowConstraints.gridwidth = 3; |
---|
2738 | | - // aWindowConstraints.gridheight = 3; |
---|
2739 | | - aWindowConstraints.gridx = 1; |
---|
2740 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2741 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2742 | | - aWindowConstraints.weightx = 0; |
---|
2743 | | - aWindowConstraints.gridx = 4; |
---|
2744 | | - aWindowConstraints.gridwidth = 1; |
---|
2745 | | - // aWindowConstraints.gridheight = 3; |
---|
2746 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2747 | | - //bigThree.add(XYZPanel, aConstraints); |
---|
2748 | | - bigThree.revalidate(); |
---|
| 2800 | + |
---|
| 2801 | +// bigThree.remove(scenePanel); |
---|
| 2802 | +// bigThree.remove(centralPanel); |
---|
| 2803 | +// bigThree.remove(XYZPanel); |
---|
| 2804 | +// aWindowConstraints.gridx = 0; |
---|
| 2805 | +// aWindowConstraints.gridy = 0; |
---|
| 2806 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2807 | +// // aConstraints.gridheight = 3; |
---|
| 2808 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2809 | +// aWindowConstraints.weightx = 0; |
---|
| 2810 | +// aWindowConstraints.weighty = 1; |
---|
| 2811 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2812 | +// aWindowConstraints.weightx = 1; |
---|
| 2813 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2814 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2815 | +// aWindowConstraints.gridx = 1; |
---|
| 2816 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2817 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2818 | +// aWindowConstraints.weightx = 0; |
---|
| 2819 | +// aWindowConstraints.gridx = 4; |
---|
| 2820 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2821 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2822 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2823 | +// //bigThree.add(XYZPanel, aConstraints); |
---|
| 2824 | +// bigThree.validate(); |
---|
| 2825 | +// scenePanel.setVisible(true); |
---|
| 2826 | +// centralPanel.setVisible(true); |
---|
| 2827 | +// XYZPanel.setVisible(false); |
---|
| 2828 | + bigThree.ClearUI(); |
---|
| 2829 | + bigThree.addComponent(scenePanel); |
---|
| 2830 | + bigThree.addComponent(centralPanel); |
---|
| 2831 | + bigThree.FlushUI(); |
---|
2749 | 2832 | } else |
---|
2750 | | - if (event.getSource() == sevenButton) |
---|
| 2833 | + if (source == sevenButton) |
---|
2751 | 2834 | { |
---|
2752 | 2835 | radio.layout = sevenButton; |
---|
2753 | | - bigThree.remove(jtp); |
---|
2754 | | - bigThree.remove(cameraPanel); |
---|
2755 | | - bigThree.remove(XYZPanel); |
---|
2756 | | - aWindowConstraints.gridx = 0; |
---|
2757 | | - aWindowConstraints.gridy = 0; |
---|
2758 | | - aWindowConstraints.gridwidth = 1; |
---|
2759 | | - // aWindowConstraints.gridheight = 3; |
---|
2760 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2761 | | - aWindowConstraints.weightx = 0; |
---|
2762 | | - aWindowConstraints.weighty = 1; |
---|
2763 | | - bigThree.add(jtp, aWindowConstraints); |
---|
2764 | | - aWindowConstraints.weightx = 1; |
---|
2765 | | - aWindowConstraints.gridwidth = 3; |
---|
2766 | | - // aWindowConstraints.gridheight = 3; |
---|
2767 | | - aWindowConstraints.gridx = 1; |
---|
2768 | | - aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2769 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
2770 | | - aWindowConstraints.weightx = 0; |
---|
2771 | | - aWindowConstraints.gridx = 4; |
---|
2772 | | - aWindowConstraints.gridwidth = 1; |
---|
2773 | | - // aConstraints.gridheight = 3; |
---|
2774 | | - aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
2775 | | - bigThree.add(XYZPanel, aWindowConstraints); |
---|
2776 | | - bigThree.revalidate(); |
---|
| 2836 | + |
---|
| 2837 | +// bigThree.remove(scenePanel); |
---|
| 2838 | +// bigThree.remove(centralPanel); |
---|
| 2839 | +// bigThree.remove(XYZPanel); |
---|
| 2840 | +// aWindowConstraints.gridx = 0; |
---|
| 2841 | +// aWindowConstraints.gridy = 0; |
---|
| 2842 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2843 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2844 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2845 | +// aWindowConstraints.weightx = 0; |
---|
| 2846 | +// aWindowConstraints.weighty = 1; |
---|
| 2847 | +// bigThree.add(scenePanel, aWindowConstraints); |
---|
| 2848 | +// aWindowConstraints.weightx = 1; |
---|
| 2849 | +// aWindowConstraints.gridwidth = 3; |
---|
| 2850 | +// // aWindowConstraints.gridheight = 3; |
---|
| 2851 | +// aWindowConstraints.gridx = 1; |
---|
| 2852 | +// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
| 2853 | +// bigThree.add(centralPanel, aWindowConstraints); |
---|
| 2854 | +// aWindowConstraints.weightx = 0; |
---|
| 2855 | +// aWindowConstraints.gridx = 4; |
---|
| 2856 | +// aWindowConstraints.gridwidth = 1; |
---|
| 2857 | +// // aConstraints.gridheight = 3; |
---|
| 2858 | +// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
| 2859 | +// bigThree.add(XYZPanel, aWindowConstraints); |
---|
| 2860 | +// bigThree.validate(); |
---|
| 2861 | +// scenePanel.setVisible(true); |
---|
| 2862 | +// centralPanel.setVisible(true); |
---|
| 2863 | +// XYZPanel.setVisible(true); |
---|
| 2864 | + bigThree.ClearUI(); |
---|
| 2865 | + bigThree.addComponent(scenePanel); |
---|
| 2866 | + bigThree.addComponent(centralPanel); |
---|
| 2867 | + bigThree.addComponent(XYZPanel); |
---|
| 2868 | + bigThree.FlushUI(); |
---|
2777 | 2869 | } else |
---|
2778 | | - if (event.getSource() == rootButton) |
---|
| 2870 | + if (source == rootButton) |
---|
2779 | 2871 | { |
---|
2780 | 2872 | Object3D obj; |
---|
2781 | 2873 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2787 | 2879 | |
---|
2788 | 2880 | refreshContents(true); |
---|
2789 | 2881 | } else |
---|
2790 | | - if (event.getSource() == closeButton) |
---|
| 2882 | + if (source == closeButton) |
---|
2791 | 2883 | { |
---|
2792 | 2884 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
2793 | 2885 | cRadio ab; |
---|
.. | .. |
---|
2808 | 2900 | } |
---|
2809 | 2901 | refreshContents(true); |
---|
2810 | 2902 | } else |
---|
2811 | | - if (event.getSource() == editItem || event.getSource() == editButton) |
---|
| 2903 | + if (source == editItem || source == editButton) |
---|
2812 | 2904 | { |
---|
2813 | 2905 | EditSelection(false); |
---|
2814 | 2906 | } else |
---|
2815 | | - if (event.getSource() == uneditButton) |
---|
| 2907 | + if (source == uneditButton) |
---|
2816 | 2908 | { |
---|
2817 | 2909 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
2818 | 2910 | { |
---|
.. | .. |
---|
2829 | 2921 | //objEditor.ResetSliders(); |
---|
2830 | 2922 | refreshContents(true); |
---|
2831 | 2923 | } else |
---|
2832 | | - if (event.getSource() == clearPanelButton) |
---|
| 2924 | + if (source == clearPanelButton) |
---|
2833 | 2925 | { |
---|
2834 | 2926 | assert(copy == group); |
---|
2835 | 2927 | //copy.ClearUI(); |
---|
.. | .. |
---|
2840 | 2932 | listUI.clear(); |
---|
2841 | 2933 | refreshContents(true); |
---|
2842 | 2934 | } else |
---|
2843 | | - if (event.getSource() == allParamsButton) |
---|
| 2935 | + if (source == allParamsButton) |
---|
2844 | 2936 | { |
---|
2845 | 2937 | assert(copy == group); |
---|
2846 | 2938 | |
---|
.. | .. |
---|
2861 | 2953 | |
---|
2862 | 2954 | refreshContents(true); |
---|
2863 | 2955 | } else |
---|
2864 | | - if (event.getSource() == unselectButton) |
---|
| 2956 | + if (source == unselectButton) |
---|
2865 | 2957 | { |
---|
2866 | 2958 | objEditor.jTree.clearSelection(); |
---|
2867 | 2959 | // ?? oct 2012 GrafreeD.clipboard.clear(); |
---|
2868 | 2960 | objEditor.ResetSliders(); |
---|
2869 | 2961 | refreshContents(true); |
---|
2870 | 2962 | } else |
---|
2871 | | - if(event.getSource() instanceof cRadio) |
---|
| 2963 | + if(source instanceof cRadio) |
---|
2872 | 2964 | { |
---|
2873 | 2965 | group.parent = keepparent; |
---|
2874 | 2966 | group.attributes = 0; |
---|
2875 | 2967 | //group.editWindow = null; |
---|
2876 | | - /*cRadio*/ radio = (cRadio)event.getSource(); |
---|
| 2968 | + /*cRadio*/ radio = (cRadio)source; |
---|
2877 | 2969 | Object3D obj = radio.GetObject(); |
---|
2878 | 2970 | System.out.println("Edit " + obj); |
---|
2879 | 2971 | if (true) // obj instanceof Composite) // obj.parent == null) // obj instanceof Composite) |
---|
.. | .. |
---|
2893 | 2985 | } |
---|
2894 | 2986 | |
---|
2895 | 2987 | copy = group; |
---|
2896 | | - //CameraPane.theRenderer.object = group; |
---|
| 2988 | + //Globals.theRenderer.object = group; |
---|
2897 | 2989 | if(!useclient) |
---|
2898 | 2990 | { |
---|
2899 | 2991 | cameraView.renderCamera = radio.camera; |
---|
.. | .. |
---|
2902 | 2994 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2903 | 2995 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2904 | 2996 | cameraView.object = group; |
---|
2905 | | - cameraView.lighttouched = true; |
---|
| 2997 | + //cameraView.lighttouched = true; |
---|
| 2998 | + Globals.lighttouched = true; |
---|
2906 | 2999 | topView.object = group; |
---|
2907 | 3000 | frontView.object = group; |
---|
2908 | 3001 | sideView.object = group; |
---|
.. | .. |
---|
2938 | 3031 | if (useclient) |
---|
2939 | 3032 | { |
---|
2940 | 3033 | cameraView.object = client; |
---|
2941 | | - cameraView.lighttouched = true; |
---|
| 3034 | + Globals.lighttouched = true; |
---|
2942 | 3035 | //topView.object = client; |
---|
2943 | 3036 | //frontView.object = client; |
---|
2944 | 3037 | //sideView.object = client; |
---|
.. | .. |
---|
2946 | 3039 | else |
---|
2947 | 3040 | { |
---|
2948 | 3041 | cameraView.object = group; |
---|
2949 | | - cameraView.lighttouched = true; |
---|
| 3042 | + Globals.lighttouched = true; |
---|
2950 | 3043 | //topView.object = group; |
---|
2951 | 3044 | //frontView.object = group; |
---|
2952 | 3045 | //sideView.object = group; |
---|
.. | .. |
---|
3454 | 3547 | String pigment = Object3D.GetPigment(tex); |
---|
3455 | 3548 | //String bump = Object3D.GetBump(tex); |
---|
3456 | 3549 | |
---|
3457 | | - com.sun.opengl.util.texture.TextureData texturedata = CameraPane.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 3550 | + com.sun.opengl.util.texture.TextureData texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
3458 | 3551 | |
---|
3459 | 3552 | double s = v.s; |
---|
3460 | 3553 | |
---|
.. | .. |
---|
3755 | 3848 | group.selection.RelinkToSupport(); // july 2014 |
---|
3756 | 3849 | System.out.println("DONE."); |
---|
3757 | 3850 | refreshContents(); |
---|
3758 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
| 3851 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.DEFAULT_CURSOR)); |
---|
3759 | 3852 | } |
---|
3760 | 3853 | |
---|
3761 | 3854 | void ReduceMesh(boolean reduction34) |
---|
.. | .. |
---|
4040 | 4133 | |
---|
4041 | 4134 | objEditor.SetText(); // jan 2014 |
---|
4042 | 4135 | |
---|
4043 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4136 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
4044 | 4137 | CameraPane.flash = true; |
---|
4045 | 4138 | |
---|
4046 | 4139 | if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
4047 | 4140 | // a camera |
---|
4048 | 4141 | { |
---|
4049 | 4142 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
4050 | | - CameraPane.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
4051 | | - // CameraPane.theRenderer.renderCamera = CameraPane.theRenderer.manipCamera; |
---|
4052 | | - // CameraPane.theRenderer.eyeCamera = CameraPane.theRenderer.manipCamera; |
---|
| 4143 | + Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
| 4144 | + // Globals.theRenderer.renderCamera = Globals.theRenderer.manipCamera; |
---|
| 4145 | + // Globals.theRenderer.eyeCamera = Globals.theRenderer.manipCamera; |
---|
4053 | 4146 | } |
---|
4054 | 4147 | |
---|
4055 | 4148 | refreshContents(); |
---|
.. | .. |
---|
5007 | 5100 | |
---|
5008 | 5101 | private MenuItem resetParentItem; |
---|
5009 | 5102 | private MenuItem repairParentItem; |
---|
| 5103 | + private MenuItem repairShadowItem; |
---|
5010 | 5104 | private MenuItem sortbysizeItem; |
---|
5011 | 5105 | private MenuItem sortbynameItem; |
---|
5012 | 5106 | |
---|