Normand Briere
2019-07-28 a434119e65146fe53d612c28e1ee7af532d1b70a
GroupEditor.java
....@@ -23,6 +23,31 @@
2323 DragGestureListener, DragSourceListener, DropTargetListener,
2424 ItemListener // ListSelectionListener
2525 {
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
+
2651 //ObjEditor objEditor;
2752 public void closeUI2()
2853 {
....@@ -60,6 +85,12 @@
6085 this.copy = this.group = group;
6186 //selectees = this.group.selectees;
6287
88
+ if (copy.versions == null)
89
+ {
90
+ copy.versions = new byte[100][];
91
+ copy.versionindex = -1;
92
+ }
93
+
6394 if(ui)
6495 SetupUI(objEditor);
6596 }
....@@ -80,6 +111,14 @@
80111 SetupViews(objEditor);
81112
82113 ((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
+ }
83122 }
84123
85124 void CloneSelection(boolean supports)
....@@ -194,8 +233,8 @@
194233 // pasteExpandItem = menu.add(new MenuItem("Paste expand"));
195234 // pasteExpandItem.addActionListener(this);
196235 menu.add("-");
197
- clearItem = menu.add(new MenuItem("Clear"));
198
- clearItem.addActionListener(this);
236
+ deleteItem = menu.add(new MenuItem("Delete"));
237
+ deleteItem.addActionListener(this);
199238
200239 if (Globals.ADVANCED)
201240 {
....@@ -421,7 +460,7 @@
421460 genNormalsMESHItem.addActionListener(this);
422461 if (Globals.ADVANCED)
423462 {
424
- genNormalsMINEItem = menu.add(new MenuItem("My Normals"));
463
+ genNormalsMINEItem = menu.add(new MenuItem("Stitch Normals"));
425464 genNormalsMINEItem.addActionListener(this);
426465 }
427466 stripifyItem = menu.add(new MenuItem("Stripify"));
....@@ -514,10 +553,15 @@
514553 attachBumpItem.addActionListener(this);
515554 pigmentBumpItem = menu.add(new MenuItem("Pigment -> Bump"));
516555 pigmentBumpItem.addActionListener(this);
556
+ //embedTexturesItem
517557 detachPigmentItem = menu.add(new MenuItem("Detach Pigment"));
518558 detachPigmentItem.addActionListener(this);
519559 detachBumpItem = menu.add(new MenuItem("Detach Bump"));
520560 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);
521565 menu.add("-");
522566 sortbysizeItem = menu.add(new MenuItem("Sort by size"));
523567 sortbysizeItem.addActionListener(this);
....@@ -589,7 +633,7 @@
589633 */
590634 cGridBag copyOptionsPanel = new cGridBag();
591635
592
- copyOptionsPanel.preferredHeight = 1;
636
+ copyOptionsPanel.preferredHeight = 2;
593637
594638 //this.AddOptions(oe.toolbarPanel, oe.aConstraints);
595639
....@@ -669,31 +713,32 @@
669713 oe.toolbarPanel.add(snapobjectButton = new cButton("O+", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
670714 snapobjectButton.addActionListener(this);
671715 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");
672720 }
673721
674722 //oe.toolbarPanel.add(new JSeparator(SwingConstants.VERTICAL));
675723
676
- oe.toolbarPanel.add(twoButton = new cButton("|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
677
- 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");
678726 twoButton.addActionListener(this);
679727 this.fullscreenLayout = twoButton;
680728
681
- oe.toolbarPanel.add(fourButton = new cButton("-||", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
682
- fourButton.addActionListener(this);
683
- fourButton.setToolTipText("Show left panel only");
684
- oe.toolbarPanel.add(sixButton = new cButton("-|-|", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
685
- sixButton.setToolTipText("2-column layout left");
686
- sixButton.addActionListener(this);
687
- oe.toolbarPanel.add(threeButton = new cButton("|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
688
- 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");
689731 threeButton.addActionListener(this);
690
- oe.toolbarPanel.add(sevenButton = new cButton("-|-|-", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
691
- sevenButton.setToolTipText("3-column layout");
692
- 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);
693738 //
694739
695
- oe.toolbarPanel.add(rootButton = GetButton("icons/write.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
696
- 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");
697742 rootButton.addActionListener(this);
698743
699744 oe.toolbarPanel.add(closeButton = GetButton("icons/close-icon.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
....@@ -702,28 +747,30 @@
702747 //oe.treePanel.add(clearButton = new cButton("X"), oe.aConstraints);
703748 //clearButton.addActionListener(this);
704749
750
+ cGridBag row1 = new cGridBag();
751
+
705752 // INSERT
706
- oe.toolboxPanel.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
753
+ row1.add(gridButton = GetButton("icons/grid.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
707754 gridButton.setToolTipText("Create grid");
708755 gridButton.addActionListener(this);
709756
710
- oe.toolboxPanel.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
757
+ row1.add(boxButton = GetButton("icons/box.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
711758 boxButton.setToolTipText("Create box");
712759 boxButton.addActionListener(this);
713760
714
- oe.toolboxPanel.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
761
+ row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
715762 sphereButton.setToolTipText("Create sphere");
716763 sphereButton.addActionListener(this);
717764
718
- oe.toolboxPanel.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
765
+ row1.add(coneButton = GetButton("icons/cone.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
719766 coneButton.setToolTipText("Create cone");
720767 coneButton.addActionListener(this);
721768
722
- oe.toolboxPanel.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
769
+ row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
723770 torusButton.setToolTipText("Create torus");
724771 torusButton.addActionListener(this);
725772
726
- oe.toolboxPanel.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
773
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
727774 superButton.setToolTipText("Create superellipsoid");
728775 superButton.addActionListener(this);
729776
....@@ -734,50 +781,144 @@
734781 kleinButton.addActionListener(this);
735782 }
736783
737
- oe.toolboxPanel.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
784
+ row1.add(particlesButton = GetButton("icons/particles.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
738785 particlesButton.setToolTipText("Create particle system");
739786 particlesButton.addActionListener(this);
740787
741
- oe.toolboxPanel.Return();
788
+ oe.toolboxPanel.add(row1);
742789
743
- 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);
744793 groupButton.setToolTipText("Create group");
745794 groupButton.addActionListener(this);
746795
747
- oe.toolboxPanel.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
796
+ row2.add(compositeButton = GetButton("icons/composite.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
748797 compositeButton.setToolTipText("Create composite");
749798 compositeButton.addActionListener(this);
750799
751
- oe.toolboxPanel.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
800
+ row2.add(switchButton = GetButton("icons/switch.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
752801 switchButton.setToolTipText("Create item switcher");
753802 switchButton.addActionListener(this);
754803
755
- oe.toolboxPanel.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
804
+ row2.add(loopButton = GetButton("icons/loop.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
756805 loopButton.setToolTipText("Create loop");
757806 loopButton.addActionListener(this);
758807
759
- oe.toolboxPanel.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
808
+ row2.add(textureButton = GetButton("icons/texture.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
760809 textureButton.setToolTipText("Create texture");
761810 textureButton.addActionListener(this);
762811
763
- oe.toolboxPanel.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
812
+ row2.add(overlayButton = GetButton("icons/overlay.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
764813 overlayButton.setToolTipText("Create overlay");
765814 overlayButton.addActionListener(this);
766815
767
- 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);
768817 lightButton.setToolTipText("Create light");
769818 lightButton.addActionListener(this);
770819
771
- 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;)
772919 {
773
- oe.toolboxPanel.Return();
774
- oe.toolboxPanel.add(new cGridBag());
775
- oe.toolboxPanel.add(new cGridBag());
776
- oe.toolboxPanel.add(new cGridBag());
777
- oe.toolboxPanel.add(new cGridBag());
778
- oe.toolboxPanel.add(new cGridBag());
779
- oe.toolboxPanel.add(new cGridBag());
780
- oe.toolboxPanel.add(new cGridBag());
920
+ //oe.toolboxPanel.Return();
921
+ oe.toolboxPanel.add(new cGridBag());
781922 }
782923
783924 // EDIT panel
....@@ -834,12 +975,12 @@
834975
835976 oe.treePanel.add(copyOptionsPanel);
836977 oe.treePanel.Return();
837
- cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 10, 0);
838
- versionField = (cNumberSlider)sliderPane.getComponent(1);
978
+ cGridBag sliderPane = AddSlider(oe.treePanel, "Version", 0, 0, 0);
979
+ versionSlider = (cNumberSlider)sliderPane.getComponent(1);
839980 sliderPane.preferredHeight = 1;
840981
841
-// mainPanel.setDividerLocation(0.5); //1.0);
842
-// mainPanel.setResizeWeight(0.5);
982
+// mainPanel.setDividerLocation(0.1); //1.0);
983
+ mainPanel.setResizeWeight(0.4);
843984
844985 //jList.addListSelectionListener(this);
845986 oe.jTree.addTreeSelectionListener(this);
....@@ -847,7 +988,7 @@
847988 //jTree.setEditable(true);
848989 oe.jTree.setDragEnabled(true);
849990 //jTree.setPreferredSize(new Dimension(10,10));
850
- jSP.setPreferredSize(new Dimension(100,200));
991
+ //jSP.setPreferredSize(new Dimension(100,200));
851992
852993 oe.jTree.setCellRenderer(new cTreeModel.Renderer());
853994
....@@ -859,7 +1000,7 @@
8591000 dgr.addDragGestureListener(this);
8601001 }catch(Exception e) {}
8611002 */
862
- radio.layout = sevenButton;
1003
+ radio.layout = sixButton; // sevenButton;
8631004 oe.toolbarPanel.add(radioPanel); //, oe.aConstraints);
8641005 }
8651006
....@@ -1001,7 +1142,7 @@
10011142 }
10021143
10031144 radioButton.SetObject(obj);
1004
- radioButton.layout = sevenButton;
1145
+ radioButton.layout = sixButton; // sevenButton;
10051146 radioButton.SetCamera(cameraView.renderCamera, false);
10061147 radioButton.addActionListener(this);
10071148 radioPanel.add(radioButton);
....@@ -1681,6 +1822,16 @@
16811822 }
16821823 }
16831824 }
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
+ }
16841835
16851836 /**
16861837 * applyExample
....@@ -2109,6 +2260,23 @@
21092260 {
21102261 makeSomething(new Light());
21112262 } 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
21122280 if (source == csgItem)
21132281 {
21142282 group(new CSG());
....@@ -2194,7 +2362,7 @@
21942362 if (source == computeAOItem)
21952363 {
21962364 Globals.drawMode = CameraPane.OCCLUSION;
2197
- Globals.theRenderer.repaint();
2365
+ cameraView.repaint();
21982366 } else
21992367 if (source == recompileItem)
22002368 {
....@@ -2646,7 +2814,7 @@
26462814 {
26472815 StepAll();
26482816 } else
2649
- if (source == clearItem) // || event.getSource() == clearButton)
2817
+ if (source == deleteItem) // || event.getSource() == clearButton)
26502818 {
26512819 //int indices[] = jList.getSelectedIndices();
26522820 //for (int i = indices.length - 1; i >= 0; i--)
....@@ -3128,7 +3296,7 @@
31283296 for (Enumeration e = group.selection.elements(); e.hasMoreElements();)
31293297 {
31303298 obj = (Object3D)e.nextElement();
3131
- obj.SetBumpTexture(null);
3299
+ obj.ResetBumpTexture();
31323300 }
31333301
31343302 refreshContents();
....@@ -3142,6 +3310,31 @@
31423310 obj.SetBumpTexture(obj.GetPigmentTexture());
31433311 }
31443312
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
+
31453338 refreshContents();
31463339 } else
31473340 if (source == flashSelectionButton)
....@@ -3245,8 +3438,8 @@
32453438 // centralPanel.setVisible(true);
32463439 // XYZPanel.setVisible(true);
32473440 bigThree.ClearUI();
3441
+ bigThree.add(scenePanel);
32483442 bigThree.add(centralPanel);
3249
- bigThree.add(XYZPanel);
32503443 bigThree.FlushUI();
32513444
32523445 cameraView.requestFocusInWindow();
....@@ -3326,8 +3519,8 @@
33263519 // centralPanel.setVisible(true);
33273520 // XYZPanel.setVisible(false);
33283521 bigThree.ClearUI();
3329
- bigThree.add(scenePanel);
33303522 bigThree.add(centralPanel);
3523
+ bigThree.add(scenePanel);
33313524 bigThree.FlushUI();
33323525
33333526 cameraView.requestFocusInWindow();
....@@ -3541,8 +3734,10 @@
35413734 radio.layout.doClick();
35423735
35433736 ClearUnpinned();
3544
- SetPinStates(group.selection.size() > 0);
3545
- 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)
35463741 EditSelection(false);
35473742 keepparent = group.parent;
35483743 // PARENT = NULL or not???
....@@ -4136,7 +4331,7 @@
41364331
41374332 try
41384333 {
4139
- texturedata = Globals.theRenderer.GetTextureData(pigment, false, node.texres);
4334
+ texturedata = Globals.theRenderer.GetTextureData(tex, false, node.texres);
41404335 }
41414336 catch (Exception e)
41424337 {
....@@ -4613,6 +4808,12 @@
46134808
46144809 void EditSelection(boolean newWindow)
46154810 {
4811
+ if (group.selection == null)
4812
+ {
4813
+ EditElement(group, newWindow); // ? new
4814
+ return;
4815
+ }
4816
+
46164817 // aConstraints.gridy = 0;
46174818 for (int i=0; i<group.selection.size(); i++)
46184819 {
....@@ -4623,12 +4824,7 @@
46234824 Object3D elem = (Object3D)group.selection.elementAt(i);
46244825 if(elem != group || !newWindow)
46254826 {
4626
- // if (!(elem instanceof Composite))
4627
- // newWindow = false;
4628
- listUI.add(elem);
4629
- elem.openEditWindow(this, newWindow); //, false);
4630
- System.out.println("edit : " + elem);
4631
- elem.editWindow.refreshContents(true); // ? new
4827
+ EditElement(elem, newWindow); // ? new
46324828 }
46334829 }
46344830 }
....@@ -4772,7 +4968,7 @@
47724968
47734969 void refreshContents(boolean cp)
47744970 {
4775
- if (objectPanel.getSelectedIndex() == objectPanel.indexOfTab("Info"))
4971
+ if (objectPanel.getSelectedIndex() == 2) // objectPanel.indexOfTab("Info"))
47764972 if (!Globals.MOUSEDRAGGED && group.selection != null) // && !Globals.TIMERRUNNING)
47774973 {
47784974 objEditor.ClearInfo(); // .GetMaterial());
....@@ -5618,6 +5814,22 @@
56185814 cButton loopButton;
56195815 cButton textureButton;
56205816
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
+
56215833 cButton gridButton;
56225834 cButton boxButton;
56235835 cButton sphereButton;
....@@ -5681,7 +5893,7 @@
56815893 private MenuItem pasteLinkItem;
56825894 private MenuItem pasteCloneItem;
56835895 private MenuItem pasteExpandItem;
5684
- private MenuItem clearItem;
5896
+ private MenuItem deleteItem;
56855897 private MenuItem clearAllItem;
56865898 private MenuItem genUVItem;
56875899 private MenuItem genNormalsMESHItem;
....@@ -5765,6 +5977,8 @@
57655977 private MenuItem attachBumpItem;
57665978 private MenuItem detachBumpItem;
57675979 private MenuItem pigmentBumpItem;
5980
+ private MenuItem embedTexturesItem;
5981
+ private MenuItem deEmbedTexturesItem;
57685982
57695983 private MenuItem particleItem;
57705984 private MenuItem ragdollItem;