Normand Briere
2019-07-17 a5580a47d246c1272b10adba68070f6e13da5e41
Object3D.java
....@@ -24,6 +24,14 @@
2424
2525 private UUID uuid = UUID.randomUUID();
2626
27
+ // TEMPORARY for mocap undo. No need to be transient.
28
+ mocap.reader.BVHReader.BVHResult savebvh;
29
+ Object3D saveskeleton;
30
+ //
31
+
32
+ byte[] versions[] = new byte[100][];
33
+ int versionindex = -1;
34
+
2735 ScriptNode scriptnode;
2836
2937 void InitOthers()
....@@ -104,64 +112,173 @@
104112
105113 // transient boolean reduced; // for morph reduction
106114
107
-transient com.bulletphysics.linearmath.Transform cache; // for fast merge
108
-transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
115
+ transient com.bulletphysics.linearmath.Transform cache; // for fast merge
116
+ transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
109117
110
-transient Object3D transientsupport; // for cloning
111
-transient boolean transientlink2master;
118
+ transient Object3D transientsupport; // for cloning
119
+ transient boolean transientlink2master;
112120
113
-void SaveSupports()
114
-{
115
- if (blockloop)
116
- return;
117
-
118
- transientsupport = support;
119
- transientlink2master = link2master;
120
-
121
- support = null;
122
- link2master = false;
123
-
124
- if (bRep != null)
121
+ void SaveSupports()
125122 {
126
- bRep.SaveSupports();
123
+ if (blockloop)
124
+ return;
125
+
126
+ transientsupport = support;
127
+ transientlink2master = link2master;
128
+
129
+ support = null;
130
+ link2master = false;
131
+
132
+ if (bRep != null)
133
+ {
134
+ bRep.SaveSupports();
135
+ }
136
+
137
+ for (int i = 0; i < Size(); i++)
138
+ {
139
+ Object3D child = (Object3D) get(i);
140
+ if (child == null)
141
+ continue;
142
+ blockloop = true;
143
+ child.SaveSupports();
144
+ blockloop = false;
145
+ }
127146 }
128
-
129
- for (int i = 0; i < Size(); i++)
147
+
148
+ void RestoreSupports()
130149 {
131
- Object3D child = (Object3D) get(i);
132
- if (child == null)
133
- continue;
150
+ if (blockloop)
151
+ return;
152
+
153
+ support = transientsupport;
154
+ link2master = transientlink2master;
155
+ transientsupport = null;
156
+ transientlink2master = false;
157
+
158
+ if (bRep != null)
159
+ {
160
+ bRep.RestoreSupports();
161
+ }
162
+
163
+ for (int i = 0; i < Size(); i++)
164
+ {
165
+ Object3D child = (Object3D) get(i);
166
+ if (child == null)
167
+ continue;
168
+ blockloop = true;
169
+ child.RestoreSupports();
170
+ blockloop = false;
171
+ }
172
+ }
173
+
174
+ void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
175
+ {
176
+ Object3D o;
177
+
178
+ if (hashtable.containsKey(GetUUID()))
179
+ {
180
+ o = hashtable.get(GetUUID());
181
+
182
+ Grafreed.Assert(this.bRep == o.bRep);
183
+ //if (this.bRep != null)
184
+ // assert(this.bRep.support == o.transientrep);
185
+ if (this.support != null)
186
+ assert(this.support.bRep == o.transientrep);
187
+ }
188
+ else
189
+ {
190
+ o = new Object3D("copy of " + this.name);
191
+
192
+ hashtable.put(GetUUID(), o);
193
+ }
194
+
195
+ if (!blockloop)
196
+ {
197
+ blockloop = true;
198
+
199
+ for (int i=0; i<Size(); i++)
200
+ {
201
+ get(i).ExtractBigData(hashtable);
202
+ }
203
+
204
+ blockloop = false;
205
+ }
206
+
207
+ ExtractBigData(o);
208
+ }
209
+
210
+ void ExtractBigData(Object3D o)
211
+ {
212
+ if (o.bRep != null)
213
+ Grafreed.Assert(o.bRep == this.bRep);
214
+
215
+ o.bRep = this.bRep;
216
+// July 2019 if (this.bRep != null)
217
+// {
218
+// o.transientrep = this.bRep.support;
219
+// o.bRep.support = null;
220
+// }
221
+ o.selection = this.selection;
222
+
223
+ if (this.support != null)
224
+ {
225
+ if (o.transientrep != null)
226
+ Grafreed.Assert(o.transientrep == this.support.bRep);
227
+
228
+ o.transientrep = this.support.bRep;
229
+ this.support.bRep = null;
230
+ }
231
+
232
+ // o.support = this.support;
233
+ // o.fileparent = this.fileparent;
234
+ // if (this.bRep != null)
235
+ // o.bRep = this.bRep.support;
236
+
237
+ this.bRep = null;
238
+ // if (this.bRep != null)
239
+ // this.bRep.support = null;
240
+ // this.support = null;
241
+ // this.fileparent = null;
242
+ }
243
+
244
+ void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
245
+ {
246
+ if (!hashtable.containsKey(GetUUID()))
247
+ return;
248
+
249
+ Object3D o = hashtable.get(GetUUID());
250
+
251
+ RestoreBigData(o);
252
+
253
+ if (blockloop)
254
+ return;
255
+
134256 blockloop = true;
135
- child.SaveSupports();
257
+
258
+ //hashtable.remove(GetUUID());
259
+
260
+ for (int i=0; i<Size(); i++)
261
+ {
262
+ get(i).RestoreBigData(hashtable);
263
+ }
264
+
136265 blockloop = false;
137266 }
138
-}
139267
140
-void RestoreSupports()
141
-{
142
- if (blockloop)
143
- return;
144
-
145
- support = transientsupport;
146
- link2master = transientlink2master;
147
- transientsupport = null;
148
- transientlink2master = false;
149
-
150
- if (bRep != null)
268
+ void RestoreBigData(Object3D o)
151269 {
152
- bRep.RestoreSupports();
270
+ this.bRep = o.bRep;
271
+ if (this.support != null && o.transientrep != null)
272
+ {
273
+ this.support.bRep = o.transientrep;
274
+ }
275
+
276
+ this.selection = o.selection;
277
+// July 2019 if (this.bRep != null)
278
+// this.bRep.support = o.transientrep;
279
+ // this.support = o.support;
280
+ // this.fileparent = o.fileparent;
153281 }
154
-
155
- for (int i = 0; i < Size(); i++)
156
- {
157
- Object3D child = (Object3D) get(i);
158
- if (child == null)
159
- continue;
160
- blockloop = true;
161
- child.RestoreSupports();
162
- blockloop = false;
163
- }
164
-}
165282
166283 // MOCAP SUPPORT
167284 double tx,ty,tz,rx,ry,rz;
....@@ -486,12 +603,14 @@
486603 toParent = LA.newMatrix();
487604 fromParent = LA.newMatrix();
488605 }
606
+
489607 if (toParentMarked == null)
490608 {
491609 if (maxcount != 1)
492610 {
493611 new Exception().printStackTrace();
494612 }
613
+
495614 toParentMarked = LA.newMatrix();
496615 fromParentMarked = LA.newMatrix();
497616 }
....@@ -802,7 +921,7 @@
802921
803922 if (marked && Globals.isLIVE() && live &&
804923 //TEMP21aug2018
805
- (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
924
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
806925 currentframe != Globals.framecount)
807926 {
808927 currentframe = Globals.framecount;
....@@ -814,7 +933,8 @@
814933
815934 boolean changedir = random && Math.random() < 0.01; // && !link2master;
816935
817
- if (transformcount*factor > maxcount || (step == 1 && changedir))
936
+ if (transformcount*factor >= maxcount && (rewind || random) ||
937
+ (step == 1 && changedir))
818938 {
819939 countdown = 1;
820940 delay = speedup?8:1;
....@@ -886,6 +1006,7 @@
8861006 if (material == null || material.multiply)
8871007 return true;
8881008
1009
+ // Transparent objects are dynamic because we have to sort the triangles.
8891010 return material.opacity > 0.99;
8901011 }
8911012
....@@ -1286,6 +1407,7 @@
12861407 toParent = LA.newMatrix();
12871408 fromParent = LA.newMatrix();
12881409 }
1410
+
12891411 LA.matCopy(other.toParent, toParent);
12901412 LA.matCopy(other.fromParent, fromParent);
12911413
....@@ -2307,6 +2429,10 @@
23072429 }
23082430 */
23092431 }
2432
+ else
2433
+ {
2434
+ //((ObjEditor)editWindow).SetupUI2(null);
2435
+ }
23102436 }
23112437
23122438 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -2348,6 +2474,14 @@
23482474 {
23492475 editWindow.refreshContents();
23502476 }
2477
+ else
2478
+ {
2479
+ if (manipWindow != null)
2480
+ {
2481
+ manipWindow.refreshContents();
2482
+ }
2483
+ }
2484
+
23512485 //if (parent != null)
23522486 //parent.refreshEditWindow();
23532487 }
....@@ -2632,6 +2766,18 @@
26322766 //Touch();
26332767 }
26342768
2769
+ void GenNormalsMeshS()
2770
+ {
2771
+ selection.GenNormalsMesh();
2772
+// for (int i=0; i<selection.size(); i++)
2773
+// {
2774
+// Object3D selectee = (Object3D) selection.elementAt(i);
2775
+// selectee.GenNormals(crease);
2776
+// }
2777
+
2778
+ //Touch();
2779
+ }
2780
+
26352781 void ClearColorsS()
26362782 {
26372783 selection.ClearColors();
....@@ -2763,6 +2909,24 @@
27632909 if (child == null)
27642910 continue;
27652911 child.GenNormals(crease);
2912
+// Children().release(i);
2913
+ }
2914
+ blockloop = false;
2915
+ }
2916
+
2917
+ void GenNormalsMesh()
2918
+ {
2919
+ if (blockloop)
2920
+ return;
2921
+
2922
+ blockloop = true;
2923
+ GenNormalsMesh0();
2924
+ for (int i = 0; i < Children().Size(); i++)
2925
+ {
2926
+ Object3D child = (Object3D) Children().get(i); // reserve(i);
2927
+ if (child == null)
2928
+ continue;
2929
+ child.GenNormalsMesh();
27662930 // Children().release(i);
27672931 }
27682932 blockloop = false;
....@@ -2931,6 +3095,15 @@
29313095 if (bRep != null)
29323096 {
29333097 bRep.GenerateNormals(crease);
3098
+ Touch();
3099
+ }
3100
+ }
3101
+
3102
+ void GenNormalsMesh0()
3103
+ {
3104
+ if (bRep != null)
3105
+ {
3106
+ bRep.GenerateNormalsMesh();
29343107 Touch();
29353108 }
29363109 }
....@@ -3385,7 +3558,8 @@
33853558 if (blockloop)
33863559 return;
33873560
3388
- if (marked || (bRep != null && material != null)) // borderline...
3561
+ if (//marked || // does not make sense
3562
+ (bRep != null || material != null)) // borderline...
33893563 live = h;
33903564
33913565 for (int i = 0; i < Size(); i++)
....@@ -3406,7 +3580,8 @@
34063580 return;
34073581
34083582 //if (bRep != null)
3409
- if (marked || (bRep != null && material != null)) // borderline...
3583
+ if (//marked || // does not make sense
3584
+ (bRep != null || material != null)) // borderline...
34103585 link2master = h;
34113586
34123587 for (int i = 0; i < Size(); i++)
....@@ -3426,7 +3601,8 @@
34263601 if (blockloop)
34273602 return;
34283603
3429
- if (marked || (bRep != null && material != null)) // borderline...
3604
+ if (//marked || // does not make sense
3605
+ (bRep != null || material != null)) // borderline...
34303606 hide = h;
34313607
34323608 for (int i = 0; i < Size(); i++)
....@@ -3446,7 +3622,7 @@
34463622 if (blockloop)
34473623 return;
34483624
3449
- if (bRep != null && material != null) // borderline...
3625
+ if (bRep != null || material != null) // borderline...
34503626 marked = h;
34513627
34523628 for (int i = 0; i < Size(); i++)
....@@ -3456,6 +3632,46 @@
34563632 continue;
34573633 blockloop = true;
34583634 child.MarkLeaves(h);
3635
+ blockloop = false;
3636
+ // release(i);
3637
+ }
3638
+ }
3639
+
3640
+ void RewindLeaves(boolean h)
3641
+ {
3642
+ if (blockloop)
3643
+ return;
3644
+
3645
+ if (bRep != null || material != null) // borderline...
3646
+ rewind = h;
3647
+
3648
+ for (int i = 0; i < Size(); i++)
3649
+ {
3650
+ Object3D child = (Object3D) get(i); // reserve(i);
3651
+ if (child == null)
3652
+ continue;
3653
+ blockloop = true;
3654
+ child.RewindLeaves(h);
3655
+ blockloop = false;
3656
+ // release(i);
3657
+ }
3658
+ }
3659
+
3660
+ void RandomLeaves(boolean h)
3661
+ {
3662
+ if (blockloop)
3663
+ return;
3664
+
3665
+ if (bRep != null || material != null) // borderline...
3666
+ random = h;
3667
+
3668
+ for (int i = 0; i < Size(); i++)
3669
+ {
3670
+ Object3D child = (Object3D) get(i); // reserve(i);
3671
+ if (child == null)
3672
+ continue;
3673
+ blockloop = true;
3674
+ child.RandomLeaves(h);
34593675 blockloop = false;
34603676 // release(i);
34613677 }
....@@ -4233,6 +4449,55 @@
42334449 }
42344450 }
42354451
4452
+ void RepairSOV()
4453
+ {
4454
+ if (blockloop)
4455
+ return;
4456
+
4457
+ String texname = this.GetPigmentTexture();
4458
+
4459
+ if (texname.startsWith("sov"))
4460
+ {
4461
+ String[] s = texname.split("/");
4462
+
4463
+ String[] sname = s[1].split("Color.pn");
4464
+
4465
+ texname = sname[0];
4466
+
4467
+ if (sname.length > 1)
4468
+ {
4469
+ texname += "Color.jpg";
4470
+ }
4471
+
4472
+ this.SetPigmentTexture("sov/" + texname);
4473
+ }
4474
+
4475
+ texname = this.GetBumpTexture();
4476
+
4477
+ if (texname.startsWith("sov"))
4478
+ {
4479
+ String[] s = texname.split("/");
4480
+
4481
+ String[] sname = s[1].split("Bump.pn");
4482
+
4483
+ texname = sname[0];
4484
+
4485
+ if (sname.length > 1)
4486
+ {
4487
+ texname += "Bump.jpg";
4488
+ }
4489
+
4490
+ this.SetBumpTexture("sov/" + texname);
4491
+ }
4492
+
4493
+ for (int i=0; i<Size(); i++)
4494
+ {
4495
+ blockloop = true;
4496
+ get(i).RepairSOV();
4497
+ blockloop = false;
4498
+ }
4499
+ }
4500
+
42364501 void RepairTexture()
42374502 {
42384503 if (this instanceof FileObject || blockloop)
....@@ -4747,6 +5012,14 @@
47475012 }
47485013 }
47495014
5015
+ ObjEditor GetWindow()
5016
+ {
5017
+ if (editWindow != null)
5018
+ return editWindow;
5019
+
5020
+ return manipWindow;
5021
+ }
5022
+
47505023 cTreePath Select(int indexcount, boolean deselect)
47515024 {
47525025 if (hide || dontselect)
....@@ -4783,10 +5056,11 @@
47835056 if (leaf != null)
47845057 {
47855058 cTreePath tp = new cTreePath(this, leaf);
4786
- if (editWindow != null)
5059
+ ObjEditor window = GetWindow();
5060
+ if (window != null)
47875061 {
47885062 //System.out.println("editWindow = " + editWindow + " vs " + this);
4789
- editWindow.Select(tp, deselect, true);
5063
+ window.Select(tp, deselect, true);
47905064 }
47915065
47925066 return tp;
....@@ -4803,6 +5077,7 @@
48035077
48045078 if (child == null)
48055079 continue;
5080
+
48065081 if (child.HasTransparency() && child.size() != 0)
48075082 {
48085083 cTreePath leaf = child.Select(indexcount, deselect);
....@@ -4812,9 +5087,10 @@
48125087 if (leaf != null)
48135088 {
48145089 cTreePath tp = new cTreePath(this, leaf);
4815
- if (editWindow != null)
5090
+ ObjEditor window = GetWindow();
5091
+ if (window != null)
48165092 {
4817
- editWindow.Select(tp, deselect, true);
5093
+ window.Select(tp, deselect, true);
48185094 }
48195095
48205096 return tp;
....@@ -5456,12 +5732,23 @@
54565732 boolean NeedSupport()
54575733 {
54585734 return
5459
- CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
5735
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
54605736 // PROBLEM with CROWD!!
54615737 && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
54625738 }
54635739
54645740 static boolean DEBUG_SELECTION = false;
5741
+
5742
+ boolean IsLive()
5743
+ {
5744
+ if (live)
5745
+ return true;
5746
+
5747
+ if (parent == null)
5748
+ return false;
5749
+
5750
+ return parent.IsLive();
5751
+ }
54655752
54665753 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
54675754 {
....@@ -5524,7 +5811,7 @@
55245811 support = support;
55255812
55265813 //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5527
- boolean usecalllists = false; // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5814
+ boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
55285815
55295816 if (!usecalllists && bRep != null && bRep.displaylist > 0)
55305817 {
....@@ -5544,10 +5831,12 @@
55445831 boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
55455832
55465833 if (!selectmode && //display.DrawMode() != display.SELECTION &&
5547
- (touched || (bRep != null && bRep.displaylist <= 0)))
5834
+ //(touched || (bRep != null && bRep.displaylist <= 0)))
5835
+ (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && Globals.COMPUTESHADOWWHENLIVE)) // || (bRep != null && bRep.displaylist <= 0)))
55485836 {
55495837 Globals.lighttouched = true;
55505838 } // all panes...
5839
+
55515840 //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
55525841 if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
55535842 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5675,6 +5964,7 @@
56755964 if (GetBRep() != null)
56765965 {
56775966 display.NextIndex();
5967
+
56785968 // vertex color conflict : gl.glCallList(list);
56795969 DrawNode(display, root, selected);
56805970 if (this instanceof BezierPatch)
....@@ -5715,16 +6005,27 @@
57156005 tex = GetTextures();
57166006 }
57176007
5718
- boolean failed = false;
6008
+ boolean failedPigment = false;
6009
+ boolean failedBump = false;
57196010
57206011 try
57216012 {
5722
- display.BindTextures(tex, texres);
6013
+ display.BindPigmentTexture(tex, texres);
57236014 }
57246015 catch (Exception e)
57256016 {
57266017 System.err.println("FAILED: " + this);
5727
- failed = true;
6018
+ failedPigment = true;
6019
+ }
6020
+
6021
+ try
6022
+ {
6023
+ display.BindBumpTexture(tex, texres);
6024
+ }
6025
+ catch (Exception e)
6026
+ {
6027
+ //System.err.println("FAILED: " + this);
6028
+ failedBump = true;
57286029 }
57296030
57306031 if (!compiled)
....@@ -5747,8 +6048,11 @@
57476048 }
57486049 }
57496050
5750
- if (!failed)
5751
- display.ReleaseTextures(tex);
6051
+ if (!failedBump)
6052
+ display.ReleaseBumpTexture(tex);
6053
+
6054
+ if (!failedPigment)
6055
+ display.ReleasePigmentTexture(tex);
57526056
57536057 display.PopMaterial(this, selected);
57546058 }
....@@ -6121,6 +6425,11 @@
61216425 // dec 2012
61226426 new Exception().printStackTrace();
61236427 return;
6428
+ }
6429
+
6430
+ if (dontselect)
6431
+ {
6432
+ //bRep.GenerateNormalsMINE();
61246433 }
61256434
61266435 display.DrawGeometry(bRep, flipV, selectmode);
....@@ -6973,7 +7282,7 @@
69737282 spot.translate(32, 32);
69747283 spotw = spot.x + spot.width;
69757284 spoth = spot.y + spot.height;
6976
- info.g.setColor(Color.blue);
7285
+ info.g.setColor(Color.cyan);
69777286 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
69787287 // if (CameraPane.Xmin > spot.x)
69797288 // {
....@@ -6991,11 +7300,12 @@
69917300 // {
69927301 // CameraPane.Ymax = spoth;
69937302 // }
6994
- // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);
6995
- //info.g.drawLine(spotw, spoth, spotw - 15, spoth);
7303
+ // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
7304
+ //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
69967305 spot.translate(0, -32);
6997
- info.g.setColor(Color.green);
7306
+ info.g.setColor(Color.yellow);
69987307 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7308
+ info.g.setColor(Color.green);
69997309 // if (CameraPane.Xmin > spot.x)
70007310 // {
70017311 // CameraPane.Xmin = spot.x;
....@@ -7012,8 +7322,8 @@
70127322 // {
70137323 // CameraPane.Ymax = spoth;
70147324 // }
7015
- info.g.drawArc(boundary.x, boundary.y,
7016
- boundary.width, boundary.height, 0, 360);
7325
+ info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY,
7326
+ (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360);
70177327 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
70187328 // if (CameraPane.Xmin > boundary.x)
70197329 // {
....@@ -7313,19 +7623,20 @@
73137623 switch (info.pane.RenderCamera().viewCode)
73147624 {
73157625 case 3: // '\001'
7316
- if (modified)
7626
+ if (modified || opposite)
73177627 {
73187628 //LA.matScale(toParent, 1, hScale, vScale);
73197629 LA.matScale(toParent, totalScale, 1, 1);
73207630 } // vScale, 1);
73217631 else
73227632 {
7633
+ // EXCEPTION!
73237634 LA.matScale(toParent, totalScale, totalScale, totalScale);
73247635 } // vScale, 1);
73257636 break;
73267637
73277638 case 2: // '\002'
7328
- if (modified)
7639
+ if (modified || opposite)
73297640 {
73307641 //LA.matScale(toParent, hScale, 1, vScale);
73317642 LA.matScale(toParent, 1, totalScale, 1);
....@@ -7336,7 +7647,7 @@
73367647 break;
73377648
73387649 case 1: // '\003'
7339
- if (modified)
7650
+ if (modified || opposite)
73407651 {
73417652 //LA.matScale(toParent, hScale, vScale, 1);
73427653 LA.matScale(toParent, 1, 1, totalScale);
....@@ -7556,6 +7867,10 @@
75567867 editWindow = null;
75577868 } // ?
75587869 }
7870
+ else
7871
+ {
7872
+ //editWindow.closeUI();
7873
+ }
75597874 }
75607875
75617876 boolean root; // patch for edit windows
....@@ -7567,7 +7882,7 @@
75677882 /*transient*/ cVector2[] projectedVertices = new cVector2[0];
75687883
75697884 Object3D /*Composite*/ parent;
7570
- Object3D /*Composite*/ fileparent;
7885
+ Object3D /*Composite*/ fileparent; // In the case of FileObject
75717886
75727887 double[][] toParent; // dynamic matrix
75737888 double[][] fromParent;
....@@ -7713,6 +8028,10 @@
77138028 }
77148029
77158030 transient ObjEditor editWindow;
8031
+ transient ObjEditor manipWindow;
8032
+
8033
+ transient boolean pinned;
8034
+
77168035 transient ObjectUI objectUI;
77178036 public static int povDepth = 0;
77188037 private static cVector tbMin = new cVector();