Normand Briere
2019-08-15 33504fc9a180903aace77613264550754fba5706
GroupEditor.java
....@@ -928,7 +928,7 @@
928928
929929 JTabbedPane resourcecontainer;
930930 cGridBag currenttab;
931
- boolean added; // patch for jar
931
+ //boolean added; // patch for jar
932932
933933 int tabcount = 0;
934934 int colcount = 0;
....@@ -940,17 +940,19 @@
940940
941941 public void ResourceCallBack(String[] path)
942942 {
943
- for (int i = 0; i < path.length; i++)
944
- System.out.print(path[i] + "/");
945
- System.out.println();
943
+// for (int i = 0; i < path.length; i++)
944
+// System.out.print(path[i] + "/");
945
+// System.out.println();
946946
947947 if (//rowcount == 0 ||
948
- path.length == 1)
948
+ path.length == 1 && !path[0].equals("") && !path[0].equals(".DS_Store"))
949949 {
950950 currenttab = new cGridBag();
951
- added = false;
952951 String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
953952 currenttab.setName(tabname);
953
+ //added = false;
954
+ resourcecontainer.add(currenttab);
955
+ resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname);
954956 rowcount = 1;
955957 colcount = 0;
956958 texturecount = 0;
....@@ -958,12 +960,11 @@
958960
959961 if (path.length > 2 && path[2].toLowerCase().endsWith(".jpg"))
960962 {
961
- if (!added)
963
+ //if (!added)
962964 {
963
- added = true;
964
- resourcecontainer.add(currenttab);
965
+ //added = true;
965966 String tabname = path[0]; // String.valueOf((char)('A'+tabcount));
966
- resourcecontainer.setToolTipTextAt(tabcount++, "Texture Group " + tabname);
967
+ currenttab = (cGridBag)resourcecontainer.getComponentAt(resourcecontainer.indexOfTab(tabname));
967968 }
968969
969970 AddTextureButton(path[0], path[1], path[2], texturecount++, currenttab);
....@@ -1186,6 +1187,10 @@
11861187 boxButton.setToolTipText("Create box");
11871188 boxButton.addActionListener(this);
11881189
1190
+ row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1191
+ superButton.setToolTipText("Create superellipsoid");
1192
+ superButton.addActionListener(this);
1193
+
11891194 row1.add(sphereButton = GetButton("icons/sphere.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
11901195 sphereButton.setToolTipText("Create sphere");
11911196 sphereButton.addActionListener(this);
....@@ -1197,10 +1202,6 @@
11971202 row1.add(torusButton = GetButton("icons/torus.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
11981203 torusButton.setToolTipText("Create torus");
11991204 torusButton.addActionListener(this);
1200
-
1201
- row1.add(superButton = GetButton("icons/super.png", !Grafreed.NIMBUSLAF)); //, oe.aConstraints);
1202
- superButton.setToolTipText("Create superellipsoid");
1203
- superButton.addActionListener(this);
12041205
12051206 if (Globals.ADVANCED)
12061207 {
....@@ -2164,7 +2165,11 @@
21642165 shadow.material = new cMaterial(obj.material);
21652166 shadow.material.diffuse = 0.0001f;
21662167 shadow.material.specular = 0.0001f;
2167
- //shadow.projectedVertices[1].x = 300;
2168
+ shadow.material.opacity = 0.75f;
2169
+
2170
+ AllocProjectedVertices(shadow);
2171
+
2172
+ shadow.projectedVertices[1].x = 300;
21682173
21692174 makeSomething(shadow);
21702175 }