Normand Briere
2019-07-19 e79247ef52a0bbb3864d46bb1e2c716005b3ecf3
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,178 @@
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
+ o.versions = this.versions;
223
+ o.versionindex = this.versionindex;
224
+
225
+ if (this.support != null)
226
+ {
227
+ if (o.transientrep != null)
228
+ Grafreed.Assert(o.transientrep == this.support.bRep);
229
+
230
+ o.transientrep = this.support.bRep;
231
+ this.support.bRep = null;
232
+ }
233
+
234
+ // o.support = this.support;
235
+ // o.fileparent = this.fileparent;
236
+ // if (this.bRep != null)
237
+ // o.bRep = this.bRep.support;
238
+
239
+ this.bRep = null;
240
+ // if (this.bRep != null)
241
+ // this.bRep.support = null;
242
+ // this.support = null;
243
+ // this.fileparent = null;
244
+ }
245
+
246
+ void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
247
+ {
248
+ if (!hashtable.containsKey(GetUUID()))
249
+ return;
250
+
251
+ Object3D o = hashtable.get(GetUUID());
252
+
253
+ RestoreBigData(o);
254
+
255
+ if (blockloop)
256
+ return;
257
+
134258 blockloop = true;
135
- child.SaveSupports();
259
+
260
+ //hashtable.remove(GetUUID());
261
+
262
+ for (int i=0; i<Size(); i++)
263
+ {
264
+ get(i).RestoreBigData(hashtable);
265
+ }
266
+
136267 blockloop = false;
137268 }
138
-}
139269
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)
270
+ void RestoreBigData(Object3D o)
151271 {
152
- bRep.RestoreSupports();
272
+ this.bRep = o.bRep;
273
+ if (this.support != null && o.transientrep != null)
274
+ {
275
+ this.support.bRep = o.transientrep;
276
+ }
277
+
278
+ this.selection = o.selection;
279
+
280
+ this.versions = o.versions;
281
+ this.versionindex = o.versionindex;
282
+// July 2019 if (this.bRep != null)
283
+// this.bRep.support = o.transientrep;
284
+ // this.support = o.support;
285
+ // this.fileparent = o.fileparent;
153286 }
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
-}
165287
166288 // MOCAP SUPPORT
167289 double tx,ty,tz,rx,ry,rz;
....@@ -486,12 +608,14 @@
486608 toParent = LA.newMatrix();
487609 fromParent = LA.newMatrix();
488610 }
611
+
489612 if (toParentMarked == null)
490613 {
491614 if (maxcount != 1)
492615 {
493616 new Exception().printStackTrace();
494617 }
618
+
495619 toParentMarked = LA.newMatrix();
496620 fromParentMarked = LA.newMatrix();
497621 }
....@@ -802,7 +926,7 @@
802926
803927 if (marked && Globals.isLIVE() && live &&
804928 //TEMP21aug2018
805
- (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
929
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
806930 currentframe != Globals.framecount)
807931 {
808932 currentframe = Globals.framecount;
....@@ -814,7 +938,8 @@
814938
815939 boolean changedir = random && Math.random() < 0.01; // && !link2master;
816940
817
- if (transformcount*factor > maxcount || (step == 1 && changedir))
941
+ if (transformcount*factor >= maxcount && (rewind || random) ||
942
+ (step == 1 && changedir))
818943 {
819944 countdown = 1;
820945 delay = speedup?8:1;
....@@ -886,6 +1011,7 @@
8861011 if (material == null || material.multiply)
8871012 return true;
8881013
1014
+ // Transparent objects are dynamic because we have to sort the triangles.
8891015 return material.opacity > 0.99;
8901016 }
8911017
....@@ -1286,6 +1412,7 @@
12861412 toParent = LA.newMatrix();
12871413 fromParent = LA.newMatrix();
12881414 }
1415
+
12891416 LA.matCopy(other.toParent, toParent);
12901417 LA.matCopy(other.fromParent, fromParent);
12911418
....@@ -2307,6 +2434,10 @@
23072434 }
23082435 */
23092436 }
2437
+ else
2438
+ {
2439
+ //((ObjEditor)editWindow).SetupUI2(null);
2440
+ }
23102441 }
23112442
23122443 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -2348,6 +2479,14 @@
23482479 {
23492480 editWindow.refreshContents();
23502481 }
2482
+ else
2483
+ {
2484
+ if (manipWindow != null)
2485
+ {
2486
+ manipWindow.refreshContents();
2487
+ }
2488
+ }
2489
+
23512490 //if (parent != null)
23522491 //parent.refreshEditWindow();
23532492 }
....@@ -2632,6 +2771,18 @@
26322771 //Touch();
26332772 }
26342773
2774
+ void GenNormalsMeshS()
2775
+ {
2776
+ selection.GenNormalsMesh();
2777
+// for (int i=0; i<selection.size(); i++)
2778
+// {
2779
+// Object3D selectee = (Object3D) selection.elementAt(i);
2780
+// selectee.GenNormals(crease);
2781
+// }
2782
+
2783
+ //Touch();
2784
+ }
2785
+
26352786 void ClearColorsS()
26362787 {
26372788 selection.ClearColors();
....@@ -2763,6 +2914,24 @@
27632914 if (child == null)
27642915 continue;
27652916 child.GenNormals(crease);
2917
+// Children().release(i);
2918
+ }
2919
+ blockloop = false;
2920
+ }
2921
+
2922
+ void GenNormalsMesh()
2923
+ {
2924
+ if (blockloop)
2925
+ return;
2926
+
2927
+ blockloop = true;
2928
+ GenNormalsMesh0();
2929
+ for (int i = 0; i < Children().Size(); i++)
2930
+ {
2931
+ Object3D child = (Object3D) Children().get(i); // reserve(i);
2932
+ if (child == null)
2933
+ continue;
2934
+ child.GenNormalsMesh();
27662935 // Children().release(i);
27672936 }
27682937 blockloop = false;
....@@ -2935,11 +3104,20 @@
29353104 }
29363105 }
29373106
3107
+ void GenNormalsMesh0()
3108
+ {
3109
+ if (bRep != null)
3110
+ {
3111
+ bRep.GenerateNormalsMesh();
3112
+ Touch();
3113
+ }
3114
+ }
3115
+
29383116 void GenNormalsMINE0()
29393117 {
29403118 if (bRep != null)
29413119 {
2942
- bRep.GenerateNormalsMINE();
3120
+ bRep.MergeNormals(); //.GenerateNormalsMINE();
29433121 Touch();
29443122 }
29453123 }
....@@ -3385,7 +3563,8 @@
33853563 if (blockloop)
33863564 return;
33873565
3388
- if (marked || (bRep != null && material != null)) // borderline...
3566
+ if (//marked || // does not make sense
3567
+ (bRep != null || material != null)) // borderline...
33893568 live = h;
33903569
33913570 for (int i = 0; i < Size(); i++)
....@@ -3406,7 +3585,8 @@
34063585 return;
34073586
34083587 //if (bRep != null)
3409
- if (marked || (bRep != null && material != null)) // borderline...
3588
+ if (//marked || // does not make sense
3589
+ (bRep != null || material != null)) // borderline...
34103590 link2master = h;
34113591
34123592 for (int i = 0; i < Size(); i++)
....@@ -3426,7 +3606,8 @@
34263606 if (blockloop)
34273607 return;
34283608
3429
- if (marked || (bRep != null && material != null)) // borderline...
3609
+ if (//marked || // does not make sense
3610
+ (bRep != null || material != null)) // borderline...
34303611 hide = h;
34313612
34323613 for (int i = 0; i < Size(); i++)
....@@ -3446,7 +3627,7 @@
34463627 if (blockloop)
34473628 return;
34483629
3449
- if (bRep != null && material != null) // borderline...
3630
+ if (bRep != null || material != null) // borderline...
34503631 marked = h;
34513632
34523633 for (int i = 0; i < Size(); i++)
....@@ -3456,6 +3637,46 @@
34563637 continue;
34573638 blockloop = true;
34583639 child.MarkLeaves(h);
3640
+ blockloop = false;
3641
+ // release(i);
3642
+ }
3643
+ }
3644
+
3645
+ void RewindLeaves(boolean h)
3646
+ {
3647
+ if (blockloop)
3648
+ return;
3649
+
3650
+ if (bRep != null || material != null) // borderline...
3651
+ rewind = h;
3652
+
3653
+ for (int i = 0; i < Size(); i++)
3654
+ {
3655
+ Object3D child = (Object3D) get(i); // reserve(i);
3656
+ if (child == null)
3657
+ continue;
3658
+ blockloop = true;
3659
+ child.RewindLeaves(h);
3660
+ blockloop = false;
3661
+ // release(i);
3662
+ }
3663
+ }
3664
+
3665
+ void RandomLeaves(boolean h)
3666
+ {
3667
+ if (blockloop)
3668
+ return;
3669
+
3670
+ if (bRep != null || material != null) // borderline...
3671
+ random = h;
3672
+
3673
+ for (int i = 0; i < Size(); i++)
3674
+ {
3675
+ Object3D child = (Object3D) get(i); // reserve(i);
3676
+ if (child == null)
3677
+ continue;
3678
+ blockloop = true;
3679
+ child.RandomLeaves(h);
34593680 blockloop = false;
34603681 // release(i);
34613682 }
....@@ -4233,6 +4454,55 @@
42334454 }
42344455 }
42354456
4457
+ void RepairSOV()
4458
+ {
4459
+ if (blockloop)
4460
+ return;
4461
+
4462
+ String texname = this.GetPigmentTexture();
4463
+
4464
+ if (texname.startsWith("sov"))
4465
+ {
4466
+ String[] s = texname.split("/");
4467
+
4468
+ String[] sname = s[1].split("Color.pn");
4469
+
4470
+ texname = sname[0];
4471
+
4472
+ if (sname.length > 1)
4473
+ {
4474
+ texname += "Color.jpg";
4475
+ }
4476
+
4477
+ this.SetPigmentTexture("sov/" + texname);
4478
+ }
4479
+
4480
+ texname = this.GetBumpTexture();
4481
+
4482
+ if (texname.startsWith("sov"))
4483
+ {
4484
+ String[] s = texname.split("/");
4485
+
4486
+ String[] sname = s[1].split("Bump.pn");
4487
+
4488
+ texname = sname[0];
4489
+
4490
+ if (sname.length > 1)
4491
+ {
4492
+ texname += "Bump.jpg";
4493
+ }
4494
+
4495
+ this.SetBumpTexture("sov/" + texname);
4496
+ }
4497
+
4498
+ for (int i=0; i<Size(); i++)
4499
+ {
4500
+ blockloop = true;
4501
+ get(i).RepairSOV();
4502
+ blockloop = false;
4503
+ }
4504
+ }
4505
+
42364506 void RepairTexture()
42374507 {
42384508 if (this instanceof FileObject || blockloop)
....@@ -4747,6 +5017,14 @@
47475017 }
47485018 }
47495019
5020
+ ObjEditor GetWindow()
5021
+ {
5022
+ if (editWindow != null)
5023
+ return editWindow;
5024
+
5025
+ return manipWindow;
5026
+ }
5027
+
47505028 cTreePath Select(int indexcount, boolean deselect)
47515029 {
47525030 if (hide || dontselect)
....@@ -4783,10 +5061,11 @@
47835061 if (leaf != null)
47845062 {
47855063 cTreePath tp = new cTreePath(this, leaf);
4786
- if (editWindow != null)
5064
+ ObjEditor window = GetWindow();
5065
+ if (window != null)
47875066 {
47885067 //System.out.println("editWindow = " + editWindow + " vs " + this);
4789
- editWindow.Select(tp, deselect, true);
5068
+ window.Select(tp, deselect, true);
47905069 }
47915070
47925071 return tp;
....@@ -4803,6 +5082,7 @@
48035082
48045083 if (child == null)
48055084 continue;
5085
+
48065086 if (child.HasTransparency() && child.size() != 0)
48075087 {
48085088 cTreePath leaf = child.Select(indexcount, deselect);
....@@ -4812,9 +5092,10 @@
48125092 if (leaf != null)
48135093 {
48145094 cTreePath tp = new cTreePath(this, leaf);
4815
- if (editWindow != null)
5095
+ ObjEditor window = GetWindow();
5096
+ if (window != null)
48165097 {
4817
- editWindow.Select(tp, deselect, true);
5098
+ window.Select(tp, deselect, true);
48185099 }
48195100
48205101 return tp;
....@@ -5456,12 +5737,23 @@
54565737 boolean NeedSupport()
54575738 {
54585739 return
5459
- CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
5740
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
54605741 // PROBLEM with CROWD!!
54615742 && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
54625743 }
54635744
54645745 static boolean DEBUG_SELECTION = false;
5746
+
5747
+ boolean IsLive()
5748
+ {
5749
+ if (live)
5750
+ return true;
5751
+
5752
+ if (parent == null)
5753
+ return false;
5754
+
5755
+ return parent.IsLive();
5756
+ }
54655757
54665758 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
54675759 {
....@@ -5524,7 +5816,7 @@
55245816 support = support;
55255817
55265818 //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);
5819
+ boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
55285820
55295821 if (!usecalllists && bRep != null && bRep.displaylist > 0)
55305822 {
....@@ -5544,10 +5836,12 @@
55445836 boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
55455837
55465838 if (!selectmode && //display.DrawMode() != display.SELECTION &&
5547
- (touched || (bRep != null && bRep.displaylist <= 0)))
5839
+ //(touched || (bRep != null && bRep.displaylist <= 0)))
5840
+ (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && Globals.COMPUTESHADOWWHENLIVE)) // || (bRep != null && bRep.displaylist <= 0)))
55485841 {
55495842 Globals.lighttouched = true;
55505843 } // all panes...
5844
+
55515845 //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
55525846 if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
55535847 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5675,6 +5969,7 @@
56755969 if (GetBRep() != null)
56765970 {
56775971 display.NextIndex();
5972
+
56785973 // vertex color conflict : gl.glCallList(list);
56795974 DrawNode(display, root, selected);
56805975 if (this instanceof BezierPatch)
....@@ -5715,16 +6010,27 @@
57156010 tex = GetTextures();
57166011 }
57176012
5718
- boolean failed = false;
6013
+ boolean failedPigment = false;
6014
+ boolean failedBump = false;
57196015
57206016 try
57216017 {
5722
- display.BindTextures(tex, texres);
6018
+ display.BindPigmentTexture(tex, texres);
57236019 }
57246020 catch (Exception e)
57256021 {
57266022 System.err.println("FAILED: " + this);
5727
- failed = true;
6023
+ failedPigment = true;
6024
+ }
6025
+
6026
+ try
6027
+ {
6028
+ display.BindBumpTexture(tex, texres);
6029
+ }
6030
+ catch (Exception e)
6031
+ {
6032
+ //System.err.println("FAILED: " + this);
6033
+ failedBump = true;
57286034 }
57296035
57306036 if (!compiled)
....@@ -5747,8 +6053,11 @@
57476053 }
57486054 }
57496055
5750
- if (!failed)
5751
- display.ReleaseTextures(tex);
6056
+ if (!failedBump)
6057
+ display.ReleaseBumpTexture(tex);
6058
+
6059
+ if (!failedPigment)
6060
+ display.ReleasePigmentTexture(tex);
57526061
57536062 display.PopMaterial(this, selected);
57546063 }
....@@ -6121,6 +6430,11 @@
61216430 // dec 2012
61226431 new Exception().printStackTrace();
61236432 return;
6433
+ }
6434
+
6435
+ if (dontselect)
6436
+ {
6437
+ //bRep.GenerateNormalsMINE();
61246438 }
61256439
61266440 display.DrawGeometry(bRep, flipV, selectmode);
....@@ -6973,7 +7287,7 @@
69737287 spot.translate(32, 32);
69747288 spotw = spot.x + spot.width;
69757289 spoth = spot.y + spot.height;
6976
- info.g.setColor(Color.blue);
7290
+ info.g.setColor(Color.cyan);
69777291 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
69787292 // if (CameraPane.Xmin > spot.x)
69797293 // {
....@@ -6991,11 +7305,12 @@
69917305 // {
69927306 // CameraPane.Ymax = spoth;
69937307 // }
6994
- // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);
6995
- //info.g.drawLine(spotw, spoth, spotw - 15, spoth);
7308
+ // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
7309
+ //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
69967310 spot.translate(0, -32);
6997
- info.g.setColor(Color.green);
7311
+ info.g.setColor(Color.yellow);
69987312 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7313
+ info.g.setColor(Color.green);
69997314 // if (CameraPane.Xmin > spot.x)
70007315 // {
70017316 // CameraPane.Xmin = spot.x;
....@@ -7012,8 +7327,8 @@
70127327 // {
70137328 // CameraPane.Ymax = spoth;
70147329 // }
7015
- info.g.drawArc(boundary.x, boundary.y,
7016
- boundary.width, boundary.height, 0, 360);
7330
+ info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY,
7331
+ (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360);
70177332 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
70187333 // if (CameraPane.Xmin > boundary.x)
70197334 // {
....@@ -7313,19 +7628,20 @@
73137628 switch (info.pane.RenderCamera().viewCode)
73147629 {
73157630 case 3: // '\001'
7316
- if (modified)
7631
+ if (modified || opposite)
73177632 {
73187633 //LA.matScale(toParent, 1, hScale, vScale);
73197634 LA.matScale(toParent, totalScale, 1, 1);
73207635 } // vScale, 1);
73217636 else
73227637 {
7638
+ // EXCEPTION!
73237639 LA.matScale(toParent, totalScale, totalScale, totalScale);
73247640 } // vScale, 1);
73257641 break;
73267642
73277643 case 2: // '\002'
7328
- if (modified)
7644
+ if (modified || opposite)
73297645 {
73307646 //LA.matScale(toParent, hScale, 1, vScale);
73317647 LA.matScale(toParent, 1, totalScale, 1);
....@@ -7336,7 +7652,7 @@
73367652 break;
73377653
73387654 case 1: // '\003'
7339
- if (modified)
7655
+ if (modified || opposite)
73407656 {
73417657 //LA.matScale(toParent, hScale, vScale, 1);
73427658 LA.matScale(toParent, 1, 1, totalScale);
....@@ -7556,6 +7872,10 @@
75567872 editWindow = null;
75577873 } // ?
75587874 }
7875
+ else
7876
+ {
7877
+ //editWindow.closeUI();
7878
+ }
75597879 }
75607880
75617881 boolean root; // patch for edit windows
....@@ -7567,7 +7887,7 @@
75677887 /*transient*/ cVector2[] projectedVertices = new cVector2[0];
75687888
75697889 Object3D /*Composite*/ parent;
7570
- Object3D /*Composite*/ fileparent;
7890
+ Object3D /*Composite*/ fileparent; // In the case of FileObject
75717891
75727892 double[][] toParent; // dynamic matrix
75737893 double[][] fromParent;
....@@ -7713,6 +8033,10 @@
77138033 }
77148034
77158035 transient ObjEditor editWindow;
8036
+ transient ObjEditor manipWindow;
8037
+
8038
+ transient boolean pinned;
8039
+
77168040 transient ObjectUI objectUI;
77178041 public static int povDepth = 0;
77188042 private static cVector tbMin = new cVector();