.. | .. |
---|
23 | 23 | DragGestureListener, DragSourceListener, DropTargetListener, |
---|
24 | 24 | ItemListener // ListSelectionListener |
---|
25 | 25 | { |
---|
| 26 | + |
---|
| 27 | + public void AddSkyboxButton(String f, String s, cGridBag row3) |
---|
| 28 | + { |
---|
| 29 | + cButton skyboxButton; |
---|
| 30 | + final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
| 31 | + row3.add(skyboxButton = GetButton(path + "/" + s + ".jpg", !Grafreed.NIMBUSLAF)); |
---|
| 32 | + skyboxButton.setToolTipText(s); |
---|
| 33 | + skyboxButton.addActionListener(new ActionListener() |
---|
| 34 | + { |
---|
| 35 | + @Override |
---|
| 36 | + public void actionPerformed(ActionEvent e) |
---|
| 37 | + { |
---|
| 38 | + ChangeSkybox(path); |
---|
| 39 | + } |
---|
| 40 | + }); |
---|
| 41 | + } |
---|
| 42 | + |
---|
| 43 | + public void ChangeSkybox(String name) |
---|
| 44 | + { |
---|
| 45 | + cameraView.envyoff = false; |
---|
| 46 | + cameraView.skyboxname = name; |
---|
| 47 | + cameraView.skyboxext = "jpg"; |
---|
| 48 | + cameraView.repaint(); |
---|
| 49 | + } |
---|
| 50 | + |
---|
26 | 51 | //ObjEditor objEditor; |
---|
27 | 52 | public void closeUI2() |
---|
28 | 53 | { |
---|
.. | .. |
---|
80 | 105 | this.copy = this.group = copy; |
---|
81 | 106 | //selectees = this.group.selectees; |
---|
82 | 107 | |
---|
83 | | - if (copy.versions == null) |
---|
84 | | - { |
---|
85 | | - copy.versions = new byte[100][]; |
---|
86 | | - copy.versionindex = -1; |
---|
87 | | - } |
---|
88 | | - |
---|
89 | 108 | SetupMenu2(this); //objEditor); |
---|
90 | 109 | SetupUI2(objEditor); |
---|
91 | 110 | objEditor.SetupUI(true); |
---|
92 | 111 | SetupViews(objEditor); |
---|
93 | 112 | |
---|
94 | 113 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
| 114 | + |
---|
| 115 | + if (copy.versions == null) |
---|
| 116 | + { |
---|
| 117 | + copy.versions = new byte[100][]; |
---|
| 118 | + copy.versionindex = -1; |
---|
| 119 | + |
---|
| 120 | + Save(true); |
---|
| 121 | + } |
---|
95 | 122 | } |
---|
96 | 123 | |
---|
97 | 124 | void CloneSelection(boolean supports) |
---|
.. | .. |
---|
206 | 233 | // pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
207 | 234 | // pasteExpandItem.addActionListener(this); |
---|
208 | 235 | menu.add("-"); |
---|
209 | | - clearItem = menu.add(new MenuItem("Clear")); |
---|
210 | | - clearItem.addActionListener(this); |
---|
| 236 | + deleteItem = menu.add(new MenuItem("Delete")); |
---|
| 237 | + deleteItem.addActionListener(this); |
---|
211 | 238 | |
---|
212 | 239 | if (Globals.ADVANCED) |
---|
213 | 240 | { |
---|
.. | .. |
---|
433 | 460 | genNormalsMESHItem.addActionListener(this); |
---|
434 | 461 | if (Globals.ADVANCED) |
---|
435 | 462 | { |
---|
436 | | - genNormalsMINEItem = menu.add(new MenuItem("My Normals")); |
---|
| 463 | + genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals")); |
---|
437 | 464 | genNormalsMINEItem.addActionListener(this); |
---|
438 | 465 | } |
---|
439 | 466 | stripifyItem = menu.add(new MenuItem("Stripify")); |
---|
.. | .. |
---|
526 | 553 | attachBumpItem.addActionListener(this); |
---|
527 | 554 | pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump")); |
---|
528 | 555 | pigmentBumpItem.addActionListener(this); |
---|
| 556 | + //embedTexturesItem |
---|
529 | 557 | detachPigmentItem = menu.add(new MenuItem("Detach Pigment")); |
---|
530 | 558 | detachPigmentItem.addActionListener(this); |
---|
531 | 559 | detachBumpItem = menu.add(new MenuItem("Detach Bump")); |
---|
532 | 560 | detachBumpItem.addActionListener(this); |
---|
| 561 | + embedTexturesItem = menu.add(new MenuItem("Embed Textures")); |
---|
| 562 | + embedTexturesItem.addActionListener(this); |
---|
| 563 | + deEmbedTexturesItem = menu.add(new MenuItem("De-embed Textures")); |
---|
| 564 | + deEmbedTexturesItem.addActionListener(this); |
---|
533 | 565 | menu.add("-"); |
---|
534 | 566 | sortbysizeItem = menu.add(new MenuItem("Sort by size")); |
---|
535 | 567 | sortbysizeItem.addActionListener(this); |
---|
.. | .. |
---|
601 | 633 | */ |
---|
602 | 634 | cGridBag copyOptionsPanel = new cGridBag(); |
---|
603 | 635 | |
---|
604 | | - copyOptionsPanel.preferredHeight = 1; |
---|
| 636 | + copyOptionsPanel.preferredHeight = 2; |
---|
605 | 637 | |
---|
606 | 638 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
607 | 639 | |
---|
.. | .. |
---|
681 | 713 | oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
682 | 714 | snapobjectButton.addActionListener(this); |
---|
683 | 715 | snapobjectButton.setToolTipText("Snap Object"); |
---|
| 716 | + |
---|
| 717 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 718 | + fourButton.addActionListener(this); |
---|
| 719 | + fourButton.setToolTipText("Show control panel only"); |
---|
684 | 720 | } |
---|
685 | 721 | |
---|
686 | 722 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
687 | 723 | |
---|
688 | | - oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
689 | | - twoButton.setToolTipText("Show center view only"); |
---|
| 724 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 725 | + twoButton.setToolTipText("Show 3D view only"); |
---|
690 | 726 | twoButton.addActionListener(this); |
---|
691 | 727 | this.fullscreenLayout = twoButton; |
---|
692 | 728 | |
---|
693 | | - oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
694 | | - fourButton.addActionListener(this); |
---|
695 | | - fourButton.setToolTipText("Show left panel only"); |
---|
696 | | - oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
697 | | - sixButton.setToolTipText("2-column layout left"); |
---|
698 | | - sixButton.addActionListener(this); |
---|
699 | | - oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
700 | | - threeButton.setToolTipText("2-column layout right"); |
---|
| 729 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 730 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
701 | 731 | threeButton.addActionListener(this); |
---|
702 | | - oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
703 | | - sevenButton.setToolTipText("3-column layout"); |
---|
704 | | - sevenButton.addActionListener(this); |
---|
| 732 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 733 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
| 734 | + sixButton.addActionListener(this); |
---|
| 735 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 736 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 737 | +// sevenButton.addActionListener(this); |
---|
705 | 738 | // |
---|
706 | 739 | |
---|
707 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
708 | | - rootButton.setToolTipText("Edit selection in new tab"); |
---|
| 740 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 741 | + rootButton.setToolTipText("Open selection in new tab"); |
---|
709 | 742 | rootButton.addActionListener(this); |
---|
710 | 743 | |
---|
711 | 744 | oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
.. | .. |
---|
714 | 747 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
715 | 748 | //clearButton.addActionListener(this); |
---|
716 | 749 | |
---|
| 750 | + cGridBag row1 = new cGridBag(); |
---|
| 751 | + |
---|
717 | 752 | // INSERT |
---|
718 | | - oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 753 | + row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
719 | 754 | gridButton.setToolTipText("Create grid"); |
---|
720 | 755 | gridButton.addActionListener(this); |
---|
721 | 756 | |
---|
722 | | - oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 757 | + row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
723 | 758 | boxButton.setToolTipText("Create box"); |
---|
724 | 759 | boxButton.addActionListener(this); |
---|
725 | 760 | |
---|
726 | | - oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 761 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
727 | 762 | sphereButton.setToolTipText("Create sphere"); |
---|
728 | 763 | sphereButton.addActionListener(this); |
---|
729 | 764 | |
---|
730 | | - oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 765 | + row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
731 | 766 | coneButton.setToolTipText("Create cone"); |
---|
732 | 767 | coneButton.addActionListener(this); |
---|
733 | 768 | |
---|
734 | | - oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 769 | + row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
735 | 770 | torusButton.setToolTipText("Create torus"); |
---|
736 | 771 | torusButton.addActionListener(this); |
---|
737 | 772 | |
---|
738 | | - oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 773 | + row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
739 | 774 | superButton.setToolTipText("Create superellipsoid"); |
---|
740 | 775 | superButton.addActionListener(this); |
---|
741 | 776 | |
---|
.. | .. |
---|
746 | 781 | kleinButton.addActionListener(this); |
---|
747 | 782 | } |
---|
748 | 783 | |
---|
749 | | - oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 784 | + row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
750 | 785 | particlesButton.setToolTipText("Create particle system"); |
---|
751 | 786 | particlesButton.addActionListener(this); |
---|
752 | 787 | |
---|
753 | | - oe.toolboxPanel.Return(); |
---|
| 788 | + oe.toolboxPanel.add(row1); |
---|
754 | 789 | |
---|
755 | | - oe.toolboxPanel.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 790 | + cGridBag row2 = new cGridBag(); |
---|
| 791 | + |
---|
| 792 | + row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
756 | 793 | groupButton.setToolTipText("Create group"); |
---|
757 | 794 | groupButton.addActionListener(this); |
---|
758 | 795 | |
---|
759 | | - oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 796 | + row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
760 | 797 | compositeButton.setToolTipText("Create composite"); |
---|
761 | 798 | compositeButton.addActionListener(this); |
---|
762 | 799 | |
---|
763 | | - oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 800 | + row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
764 | 801 | switchButton.setToolTipText("Create item switcher"); |
---|
765 | 802 | switchButton.addActionListener(this); |
---|
766 | 803 | |
---|
767 | | - oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 804 | + row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
768 | 805 | loopButton.setToolTipText("Create loop"); |
---|
769 | 806 | loopButton.addActionListener(this); |
---|
770 | 807 | |
---|
771 | | - oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 808 | + row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
772 | 809 | textureButton.setToolTipText("Create texture"); |
---|
773 | 810 | textureButton.addActionListener(this); |
---|
774 | 811 | |
---|
775 | | - oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 812 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
776 | 813 | overlayButton.setToolTipText("Create overlay"); |
---|
777 | 814 | overlayButton.addActionListener(this); |
---|
778 | 815 | |
---|
779 | | - oe.toolboxPanel.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 816 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
780 | 817 | lightButton.setToolTipText("Create light"); |
---|
781 | 818 | lightButton.addActionListener(this); |
---|
782 | 819 | |
---|
783 | | - for (int i=6; --i>=0;) |
---|
| 820 | + oe.toolboxPanel.add(row2); |
---|
| 821 | + |
---|
| 822 | + // ENVYMAPS |
---|
| 823 | + cGridBag row3 = new cGridBag(); |
---|
| 824 | + row3.preferredHeight = 20; |
---|
| 825 | + |
---|
| 826 | + AddSkyboxButton("default", "rgb", row3); |
---|
| 827 | + AddSkyboxButton("default", "cornell", row3); |
---|
| 828 | + AddSkyboxButton("default", "uffizi", row3); |
---|
| 829 | + AddSkyboxButton("default", "CloudyHills", row3); |
---|
| 830 | + AddSkyboxButton("default", "skycube", row3); |
---|
| 831 | + |
---|
| 832 | + oe.toolboxPanel.add(row3); |
---|
| 833 | + |
---|
| 834 | + cGridBag row4 = new cGridBag(); |
---|
| 835 | + row4.preferredHeight = 20; |
---|
| 836 | + |
---|
| 837 | + AddSkyboxButton("bridge", "Bridge2", row4); |
---|
| 838 | + AddSkyboxButton("urban", "GamlaStan2", row4); |
---|
| 839 | + AddSkyboxButton("urban", "Parliament", row4); |
---|
| 840 | + AddSkyboxButton("urban", "Roundabout", row4); |
---|
| 841 | + |
---|
| 842 | + oe.toolboxPanel.add(row4); |
---|
| 843 | + |
---|
| 844 | + cGridBag row5 = new cGridBag(); |
---|
| 845 | + row5.preferredHeight = 20; |
---|
| 846 | + |
---|
| 847 | + AddSkyboxButton("urban", "SaintLazarusChurch", row5); |
---|
| 848 | + AddSkyboxButton("urban", "SaintLazarusChurch2", row5); |
---|
| 849 | + AddSkyboxButton("urban", "SaintLazarusChurch3", row5); |
---|
| 850 | + AddSkyboxButton("urban", "UnionSquare", row5); |
---|
| 851 | + |
---|
| 852 | + oe.toolboxPanel.add(row5); |
---|
| 853 | + |
---|
| 854 | + cGridBag row6 = new cGridBag(); |
---|
| 855 | + row6.preferredHeight = 20; |
---|
| 856 | + |
---|
| 857 | + AddSkyboxButton("park", "BerzeliiPark", row6); |
---|
| 858 | + AddSkyboxButton("park", "Buddha", row6); |
---|
| 859 | + AddSkyboxButton("park", "CNTower2", row6); |
---|
| 860 | + //AddSkyboxButton("park", "Fatbursparken", row6); |
---|
| 861 | + AddSkyboxButton("park", "NiagaraFalls1", row6); |
---|
| 862 | + |
---|
| 863 | + oe.toolboxPanel.add(row6); |
---|
| 864 | + |
---|
| 865 | + cGridBag row7 = new cGridBag(); |
---|
| 866 | + row7.preferredHeight = 20; |
---|
| 867 | + |
---|
| 868 | + AddSkyboxButton("park", "NiagaraFalls3", row7); |
---|
| 869 | + AddSkyboxButton("park", "Park", row7); |
---|
| 870 | + //AddSkyboxButton("park", "Park2", row6); |
---|
| 871 | + //AddSkyboxButton("park", "Path", row6); |
---|
| 872 | + AddSkyboxButton("park", "Pond", row7); |
---|
| 873 | + AddSkyboxButton("park", "Skansen", row7); |
---|
| 874 | + |
---|
| 875 | + oe.toolboxPanel.add(row7); |
---|
| 876 | + |
---|
| 877 | + cGridBag row8 = new cGridBag(); |
---|
| 878 | + row8.preferredHeight = 20; |
---|
| 879 | + |
---|
| 880 | + AddSkyboxButton("park", "Skansen2", row8); |
---|
| 881 | + AddSkyboxButton("park", "Skansen3", row8); |
---|
| 882 | + AddSkyboxButton("park", "Skansen4", row8); |
---|
| 883 | + AddSkyboxButton("park", "Skansen5", row8); |
---|
| 884 | + |
---|
| 885 | + oe.toolboxPanel.add(row8); |
---|
| 886 | + |
---|
| 887 | + cGridBag row9 = new cGridBag(); |
---|
| 888 | + row9.preferredHeight = 20; |
---|
| 889 | + |
---|
| 890 | + AddSkyboxButton("park", "Stairs", row9); |
---|
| 891 | + //AddSkyboxButton("park", "Tantolunden", row6); |
---|
| 892 | + //AddSkyboxButton("park", "Tantolunden3", row6); |
---|
| 893 | + AddSkyboxButton("park", "Tantolunden4", row9); |
---|
| 894 | + |
---|
| 895 | + oe.toolboxPanel.add(row9); |
---|
| 896 | +/* |
---|
| 897 | +BerzeliiPark |
---|
| 898 | +Buddha |
---|
| 899 | +CNTower2 |
---|
| 900 | +Fatbursparken |
---|
| 901 | +NiagaraFalls1 |
---|
| 902 | +NiagaraFalls3 |
---|
| 903 | +Park |
---|
| 904 | +Park2 |
---|
| 905 | +Path |
---|
| 906 | +Pond |
---|
| 907 | +Skansen |
---|
| 908 | +Skansen2 |
---|
| 909 | +Skansen3 |
---|
| 910 | +Skansen4 |
---|
| 911 | +Skansen5 |
---|
| 912 | +Stairs |
---|
| 913 | +Tantolunden |
---|
| 914 | +Tantolunden3 |
---|
| 915 | +Tantolunden4 |
---|
| 916 | + */ |
---|
| 917 | + |
---|
| 918 | + for (int i=1; --i>=0;) |
---|
784 | 919 | { |
---|
785 | | - oe.toolboxPanel.Return(); |
---|
786 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
787 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
788 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
789 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
790 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
791 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
792 | | - oe.toolboxPanel.add(new cGridBag()); |
---|
| 920 | + //oe.toolboxPanel.Return(); |
---|
| 921 | + oe.toolboxPanel.add(new cGridBag()); |
---|
793 | 922 | } |
---|
794 | 923 | |
---|
795 | 924 | // EDIT panel |
---|
.. | .. |
---|
850 | 979 | versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
851 | 980 | sliderPane.preferredHeight = 1; |
---|
852 | 981 | |
---|
853 | | -// mainPanel.setDividerLocation(0.5); //1.0); |
---|
854 | | -// mainPanel.setResizeWeight(0.5); |
---|
| 982 | +// mainPanel.setDividerLocation(0.1); //1.0); |
---|
| 983 | + mainPanel.setResizeWeight(0.4); |
---|
855 | 984 | |
---|
856 | 985 | //jList.addListSelectionListener(this); |
---|
857 | 986 | oe.jTree.addTreeSelectionListener(this); |
---|
.. | .. |
---|
859 | 988 | //jTree.setEditable(true); |
---|
860 | 989 | oe.jTree.setDragEnabled(true); |
---|
861 | 990 | //jTree.setPreferredSize(new Dimension(10,10)); |
---|
862 | | - jSP.setPreferredSize(new Dimension(100,200)); |
---|
| 991 | + //jSP.setPreferredSize(new Dimension(100,200)); |
---|
863 | 992 | |
---|
864 | 993 | oe.jTree.setCellRenderer(new cTreeModel.Renderer()); |
---|
865 | 994 | |
---|
.. | .. |
---|
871 | 1000 | dgr.addDragGestureListener(this); |
---|
872 | 1001 | }catch(Exception e) {} |
---|
873 | 1002 | */ |
---|
874 | | - radio.layout = sevenButton; |
---|
| 1003 | + radio.layout = sixButton; // sevenButton; |
---|
875 | 1004 | oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
876 | 1005 | } |
---|
877 | 1006 | |
---|
.. | .. |
---|
1013 | 1142 | } |
---|
1014 | 1143 | |
---|
1015 | 1144 | radioButton.SetObject(obj); |
---|
1016 | | - radioButton.layout = sevenButton; |
---|
| 1145 | + radioButton.layout = sixButton; // sevenButton; |
---|
1017 | 1146 | radioButton.SetCamera(cameraView.renderCamera, false); |
---|
1018 | 1147 | radioButton.addActionListener(this); |
---|
1019 | 1148 | radioPanel.add(radioButton); |
---|
.. | .. |
---|
1693 | 1822 | } |
---|
1694 | 1823 | } |
---|
1695 | 1824 | } |
---|
| 1825 | + |
---|
| 1826 | + private void EditElement(Object3D elem, boolean newWindow) |
---|
| 1827 | + { |
---|
| 1828 | + // if (!(elem instanceof Composite)) |
---|
| 1829 | + // newWindow = false; |
---|
| 1830 | + listUI.add(elem); |
---|
| 1831 | + elem.openEditWindow(this, newWindow); //, false); |
---|
| 1832 | + System.out.println("edit : " + elem); |
---|
| 1833 | + elem.editWindow.refreshContents(true); // ? new |
---|
| 1834 | + } |
---|
1696 | 1835 | |
---|
1697 | 1836 | /** |
---|
1698 | 1837 | * applyExample |
---|
.. | .. |
---|
2121 | 2260 | { |
---|
2122 | 2261 | makeSomething(new Light()); |
---|
2123 | 2262 | } else |
---|
| 2263 | +// if (source == skybox1Button || |
---|
| 2264 | +// source == skybox2Button || |
---|
| 2265 | +// source == skybox3Button || |
---|
| 2266 | +// source == skybox4Button || |
---|
| 2267 | +// source == skybox5Button || |
---|
| 2268 | +// source == skybox6Button || |
---|
| 2269 | +// source == skybox7Button || |
---|
| 2270 | +// source == skybox11Button || |
---|
| 2271 | +// source == skybox12Button || |
---|
| 2272 | +// source == skybox13Button || |
---|
| 2273 | +// source == skybox14Button || |
---|
| 2274 | +// source == skybox15Button || |
---|
| 2275 | +// source == skybox16Button || |
---|
| 2276 | +// source == skybox17Button) |
---|
| 2277 | +// { |
---|
| 2278 | +// ChangeSkybox(source); |
---|
| 2279 | +// } else |
---|
2124 | 2280 | if (source == csgItem) |
---|
2125 | 2281 | { |
---|
2126 | 2282 | group(new CSG()); |
---|
.. | .. |
---|
2206 | 2362 | if (source == computeAOItem) |
---|
2207 | 2363 | { |
---|
2208 | 2364 | Globals.drawMode = CameraPane.OCCLUSION; |
---|
2209 | | - Globals.theRenderer.repaint(); |
---|
| 2365 | + cameraView.repaint(); |
---|
2210 | 2366 | } else |
---|
2211 | 2367 | if (source == recompileItem) |
---|
2212 | 2368 | { |
---|
.. | .. |
---|
2658 | 2814 | { |
---|
2659 | 2815 | StepAll(); |
---|
2660 | 2816 | } else |
---|
2661 | | - if (source == clearItem) // || event.getSource() == clearButton) |
---|
| 2817 | + if (source == deleteItem) // || event.getSource() == clearButton) |
---|
2662 | 2818 | { |
---|
2663 | 2819 | //int indices[] = jList.getSelectedIndices(); |
---|
2664 | 2820 | //for (int i = indices.length - 1; i >= 0; i--) |
---|
.. | .. |
---|
3140 | 3296 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
3141 | 3297 | { |
---|
3142 | 3298 | obj = (Object3D)e.nextElement(); |
---|
3143 | | - obj.SetBumpTexture(null); |
---|
| 3299 | + obj.ResetBumpTexture(); |
---|
3144 | 3300 | } |
---|
3145 | 3301 | |
---|
3146 | 3302 | refreshContents(); |
---|
.. | .. |
---|
3154 | 3310 | obj.SetBumpTexture(obj.GetPigmentTexture()); |
---|
3155 | 3311 | } |
---|
3156 | 3312 | |
---|
| 3313 | + refreshContents(); |
---|
| 3314 | + } else |
---|
| 3315 | + if (source == embedTexturesItem) |
---|
| 3316 | + { |
---|
| 3317 | + Object3D obj; |
---|
| 3318 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3319 | + { |
---|
| 3320 | + obj = (Object3D)e.nextElement(); |
---|
| 3321 | + obj.EmbedTextures(true); |
---|
| 3322 | + } |
---|
| 3323 | + |
---|
| 3324 | + refreshContents(); |
---|
| 3325 | + } else |
---|
| 3326 | + if (source == deEmbedTexturesItem) |
---|
| 3327 | + { |
---|
| 3328 | + Object3D obj; |
---|
| 3329 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 3330 | + { |
---|
| 3331 | + obj = (Object3D)e.nextElement(); |
---|
| 3332 | + obj.EmbedTextures(false); |
---|
| 3333 | + } |
---|
| 3334 | + |
---|
| 3335 | + CameraPane.texturepigment.clear(); |
---|
| 3336 | + CameraPane.texturebump.clear(); |
---|
| 3337 | + |
---|
3157 | 3338 | refreshContents(); |
---|
3158 | 3339 | } else |
---|
3159 | 3340 | if (source == flashSelectionButton) |
---|
.. | .. |
---|
3257 | 3438 | // centralPanel.setVisible(true); |
---|
3258 | 3439 | // XYZPanel.setVisible(true); |
---|
3259 | 3440 | bigThree.ClearUI(); |
---|
| 3441 | + bigThree.add(scenePanel); |
---|
3260 | 3442 | bigThree.add(centralPanel); |
---|
3261 | | - bigThree.add(XYZPanel); |
---|
3262 | 3443 | bigThree.FlushUI(); |
---|
3263 | 3444 | |
---|
3264 | 3445 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3338 | 3519 | // centralPanel.setVisible(true); |
---|
3339 | 3520 | // XYZPanel.setVisible(false); |
---|
3340 | 3521 | bigThree.ClearUI(); |
---|
3341 | | - bigThree.add(scenePanel); |
---|
3342 | 3522 | bigThree.add(centralPanel); |
---|
| 3523 | + bigThree.add(scenePanel); |
---|
3343 | 3524 | bigThree.FlushUI(); |
---|
3344 | 3525 | |
---|
3345 | 3526 | cameraView.requestFocusInWindow(); |
---|
.. | .. |
---|
3553 | 3734 | radio.layout.doClick(); |
---|
3554 | 3735 | |
---|
3555 | 3736 | ClearUnpinned(); |
---|
3556 | | - Grafreed.Assert(group != null); |
---|
3557 | | - Grafreed.Assert(group.selection != null); |
---|
3558 | | - SetPinStates(group.selection.size() > 0); |
---|
3559 | | - if (group.selection.size() == 1) |
---|
| 3737 | + //Grafreed.Assert(group != null); |
---|
| 3738 | + //Grafreed.Assert(group.selection != null); |
---|
| 3739 | + SetPinStates(group.selection == null || group.selection.size() > 0); |
---|
| 3740 | + if (group.selection == null || group.selection.size() == 1) |
---|
3560 | 3741 | EditSelection(false); |
---|
3561 | 3742 | keepparent = group.parent; |
---|
3562 | 3743 | // PARENT = NULL or not??? |
---|
.. | .. |
---|
4150 | 4331 | |
---|
4151 | 4332 | try |
---|
4152 | 4333 | { |
---|
4153 | | - texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres); |
---|
| 4334 | + texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres); |
---|
4154 | 4335 | } |
---|
4155 | 4336 | catch (Exception e) |
---|
4156 | 4337 | { |
---|
.. | .. |
---|
4627 | 4808 | |
---|
4628 | 4809 | void EditSelection(boolean newWindow) |
---|
4629 | 4810 | { |
---|
| 4811 | + if (group.selection == null) |
---|
| 4812 | + { |
---|
| 4813 | + EditElement(group, newWindow); // ? new |
---|
| 4814 | + return; |
---|
| 4815 | + } |
---|
| 4816 | + |
---|
4630 | 4817 | // aConstraints.gridy = 0; |
---|
4631 | 4818 | for (int i=0; i<group.selection.size(); i++) |
---|
4632 | 4819 | { |
---|
.. | .. |
---|
4637 | 4824 | Object3D elem = (Object3D)group.selection.elementAt(i); |
---|
4638 | 4825 | if(elem != group || !newWindow) |
---|
4639 | 4826 | { |
---|
4640 | | - // if (!(elem instanceof Composite)) |
---|
4641 | | - // newWindow = false; |
---|
4642 | | - listUI.add(elem); |
---|
4643 | | - elem.openEditWindow(this, newWindow); //, false); |
---|
4644 | | - System.out.println("edit : " + elem); |
---|
4645 | | - elem.editWindow.refreshContents(true); // ? new |
---|
| 4827 | + EditElement(elem, newWindow); // ? new |
---|
4646 | 4828 | } |
---|
4647 | 4829 | } |
---|
4648 | 4830 | } |
---|
.. | .. |
---|
4786 | 4968 | |
---|
4787 | 4969 | void refreshContents(boolean cp) |
---|
4788 | 4970 | { |
---|
4789 | | - if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info")) |
---|
| 4971 | + if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
4790 | 4972 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
4791 | 4973 | { |
---|
4792 | 4974 | objEditor.ClearInfo(); // .GetMaterial()); |
---|
.. | .. |
---|
5632 | 5814 | cButton loopButton; |
---|
5633 | 5815 | cButton textureButton; |
---|
5634 | 5816 | |
---|
| 5817 | + cButton skybox1Button; |
---|
| 5818 | + cButton skybox2Button; |
---|
| 5819 | + cButton skybox3Button; |
---|
| 5820 | + cButton skybox4Button; |
---|
| 5821 | + cButton skybox5Button; |
---|
| 5822 | + cButton skybox6Button; |
---|
| 5823 | + cButton skybox7Button; |
---|
| 5824 | + |
---|
| 5825 | + cButton skybox11Button; |
---|
| 5826 | + cButton skybox12Button; |
---|
| 5827 | + cButton skybox13Button; |
---|
| 5828 | + cButton skybox14Button; |
---|
| 5829 | + cButton skybox15Button; |
---|
| 5830 | + cButton skybox16Button; |
---|
| 5831 | + cButton skybox17Button; |
---|
| 5832 | + |
---|
5635 | 5833 | cButton gridButton; |
---|
5636 | 5834 | cButton boxButton; |
---|
5637 | 5835 | cButton sphereButton; |
---|
.. | .. |
---|
5695 | 5893 | private MenuItem pasteLinkItem; |
---|
5696 | 5894 | private MenuItem pasteCloneItem; |
---|
5697 | 5895 | private MenuItem pasteExpandItem; |
---|
5698 | | - private MenuItem clearItem; |
---|
| 5896 | + private MenuItem deleteItem; |
---|
5699 | 5897 | private MenuItem clearAllItem; |
---|
5700 | 5898 | private MenuItem genUVItem; |
---|
5701 | 5899 | private MenuItem genNormalsMESHItem; |
---|
.. | .. |
---|
5779 | 5977 | private MenuItem attachBumpItem; |
---|
5780 | 5978 | private MenuItem detachBumpItem; |
---|
5781 | 5979 | private MenuItem pigmentBumpItem; |
---|
| 5980 | + private MenuItem embedTexturesItem; |
---|
| 5981 | + private MenuItem deEmbedTexturesItem; |
---|
5782 | 5982 | |
---|
5783 | 5983 | private MenuItem particleItem; |
---|
5784 | 5984 | private MenuItem ragdollItem; |
---|