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