.. | .. |
---|
437 | 437 | oe.aConstraints.gridwidth = 1; |
---|
438 | 438 | oe.aConstraints.gridx = 0; |
---|
439 | 439 | |
---|
440 | | - oe.toolbarPanel.add(liveCB = new cCheckBox("Live", CameraPane.isLIVE()), oe.aConstraints); |
---|
| 440 | + oe.toolbarPanel.add(liveCB = new cCheckBox("Live", Globals.isLIVE()), oe.aConstraints); |
---|
441 | 441 | liveCB.addItemListener(this); |
---|
442 | 442 | |
---|
443 | 443 | oe.aConstraints.gridx += 1; |
---|
.. | .. |
---|
449 | 449 | // localCB.addItemListener(this); |
---|
450 | 450 | |
---|
451 | 451 | oe.aConstraints.gridx += 1; |
---|
452 | | - oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", CameraPane.CROWD), oe.aConstraints); |
---|
| 452 | + oe.toolbarPanel.add(crowdCB = new cCheckBox("Crowd", Globals.CROWD), oe.aConstraints); |
---|
453 | 453 | crowdCB.addItemListener(this); |
---|
454 | 454 | |
---|
455 | 455 | oe.aConstraints.gridx += 1; |
---|
.. | .. |
---|
520 | 520 | |
---|
521 | 521 | oe.toolbarPanel.add(flashSelectionButton = new cButton(" ? ")); //, oe.aConstraints); |
---|
522 | 522 | flashSelectionButton.addActionListener(this); |
---|
| 523 | + |
---|
| 524 | + oe.toolbarPanel.add(new cButton(" ", false)); |
---|
| 525 | + |
---|
523 | 526 | oe.aConstraints.gridx += 1; |
---|
524 | 527 | oe.aConstraints.weighty = 0; |
---|
525 | 528 | oe.aConstraints.gridwidth = 1; |
---|
.. | .. |
---|
646 | 649 | |
---|
647 | 650 | void EditObject(Object3D obj) |
---|
648 | 651 | { |
---|
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(); |
---|
| 652 | + cRadio radioButton = new cRadio(obj.name); |
---|
| 653 | + radioButton.SetObject(obj); |
---|
| 654 | + radioButton.layout = sevenButton; |
---|
| 655 | + radioButton.SetCamera(cameraView.renderCamera, false); |
---|
| 656 | + radioButton.addActionListener(this); |
---|
| 657 | + radioPanel.add(radioButton); |
---|
| 658 | + buttonGroup.add(radioButton); |
---|
| 659 | + radioButton.doClick(); |
---|
657 | 660 | } |
---|
658 | 661 | void SetupViews(ObjEditor oe) |
---|
659 | 662 | { |
---|
.. | .. |
---|
715 | 718 | dropAttributes |= Object3D.TEXTURE; |
---|
716 | 719 | else |
---|
717 | 720 | dropAttributes &= ~Object3D.TEXTURE; |
---|
718 | | - } |
---|
719 | | - else if(e.getSource() == liveCB) |
---|
| 721 | + } else if(e.getSource() == liveCB) |
---|
720 | 722 | { |
---|
721 | 723 | cameraView.ToggleLive(); |
---|
722 | 724 | } |
---|
.. | .. |
---|
1118 | 1120 | resetParentItem.addActionListener(this); |
---|
1119 | 1121 | repairParentItem = menu.add(new MenuItem("Repair Parent")); |
---|
1120 | 1122 | repairParentItem.addActionListener(this); |
---|
| 1123 | + repairShadowItem = menu.add(new MenuItem("Repair Shadow")); |
---|
| 1124 | + repairShadowItem.addActionListener(this); |
---|
1121 | 1125 | menu.add(invariantsItem = new MenuItem("Invariants")); |
---|
1122 | 1126 | invariantsItem.addActionListener(this); |
---|
1123 | 1127 | menu.add(recompileItem = new MenuItem("Recompile")); |
---|
.. | .. |
---|
1778 | 1782 | } else |
---|
1779 | 1783 | if (event.getSource() == computeAOItem) |
---|
1780 | 1784 | { |
---|
1781 | | - CameraPane.drawMode = CameraPane.OCCLUSION; |
---|
| 1785 | + Globals.drawMode = CameraPane.OCCLUSION; |
---|
1782 | 1786 | CameraPane.theRenderer.repaint(); |
---|
1783 | 1787 | } else |
---|
1784 | 1788 | if (event.getSource() == recompileItem) |
---|
.. | .. |
---|
2543 | 2547 | |
---|
2544 | 2548 | refreshContents(); |
---|
2545 | 2549 | } else |
---|
| 2550 | + if (event.getSource() == repairShadowItem) |
---|
| 2551 | + { |
---|
| 2552 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 2553 | + { |
---|
| 2554 | + Object3D obj = (Object3D)e.nextElement(); |
---|
| 2555 | + obj.RepairShadow(); |
---|
| 2556 | +// for (int i=0; i<obj.size(); i++) |
---|
| 2557 | +// { |
---|
| 2558 | +// obj.get(i).parent = obj; |
---|
| 2559 | +// } |
---|
| 2560 | + } |
---|
| 2561 | + |
---|
| 2562 | + refreshContents(); |
---|
| 2563 | + } else |
---|
2546 | 2564 | if (event.getSource() == sortbysizeItem) |
---|
2547 | 2565 | { |
---|
2548 | 2566 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
.. | .. |
---|
2639 | 2657 | //gridPanel.setDividerLocation(1.0); |
---|
2640 | 2658 | //bigPanel.setDividerLocation(0.0); |
---|
2641 | 2659 | bigThree.remove(scenePanel); |
---|
2642 | | - bigThree.remove(cameraPanel); |
---|
| 2660 | + bigThree.remove(centralPanel); |
---|
2643 | 2661 | bigThree.remove(XYZPanel); |
---|
2644 | 2662 | aWindowConstraints.gridx = 0; |
---|
2645 | 2663 | aWindowConstraints.gridy = 0; |
---|
.. | .. |
---|
2654 | 2672 | // aConstraints.gridheight = 3; |
---|
2655 | 2673 | aWindowConstraints.gridx = 1; |
---|
2656 | 2674 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2657 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2675 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
2658 | 2676 | aWindowConstraints.weightx = 0; |
---|
2659 | 2677 | aWindowConstraints.gridx = 4; |
---|
2660 | 2678 | aWindowConstraints.gridwidth = 1; |
---|
.. | .. |
---|
2667 | 2685 | { |
---|
2668 | 2686 | radio.layout = threeButton; |
---|
2669 | 2687 | bigThree.remove(scenePanel); |
---|
2670 | | - bigThree.remove(cameraPanel); |
---|
| 2688 | + bigThree.remove(centralPanel); |
---|
2671 | 2689 | bigThree.remove(XYZPanel); |
---|
2672 | 2690 | aWindowConstraints.gridx = 0; |
---|
2673 | 2691 | aWindowConstraints.gridy = 0; |
---|
.. | .. |
---|
2682 | 2700 | // aConstraints.gridheight = 3; |
---|
2683 | 2701 | aWindowConstraints.gridx = 1; |
---|
2684 | 2702 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2685 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2703 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
2686 | 2704 | aWindowConstraints.weightx = 0; |
---|
2687 | 2705 | aWindowConstraints.gridx = 4; |
---|
2688 | 2706 | aWindowConstraints.gridwidth = 1; |
---|
.. | .. |
---|
2695 | 2713 | { |
---|
2696 | 2714 | radio.layout = fourButton; |
---|
2697 | 2715 | bigThree.remove(scenePanel); |
---|
2698 | | - bigThree.remove(cameraPanel); |
---|
| 2716 | + bigThree.remove(centralPanel); |
---|
2699 | 2717 | bigThree.remove(XYZPanel); |
---|
2700 | 2718 | aWindowConstraints.gridx = 0; |
---|
2701 | 2719 | aWindowConstraints.gridy = 0; |
---|
.. | .. |
---|
2723 | 2741 | { |
---|
2724 | 2742 | radio.layout = sixButton; |
---|
2725 | 2743 | bigThree.remove(scenePanel); |
---|
2726 | | - bigThree.remove(cameraPanel); |
---|
| 2744 | + bigThree.remove(centralPanel); |
---|
2727 | 2745 | bigThree.remove(XYZPanel); |
---|
2728 | 2746 | aWindowConstraints.gridx = 0; |
---|
2729 | 2747 | aWindowConstraints.gridy = 0; |
---|
.. | .. |
---|
2738 | 2756 | // aWindowConstraints.gridheight = 3; |
---|
2739 | 2757 | aWindowConstraints.gridx = 1; |
---|
2740 | 2758 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2741 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2759 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
2742 | 2760 | aWindowConstraints.weightx = 0; |
---|
2743 | 2761 | aWindowConstraints.gridx = 4; |
---|
2744 | 2762 | aWindowConstraints.gridwidth = 1; |
---|
.. | .. |
---|
2751 | 2769 | { |
---|
2752 | 2770 | radio.layout = sevenButton; |
---|
2753 | 2771 | bigThree.remove(scenePanel); |
---|
2754 | | - bigThree.remove(cameraPanel); |
---|
| 2772 | + bigThree.remove(centralPanel); |
---|
2755 | 2773 | bigThree.remove(XYZPanel); |
---|
2756 | 2774 | aWindowConstraints.gridx = 0; |
---|
2757 | 2775 | aWindowConstraints.gridy = 0; |
---|
.. | .. |
---|
2766 | 2784 | // aWindowConstraints.gridheight = 3; |
---|
2767 | 2785 | aWindowConstraints.gridx = 1; |
---|
2768 | 2786 | aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
2769 | | - bigThree.add(cameraPanel, aWindowConstraints); |
---|
| 2787 | + bigThree.add(centralPanel, aWindowConstraints); |
---|
2770 | 2788 | aWindowConstraints.weightx = 0; |
---|
2771 | 2789 | aWindowConstraints.gridx = 4; |
---|
2772 | 2790 | aWindowConstraints.gridwidth = 1; |
---|
.. | .. |
---|
2902 | 2920 | cameraView.cameras[cameraView.cameracount] = radio.camera; |
---|
2903 | 2921 | cameraView.targetLookAt.set(radio.camera.lookAt); |
---|
2904 | 2922 | cameraView.object = group; |
---|
2905 | | - cameraView.lighttouched = true; |
---|
| 2923 | + //cameraView.lighttouched = true; |
---|
| 2924 | + Globals.lighttouched = true; |
---|
2906 | 2925 | topView.object = group; |
---|
2907 | 2926 | frontView.object = group; |
---|
2908 | 2927 | sideView.object = group; |
---|
.. | .. |
---|
2938 | 2957 | if (useclient) |
---|
2939 | 2958 | { |
---|
2940 | 2959 | cameraView.object = client; |
---|
2941 | | - cameraView.lighttouched = true; |
---|
| 2960 | + Globals.lighttouched = true; |
---|
2942 | 2961 | //topView.object = client; |
---|
2943 | 2962 | //frontView.object = client; |
---|
2944 | 2963 | //sideView.object = client; |
---|
.. | .. |
---|
2946 | 2965 | else |
---|
2947 | 2966 | { |
---|
2948 | 2967 | cameraView.object = group; |
---|
2949 | | - cameraView.lighttouched = true; |
---|
| 2968 | + Globals.lighttouched = true; |
---|
2950 | 2969 | //topView.object = group; |
---|
2951 | 2970 | //frontView.object = group; |
---|
2952 | 2971 | //sideView.object = group; |
---|
.. | .. |
---|
4040 | 4059 | |
---|
4041 | 4060 | objEditor.SetText(); // jan 2014 |
---|
4042 | 4061 | |
---|
4043 | | - if (flashIt && !CameraPane.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
| 4062 | + if (flashIt && !Globals.isLIVE() && tps != null && tps.length > 0 && !(((Object3D) tps[0].getLastPathComponent()) instanceof Camera)) |
---|
4044 | 4063 | CameraPane.flash = true; |
---|
4045 | 4064 | |
---|
4046 | 4065 | if (tps != null && tps.length > 0 && ((Object3D) tps[0].getLastPathComponent()) instanceof Camera) |
---|
.. | .. |
---|
5007 | 5026 | |
---|
5008 | 5027 | private MenuItem resetParentItem; |
---|
5009 | 5028 | private MenuItem repairParentItem; |
---|
| 5029 | + private MenuItem repairShadowItem; |
---|
5010 | 5030 | private MenuItem sortbysizeItem; |
---|
5011 | 5031 | private MenuItem sortbynameItem; |
---|
5012 | 5032 | |
---|