.. | .. |
---|
29 | 29 | { |
---|
30 | 30 | cButton skyboxButton; |
---|
31 | 31 | final String path = "cubemaps/" + f + "-skyboxes/" + s; |
---|
32 | | - row.add(skyboxButton = GetButton(path + "/preview.jpg", !Grafreed.NIMBUSLAF)); |
---|
| 32 | + row.add(skyboxButton = GetButton(path + "/preview.jpg", !Globals.NIMBUSLAF)); |
---|
33 | 33 | //row.add(skyboxButton = GetButton(path + "/negx.jpg", !Grafreed.NIMBUSLAF)); |
---|
34 | | - skyboxButton.setToolTipText(s); |
---|
| 34 | + skyboxButton.setToolTipText(s.equals("") ? "No background" : s); |
---|
35 | 35 | skyboxButton.addActionListener(new ActionListener() |
---|
36 | 36 | { |
---|
37 | 37 | @Override |
---|
.. | .. |
---|
46 | 46 | { |
---|
47 | 47 | cButton textureButton; |
---|
48 | 48 | final String path = "textures/" + f + "/" + c + "/"; // + t; |
---|
49 | | - row.add(textureButton = GetButton(path + "icons/" + t, !Grafreed.NIMBUSLAF)); |
---|
| 49 | + row.add(textureButton = GetButton(path + "icons/" + t, !Globals.NIMBUSLAF)); |
---|
50 | 50 | textureButton.setToolTipText(c + count); |
---|
51 | 51 | textureButton.addActionListener(new ActionListener() |
---|
52 | 52 | { |
---|
.. | .. |
---|
73 | 73 | cGridBag row5 = new cGridBag(); |
---|
74 | 74 | cGridBag row6 = new cGridBag(); |
---|
75 | 75 | |
---|
76 | | - AddSkyboxButton("default", "rgb", row0); |
---|
| 76 | + AddSkyboxButton("default", "", row0); |
---|
77 | 77 | //AddSkyboxButton("default", "cornell", row0); |
---|
78 | 78 | AddSkyboxButton("penguins", "dust", row0); |
---|
79 | 79 | AddSkyboxButton("penguins", "tropic", row0); |
---|
.. | .. |
---|
330 | 330 | |
---|
331 | 331 | public void ChangeSkybox(String skybox) |
---|
332 | 332 | { |
---|
333 | | - //cameraView.envyoff = false; |
---|
334 | | - group.skyboxname = skybox; |
---|
335 | | - group.skyboxext = "jpg"; |
---|
336 | | - cameraView.repaint(); |
---|
| 333 | + if (skybox.endsWith("/")) |
---|
| 334 | + { |
---|
| 335 | + group.skyboxname = null; |
---|
| 336 | + group.skyboxext = null; |
---|
| 337 | + cameraView.repaint(); |
---|
| 338 | + } |
---|
| 339 | + else |
---|
| 340 | + { |
---|
| 341 | + //cameraView.envyoff = false; |
---|
| 342 | + group.skyboxname = skybox; |
---|
| 343 | + group.skyboxext = "jpg"; |
---|
| 344 | + cameraView.repaint(); |
---|
| 345 | + } |
---|
337 | 346 | } |
---|
338 | 347 | |
---|
339 | 348 | public void CreateSkyboxPanel(cGridBag skyboxPanel) |
---|
340 | 349 | { |
---|
341 | | - JTabbedPane skyboxpane = new JTabbedPane(); |
---|
| 350 | + JTabbedPane skyboxpane = new JTabbedPane(JTabbedPane.LEFT); |
---|
342 | 351 | |
---|
343 | 352 | AddSkyboxTab0(skyboxpane); |
---|
344 | 353 | AddSkyboxTab1(skyboxpane); |
---|
.. | .. |
---|
396 | 405 | this.copy = this.group = group; |
---|
397 | 406 | //selectees = this.group.selectees; |
---|
398 | 407 | |
---|
399 | | - if (copy.versionlist == null) |
---|
400 | | - { |
---|
401 | | - copy.versionlist = new Object3D[100]; |
---|
402 | | - copy.versionindex = -1; |
---|
403 | | - } |
---|
| 408 | + assert(false); |
---|
| 409 | + |
---|
| 410 | +// if (copy.versionlist == null) |
---|
| 411 | +// { |
---|
| 412 | +// copy.versionlist = new Object3D[100]; |
---|
| 413 | +// copy.versionindex = -1; |
---|
| 414 | +// |
---|
| 415 | +// //Save(true); |
---|
| 416 | +// } |
---|
404 | 417 | |
---|
405 | 418 | if(ui) |
---|
406 | 419 | SetupUI(objEditor); |
---|
.. | .. |
---|
423 | 436 | |
---|
424 | 437 | ((cRadio)radioPanel.getComponent(0)).SetCamera(cameraView.renderCamera, true); |
---|
425 | 438 | |
---|
426 | | - if (copy.versionlist == null) |
---|
427 | | - { |
---|
428 | | - copy.versionlist = new Object3D[100]; |
---|
429 | | - copy.versionindex = -1; |
---|
430 | | - |
---|
431 | | - Save(true); |
---|
432 | | - } |
---|
| 439 | +// if (copy.versionlist == null) |
---|
| 440 | +// { |
---|
| 441 | +// copy.versionlist = new Object3D[100]; |
---|
| 442 | +// copy.versionindex = -1; |
---|
| 443 | +// |
---|
| 444 | +// //Save(true); |
---|
| 445 | +// } |
---|
433 | 446 | } |
---|
434 | 447 | |
---|
435 | 448 | void CloneSelection(boolean supports) |
---|
.. | .. |
---|
519 | 532 | // menu.add("-"); |
---|
520 | 533 | duplicateItem = oe.jTree.popup.add(new JMenuItem("Duplicate")); |
---|
521 | 534 | duplicateItem.addActionListener(this); |
---|
522 | | - cloneItem = menu.add(new MenuItem("Clone")); |
---|
| 535 | + |
---|
| 536 | + cloneItem = oe.jTree.popup.add(new JMenuItem("Clone")); |
---|
523 | 537 | cloneItem.addActionListener(this); |
---|
524 | | - if (Globals.ADVANCED) |
---|
| 538 | + //if (Globals.ADVANCED) |
---|
525 | 539 | { |
---|
526 | 540 | cloneSupportItem = menu.add(new MenuItem("Clone (+supports)")); |
---|
527 | 541 | cloneSupportItem.addActionListener(this); |
---|
528 | 542 | } |
---|
| 543 | + oe.jTree.popup.addSeparator(); |
---|
529 | 544 | menu.add("-"); |
---|
530 | | - cutItem = menu.add(new MenuItem("Cut")); |
---|
| 545 | + cutItem = oe.jTree.popup.add(new JMenuItem("Cut")); |
---|
531 | 546 | cutItem.addActionListener(this); |
---|
532 | | - copyItem = menu.add(new MenuItem("Copy")); |
---|
| 547 | + copyItem = oe.jTree.popup.add(new JMenuItem("Copy")); |
---|
533 | 548 | copyItem.addActionListener(this); |
---|
534 | 549 | pasteItem = menu.add(new MenuItem("Paste")); |
---|
535 | 550 | pasteItem.addActionListener(this); |
---|
536 | 551 | |
---|
537 | | - menu.add("-"); |
---|
538 | | - pasteIntoItem = menu.add(new MenuItem("Paste into")); |
---|
| 552 | + oe.jTree.popup.addSeparator(); |
---|
| 553 | + //menu.add("-"); |
---|
| 554 | + pasteIntoItem = oe.jTree.popup.add(new JMenuItem("Paste into")); |
---|
539 | 555 | pasteIntoItem.addActionListener(this); |
---|
540 | | - pasteLinkItem = menu.add(new MenuItem("Paste link")); |
---|
| 556 | + pasteLinkItem = oe.jTree.popup.add(new JMenuItem("Paste link")); |
---|
541 | 557 | pasteLinkItem.addActionListener(this); |
---|
542 | | - pasteCloneItem = menu.add(new MenuItem("Paste clone")); |
---|
| 558 | + pasteCloneItem = oe.jTree.popup.add(new JMenuItem("Paste clone")); |
---|
543 | 559 | pasteCloneItem.addActionListener(this); |
---|
544 | | -// pasteExpandItem = menu.add(new MenuItem("Paste expand")); |
---|
| 560 | +// CRASH pasteExpandItem = oe.jTree.popup.add(new JMenuItem("Paste expand")); |
---|
545 | 561 | // pasteExpandItem.addActionListener(this); |
---|
546 | | - menu.add("-"); |
---|
547 | | - deleteItem = menu.add(new MenuItem("Delete")); |
---|
548 | | - deleteItem.addActionListener(this); |
---|
| 562 | + //menu.add("-"); |
---|
| 563 | + oe.jTree.popup.addSeparator(); |
---|
549 | 564 | |
---|
550 | 565 | if (Globals.ADVANCED) |
---|
551 | 566 | { |
---|
.. | .. |
---|
631 | 646 | oe.cameraMenu.add(lookAtItem = new MenuItem("Set Interest")); |
---|
632 | 647 | //cameraMenu.add(lookFromItem = new MenuItem("Look From Selection")); |
---|
633 | 648 | //cameraMenu.add(switchViewItem = new MenuItem("Reverse View")); |
---|
634 | | - editLeafItem = oe.cameraMenu.add(new MenuItem("Edit Leaf")); |
---|
635 | 649 | oe.cameraMenu.add("-"); |
---|
636 | 650 | openWindowItem = oe.cameraMenu.add(new MenuItem("Edit copy...")); |
---|
637 | 651 | openWindowItem.addActionListener(this); |
---|
638 | | - editLeafItem.addActionListener(this); |
---|
639 | 652 | lookAtItem.addActionListener(this); |
---|
640 | 653 | //lookFromItem.addActinoListener(this); |
---|
641 | 654 | //switchViewItem.addActionListener(this); |
---|
.. | .. |
---|
682 | 695 | setMasterItem.addActionListener(this); |
---|
683 | 696 | } |
---|
684 | 697 | |
---|
685 | | - oe.menuBar.add(menu = new Menu("Group")); |
---|
686 | | -// grabItem = menu.add(new MenuItem("Grab")); |
---|
687 | | -// grabItem.addActionListener(this); |
---|
| 698 | + oe.menuBar.add(menu = new Menu("Order")); |
---|
| 699 | + |
---|
688 | 700 | backItem = menu.add(new MenuItem("Back")); |
---|
689 | 701 | backItem.addActionListener(this); |
---|
690 | 702 | frontItem = menu.add(new MenuItem("Front")); |
---|
.. | .. |
---|
692 | 704 | // compositeItem = menu.add(new MenuItem("Composite")); |
---|
693 | 705 | // compositeItem.addActionListener(this); |
---|
694 | 706 | |
---|
| 707 | + grabItem = oe.jTree.popup.add(new JMenuItem("Group")); |
---|
| 708 | + grabItem.addActionListener(this); |
---|
| 709 | + |
---|
695 | 710 | if (Globals.ADVANCED) |
---|
696 | 711 | { |
---|
697 | 712 | hideItem = menu.add(new MenuItem("Hidden Group")); |
---|
698 | 713 | hideItem.addActionListener(this); |
---|
699 | 714 | } |
---|
700 | | - ungroupItem = menu.add(new MenuItem("Ungroup")); |
---|
| 715 | + ungroupItem = oe.jTree.popup.add(new JMenuItem("Ungroup")); |
---|
701 | 716 | ungroupItem.addActionListener(this); |
---|
| 717 | + |
---|
| 718 | + oe.jTree.popup.addSeparator(); |
---|
| 719 | + |
---|
| 720 | + deleteItem = oe.jTree.popup.add(new JMenuItem("Delete")); |
---|
| 721 | + deleteItem.addActionListener(this); |
---|
702 | 722 | |
---|
703 | 723 | // menu.add("-"); |
---|
704 | 724 | // |
---|
.. | .. |
---|
735 | 755 | shadowYItem.addActionListener(this); |
---|
736 | 756 | shadowZItem = menu.add(new MenuItem("Shadow Blue")); |
---|
737 | 757 | shadowZItem.addActionListener(this); |
---|
| 758 | + |
---|
738 | 759 | attributeItem = menu.add(new MenuItem("Attribute")); |
---|
739 | 760 | attributeItem.addActionListener(this); |
---|
740 | | - |
---|
741 | 761 | if (Globals.ADVANCED) |
---|
742 | 762 | { |
---|
743 | 763 | menu.add("-"); |
---|
.. | .. |
---|
749 | 769 | pointflowItem.addActionListener(this); |
---|
750 | 770 | } |
---|
751 | 771 | menu.add("-"); |
---|
| 772 | + textureRatioRItem = menu.add(new MenuItem("Texture Ratio Red")); |
---|
| 773 | + textureRatioRItem.addActionListener(this); |
---|
| 774 | + textureRatioGItem = menu.add(new MenuItem("Texture Ratio Green")); |
---|
| 775 | + textureRatioGItem.addActionListener(this); |
---|
| 776 | + textureRatioBItem = menu.add(new MenuItem("Texture Ratio Blue")); |
---|
| 777 | + textureRatioBItem.addActionListener(this); |
---|
| 778 | + menu.add("-"); |
---|
752 | 779 | resetTransformItem = menu.add(new MenuItem("Reset Transform")); |
---|
753 | 780 | resetTransformItem.addActionListener(this); |
---|
754 | 781 | resetCentroidItem = menu.add(new MenuItem("Reset Centroid")); |
---|
755 | 782 | resetCentroidItem.addActionListener(this); |
---|
756 | | - resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XY")); |
---|
| 783 | + resetCentroidXZItem = menu.add(new MenuItem("Reset Centroid XZ")); |
---|
757 | 784 | resetCentroidXZItem.addActionListener(this); |
---|
758 | 785 | transformGeometryItem = menu.add(new MenuItem("Transform Geometry")); |
---|
759 | 786 | transformGeometryItem.addActionListener(this); |
---|
.. | .. |
---|
805 | 832 | } |
---|
806 | 833 | |
---|
807 | 834 | oe.menuBar.add(menu = new Menu("Attributes")); |
---|
| 835 | + clearVersionsItem = menu.add(new MenuItem("Clear Versions")); |
---|
| 836 | + clearVersionsItem.addActionListener(this); |
---|
808 | 837 | clearMaterialsItem = menu.add(new MenuItem("Clear Materials")); |
---|
809 | 838 | clearMaterialsItem.addActionListener(this); |
---|
810 | 839 | resetAllItem = menu.add(new MenuItem("Reset All")); |
---|
.. | .. |
---|
827 | 856 | hideleavesItem.addActionListener(this); |
---|
828 | 857 | showleavesItem = menu.add(new MenuItem("Show Leaves")); |
---|
829 | 858 | showleavesItem.addActionListener(this); |
---|
830 | | - markleavesItem = menu.add(new MenuItem("Mark Leaves")); |
---|
| 859 | + markleavesItem = menu.add(new MenuItem("Anim Leaves")); |
---|
831 | 860 | markleavesItem.addActionListener(this); |
---|
832 | | - unmarkleavesItem = menu.add(new MenuItem("Unmark Leaves")); |
---|
| 861 | + unmarkleavesItem = menu.add(new MenuItem("Unanim Leaves")); |
---|
833 | 862 | unmarkleavesItem.addActionListener(this); |
---|
834 | 863 | rewindleavesItem = menu.add(new MenuItem("Rewind Leaves")); |
---|
835 | 864 | rewindleavesItem.addActionListener(this); |
---|
.. | .. |
---|
883 | 912 | shareGeometriesItem.addActionListener(this); |
---|
884 | 913 | mergeGeometriesItem = menu.add(new MenuItem("Merge Geometries")); |
---|
885 | 914 | mergeGeometriesItem.addActionListener(this); |
---|
| 915 | + menu.add("-"); |
---|
| 916 | + editLeafItem = menu.add(new MenuItem("Edit leaf...")); |
---|
| 917 | + editLeafItem.addActionListener(this); |
---|
886 | 918 | if (Globals.ADVANCED) |
---|
887 | 919 | { |
---|
888 | 920 | // Pretty much the same as duplicate and clone. |
---|
.. | .. |
---|
901 | 933 | |
---|
902 | 934 | JTabbedPane resourcecontainer; |
---|
903 | 935 | cGridBag currenttab; |
---|
904 | | - boolean added; // patch for jar |
---|
| 936 | + //boolean added; // patch for jar |
---|
905 | 937 | |
---|
| 938 | + int totalcount = 0; |
---|
| 939 | + |
---|
906 | 940 | int tabcount = 0; |
---|
907 | 941 | int colcount = 0; |
---|
908 | 942 | int rowcount = 0; |
---|
.. | .. |
---|
918 | 952 | // System.out.println(); |
---|
919 | 953 | |
---|
920 | 954 | if (//rowcount == 0 || |
---|
921 | | - path.length == 1) |
---|
| 955 | + path.length == 1 && !path[0].equals("") && !path[0].equals(".DS_Store")) |
---|
922 | 956 | { |
---|
923 | 957 | currenttab = new cGridBag(); |
---|
924 | | - added = false; |
---|
925 | 958 | String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
926 | 959 | currenttab.setName(tabname); |
---|
| 960 | + //added = false; |
---|
| 961 | + resourcecontainer.add(currenttab); |
---|
| 962 | + resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
927 | 963 | rowcount = 1; |
---|
928 | 964 | colcount = 0; |
---|
929 | 965 | texturecount = 0; |
---|
930 | 966 | } |
---|
931 | 967 | |
---|
932 | | - if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg")) |
---|
| 968 | + if (path.length > 2 && (path[2].toLowerCase().endsWith(".jpg") || path[2].toLowerCase().endsWith(".png"))) |
---|
933 | 969 | { |
---|
934 | | - if (!added) |
---|
| 970 | + //if (!added) |
---|
935 | 971 | { |
---|
936 | | - added = true; |
---|
937 | | - resourcecontainer.add(currenttab); |
---|
| 972 | + //added = true; |
---|
938 | 973 | String tabname = path[0]; // String.valueOf((char)('A'+tabcount)); |
---|
939 | | - resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname); |
---|
| 974 | + currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname)); |
---|
940 | 975 | } |
---|
941 | 976 | |
---|
942 | | - AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab); |
---|
| 977 | + AddTextureButton(path[0], path[1], path[2], ++texturecount, currenttab); |
---|
| 978 | + totalcount++; |
---|
943 | 979 | |
---|
944 | 980 | if (++colcount >= columns) |
---|
945 | 981 | { |
---|
.. | .. |
---|
965 | 1001 | container.add(resourcecontainer); |
---|
966 | 1002 | |
---|
967 | 1003 | Grafreed.ParseResources("textures", this); |
---|
| 1004 | + |
---|
| 1005 | + // 935. System.out.println("Total = " + totalcount); |
---|
968 | 1006 | } |
---|
969 | 1007 | |
---|
970 | 1008 | void SetupUI2(ObjEditor oe) |
---|
.. | .. |
---|
984 | 1022 | //new Exception().printStackTrace(); |
---|
985 | 1023 | |
---|
986 | 1024 | oe.radioPanel = new JPanel(new GridBagLayout()); |
---|
987 | | - oe.aConstraints.weightx = 1; |
---|
988 | | - oe.aConstraints.weighty = 0; |
---|
989 | | - oe.aConstraints.fill = GridBagConstraints.HORIZONTAL; |
---|
990 | | - oe.aConstraints.gridwidth = 100; |
---|
991 | | - oe.aConstraints.gridheight = 1; |
---|
992 | 1025 | // oe.toolbarPanel.add(radioPanel); //, oe.aConstraints); |
---|
993 | 1026 | |
---|
994 | 1027 | oe.buttonGroup = new ButtonGroup(); |
---|
.. | .. |
---|
1009 | 1042 | oe.radioPanel.add(dummyButton); |
---|
1010 | 1043 | oe.buttonGroup.add(dummyButton); |
---|
1011 | 1044 | */ |
---|
1012 | | - cGridBag copyOptionsPanel = new cGridBag(); |
---|
| 1045 | + cGridBag versionManagerPanel = new cGridBag(); |
---|
1013 | 1046 | |
---|
1014 | | - copyOptionsPanel.preferredHeight = 2; |
---|
| 1047 | + versionManagerPanel.preferredHeight = 4; |
---|
1015 | 1048 | |
---|
1016 | 1049 | //this.AddOptions(oe.toolbarPanel, oe.aConstraints); |
---|
1017 | 1050 | |
---|
.. | .. |
---|
1021 | 1054 | |
---|
1022 | 1055 | if (Globals.ADVANCED) |
---|
1023 | 1056 | { |
---|
1024 | | - oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1025 | | - maxButton.setToolTipText("Maximize window"); |
---|
1026 | | - maxButton.addActionListener(this); |
---|
| 1057 | +// oe.toolbarPanel.add(maxButton = GetButton("icons/add-128.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1058 | +// maxButton.setToolTipText("Maximize window"); |
---|
| 1059 | +// maxButton.addActionListener(this); |
---|
1027 | 1060 | } |
---|
1028 | 1061 | |
---|
1029 | | - oe.toolbarPanel.add(fullButton = GetButton("icons/fullscreen.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1030 | | - fullButton.setToolTipText("Full-screen window"); |
---|
1031 | | - fullButton.addActionListener(this); |
---|
| 1062 | + cButton gcButton; |
---|
1032 | 1063 | |
---|
1033 | | - oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1064 | +// oe.toolbarPanel.add(gcButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1065 | +// gcButton.setToolTipText("Garbage collect"); |
---|
| 1066 | +// gcButton.addActionListener(new ActionListener() |
---|
| 1067 | +// { |
---|
| 1068 | +// public void actionPerformed(ActionEvent e) |
---|
| 1069 | +// { |
---|
| 1070 | +// System.gc(); |
---|
| 1071 | +// } |
---|
| 1072 | +// }); |
---|
| 1073 | + |
---|
| 1074 | + oe.toolbarPanel.add(fullScreenButton = GetButton("icons/fullscreen.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1075 | + fullScreenButton.setToolTipText("Full-screen window"); |
---|
| 1076 | + fullScreenButton.addActionListener(this); |
---|
| 1077 | + |
---|
| 1078 | + oe.toolbarPanel.add(collapseButton = GetButton("icons/collapse.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1079 | + collapseButton.setToolTipText("Collapse toolbar"); |
---|
| 1080 | + collapseButton.addActionListener(this); |
---|
| 1081 | + |
---|
| 1082 | +// oe.toolbarPanel.add(maximize3DButton = GetButton("icons/square.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1083 | +// maximize3DButton.setToolTipText("Maximize 3D view"); |
---|
| 1084 | +// maximize3DButton.addActionListener(this); |
---|
| 1085 | + |
---|
| 1086 | + oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1087 | + twoButton.setToolTipText("Show 3D view only"); |
---|
| 1088 | + twoButton.addActionListener(this); |
---|
| 1089 | + this.fullscreenLayout = twoButton; |
---|
| 1090 | + |
---|
| 1091 | + oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1092 | + threeButton.setToolTipText("Show controls and 3D view"); |
---|
| 1093 | + threeButton.addActionListener(this); |
---|
| 1094 | + if (Globals.ADVANCED) |
---|
| 1095 | + { |
---|
| 1096 | + oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1097 | + sixButton.setToolTipText("Show 3D view and controls"); |
---|
| 1098 | + sixButton.addActionListener(this); |
---|
| 1099 | + } |
---|
| 1100 | +// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1101 | +// sevenButton.setToolTipText("3-column layout"); |
---|
| 1102 | +// sevenButton.addActionListener(this); |
---|
| 1103 | + // |
---|
| 1104 | + |
---|
| 1105 | + oe.toolbarPanel.add(screenfitButton = GetButton("icons/fit.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1034 | 1106 | screenfitButton.setToolTipText("Screen fit"); |
---|
1035 | 1107 | screenfitButton.addActionListener(this); |
---|
1036 | 1108 | |
---|
1037 | | - oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1109 | + oe.toolbarPanel.add(restoreCameraButton = GetButton("icons/eye.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1038 | 1110 | restoreCameraButton.setToolTipText("Restore viewpoint"); |
---|
1039 | 1111 | restoreCameraButton.addActionListener(this); |
---|
1040 | 1112 | |
---|
1041 | | - copyOptionsPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1113 | + versionManagerPanel.add(saveVersionButton = GetButton("icons/down_arrow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1042 | 1114 | saveVersionButton.setToolTipText("Duplicate current version"); |
---|
1043 | 1115 | saveVersionButton.addActionListener(this); |
---|
1044 | 1116 | |
---|
1045 | | - copyOptionsPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1117 | + versionManagerPanel.add(deleteVersionButton = GetButton("icons/trash.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1046 | 1118 | deleteVersionButton.setToolTipText("Delete current version"); |
---|
1047 | 1119 | deleteVersionButton.addActionListener(this); |
---|
| 1120 | + deleteVersionButton.setEnabled(false); |
---|
1048 | 1121 | |
---|
1049 | | - copyOptionsPanel.add(previousVersionButton = GetButton("icons/undo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1122 | + versionManagerPanel.add(previousVersionButton = GetButton("icons/undo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1050 | 1123 | previousVersionButton.setToolTipText("Previous version"); |
---|
1051 | 1124 | previousVersionButton.addActionListener(this); |
---|
1052 | 1125 | previousVersionButton.setEnabled(false); |
---|
1053 | 1126 | |
---|
1054 | 1127 | cGridBag updown = new cGridBag().setVertical(true); |
---|
1055 | | - updown.add(restoreButton = GetButton("icons/restore.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1128 | + updown.add(restoreButton = GetButton("icons/restore.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1056 | 1129 | restoreButton.setToolTipText("Undo (restore current version)"); |
---|
1057 | 1130 | restoreButton.addActionListener(this); |
---|
1058 | | - //restoreButton.setEnabled(false); |
---|
| 1131 | + restoreButton.setEnabled(false); |
---|
1059 | 1132 | |
---|
1060 | | - updown.add(replaceButton = GetButton("icons/replace.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1133 | + updown.add(replaceButton = GetButton("icons/replace.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1061 | 1134 | replaceButton.setToolTipText("Save (replace current version)"); |
---|
1062 | 1135 | replaceButton.addActionListener(this); |
---|
1063 | | - //replaceButton.setEnabled(false); |
---|
| 1136 | + replaceButton.setEnabled(false); |
---|
1064 | 1137 | |
---|
1065 | | - copyOptionsPanel.add(updown); |
---|
| 1138 | + versionManagerPanel.add(updown); |
---|
1066 | 1139 | |
---|
1067 | | - copyOptionsPanel.add(nextVersionButton = GetButton("icons/redo.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1140 | + versionManagerPanel.add(nextVersionButton = GetButton("icons/redo.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1068 | 1141 | nextVersionButton.setToolTipText("Next version"); |
---|
1069 | 1142 | nextVersionButton.addActionListener(this); |
---|
1070 | 1143 | nextVersionButton.setEnabled(false); |
---|
| 1144 | + |
---|
| 1145 | + oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1146 | + oneStepButton.setToolTipText("Animate one step forward"); |
---|
| 1147 | + oneStepButton.addActionListener(this); |
---|
1071 | 1148 | |
---|
1072 | 1149 | oe.toolbarPanel.add(liveCB = GetToggleButton("icons/run.png", Globals.isLIVE())); //, oe.aConstraints); |
---|
1073 | 1150 | liveCB.setToolTipText("Enable animation"); |
---|
1074 | 1151 | liveCB.addItemListener(this); |
---|
1075 | 1152 | |
---|
1076 | | - oe.toolbarPanel.add(oneStepButton = GetButton("icons/step.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1077 | | - oneStepButton.setToolTipText("Animate one step forward"); |
---|
1078 | | - oneStepButton.addActionListener(this); |
---|
1079 | | - |
---|
1080 | 1153 | oe.toolbarPanel.add(fastCB = GetToggleButton("icons/runfast.png", CameraPane.FAST)); //, constraints); |
---|
1081 | 1154 | fastCB.setToolTipText("Fast mode"); |
---|
1082 | 1155 | fastCB.addItemListener(this); |
---|
.. | .. |
---|
1092 | 1165 | |
---|
1093 | 1166 | if (Globals.ADVANCED) |
---|
1094 | 1167 | { |
---|
1095 | | - oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1168 | + oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1096 | 1169 | snapobjectButton.addActionListener(this); |
---|
1097 | 1170 | snapobjectButton.setToolTipText("Snap Object"); |
---|
1098 | 1171 | |
---|
1099 | | - oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1172 | + oe.toolbarPanel.add(fourButton = GetButton("icons/controls-horizontal.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1100 | 1173 | fourButton.addActionListener(this); |
---|
1101 | 1174 | fourButton.setToolTipText("Show control panel only"); |
---|
1102 | 1175 | } |
---|
1103 | 1176 | |
---|
1104 | 1177 | //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL)); |
---|
1105 | 1178 | |
---|
1106 | | - oe.toolbarPanel.add(twoButton = GetButton("icons/cube.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1107 | | - twoButton.setToolTipText("Show 3D view only"); |
---|
1108 | | - twoButton.addActionListener(this); |
---|
1109 | | - this.fullscreenLayout = twoButton; |
---|
1110 | | - |
---|
1111 | | - oe.toolbarPanel.add(threeButton = GetButton("icons/controlsview.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1112 | | - threeButton.setToolTipText("Show controls and 3D view"); |
---|
1113 | | - threeButton.addActionListener(this); |
---|
1114 | | - oe.toolbarPanel.add(sixButton = GetButton("icons/viewcontrols.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1115 | | - sixButton.setToolTipText("Show 3D view and controls"); |
---|
1116 | | - sixButton.addActionListener(this); |
---|
1117 | | -// oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1118 | | -// sevenButton.setToolTipText("3-column layout"); |
---|
1119 | | -// sevenButton.addActionListener(this); |
---|
1120 | | - // |
---|
1121 | 1179 | |
---|
1122 | | - oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1180 | + oe.toolbarPanel.add(rootButton = GetButton("icons/openwindow.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1123 | 1181 | rootButton.setToolTipText("Open selection in new tab"); |
---|
1124 | 1182 | rootButton.addActionListener(this); |
---|
1125 | 1183 | |
---|
1126 | | - oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1184 | + oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1127 | 1185 | closeButton.setToolTipText("Close tab"); |
---|
1128 | 1186 | closeButton.addActionListener(this); |
---|
1129 | 1187 | //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints); |
---|
.. | .. |
---|
1132 | 1190 | cGridBag row1 = new cGridBag(); |
---|
1133 | 1191 | |
---|
1134 | 1192 | // INSERT |
---|
1135 | | - row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1136 | | - gridButton.setToolTipText("Create grid"); |
---|
| 1193 | + row1.add(gridButton = GetButton("icons/grid.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1194 | + gridButton.setToolTipText("Create ground"); |
---|
1137 | 1195 | gridButton.addActionListener(this); |
---|
1138 | 1196 | |
---|
1139 | | - row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1197 | + row1.add(boxButton = GetButton("icons/box.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1140 | 1198 | boxButton.setToolTipText("Create box"); |
---|
1141 | 1199 | boxButton.addActionListener(this); |
---|
1142 | 1200 | |
---|
1143 | | - row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1144 | | - sphereButton.setToolTipText("Create sphere"); |
---|
1145 | | - sphereButton.addActionListener(this); |
---|
1146 | | - |
---|
1147 | | - row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1148 | | - coneButton.setToolTipText("Create cone"); |
---|
1149 | | - coneButton.addActionListener(this); |
---|
1150 | | - |
---|
1151 | | - row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
1152 | | - torusButton.setToolTipText("Create torus"); |
---|
1153 | | - torusButton.addActionListener(this); |
---|
1154 | | - |
---|
1155 | | - row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1201 | + row1.add(superButton = GetButton("icons/super.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1156 | 1202 | superButton.setToolTipText("Create superellipsoid"); |
---|
1157 | 1203 | superButton.addActionListener(this); |
---|
1158 | 1204 | |
---|
1159 | | - if (Globals.ADVANCED) |
---|
| 1205 | + row1.add(sphereButton = GetButton("icons/sphere.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1206 | + sphereButton.setToolTipText("Create sphere"); |
---|
| 1207 | + sphereButton.addActionListener(this); |
---|
| 1208 | + |
---|
| 1209 | + row1.add(coneButton = GetButton("icons/cone.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1210 | + coneButton.setToolTipText("Create cone"); |
---|
| 1211 | + coneButton.addActionListener(this); |
---|
| 1212 | + |
---|
| 1213 | + row1.add(torusButton = GetButton("icons/torus.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1214 | + torusButton.setToolTipText("Create torus"); |
---|
| 1215 | + torusButton.addActionListener(this); |
---|
| 1216 | + |
---|
| 1217 | + if (false) //Globals.ADVANCED) |
---|
1160 | 1218 | { |
---|
1161 | | - oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1219 | + oe.toolboxPanel.add(kleinButton = GetButton("icons/klein.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1162 | 1220 | kleinButton.setToolTipText("Create Klein bottle"); |
---|
1163 | 1221 | kleinButton.addActionListener(this); |
---|
1164 | 1222 | } |
---|
1165 | 1223 | |
---|
1166 | | - row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1224 | + row1.add(particlesButton = GetButton("icons/particles.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1167 | 1225 | particlesButton.setToolTipText("Create particle system"); |
---|
1168 | 1226 | particlesButton.addActionListener(this); |
---|
1169 | 1227 | |
---|
.. | .. |
---|
1171 | 1229 | |
---|
1172 | 1230 | cGridBag row2 = new cGridBag(); |
---|
1173 | 1231 | |
---|
1174 | | - row2.add(groupButton = GetButton("icons/group.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1232 | + row2.add(groupButton = GetButton("icons/group.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1175 | 1233 | groupButton.setToolTipText("Create group"); |
---|
1176 | 1234 | groupButton.addActionListener(this); |
---|
1177 | 1235 | |
---|
1178 | | - row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1236 | + row2.add(compositeButton = GetButton("icons/composite.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1179 | 1237 | compositeButton.setToolTipText("Create composite"); |
---|
1180 | 1238 | compositeButton.addActionListener(this); |
---|
1181 | 1239 | |
---|
1182 | | - row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1240 | + row2.add(switchButton = GetButton("icons/switch.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1183 | 1241 | switchButton.setToolTipText("Create item switcher"); |
---|
1184 | 1242 | switchButton.addActionListener(this); |
---|
1185 | 1243 | |
---|
1186 | | - row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1244 | + row2.add(loopButton = GetButton("icons/loop.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1187 | 1245 | loopButton.setToolTipText("Create loop"); |
---|
1188 | 1246 | loopButton.addActionListener(this); |
---|
1189 | 1247 | |
---|
1190 | | - row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1248 | + row2.add(textureButton = GetButton("icons/texture.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1191 | 1249 | textureButton.setToolTipText("Create texture"); |
---|
1192 | 1250 | textureButton.addActionListener(this); |
---|
1193 | 1251 | |
---|
1194 | | - row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1252 | + row2.add(overlayButton = GetButton("icons/overlay.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1195 | 1253 | overlayButton.setToolTipText("Create overlay"); |
---|
1196 | 1254 | overlayButton.addActionListener(this); |
---|
1197 | 1255 | |
---|
1198 | | - row2.add(lightButton = GetButton("icons/light-bulb.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1256 | + row2.add(lightButton = GetButton("icons/light-bulb.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1199 | 1257 | lightButton.setToolTipText("Create light"); |
---|
1200 | 1258 | lightButton.addActionListener(this); |
---|
1201 | 1259 | |
---|
.. | .. |
---|
1205 | 1263 | |
---|
1206 | 1264 | CreateTexturePanel(textures); |
---|
1207 | 1265 | |
---|
| 1266 | + int tabCount = resourcecontainer.getTabCount(); |
---|
| 1267 | + |
---|
| 1268 | + if (tabCount > 0) |
---|
| 1269 | + resourcecontainer.setSelectedIndex((int)(Math.random() * tabCount)); |
---|
| 1270 | + |
---|
1208 | 1271 | oe.toolboxPanel.add(textures); |
---|
1209 | 1272 | |
---|
1210 | 1273 | textures.preferredHeight = 100; |
---|
.. | .. |
---|
1212 | 1275 | CreateSkyboxPanel(oe.skyboxPanel); |
---|
1213 | 1276 | |
---|
1214 | 1277 | // EDIT panel |
---|
1215 | | - editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1278 | + editCommandsPanel.add(editButton = GetButton("icons/controls.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1216 | 1279 | editButton.setToolTipText("Pin selection controls"); |
---|
1217 | 1280 | editButton.addActionListener(this); |
---|
1218 | 1281 | |
---|
1219 | | - editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1282 | + editCommandsPanel.add(uneditButton = GetButton("icons/remove.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1220 | 1283 | uneditButton.setToolTipText("Unpin and remove selection controls"); |
---|
1221 | 1284 | uneditButton.addActionListener(this); |
---|
1222 | 1285 | |
---|
.. | .. |
---|
1224 | 1287 | allParamsButton.setToolTipText("Show all controls"); |
---|
1225 | 1288 | allParamsButton.addActionListener(this); |
---|
1226 | 1289 | |
---|
1227 | | - editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1290 | + editCommandsPanel.add(clearPanelButton = GetButton("icons/clear.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1228 | 1291 | clearPanelButton.setToolTipText("Clear all controls"); |
---|
1229 | 1292 | clearPanelButton.addActionListener(this); |
---|
1230 | 1293 | |
---|
.. | .. |
---|
1232 | 1295 | //unselectButton.setToolTipText("Unselect"); |
---|
1233 | 1296 | //unselectButton.addActionListener(this); |
---|
1234 | 1297 | |
---|
1235 | | - editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints); |
---|
| 1298 | + editCommandsPanel.add(flashSelectionButton = GetButton("icons/flash-light.png", !Globals.NIMBUSLAF)); //, oe.aConstraints); |
---|
1236 | 1299 | flashSelectionButton.setToolTipText("Highlight selection"); |
---|
1237 | 1300 | flashSelectionButton.addActionListener(this); |
---|
1238 | 1301 | |
---|
.. | .. |
---|
1255 | 1318 | |
---|
1256 | 1319 | cGridBag jSPPanel = new cGridBag(); |
---|
1257 | 1320 | |
---|
| 1321 | + jSPPanel.preferredHeight = 20; |
---|
| 1322 | + |
---|
1258 | 1323 | JScrollPane jSP; |
---|
1259 | 1324 | //ctrlPanel.add(new JScrollPane(jTree = new cTree(new cTreeModel(this))), aConstraints); |
---|
1260 | 1325 | jSPPanel.add(jSP = new JScrollPane(oe.jTree)); //, oe.aConstraints); |
---|
.. | .. |
---|
1263 | 1328 | oe.treePanel.add(jSPPanel); |
---|
1264 | 1329 | oe.treePanel.Return(); |
---|
1265 | 1330 | |
---|
1266 | | - oe.treePanel.add(copyOptionsPanel); |
---|
| 1331 | + oe.treePanel.add(versionManagerPanel); |
---|
1267 | 1332 | oe.treePanel.Return(); |
---|
1268 | | - cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
1269 | | - versionSlider = (cNumberSlider)sliderPane.getComponent(1); |
---|
1270 | | - sliderPane.preferredHeight = 1; |
---|
| 1333 | + versionSliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0); |
---|
| 1334 | + versionSlider = (cNumberSlider)versionSliderPane.getComponent(1); |
---|
| 1335 | + versionSliderPane.preferredHeight = 3; |
---|
1271 | 1336 | |
---|
1272 | 1337 | // mainPanel.setDividerLocation(0.1); //1.0); |
---|
1273 | 1338 | mainPanel.setResizeWeight(0.4); |
---|
.. | .. |
---|
1425 | 1490 | |
---|
1426 | 1491 | void EditObject(Object3D obj) |
---|
1427 | 1492 | { |
---|
| 1493 | + //assert(obj instanceof Composite); |
---|
| 1494 | + |
---|
| 1495 | +// if (obj.versionlist == null) |
---|
| 1496 | +// { |
---|
| 1497 | +// obj.versionlist = new Object3D[100]; |
---|
| 1498 | +// obj.versionindex = -1; |
---|
| 1499 | +// } |
---|
| 1500 | + |
---|
1428 | 1501 | cRadio radioButton = new cRadio(obj.name); |
---|
1429 | 1502 | |
---|
1430 | 1503 | // June 2019. Patch to avoid bug with transparency. |
---|
.. | .. |
---|
1449 | 1522 | |
---|
1450 | 1523 | oe.SetupViews(); |
---|
1451 | 1524 | |
---|
| 1525 | + if (Globals.DEBUG) |
---|
1452 | 1526 | System.out.println("SetupViews"); |
---|
1453 | 1527 | DragSource.getDefaultDragSource().createDefaultDragGestureRecognizer( |
---|
1454 | 1528 | oe.cameraView, DnDConstants.ACTION_COPY_OR_MOVE, this); // ACTION_LINK ?? |
---|
.. | .. |
---|
1815 | 1889 | TreePath path; |
---|
1816 | 1890 | |
---|
1817 | 1891 | public TransferableTreePath(TreePath tp) { |
---|
1818 | | - path = tp; |
---|
| 1892 | + Object[] objs = new Object[tp.getPathCount()]; |
---|
| 1893 | + for (int i=0; i<objs.length; i++) |
---|
| 1894 | + { |
---|
| 1895 | + objs[i] = ((Object3D)tp.getPathComponent(i)).GetUUID(); |
---|
| 1896 | + } |
---|
| 1897 | + path = new TreePath(objs); |
---|
1819 | 1898 | } |
---|
1820 | 1899 | |
---|
1821 | 1900 | public synchronized DataFlavor[] getTransferDataFlavors() { |
---|
.. | .. |
---|
2047 | 2126 | switch(axis) |
---|
2048 | 2127 | { |
---|
2049 | 2128 | case 0 : |
---|
2050 | | - vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z; |
---|
2051 | | - vert2.x = minima.x; vert2.y = maxima.y; vert2.z = minima.z; |
---|
2052 | | - vert3.x = minima.x; vert3.y = minima.y; vert3.z = maxima.z; |
---|
2053 | | - vert4.x = minima.x; vert4.y = maxima.y; vert4.z = maxima.z; |
---|
| 2129 | + vert1.x = minima.x + 0.001f; vert1.y = minima.y; vert1.z = minima.z; |
---|
| 2130 | + vert2.x = minima.x + 0.001f; vert2.y = maxima.y; vert2.z = minima.z; |
---|
| 2131 | + vert3.x = minima.x + 0.001f; vert3.y = minima.y; vert3.z = maxima.z; |
---|
| 2132 | + vert4.x = minima.x + 0.001f; vert4.y = maxima.y; vert4.z = maxima.z; |
---|
2054 | 2133 | norm = cVector.X; |
---|
2055 | 2134 | break; |
---|
2056 | 2135 | case 1 : |
---|
2057 | | - vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z; |
---|
2058 | | - vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z; |
---|
2059 | | - vert3.x = minima.x; vert3.y = minima.y; vert3.z = maxima.z; |
---|
2060 | | - vert4.x = maxima.x; vert4.y = minima.y; vert4.z = maxima.z; |
---|
| 2136 | + vert1.x = minima.x; vert1.y = minima.y + 0.001f; vert1.z = minima.z; |
---|
| 2137 | + vert2.x = maxima.x; vert2.y = minima.y + 0.001f; vert2.z = minima.z; |
---|
| 2138 | + vert3.x = minima.x; vert3.y = minima.y + 0.001f; vert3.z = maxima.z; |
---|
| 2139 | + vert4.x = maxima.x; vert4.y = minima.y + 0.001f; vert4.z = maxima.z; |
---|
2061 | 2140 | norm = cVector.Y; |
---|
2062 | 2141 | break; |
---|
2063 | 2142 | case 2 : |
---|
2064 | | - vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z; |
---|
2065 | | - vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z; |
---|
2066 | | - vert3.x = minima.x; vert3.y = maxima.y; vert3.z = minima.z; |
---|
2067 | | - vert4.x = maxima.x; vert4.y = maxima.y; vert4.z = minima.z; |
---|
| 2143 | + vert1.x = minima.x; vert1.y = minima.y; vert1.z = minima.z + 0.001f; |
---|
| 2144 | + vert2.x = maxima.x; vert2.y = minima.y; vert2.z = minima.z + 0.001f; |
---|
| 2145 | + vert3.x = minima.x; vert3.y = maxima.y; vert3.z = minima.z + 0.001f; |
---|
| 2146 | + vert4.x = maxima.x; vert4.y = maxima.y; vert4.z = minima.z + 0.001f; |
---|
2068 | 2147 | norm = cVector.Z; |
---|
2069 | 2148 | break; |
---|
2070 | 2149 | } |
---|
.. | .. |
---|
2105 | 2184 | shadow.material = new cMaterial(obj.material); |
---|
2106 | 2185 | shadow.material.diffuse = 0.0001f; |
---|
2107 | 2186 | shadow.material.specular = 0.0001f; |
---|
2108 | | - //shadow.projectedVertices[1].x = 300; |
---|
| 2187 | + shadow.material.opacity = 0.75f; |
---|
| 2188 | + |
---|
| 2189 | + AllocProjectedVertices(shadow); |
---|
| 2190 | + |
---|
| 2191 | + shadow.projectedVertices[1].x = 300; |
---|
2109 | 2192 | |
---|
2110 | 2193 | makeSomething(shadow); |
---|
2111 | 2194 | } |
---|
.. | .. |
---|
2626 | 2709 | } else |
---|
2627 | 2710 | if (source == loopItem || source == loopButton) |
---|
2628 | 2711 | { |
---|
| 2712 | + if (!group.selection.isEmpty()) |
---|
| 2713 | + { |
---|
2629 | 2714 | Composite csg = new GroupLeaf(); |
---|
2630 | | - csg.count = 5; |
---|
2631 | 2715 | group(csg); |
---|
| 2716 | + csg.count = 5; |
---|
2632 | 2717 | Composite child = new cGroup("Branch"); |
---|
2633 | 2718 | csg.addChild(child); |
---|
2634 | 2719 | child.addChild(csg); |
---|
| 2720 | + } |
---|
2635 | 2721 | } else |
---|
2636 | 2722 | if (source == doubleItem) |
---|
2637 | 2723 | { |
---|
| 2724 | + if (!group.selection.isEmpty()) |
---|
| 2725 | + { |
---|
2638 | 2726 | Composite csg = new GroupLeaf("Fork"); |
---|
2639 | | - csg.count = 5; |
---|
2640 | 2727 | group(csg); |
---|
| 2728 | + csg.count = 5; |
---|
2641 | 2729 | Composite child = new cGroup("Branch A"); |
---|
2642 | 2730 | csg.addChild(child); |
---|
2643 | 2731 | child.addChild(csg); |
---|
2644 | 2732 | child = new cGroup("Branch B"); |
---|
2645 | 2733 | csg.addChild(child); |
---|
2646 | 2734 | child.addChild(csg); |
---|
| 2735 | + } |
---|
2647 | 2736 | } else |
---|
2648 | 2737 | if (source == tripleItem) |
---|
2649 | 2738 | { |
---|
| 2739 | + if (!group.selection.isEmpty()) |
---|
| 2740 | + { |
---|
2650 | 2741 | Composite csg = new GroupLeaf("Trident"); |
---|
2651 | 2742 | csg.count = 4; |
---|
2652 | 2743 | group(csg); |
---|
.. | .. |
---|
2659 | 2750 | child = new cGroup(); |
---|
2660 | 2751 | csg.addChild(child); |
---|
2661 | 2752 | child.addChild(csg); |
---|
| 2753 | + } |
---|
2662 | 2754 | } else |
---|
2663 | 2755 | if (source == computeAOItem) |
---|
2664 | 2756 | { |
---|
.. | .. |
---|
2705 | 2797 | { |
---|
2706 | 2798 | Maximize(); |
---|
2707 | 2799 | } else |
---|
2708 | | - if (source == fullButton) |
---|
| 2800 | + if (source == fullScreenButton) |
---|
2709 | 2801 | { |
---|
2710 | 2802 | ToggleFullScreen(); |
---|
2711 | 2803 | } else |
---|
| 2804 | + if (source == collapseButton) |
---|
| 2805 | + { |
---|
| 2806 | + this.expandedLayout = radio.layout; |
---|
| 2807 | + CollapseToolbar(); |
---|
| 2808 | + } else |
---|
| 2809 | +// if (source == maximize3DButton) |
---|
| 2810 | +// { |
---|
| 2811 | +// this.expandedLayout = radio.layout; |
---|
| 2812 | +// radio.layout = twoButton; |
---|
| 2813 | +// CollapseToolbar(); |
---|
| 2814 | +// Show3DView(); |
---|
| 2815 | +// } else |
---|
2712 | 2816 | if (source == previousVersionButton) |
---|
2713 | 2817 | { |
---|
2714 | 2818 | // Go to previous version |
---|
.. | .. |
---|
3282 | 3386 | } else |
---|
3283 | 3387 | if (source == ungroupItem || source == ungroupButton) |
---|
3284 | 3388 | { |
---|
3285 | | - boolean hasRoot = false; |
---|
| 3389 | + boolean canUngroup = true; |
---|
3286 | 3390 | |
---|
3287 | 3391 | for (int i=0; i<group.selection.size(); i++) |
---|
3288 | 3392 | { |
---|
3289 | | - if (group.selection.get(i) == group) |
---|
| 3393 | + Object3D selectedItem = group.selection.get(i); |
---|
| 3394 | + |
---|
| 3395 | + if (selectedItem.Size() == 0) |
---|
3290 | 3396 | { |
---|
3291 | | - hasRoot = true; |
---|
| 3397 | + // Cannot ungroup leaves |
---|
| 3398 | + canUngroup = false; |
---|
| 3399 | + break; |
---|
| 3400 | + } |
---|
| 3401 | + |
---|
| 3402 | + if (selectedItem == group) |
---|
| 3403 | + { |
---|
| 3404 | + // Cannot ungroup root |
---|
| 3405 | + canUngroup = false; |
---|
3292 | 3406 | break; |
---|
3293 | 3407 | } |
---|
3294 | 3408 | } |
---|
3295 | 3409 | |
---|
3296 | | - if (!hasRoot) |
---|
| 3410 | + if (canUngroup) |
---|
3297 | 3411 | { |
---|
3298 | 3412 | for (int i=0; i<group.selection.size(); i++) |
---|
3299 | 3413 | { |
---|
3300 | | - Ungroup(group.selection.get(i)); |
---|
| 3414 | + Object3D selectedItem = group.selection.get(i); |
---|
| 3415 | + |
---|
| 3416 | + Ungroup(selectedItem); |
---|
3301 | 3417 | } |
---|
3302 | 3418 | |
---|
3303 | 3419 | ClearSelection(false); |
---|
.. | .. |
---|
3348 | 3464 | if (source == clearMaterialsItem) |
---|
3349 | 3465 | { |
---|
3350 | 3466 | ClearMaterials(); |
---|
| 3467 | + } else |
---|
| 3468 | + if (source == clearVersionsItem) |
---|
| 3469 | + { |
---|
| 3470 | + ClearVersions(); |
---|
3351 | 3471 | } else |
---|
3352 | 3472 | if (source == liveleavesItem) |
---|
3353 | 3473 | { |
---|
.. | .. |
---|
3488 | 3608 | if (source == transformChildrenItem) |
---|
3489 | 3609 | { |
---|
3490 | 3610 | TransformChildren(); |
---|
| 3611 | + } else |
---|
| 3612 | + if (source == textureRatioRItem) |
---|
| 3613 | + { |
---|
| 3614 | + TextureRatio(0); |
---|
| 3615 | + } else |
---|
| 3616 | + if (source == textureRatioGItem) |
---|
| 3617 | + { |
---|
| 3618 | + TextureRatio(1); |
---|
| 3619 | + } else |
---|
| 3620 | + if (source == textureRatioBItem) |
---|
| 3621 | + { |
---|
| 3622 | + TextureRatio(2); |
---|
3491 | 3623 | } else |
---|
3492 | 3624 | if (source == resetTransformItem) |
---|
3493 | 3625 | { |
---|
.. | .. |
---|
3660 | 3792 | if (CameraPane.FULLSCREEN) |
---|
3661 | 3793 | fullscreenLayout = radio.layout; |
---|
3662 | 3794 | |
---|
3663 | | - // bug |
---|
3664 | | - //gridPanel.setDividerLocation(1.0); |
---|
3665 | | - //bigPanel.setDividerLocation(0.0); |
---|
3666 | | -// bigThree.remove(scenePanel); |
---|
3667 | | -// bigThree.remove(centralPanel); |
---|
3668 | | -// bigThree.remove(XYZPanel); |
---|
3669 | | -// aWindowConstraints.gridx = 0; |
---|
3670 | | -// aWindowConstraints.gridy = 0; |
---|
3671 | | -// aWindowConstraints.gridwidth = 1; |
---|
3672 | | -// // aConstraints.gridheight = 3; |
---|
3673 | | -// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
3674 | | -// aWindowConstraints.weightx = 0; |
---|
3675 | | -// aWindowConstraints.weighty = 1; |
---|
3676 | | -// //bigThree.add(jtp, aWindowConstraints); |
---|
3677 | | -// aWindowConstraints.weightx = 1; |
---|
3678 | | -// aWindowConstraints.gridwidth = 3; |
---|
3679 | | -// // aConstraints.gridheight = 3; |
---|
3680 | | -// aWindowConstraints.gridx = 1; |
---|
3681 | | -// aWindowConstraints.fill = GridBagConstraints.BOTH; |
---|
3682 | | -// bigThree.add(centralPanel, aWindowConstraints); |
---|
3683 | | -// aWindowConstraints.weightx = 0; |
---|
3684 | | -// aWindowConstraints.gridx = 4; |
---|
3685 | | -// aWindowConstraints.gridwidth = 1; |
---|
3686 | | -// // aConstraints.gridheight = 3; |
---|
3687 | | -// aWindowConstraints.fill = GridBagConstraints.VERTICAL; |
---|
3688 | | -// //bigThree.add(XYZPanel, aWindowConstraints); |
---|
3689 | | -// scenePanel.setVisible(false); |
---|
3690 | | -// centralPanel.setVisible(true); |
---|
3691 | | -// XYZPanel.setVisible(false); |
---|
3692 | | - bigThree.ClearUI(); |
---|
3693 | | - bigThree.add(centralPanel); |
---|
3694 | | - bigThree.FlushUI(); |
---|
| 3795 | + Show3DView(); |
---|
3695 | 3796 | |
---|
3696 | 3797 | cameraView.requestFocusInWindow(); |
---|
3697 | 3798 | |
---|
.. | .. |
---|
3877 | 3978 | } else |
---|
3878 | 3979 | if (source == rootButton) |
---|
3879 | 3980 | { |
---|
| 3981 | + Replace(); |
---|
3880 | 3982 | Object3D obj; |
---|
3881 | 3983 | for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
3882 | 3984 | { |
---|
.. | .. |
---|
3891 | 3993 | if (source == closeButton) |
---|
3892 | 3994 | { |
---|
3893 | 3995 | //System.out.println("CLOSE: " + buttonGroup.getSelection()); |
---|
| 3996 | + if (copy.versionlist != null) |
---|
| 3997 | + Replace(); |
---|
| 3998 | + |
---|
3894 | 3999 | cRadio ab; |
---|
3895 | 4000 | for (Enumeration e = buttonGroup.getElements(); e.hasMoreElements();) |
---|
3896 | 4001 | { |
---|
.. | .. |
---|
3989 | 4094 | } else |
---|
3990 | 4095 | if(source instanceof cRadio) |
---|
3991 | 4096 | { |
---|
| 4097 | + if (copy.versionlist != null) |
---|
| 4098 | + Replace(); |
---|
| 4099 | + |
---|
3992 | 4100 | group.parent = keepparent; |
---|
3993 | 4101 | group.attributes = 0; |
---|
3994 | 4102 | //group.editWindow = null; |
---|
.. | .. |
---|
4013 | 4121 | |
---|
4014 | 4122 | copy = group; |
---|
4015 | 4123 | |
---|
4016 | | - SetUndoStates(); |
---|
4017 | | - |
---|
4018 | 4124 | //Globals.theRenderer.object = group; |
---|
4019 | 4125 | if(!useclient) |
---|
4020 | 4126 | { |
---|
.. | .. |
---|
4042 | 4148 | */ |
---|
4043 | 4149 | radio.layout.doClick(); |
---|
4044 | 4150 | |
---|
| 4151 | + //assert(copy instanceof Composite); |
---|
| 4152 | + |
---|
| 4153 | + if (copy.versionlist == null) |
---|
| 4154 | + { |
---|
| 4155 | + copy.versionindex = -1; |
---|
| 4156 | + |
---|
| 4157 | + // Cannot work with loops |
---|
| 4158 | + // To fix this issue, we first mark all nodes above the root, |
---|
| 4159 | + // and check if any of these nodes are reachable below the root. |
---|
| 4160 | + Grafreed.grafreed.universe.TagObjects(copy, true); |
---|
| 4161 | + |
---|
| 4162 | + if (copy instanceof Composite && !copy.HasTags()) |
---|
| 4163 | + { |
---|
| 4164 | + if (copy.versionlist == null) |
---|
| 4165 | + copy.versionlist = new Object3D[100]; |
---|
| 4166 | + |
---|
| 4167 | + //Save(true); |
---|
| 4168 | + } |
---|
| 4169 | + else |
---|
| 4170 | + copy.versionindex = -2; |
---|
| 4171 | + |
---|
| 4172 | + Grafreed.grafreed.universe.TagObjects(copy, false); |
---|
| 4173 | + } |
---|
| 4174 | + |
---|
| 4175 | + SetVersionStates(); |
---|
| 4176 | + |
---|
4045 | 4177 | ClearUnpinned(); |
---|
4046 | 4178 | |
---|
4047 | 4179 | //Grafreed.Assert(group != null); |
---|
.. | .. |
---|
4155 | 4287 | refreshContents(); |
---|
4156 | 4288 | } |
---|
4157 | 4289 | |
---|
| 4290 | + void TextureRatio(int axis) |
---|
| 4291 | + { |
---|
| 4292 | + Object3D obj; |
---|
| 4293 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 4294 | + { |
---|
| 4295 | + obj = (Object3D)e.nextElement(); |
---|
| 4296 | + obj.TextureRatio(axis); |
---|
| 4297 | + } |
---|
| 4298 | + |
---|
| 4299 | + refreshContents(); |
---|
| 4300 | + } |
---|
| 4301 | + |
---|
4158 | 4302 | void ResetTransform() |
---|
4159 | 4303 | { |
---|
4160 | 4304 | ResetTransform(-1); |
---|
.. | .. |
---|
4170 | 4314 | if (obj.toParent == null) |
---|
4171 | 4315 | continue; |
---|
4172 | 4316 | |
---|
4173 | | - if (mask == -1) |
---|
4174 | | - { |
---|
4175 | | - if (obj instanceof Camera) // jan 2014 |
---|
4176 | | - { |
---|
4177 | | - LA.matIdentity(obj.toParent); |
---|
4178 | | - LA.matIdentity(obj.fromParent); |
---|
4179 | | - } |
---|
4180 | | - else |
---|
4181 | | - { |
---|
4182 | | - obj.toParent = null; // jan 2014 LA.matIdentity(obj.toParent); |
---|
4183 | | - obj.fromParent = null; // LA.matIdentity(obj.fromParent); |
---|
4184 | | - } |
---|
4185 | | - TouchTransform(obj); |
---|
4186 | | - continue; |
---|
4187 | | - } |
---|
4188 | | - if ((mask&2) != 0) // Scale |
---|
4189 | | - { |
---|
4190 | | - obj.toParent[0][0] = obj.toParent[1][1] = obj.toParent[2][2] = 1; |
---|
4191 | | - obj.toParent[0][1] = obj.toParent[1][0] = obj.toParent[2][0] = 0; |
---|
4192 | | - obj.toParent[0][2] = obj.toParent[1][2] = obj.toParent[2][1] = 0; |
---|
4193 | | - obj.fromParent[0][0] = obj.fromParent[1][1] = obj.fromParent[2][2] = 1; |
---|
4194 | | - obj.fromParent[0][1] = obj.fromParent[1][0] = obj.fromParent[2][0] = 0; |
---|
4195 | | - obj.fromParent[0][2] = obj.fromParent[1][2] = obj.fromParent[2][1] = 0; |
---|
4196 | | - } |
---|
4197 | | - if ((mask&4) != 0) // Rotation |
---|
4198 | | - { |
---|
4199 | | - // ? |
---|
4200 | | - } |
---|
4201 | | - if ((mask&1) != 0) // Translation |
---|
4202 | | - { |
---|
4203 | | - if (obj.toParent != null) |
---|
4204 | | - { |
---|
4205 | | - obj.toParent[3][0] = obj.toParent[3][1] = obj.toParent[3][2] = 0; |
---|
4206 | | - obj.fromParent[3][0] = obj.fromParent[3][1] = obj.fromParent[3][2] = 0; |
---|
4207 | | - } |
---|
4208 | | - } |
---|
| 4317 | + obj.ResetTransform(mask); |
---|
| 4318 | + |
---|
4209 | 4319 | if (obj.parent == null) |
---|
4210 | 4320 | { |
---|
4211 | 4321 | System.out.println("NULL PARENT!"); |
---|
.. | .. |
---|
4714 | 4824 | { |
---|
4715 | 4825 | Object3D obj = group.selection.get(i); |
---|
4716 | 4826 | |
---|
| 4827 | + if (obj.toParent == null) |
---|
| 4828 | + { |
---|
| 4829 | + obj.toParent = LA.newMatrix(); |
---|
| 4830 | + obj.fromParent = LA.newMatrix(); |
---|
| 4831 | + } |
---|
| 4832 | + |
---|
4717 | 4833 | LA.matTranslate(obj.toParent, i * scale, 0, 0); |
---|
4718 | 4834 | LA.matTranslateInv(obj.fromParent, -i * scale, 0, 0); |
---|
4719 | 4835 | } |
---|
.. | .. |
---|
5005 | 5121 | refreshContents(); |
---|
5006 | 5122 | } |
---|
5007 | 5123 | |
---|
| 5124 | + void ClearVersions() |
---|
| 5125 | + { |
---|
| 5126 | + group.selection.ClearVersions(); |
---|
| 5127 | + refreshContents(); |
---|
| 5128 | + } |
---|
| 5129 | + |
---|
5008 | 5130 | void FlipV(boolean flip) |
---|
5009 | 5131 | { |
---|
5010 | 5132 | group.selection.FlipV(flip); |
---|
.. | .. |
---|
5243 | 5365 | if (tps != null && tps.length > 0 && tps[0].getLastPathComponent() instanceof Camera) |
---|
5244 | 5366 | // a camera |
---|
5245 | 5367 | { |
---|
5246 | | - if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crash the camera because of invalid lightspace |
---|
| 5368 | + if (tps[0].getLastPathComponent() != Globals.theRenderer.LightCamera()) // Crashes the camera because of invalid lightspace |
---|
5247 | 5369 | { |
---|
5248 | 5370 | CameraPane.camerachangeframe = 0; // don't refuse it |
---|
5249 | 5371 | Globals.theRenderer.SetCamera((Camera) tps[0].getLastPathComponent()); |
---|
.. | .. |
---|
5276 | 5398 | flashSelectionButton.setEnabled(enabled); |
---|
5277 | 5399 | |
---|
5278 | 5400 | clearPanelButton.setEnabled(!listUI.isEmpty()); |
---|
| 5401 | + |
---|
| 5402 | + boolean allComposites = true; |
---|
| 5403 | + |
---|
| 5404 | + if (group.selection != null) |
---|
| 5405 | + for (Enumeration e = group.selection.elements(); e.hasMoreElements();) |
---|
| 5406 | + { |
---|
| 5407 | + Object next = e.nextElement(); |
---|
| 5408 | + if (!(next instanceof Composite)) // || (next instanceof GroupLeaf)) |
---|
| 5409 | + { |
---|
| 5410 | + allComposites = false; |
---|
| 5411 | + break; |
---|
| 5412 | + } |
---|
| 5413 | + } |
---|
| 5414 | + |
---|
| 5415 | + rootButton.setEnabled(true); // allComposites); |
---|
5279 | 5416 | } |
---|
5280 | 5417 | |
---|
5281 | 5418 | void refreshContents(boolean cp) |
---|
5282 | 5419 | { |
---|
| 5420 | + if (Globals.SHOWINFO) |
---|
5283 | 5421 | //if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info")) |
---|
5284 | 5422 | if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING) |
---|
5285 | 5423 | { |
---|
.. | .. |
---|
5290 | 5428 | Object3D child = (Object3D) group.selection.get(i); |
---|
5291 | 5429 | |
---|
5292 | 5430 | objEditor.AddInfo(child, this, true); |
---|
5293 | | - System.err.println("info : " + child.GetPath()); |
---|
| 5431 | +// System.err.println("info : " + child.GetPath()); |
---|
5294 | 5432 | } |
---|
5295 | 5433 | |
---|
5296 | 5434 | objEditor.SetText(); // jan 2014 |
---|
.. | .. |
---|
6173 | 6311 | private MenuItem lookAtItem; |
---|
6174 | 6312 | private MenuItem lookFromItem; |
---|
6175 | 6313 | private MenuItem switchViewItem; |
---|
6176 | | - private MenuItem cutItem; |
---|
| 6314 | + private JMenuItem cutItem; |
---|
6177 | 6315 | private MenuItem undoItem; |
---|
6178 | 6316 | private MenuItem redoItem; |
---|
6179 | 6317 | private JMenuItem duplicateItem; |
---|
6180 | | - private MenuItem cloneItem; |
---|
| 6318 | + private JMenuItem cloneItem; |
---|
6181 | 6319 | private MenuItem cloneSupportItem; |
---|
6182 | 6320 | private MenuItem overwriteGeoItem; |
---|
6183 | 6321 | private MenuItem overwriteMatItem; |
---|
.. | .. |
---|
6198 | 6336 | private MenuItem cloneGeometriesItem; |
---|
6199 | 6337 | private MenuItem shareGeometriesItem; |
---|
6200 | 6338 | private MenuItem mergeGeometriesItem; |
---|
6201 | | - private MenuItem copyItem; |
---|
| 6339 | + private JMenuItem copyItem; |
---|
6202 | 6340 | private MenuItem pasteItem; |
---|
6203 | | - private MenuItem pasteIntoItem; |
---|
6204 | | - private MenuItem pasteLinkItem; |
---|
6205 | | - private MenuItem pasteCloneItem; |
---|
6206 | | - private MenuItem pasteExpandItem; |
---|
6207 | | - private MenuItem deleteItem; |
---|
| 6341 | + private JMenuItem pasteIntoItem; |
---|
| 6342 | + private JMenuItem pasteLinkItem; |
---|
| 6343 | + private JMenuItem pasteCloneItem; |
---|
| 6344 | + private JMenuItem pasteExpandItem; |
---|
| 6345 | + private JMenuItem deleteItem; |
---|
6208 | 6346 | private MenuItem clearAllItem; |
---|
6209 | 6347 | private MenuItem genUVItem; |
---|
6210 | 6348 | private MenuItem genNormalsMESHItem; |
---|
.. | .. |
---|
6230 | 6368 | private MenuItem clipMeshItem; |
---|
6231 | 6369 | private MenuItem smoothMeshItem; |
---|
6232 | 6370 | private MenuItem clearMaterialsItem; |
---|
| 6371 | + private MenuItem clearVersionsItem; |
---|
6233 | 6372 | |
---|
6234 | 6373 | private MenuItem liveleavesItem; |
---|
6235 | 6374 | private MenuItem unliveleavesItem; |
---|
.. | .. |
---|
6253 | 6392 | private MenuItem maxTexturesItem; |
---|
6254 | 6393 | private MenuItem panoTexturesItem; |
---|
6255 | 6394 | |
---|
| 6395 | + private MenuItem textureRatioRItem; |
---|
| 6396 | + private MenuItem textureRatioGItem; |
---|
| 6397 | + private MenuItem textureRatioBItem; |
---|
6256 | 6398 | private MenuItem resetCentroidItem; |
---|
6257 | 6399 | private MenuItem resetCentroidXZItem; |
---|
6258 | 6400 | private MenuItem resetTransformItem; |
---|
6259 | 6401 | private MenuItem transformGeometryItem; |
---|
6260 | 6402 | private MenuItem transformChildrenItem; |
---|
6261 | 6403 | private MenuItem hideItem; |
---|
6262 | | - private MenuItem grabItem; |
---|
| 6404 | + private JMenuItem grabItem; |
---|
6263 | 6405 | private MenuItem backItem; |
---|
6264 | 6406 | private MenuItem frontItem; |
---|
6265 | 6407 | private MenuItem cameraItem; |
---|
.. | .. |
---|
6272 | 6414 | private MenuItem switchTransfoItem; |
---|
6273 | 6415 | private MenuItem morphItem; |
---|
6274 | 6416 | private MenuItem linkerItem; |
---|
6275 | | - private MenuItem ungroupItem; |
---|
| 6417 | + private JMenuItem ungroupItem; |
---|
6276 | 6418 | private MenuItem editItem; |
---|
6277 | 6419 | private MenuItem openWindowItem; |
---|
6278 | 6420 | private MenuItem editLeafItem; |
---|