.. | .. |
---|
784 | 784 | // NumberSlider vDivsField; |
---|
785 | 785 | // JCheckBox endcaps; |
---|
786 | 786 | JCheckBox liveCB; |
---|
| 787 | + JCheckBox selectCB; |
---|
787 | 788 | JCheckBox hideCB; |
---|
788 | 789 | JCheckBox link2masterCB; |
---|
789 | 790 | JCheckBox markCB; |
---|
.. | .. |
---|
986 | 987 | |
---|
987 | 988 | liveCB = AddCheckBox(setupPanel, "Live", copy.live); |
---|
988 | 989 | liveCB.setToolTipText("Animate object"); |
---|
| 990 | + selectCB = AddCheckBox(setupPanel, "Select", !copy.dontselect); |
---|
| 991 | + selectCB.setToolTipText("Make object selectable"); |
---|
| 992 | +// Return(); |
---|
989 | 993 | hideCB = AddCheckBox(setupPanel, "Hide", copy.hide); |
---|
990 | 994 | hideCB.setToolTipText("Hide object"); |
---|
991 | | -// Return(); |
---|
992 | 995 | markCB = AddCheckBox(setupPanel, "Mark", copy.marked); |
---|
993 | 996 | markCB.setToolTipText("Set the animation target transform"); |
---|
994 | 997 | |
---|
.. | .. |
---|
1028 | 1031 | oe.ctrlPanel.add(commandsPanel); |
---|
1029 | 1032 | oe.ctrlPanel.Return(); |
---|
1030 | 1033 | |
---|
1031 | | - pushPanel = AddSlider(oe.ctrlPanel, "Push", -10, 10, 0, 1); |
---|
| 1034 | + pushPanel = AddSlider(oe.ctrlPanel, "Push", -1, 1, copy.NORMALPUSH, 1.1); // To have the buttons |
---|
1032 | 1035 | normalpushField = (cNumberSlider)pushPanel.getComponent(1); |
---|
1033 | 1036 | //Return(); |
---|
1034 | 1037 | |
---|
.. | .. |
---|
3007 | 3010 | { |
---|
3008 | 3011 | copy.live ^= true; |
---|
3009 | 3012 | return; |
---|
| 3013 | + } else if (event.getSource() == selectCB) |
---|
| 3014 | + { |
---|
| 3015 | + copy.dontselect ^= true; |
---|
| 3016 | + return; |
---|
3010 | 3017 | } else if (event.getSource() == hideCB) |
---|
3011 | 3018 | { |
---|
3012 | 3019 | copy.hide ^= true; |
---|
.. | .. |
---|
3588 | 3595 | } |
---|
3589 | 3596 | |
---|
3590 | 3597 | if (normalpushField != null) |
---|
3591 | | - copy.NORMALPUSH = (float)normalpushField.getFloat()/1000; |
---|
| 3598 | + copy.NORMALPUSH = (float)normalpushField.getFloat()/100; |
---|
3592 | 3599 | } |
---|
3593 | 3600 | |
---|
3594 | 3601 | void SnapObject() |
---|
.. | .. |
---|
4055 | 4062 | } |
---|
4056 | 4063 | } |
---|
4057 | 4064 | } |
---|
| 4065 | + |
---|
4058 | 4066 | LoadGFDThread loadGFDThread; |
---|
4059 | 4067 | |
---|
4060 | 4068 | void ReadGFD(String fullname, iCallBack cb) |
---|
.. | .. |
---|
4075 | 4083 | try |
---|
4076 | 4084 | { |
---|
4077 | 4085 | java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
4078 | | - java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4086 | + java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream); |
---|
| 4087 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream); |
---|
4079 | 4088 | |
---|
4080 | 4089 | readobj = (Object3D) p.readObject(); |
---|
4081 | 4090 | istream.close(); |
---|
.. | .. |
---|
4083 | 4092 | readobj.ResetDisplayList(); |
---|
4084 | 4093 | } catch (Exception e) |
---|
4085 | 4094 | { |
---|
4086 | | - e.printStackTrace(); |
---|
| 4095 | + //e.printStackTrace(); |
---|
| 4096 | + try |
---|
| 4097 | + { |
---|
| 4098 | + java.io.FileInputStream istream = new java.io.FileInputStream(fullname); |
---|
| 4099 | + java.io.ObjectInputStream p = new java.io.ObjectInputStream(istream); |
---|
| 4100 | + |
---|
| 4101 | + readobj = (Object3D) p.readObject(); |
---|
| 4102 | + istream.close(); |
---|
| 4103 | + |
---|
| 4104 | + readobj.ResetDisplayList(); |
---|
| 4105 | + } catch (Exception e2) |
---|
| 4106 | + { |
---|
| 4107 | + e2.printStackTrace(); |
---|
| 4108 | + } |
---|
4087 | 4109 | } |
---|
4088 | 4110 | // catch(java.io.StreamCorruptedException e) { e.printStackTrace(); } |
---|
4089 | 4111 | // catch(java.io.IOException e) { System.out.println("IOexception"); e.printStackTrace(); } |
---|
.. | .. |
---|
4287 | 4309 | try |
---|
4288 | 4310 | { |
---|
4289 | 4311 | FileOutputStream ostream = new FileOutputStream(lastname); |
---|
4290 | | - ObjectOutputStream p = new ObjectOutputStream(ostream); |
---|
| 4312 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4313 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4291 | 4314 | |
---|
4292 | 4315 | p.writeObject(copy); |
---|
4293 | 4316 | p.flush(); |
---|
4294 | 4317 | |
---|
| 4318 | + zstream.close(); |
---|
4295 | 4319 | ostream.close(); |
---|
4296 | 4320 | |
---|
4297 | 4321 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|
.. | .. |
---|
4301 | 4325 | { |
---|
4302 | 4326 | } |
---|
4303 | 4327 | } |
---|
| 4328 | + |
---|
4304 | 4329 | String lastname; |
---|
4305 | 4330 | |
---|
4306 | 4331 | void saveAs() |
---|
.. | .. |
---|
4410 | 4435 | try |
---|
4411 | 4436 | { |
---|
4412 | 4437 | FileOutputStream ostream = new FileOutputStream(filename); |
---|
4413 | | - // ?? java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
4414 | | - ObjectOutputStream p = new ObjectOutputStream(/*z*/ostream); |
---|
| 4438 | + java.util.zip.GZIPOutputStream zstream = new java.util.zip.GZIPOutputStream(ostream); |
---|
| 4439 | + ObjectOutputStream p = new ObjectOutputStream(zstream); |
---|
4415 | 4440 | |
---|
4416 | 4441 | Object3D objectparent = obj.parent; |
---|
4417 | 4442 | obj.parent = null; |
---|
.. | .. |
---|
4428 | 4453 | p.writeObject(object); |
---|
4429 | 4454 | p.flush(); |
---|
4430 | 4455 | |
---|
| 4456 | + zstream.close(); |
---|
4431 | 4457 | ostream.close(); |
---|
4432 | | - // zstream.close(); |
---|
4433 | 4458 | |
---|
4434 | 4459 | // group.selection.get(0).parent = parent; |
---|
4435 | 4460 | //FileOutputStream fos = new FileOutputStream(fullname); |
---|