Normand Briere
2019-09-02 c23a2a128cbd5eb94b1a11e3b3a34676cf681135
isWindows flag.
7 files modified
87 ■■■■ changed files
FileObject.java 13 ●●●●● patch | view | raw | blame | history
Grafreed.java 3 ●●●●● patch | view | raw | blame | history
GroupEditor.java 8 ●●●● patch | view | raw | blame | history
Mocap.java 5 ●●●●● patch | view | raw | blame | history
MocapEditor.java 5 ●●●●● patch | view | raw | blame | history
ObjEditor.java 47 ●●●● patch | view | raw | blame | history
RandomEditor.java 6 ●●●●● patch | view | raw | blame | history
FileObject.java
....@@ -17,6 +17,19 @@
1717 filecontent = null;
1818 }
1919
20
+ boolean HasBigData()
21
+ {
22
+ return false;
23
+ }
24
+
25
+ void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
26
+ {
27
+ }
28
+
29
+ void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
30
+ {
31
+ }
32
+
2033 boolean IsStatic()
2134 {
2235 return false; // ???? false;
Grafreed.java
....@@ -673,6 +673,8 @@
673673 PlayWord(word, 1);
674674 }
675675
676
+ static boolean isWindows;
677
+
676678 public static void main(String argv[])
677679 {
678680 String osArch = System.getProperty("os.arch");
....@@ -704,6 +706,7 @@
704706 // -Djava.library.path=/Users/nbriere/Projects/shared/lib
705707 if (jarfile.charAt(2) == ':')
706708 {
709
+ isWindows = true;
707710 command = "\"" + javaPath + "\" -Xmx1024m -Djava.library.path=" + jarpath;
708711 // On Windows systems, the path is /C:/
709712 jarfile = jarfile.substring(1, jarfile.length());
GroupEditor.java
....@@ -766,10 +766,10 @@
766766 shadowZItem = menu.add(new MenuItem("Shadow Blue"));
767767 shadowZItem.addActionListener(this);
768768
769
- if (Globals.ADVANCED)
770
- {
771769 attributeItem = menu.add(new MenuItem("Attribute"));
772770 attributeItem.addActionListener(this);
771
+ if (Globals.ADVANCED)
772
+ {
773773 menu.add("-");
774774 linkerItem = menu.add(new MenuItem("Linker"));
775775 linkerItem.addActionListener(this);
....@@ -2722,11 +2722,11 @@
27222722 if (!group.selection.isEmpty())
27232723 {
27242724 Composite csg = new GroupLeaf();
2725
+ group(csg);
27252726 csg.count = 5;
27262727 Composite child = new cGroup("Branch");
27272728 csg.addChild(child);
27282729 child.addChild(csg);
2729
- group(csg);
27302730 }
27312731 } else
27322732 if (source == doubleItem)
....@@ -2734,6 +2734,7 @@
27342734 if (!group.selection.isEmpty())
27352735 {
27362736 Composite csg = new GroupLeaf("Fork");
2737
+ group(csg);
27372738 csg.count = 5;
27382739 Composite child = new cGroup("Branch A");
27392740 csg.addChild(child);
....@@ -2741,7 +2742,6 @@
27412742 child = new cGroup("Branch B");
27422743 csg.addChild(child);
27432744 child.addChild(csg);
2744
- group(csg);
27452745 }
27462746 } else
27472747 if (source == tripleItem)
Mocap.java
....@@ -3992,6 +3992,11 @@
39923992 // GetObject().release(i);
39933993 }
39943994
3995
+ boolean HasBigData()
3996
+ {
3997
+ return skeleton != null;
3998
+ }
3999
+
39954000 public Object3D get(int i)
39964001 {
39974002 if (i != 0)
MocapEditor.java
....@@ -59,6 +59,11 @@
5959 SetupUI2(objEditor);
6060 }
6161
62
+ String GetSupportText()
63
+ {
64
+ return "Hip pos";
65
+ }
66
+
6267 void SetupUI2(ObjEditor oe)
6368 {
6469 /*
ObjEditor.java
....@@ -136,19 +136,19 @@
136136 {
137137 BufferedImage image;
138138
139
-// if (name.endsWith("jpg"))
140
-// {
141
-// try
142
-// {
143
-// // Much faster!
144
-// image = new sun.awt.image.codec.JPEGImageDecoderImpl(ObjEditor.class.getClassLoader().getResourceAsStream(name)).decodeAsBufferedImage();
145
-// }
146
-// catch (Exception e)
147
-// {
148
-// image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream(name));
149
-// }
150
-// }
151
-// else
139
+ if (!Grafreed.isWindows && name.endsWith("jpg"))
140
+ {
141
+ try
142
+ {
143
+ // Much faster!
144
+ image = new sun.awt.image.codec.JPEGImageDecoderImpl(ObjEditor.class.getClassLoader().getResourceAsStream(name)).decodeAsBufferedImage();
145
+ }
146
+ catch (Exception e)
147
+ {
148
+ image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream(name));
149
+ }
150
+ }
151
+ else
152152 image = javax.imageio.ImageIO.read(ObjEditor.class.getClassLoader().getResourceAsStream(name));
153153
154154 // if (image.getWidth() > 48 && image.getHeight() > 48)
....@@ -1341,6 +1341,11 @@
13411341 obj = o;
13421342 }
13431343 }
1344
+
1345
+ String GetSupportText()
1346
+ {
1347
+ return "Support";
1348
+ }
13441349
13451350 void SetupUI2(ObjEditor oe)
13461351 {
....@@ -1392,7 +1397,7 @@
13921397 randomCB = AddCheckBox(setupPanel2, "Random", copy.random);
13931398 randomCB.setToolTipText("Randomly Rewind (or Go back and forth)");
13941399
1395
- link2masterCB = AddCheckBox(setupPanel2, "Support", copy.link2master);
1400
+ link2masterCB = AddCheckBox(setupPanel2, GetSupportText(), copy.link2master);
13961401 link2masterCB.setToolTipText("Attach to support");
13971402
13981403 if (Globals.ADVANCED)
....@@ -4094,6 +4099,20 @@
40944099 if (event.getSource() == randomCB)
40954100 {
40964101 copy.random ^= true;
4102
+ if (this instanceof RandomEditor)
4103
+ {
4104
+ cGridBag itemPanel = ((RandomEditor)this).itemPanel;
4105
+ itemPanel.getComponent(0).setEnabled(!copy.random);
4106
+
4107
+ // Tooltip?
4108
+ if (copy.random)
4109
+ {
4110
+ }
4111
+ else
4112
+ {
4113
+ }
4114
+ }
4115
+
40974116 objEditor.refreshContents();
40984117 return;
40994118 }
RandomEditor.java
....@@ -58,12 +58,18 @@
5858 SetupUI2(objEditor);
5959 }
6060
61
+ String GetSupportText()
62
+ {
63
+ return "Show all";
64
+ }
65
+
6166 void SetupUI2(ObjEditor oe)
6267 {
6368 super.SetupUI2(oe);
6469 itemPanel = AddSlider(oe.ctrlPanel, "Item: ", 0, randomnode.Size()-1, randomnode.rndIndex);
6570
6671 itemField = (cNumberSlider)itemPanel.getComponent(1);
72
+ itemPanel.getComponent(0).setEnabled(!randomnode.random);
6773 oe.ctrlPanel.Return();
6874
6975 oe.ctrlPanel.Return();