Normand Briere
2019-08-01 c49ad213b600f844e9070cb09390c3e6d3d13db4
Object3D.java
....@@ -24,6 +24,17 @@
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
+ String skyboxname;
33
+ String skyboxext;
34
+
35
+ Object3D versions[];
36
+ int versionindex = -1;
37
+
2738 ScriptNode scriptnode;
2839
2940 void InitOthers()
....@@ -104,125 +115,178 @@
104115
105116 // transient boolean reduced; // for morph reduction
106117
107
-transient com.bulletphysics.linearmath.Transform cache; // for fast merge
108
-transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
118
+ transient com.bulletphysics.linearmath.Transform cache; // for fast merge
119
+ transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
109120
110
-transient Object3D transientsupport; // for cloning
111
-transient boolean transientlink2master;
121
+ transient Object3D transientsupport; // for cloning
122
+ transient boolean transientlink2master;
112123
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)
124
+ void SaveSupports()
125125 {
126
- bRep.SaveSupports();
126
+ if (blockloop)
127
+ return;
128
+
129
+ transientsupport = support;
130
+ transientlink2master = link2master;
131
+
132
+ support = null;
133
+ link2master = false;
134
+
135
+ if (bRep != null)
136
+ {
137
+ bRep.SaveSupports();
138
+ }
139
+
140
+ for (int i = 0; i < Size(); i++)
141
+ {
142
+ Object3D child = (Object3D) get(i);
143
+ if (child == null)
144
+ continue;
145
+ blockloop = true;
146
+ child.SaveSupports();
147
+ blockloop = false;
148
+ }
127149 }
128
-
129
- for (int i = 0; i < Size(); i++)
130
- {
131
- Object3D child = (Object3D) get(i);
132
- if (child == null)
133
- continue;
134
- blockloop = true;
135
- child.SaveSupports();
136
- blockloop = false;
137
- }
138
-}
139150
140
-void RestoreSupports()
141
-{
142
- if (blockloop)
143
- return;
151
+ void RestoreSupports()
152
+ {
153
+ if (blockloop)
154
+ return;
144155
145
- support = transientsupport;
146
- link2master = transientlink2master;
147
- transientsupport = null;
148
- transientlink2master = false;
149
-
150
- if (bRep != null)
151
- {
152
- bRep.RestoreSupports();
153
- }
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
-}
156
+ support = transientsupport;
157
+ link2master = transientlink2master;
158
+ transientsupport = null;
159
+ transientlink2master = false;
165160
166
-void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
167
-{
168
- if (hashtable.containsKey(GetUUID()))
161
+ if (bRep != null)
162
+ {
163
+ bRep.RestoreSupports();
164
+ }
165
+
166
+ for (int i = 0; i < Size(); i++)
167
+ {
168
+ Object3D child = (Object3D) get(i);
169
+ if (child == null)
170
+ continue;
171
+ blockloop = true;
172
+ child.RestoreSupports();
173
+ blockloop = false;
174
+ }
175
+ }
176
+
177
+ void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
169178 {
179
+ Object3D o;
180
+
181
+ if (hashtable.containsKey(GetUUID()))
182
+ {
183
+ o = hashtable.get(GetUUID());
184
+
185
+ Grafreed.Assert(this.bRep == o.bRep);
186
+ //if (this.bRep != null)
187
+ // assert(this.bRep.support == o.transientrep);
188
+ if (this.support != null)
189
+ assert(this.support.bRep == o.transientrep);
190
+ }
191
+ else
192
+ {
193
+ o = new Object3D("copy of " + this.name);
194
+
195
+ hashtable.put(GetUUID(), o);
196
+ }
197
+
198
+ if (!blockloop)
199
+ {
200
+ blockloop = true;
201
+
202
+ for (int i=0; i<Size(); i++)
203
+ {
204
+ get(i).ExtractBigData(hashtable);
205
+ }
206
+
207
+ blockloop = false;
208
+ }
209
+
210
+ ExtractBigData(o);
211
+ }
212
+
213
+ void ExtractBigData(Object3D o)
214
+ {
215
+ if (o.bRep != null)
216
+ Grafreed.Assert(o.bRep == this.bRep);
217
+
218
+ o.bRep = this.bRep;
219
+// July 2019 if (this.bRep != null)
220
+// {
221
+// o.transientrep = this.bRep.support;
222
+// o.bRep.support = null;
223
+// }
224
+ o.selection = this.selection;
225
+ o.versions = this.versions;
226
+ o.versionindex = this.versionindex;
227
+
228
+ if (this.support != null)
229
+ {
230
+ if (o.transientrep != null)
231
+ Grafreed.Assert(o.transientrep == this.support.bRep);
232
+
233
+ o.transientrep = this.support.bRep;
234
+ this.support.bRep = null;
235
+ }
236
+
237
+ // o.support = this.support;
238
+ // o.fileparent = this.fileparent;
239
+ // if (this.bRep != null)
240
+ // o.bRep = this.bRep.support;
241
+
242
+ this.bRep = null;
243
+ // if (this.bRep != null)
244
+ // this.bRep.support = null;
245
+ // this.support = null;
246
+ // this.fileparent = null;
247
+ }
248
+
249
+ void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
250
+ {
251
+ if (!hashtable.containsKey(GetUUID()))
252
+ return;
253
+
170254 Object3D o = hashtable.get(GetUUID());
171255
172
- assert(this.bRep == o.bRep);
173
- if (this.bRep != null)
174
- assert(this.bRep.support == o.transientrep);
175
-
176
- return;
177
- }
178
-
179
- Object3D o = new Object3D();
180
- o.bRep = this.bRep;
181
- if (this.bRep != null)
182
- {
183
- o.transientrep = this.bRep.support;
184
- o.bRep.support = null;
185
- }
186
-
187
-// o.support = this.support;
188
-// o.fileparent = this.fileparent;
189
-// if (this.bRep != null)
190
-// o.bRep = this.bRep.support;
191
-
192
- hashtable.put(GetUUID(), o);
193
-
194
- this.bRep = null;
195
-// if (this.bRep != null)
196
-// this.bRep.support = null;
197
-// this.support = null;
198
-// this.fileparent = null;
199
-
200
- for (int i=0; i<Size(); i++)
201
- {
202
- get(i).ExtractBigData(hashtable);
203
- }
204
-}
256
+ RestoreBigData(o);
205257
206
-void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
207
-{
208
- if (!hashtable.containsKey(GetUUID()))
209
- return;
210
-
211
- Object3D o = hashtable.get(GetUUID());
212
-
213
- this.bRep = o.bRep;
214
- if (this.bRep != null)
215
- this.bRep.support = o.transientrep;
216
-// this.support = o.support;
217
-// this.fileparent = o.fileparent;
218
-
219
- hashtable.remove(GetUUID());
220
-
221
- for (int i=0; i<Size(); i++)
222
- {
223
- get(i).RestoreBigData(hashtable);
258
+ if (blockloop)
259
+ return;
260
+
261
+ blockloop = true;
262
+
263
+ //hashtable.remove(GetUUID());
264
+
265
+ for (int i=0; i<Size(); i++)
266
+ {
267
+ get(i).RestoreBigData(hashtable);
268
+ }
269
+
270
+ blockloop = false;
224271 }
225
-}
272
+
273
+ void RestoreBigData(Object3D o)
274
+ {
275
+ this.bRep = o.bRep;
276
+ if (this.support != null && o.transientrep != null)
277
+ {
278
+ this.support.bRep = o.transientrep;
279
+ }
280
+
281
+ this.selection = o.selection;
282
+
283
+ this.versions = o.versions;
284
+ this.versionindex = o.versionindex;
285
+// July 2019 if (this.bRep != null)
286
+// this.bRep.support = o.transientrep;
287
+ // this.support = o.support;
288
+ // this.fileparent = o.fileparent;
289
+ }
226290
227291 // MOCAP SUPPORT
228292 double tx,ty,tz,rx,ry,rz;
....@@ -365,6 +429,7 @@
365429 }
366430
367431 boolean live = false;
432
+ transient boolean keepdontselect;
368433 boolean dontselect = false;
369434 boolean hide = false;
370435 boolean link2master = false; // performs reset support/master at each frame
....@@ -547,12 +612,14 @@
547612 toParent = LA.newMatrix();
548613 fromParent = LA.newMatrix();
549614 }
615
+
550616 if (toParentMarked == null)
551617 {
552618 if (maxcount != 1)
553619 {
554620 new Exception().printStackTrace();
555621 }
622
+
556623 toParentMarked = LA.newMatrix();
557624 fromParentMarked = LA.newMatrix();
558625 }
....@@ -863,7 +930,7 @@
863930
864931 if (marked && Globals.isLIVE() && live &&
865932 //TEMP21aug2018
866
- (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
933
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
867934 currentframe != Globals.framecount)
868935 {
869936 currentframe = Globals.framecount;
....@@ -875,7 +942,8 @@
875942
876943 boolean changedir = random && Math.random() < 0.01; // && !link2master;
877944
878
- if (transformcount*factor > maxcount || (step == 1 && changedir))
945
+ if (transformcount*factor >= maxcount && (rewind || random) ||
946
+ (step == 1 && changedir))
879947 {
880948 countdown = 1;
881949 delay = speedup?8:1;
....@@ -947,6 +1015,10 @@
9471015 if (material == null || material.multiply)
9481016 return true;
9491017
1018
+ if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000)
1019
+ return false;
1020
+
1021
+ // Transparent objects are dynamic because we have to sort the triangles.
9501022 return material.opacity > 0.99;
9511023 }
9521024
....@@ -1347,6 +1419,7 @@
13471419 toParent = LA.newMatrix();
13481420 fromParent = LA.newMatrix();
13491421 }
1422
+
13501423 LA.matCopy(other.toParent, toParent);
13511424 LA.matCopy(other.fromParent, fromParent);
13521425
....@@ -2368,6 +2441,10 @@
23682441 }
23692442 */
23702443 }
2444
+ else
2445
+ {
2446
+ //((ObjEditor)editWindow).SetupUI2(null);
2447
+ }
23712448 }
23722449
23732450 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -2409,6 +2486,14 @@
24092486 {
24102487 editWindow.refreshContents();
24112488 }
2489
+ else
2490
+ {
2491
+ if (manipWindow != null)
2492
+ {
2493
+ manipWindow.refreshContents();
2494
+ }
2495
+ }
2496
+
24122497 //if (parent != null)
24132498 //parent.refreshEditWindow();
24142499 }
....@@ -2488,7 +2573,8 @@
24882573 private static final int editSelf = 1;
24892574 private static final int editChild = 2;
24902575
2491
- void drawEditHandles(ClickInfo info, int level)
2576
+ void drawEditHandles(//ClickInfo info,
2577
+ int level)
24922578 {
24932579 if (level == 0)
24942580 {
....@@ -2496,7 +2582,8 @@
24962582 return;
24972583
24982584 Object3D selectee;
2499
- for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(info, level + 1))
2585
+ for (java.util.Enumeration e = selection.elements(); e.hasMoreElements(); selectee.drawEditHandles(//info,
2586
+ level + 1))
25002587 {
25012588 selectee = (Object3D) e.nextElement();
25022589 }
....@@ -2504,19 +2591,22 @@
25042591 } else
25052592 {
25062593 //super.
2507
- drawEditHandles0(info, level + 1);
2594
+ drawEditHandles0(//info,
2595
+ level + 1);
25082596 }
25092597 }
25102598
2511
- boolean doEditClick(ClickInfo info, int level)
2599
+ boolean doEditClick(//ClickInfo info,
2600
+ int level)
25122601 {
25132602 doSomething = 0;
25142603 if (level == 0)
25152604 {
2516
- return doParentClick(info);
2605
+ return doParentClick(); //info);
25172606 }
25182607 if (//super.
2519
- doEditClick0(info, level))
2608
+ doEditClick0(//info,
2609
+ level))
25202610 {
25212611 doSomething = 1;
25222612 return true;
....@@ -2526,7 +2616,7 @@
25262616 }
25272617 }
25282618
2529
- boolean doParentClick(ClickInfo info)
2619
+ boolean doParentClick() //ClickInfo info)
25302620 {
25312621 if (selection == null)
25322622 {
....@@ -2539,7 +2629,8 @@
25392629 for (java.util.Enumeration e = selection.elements(); e.hasMoreElements();)
25402630 {
25412631 Object3D selectee = (Object3D) e.nextElement();
2542
- if (selectee.doEditClick(info, 1))
2632
+ if (selectee.doEditClick(//info,
2633
+ 1))
25432634 {
25442635 childToDrag = selectee;
25452636 doSomething = 2;
....@@ -2551,13 +2642,15 @@
25512642 return retval;
25522643 }
25532644
2554
- void doEditDrag(ClickInfo info, boolean opposite)
2645
+ void doEditDrag(//ClickInfo clickInfo,
2646
+ boolean opposite)
25552647 {
25562648 switch (doSomething)
25572649 {
25582650 case 1: // '\001'
25592651 //super.
2560
- doEditDrag0(info, opposite);
2652
+ doEditDrag0(//clickInfo,
2653
+ opposite);
25612654 break;
25622655
25632656 case 2: // '\002'
....@@ -2570,11 +2663,13 @@
25702663 {
25712664 //sel.hitSomething = childToDrag.hitSomething;
25722665 //childToDrag.doEditDrag(info);
2573
- sel.doEditDrag(info, opposite);
2666
+ sel.doEditDrag(//clickInfo,
2667
+ opposite);
25742668 } else
25752669 {
25762670 //super.
2577
- doEditDrag0(info, opposite);
2671
+ doEditDrag0(//clickInfo,
2672
+ opposite);
25782673 }
25792674 }
25802675 break;
....@@ -2592,6 +2687,9 @@
25922687 {
25932688 deselectAll();
25942689 }
2690
+
2691
+ new Exception().printStackTrace();
2692
+
25952693 ClickInfo newInfo = new ClickInfo();
25962694 newInfo.flags = info.flags;
25972695 newInfo.bounds = info.bounds;
....@@ -2684,6 +2782,18 @@
26842782 void GenNormalsS(boolean crease)
26852783 {
26862784 selection.GenNormals(crease);
2785
+// for (int i=0; i<selection.size(); i++)
2786
+// {
2787
+// Object3D selectee = (Object3D) selection.elementAt(i);
2788
+// selectee.GenNormals(crease);
2789
+// }
2790
+
2791
+ //Touch();
2792
+ }
2793
+
2794
+ void GenNormalsMeshS()
2795
+ {
2796
+ selection.GenNormalsMesh();
26872797 // for (int i=0; i<selection.size(); i++)
26882798 // {
26892799 // Object3D selectee = (Object3D) selection.elementAt(i);
....@@ -2824,6 +2934,24 @@
28242934 if (child == null)
28252935 continue;
28262936 child.GenNormals(crease);
2937
+// Children().release(i);
2938
+ }
2939
+ blockloop = false;
2940
+ }
2941
+
2942
+ void GenNormalsMesh()
2943
+ {
2944
+ if (blockloop)
2945
+ return;
2946
+
2947
+ blockloop = true;
2948
+ GenNormalsMesh0();
2949
+ for (int i = 0; i < Children().Size(); i++)
2950
+ {
2951
+ Object3D child = (Object3D) Children().get(i); // reserve(i);
2952
+ if (child == null)
2953
+ continue;
2954
+ child.GenNormalsMesh();
28272955 // Children().release(i);
28282956 }
28292957 blockloop = false;
....@@ -2996,11 +3124,20 @@
29963124 }
29973125 }
29983126
3127
+ void GenNormalsMesh0()
3128
+ {
3129
+ if (bRep != null)
3130
+ {
3131
+ bRep.GenerateNormalsMesh();
3132
+ Touch();
3133
+ }
3134
+ }
3135
+
29993136 void GenNormalsMINE0()
30003137 {
30013138 if (bRep != null)
30023139 {
3003
- bRep.GenerateNormalsMINE();
3140
+ bRep.MergeNormals(); //.GenerateNormalsMINE();
30043141 Touch();
30053142 }
30063143 }
....@@ -3446,7 +3583,8 @@
34463583 if (blockloop)
34473584 return;
34483585
3449
- if (marked || (bRep != null && material != null)) // borderline...
3586
+ if (//marked || // does not make sense
3587
+ (bRep != null || material != null)) // borderline...
34503588 live = h;
34513589
34523590 for (int i = 0; i < Size(); i++)
....@@ -3467,7 +3605,8 @@
34673605 return;
34683606
34693607 //if (bRep != null)
3470
- if (marked || (bRep != null && material != null)) // borderline...
3608
+ if (//marked || // does not make sense
3609
+ (bRep != null || material != null)) // borderline...
34713610 link2master = h;
34723611
34733612 for (int i = 0; i < Size(); i++)
....@@ -3487,7 +3626,8 @@
34873626 if (blockloop)
34883627 return;
34893628
3490
- if (marked || (bRep != null && material != null)) // borderline...
3629
+ if (//marked || // does not make sense
3630
+ (bRep != null || material != null)) // borderline...
34913631 hide = h;
34923632
34933633 for (int i = 0; i < Size(); i++)
....@@ -3507,7 +3647,7 @@
35073647 if (blockloop)
35083648 return;
35093649
3510
- if (bRep != null && material != null) // borderline...
3650
+ if (bRep != null || material != null) // borderline...
35113651 marked = h;
35123652
35133653 for (int i = 0; i < Size(); i++)
....@@ -3517,6 +3657,46 @@
35173657 continue;
35183658 blockloop = true;
35193659 child.MarkLeaves(h);
3660
+ blockloop = false;
3661
+ // release(i);
3662
+ }
3663
+ }
3664
+
3665
+ void RewindLeaves(boolean h)
3666
+ {
3667
+ if (blockloop)
3668
+ return;
3669
+
3670
+ if (bRep != null || material != null) // borderline...
3671
+ rewind = 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.RewindLeaves(h);
3680
+ blockloop = false;
3681
+ // release(i);
3682
+ }
3683
+ }
3684
+
3685
+ void RandomLeaves(boolean h)
3686
+ {
3687
+ if (blockloop)
3688
+ return;
3689
+
3690
+ if (bRep != null || material != null) // borderline...
3691
+ random = h;
3692
+
3693
+ for (int i = 0; i < Size(); i++)
3694
+ {
3695
+ Object3D child = (Object3D) get(i); // reserve(i);
3696
+ if (child == null)
3697
+ continue;
3698
+ blockloop = true;
3699
+ child.RandomLeaves(h);
35203700 blockloop = false;
35213701 // release(i);
35223702 }
....@@ -4294,6 +4474,55 @@
42944474 }
42954475 }
42964476
4477
+ void RepairSOV()
4478
+ {
4479
+ if (blockloop)
4480
+ return;
4481
+
4482
+ String texname = this.GetPigmentTexture();
4483
+
4484
+ if (texname.startsWith("sov"))
4485
+ {
4486
+ String[] s = texname.split("/");
4487
+
4488
+ String[] sname = s[1].split("Color.pn");
4489
+
4490
+ texname = sname[0];
4491
+
4492
+ if (sname.length > 1)
4493
+ {
4494
+ texname += "Color.jpg";
4495
+ }
4496
+
4497
+ this.SetPigmentTexture("sov/" + texname);
4498
+ }
4499
+
4500
+ texname = this.GetBumpTexture();
4501
+
4502
+ if (texname.startsWith("sov"))
4503
+ {
4504
+ String[] s = texname.split("/");
4505
+
4506
+ String[] sname = s[1].split("Bump.pn");
4507
+
4508
+ texname = sname[0];
4509
+
4510
+ if (sname.length > 1)
4511
+ {
4512
+ texname += "Bump.jpg";
4513
+ }
4514
+
4515
+ this.SetBumpTexture("sov/" + texname);
4516
+ }
4517
+
4518
+ for (int i=0; i<Size(); i++)
4519
+ {
4520
+ blockloop = true;
4521
+ get(i).RepairSOV();
4522
+ blockloop = false;
4523
+ }
4524
+ }
4525
+
42974526 void RepairTexture()
42984527 {
42994528 if (this instanceof FileObject || blockloop)
....@@ -4808,6 +5037,14 @@
48085037 }
48095038 }
48105039
5040
+ ObjEditor GetWindow()
5041
+ {
5042
+ if (editWindow != null)
5043
+ return editWindow;
5044
+
5045
+ return manipWindow;
5046
+ }
5047
+
48115048 cTreePath Select(int indexcount, boolean deselect)
48125049 {
48135050 if (hide || dontselect)
....@@ -4844,10 +5081,11 @@
48445081 if (leaf != null)
48455082 {
48465083 cTreePath tp = new cTreePath(this, leaf);
4847
- if (editWindow != null)
5084
+ ObjEditor window = GetWindow();
5085
+ if (window != null)
48485086 {
48495087 //System.out.println("editWindow = " + editWindow + " vs " + this);
4850
- editWindow.Select(tp, deselect, true);
5088
+ window.Select(tp, deselect, true);
48515089 }
48525090
48535091 return tp;
....@@ -4864,6 +5102,7 @@
48645102
48655103 if (child == null)
48665104 continue;
5105
+
48675106 if (child.HasTransparency() && child.size() != 0)
48685107 {
48695108 cTreePath leaf = child.Select(indexcount, deselect);
....@@ -4873,9 +5112,10 @@
48735112 if (leaf != null)
48745113 {
48755114 cTreePath tp = new cTreePath(this, leaf);
4876
- if (editWindow != null)
5115
+ ObjEditor window = GetWindow();
5116
+ if (window != null)
48775117 {
4878
- editWindow.Select(tp, deselect, true);
5118
+ window.Select(tp, deselect, true);
48795119 }
48805120
48815121 return tp;
....@@ -5200,6 +5440,51 @@
52005440 blockloop = false;
52015441 }
52025442
5443
+ void ResetSelectable()
5444
+ {
5445
+ if (blockloop)
5446
+ return;
5447
+
5448
+ blockloop = true;
5449
+
5450
+ keepdontselect = dontselect;
5451
+ dontselect = true;
5452
+
5453
+ Object3D child;
5454
+ int nb = Size();
5455
+ for (int i = 0; i < nb; i++)
5456
+ {
5457
+ child = (Object3D) get(i);
5458
+ if (child == null)
5459
+ continue;
5460
+ child.ResetSelectable();
5461
+ }
5462
+
5463
+ blockloop = false;
5464
+ }
5465
+
5466
+ void RestoreSelectable()
5467
+ {
5468
+ if (blockloop)
5469
+ return;
5470
+
5471
+ blockloop = true;
5472
+
5473
+ dontselect = keepdontselect;
5474
+
5475
+ Object3D child;
5476
+ int nb = Size();
5477
+ for (int i = 0; i < nb; i++)
5478
+ {
5479
+ child = (Object3D) get(i);
5480
+ if (child == null)
5481
+ continue;
5482
+ child.RestoreSelectable();
5483
+ }
5484
+
5485
+ blockloop = false;
5486
+ }
5487
+
52035488 boolean IsSelected()
52045489 {
52055490 if (parent == null)
....@@ -5509,6 +5794,38 @@
55095794 }
55105795 }
55115796
5797
+ void EmbedTextures(boolean embed)
5798
+ {
5799
+ if (blockloop)
5800
+ return;
5801
+
5802
+ //if (GetTextures() != null)
5803
+ if (embed)
5804
+ CameraPane.EmbedTextures(GetTextures());
5805
+ else
5806
+ {
5807
+ GetTextures().pigmentdata = null;
5808
+ GetTextures().bumpdata = null;
5809
+ GetTextures().pw = 0;
5810
+ GetTextures().ph = 0;
5811
+ GetTextures().bw = 0;
5812
+ GetTextures().bh = 0;
5813
+ }
5814
+
5815
+ int nb = Size();
5816
+ for (int i = 0; i < nb; i++)
5817
+ {
5818
+ Object3D child = (Object3D) get(i);
5819
+
5820
+ if (child == null)
5821
+ continue;
5822
+
5823
+ blockloop = true;
5824
+ child.EmbedTextures(embed);
5825
+ blockloop = false;
5826
+ }
5827
+ }
5828
+
55125829 void draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
55135830 {
55145831 Draw(display, root, selected, blocked);
....@@ -5517,12 +5834,23 @@
55175834 boolean NeedSupport()
55185835 {
55195836 return
5520
- CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
5837
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
55215838 // PROBLEM with CROWD!!
55225839 && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
55235840 }
55245841
55255842 static boolean DEBUG_SELECTION = false;
5843
+
5844
+ boolean IsLive()
5845
+ {
5846
+ if (live)
5847
+ return true;
5848
+
5849
+ if (parent == null)
5850
+ return false;
5851
+
5852
+ return parent.IsLive();
5853
+ }
55265854
55275855 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
55285856 {
....@@ -5584,8 +5912,10 @@
55845912 if (support != null)
55855913 support = support;
55865914
5587
- //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5588
- boolean usecalllists = false; // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5915
+ boolean usecalllists = !IsLive() && IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5916
+ //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5917
+
5918
+ //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass.
55895919
55905920 if (!usecalllists && bRep != null && bRep.displaylist > 0)
55915921 {
....@@ -5595,8 +5925,9 @@
55955925 // usecalllists &= !(parent instanceof RandomNode);
55965926 // usecalllists = false;
55975927
5598
- if (GetBRep() != null)
5599
- usecalllists = usecalllists;
5928
+ if (display.DrawMode() == display.SHADOW)
5929
+ //GetBRep() != null)
5930
+ usecalllists = !!usecalllists;
56005931 //System.out.println("draw " + this);
56015932 //new Exception().printStackTrace();
56025933
....@@ -5605,10 +5936,12 @@
56055936 boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
56065937
56075938 if (!selectmode && //display.DrawMode() != display.SELECTION &&
5608
- (touched || (bRep != null && bRep.displaylist <= 0)))
5939
+ //(touched || (bRep != null && bRep.displaylist <= 0)))
5940
+ (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && Globals.COMPUTESHADOWWHENLIVE)) // || (bRep != null && bRep.displaylist <= 0)))
56095941 {
56105942 Globals.lighttouched = true;
56115943 } // all panes...
5944
+
56125945 //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
56135946 if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
56145947 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5616,7 +5949,7 @@
56165949 if (!(this instanceof Composite))
56175950 touched = false;
56185951 //if (displaylist == -1 && usecalllists)
5619
- if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013
5952
+ if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013
56205953 {
56215954 bRep.displaylist = display.GenList();
56225955 assert(bRep.displaylist != 0);
....@@ -5627,7 +5960,7 @@
56275960
56285961 //System.out.println("\tnew list " + list);
56295962 //gl.glDrawBuffer(gl.GL_NONE);
5630
- if (usecalllists)
5963
+ if (usecalllists && bRep.displaylist > 0)
56315964 {
56325965 // System.err.println("new list " + bRep.displaylist + " for " + this);
56335966 display.NewList(bRep.displaylist);
....@@ -5636,7 +5969,7 @@
56365969 CallList(display, root, selected, blocked);
56375970
56385971 // compiled = true;
5639
- if (usecalllists)
5972
+ if (usecalllists && bRep.displaylist > 0)
56405973 {
56415974 // System.err.println("end list " + bRep.displaylist + " for " + this);
56425975 display.EndList();
....@@ -5736,6 +6069,7 @@
57366069 if (GetBRep() != null)
57376070 {
57386071 display.NextIndex();
6072
+
57396073 // vertex color conflict : gl.glCallList(list);
57406074 DrawNode(display, root, selected);
57416075 if (this instanceof BezierPatch)
....@@ -5776,16 +6110,27 @@
57766110 tex = GetTextures();
57776111 }
57786112
5779
- boolean failed = false;
6113
+ boolean failedPigment = false;
6114
+ boolean failedBump = false;
57806115
57816116 try
57826117 {
5783
- display.BindTextures(tex, texres);
6118
+ display.BindPigmentTexture(tex, texres);
57846119 }
57856120 catch (Exception e)
57866121 {
57876122 System.err.println("FAILED: " + this);
5788
- failed = true;
6123
+ failedPigment = true;
6124
+ }
6125
+
6126
+ try
6127
+ {
6128
+ display.BindBumpTexture(tex, texres);
6129
+ }
6130
+ catch (Exception e)
6131
+ {
6132
+ //System.err.println("FAILED: " + this);
6133
+ failedBump = true;
57896134 }
57906135
57916136 if (!compiled)
....@@ -5808,8 +6153,11 @@
58086153 }
58096154 }
58106155
5811
- if (!failed)
5812
- display.ReleaseTextures(tex);
6156
+ if (!failedBump)
6157
+ display.ReleaseBumpTexture(tex);
6158
+
6159
+ if (!failedPigment)
6160
+ display.ReleasePigmentTexture(tex);
58136161
58146162 display.PopMaterial(this, selected);
58156163 }
....@@ -6182,6 +6530,11 @@
61826530 // dec 2012
61836531 new Exception().printStackTrace();
61846532 return;
6533
+ }
6534
+
6535
+ if (dontselect)
6536
+ {
6537
+ //bRep.GenerateNormalsMINE();
61856538 }
61866539
61876540 display.DrawGeometry(bRep, flipV, selectmode);
....@@ -6967,20 +7320,23 @@
69677320 }
69687321 }
69697322
6970
- protected void calcHotSpot(cVector in, ClickInfo info, Point outPt, Rectangle outRec)
7323
+ static ClickInfo clickInfo = new ClickInfo();
7324
+
7325
+ protected void calcHotSpot(cVector in, //ClickInfo clickInfo,
7326
+ Point outPt, Rectangle outRec)
69717327 {
6972
- int hc = info.bounds.x + info.bounds.width / 2;
6973
- int vc = info.bounds.y + info.bounds.height / 2;
6974
- double[][] toscreen = info.toScreen;
7328
+ int hc = clickInfo.bounds.x + clickInfo.bounds.width / 2;
7329
+ int vc = clickInfo.bounds.y + clickInfo.bounds.height / 2;
7330
+ double[][] toscreen = clickInfo.toScreen;
69757331 if (toscreen == null)
69767332 {
6977
- toscreen = new Camera(info.camera.viewCode).toScreen;
7333
+ toscreen = new Camera(clickInfo.camera.viewCode).toScreen;
69787334 }
69797335 cVector vec = in;
69807336 LA.xformPos(in, toscreen, in);
69817337 //System.out.println("Distance = " + info.camera.Distance());
6982
- vec.x *= 100 * info.camera.SCALE / info.camera.Distance();
6983
- vec.y *= 100 * info.camera.SCALE / info.camera.Distance();
7338
+ vec.x *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance();
7339
+ vec.y *= 100 * clickInfo.camera.SCALE / clickInfo.camera.Distance();
69847340 outPt.x = hc + (int) vec.x;
69857341 outPt.y = vc - (int) vec.y;
69867342 outRec.x = outPt.x - 3;
....@@ -6988,15 +7344,18 @@
69887344 outRec.width = outRec.height = 6;
69897345 }
69907346
6991
- protected Rectangle calcHotSpot(cVector in, ClickInfo info)
7347
+ protected Rectangle calcHotSpot(cVector in//, ClickInfo clickInfo
7348
+ )
69927349 {
69937350 Point pt = new Point(0, 0);
69947351 Rectangle rec = new Rectangle();
6995
- calcHotSpot(in, info, pt, rec);
7352
+ calcHotSpot(in, //clickInfo,
7353
+ pt, rec);
69967354 return rec;
69977355 }
69987356
6999
- void drawEditHandles0(ClickInfo info, int level)
7357
+ void drawEditHandles0(//ClickInfo clickInfo,
7358
+ int level)
70007359 {
70017360 if (level == 0)
70027361 {
....@@ -7005,16 +7364,19 @@
70057364 {
70067365 cVector origin = new cVector();
70077366 //LA.xformPos(origin, toParent, origin);
7008
- Rectangle spot = calcHotSpot(origin, info);
7367
+ if (this.clickInfo == null)
7368
+ this.clickInfo = new ClickInfo();
7369
+
7370
+ Rectangle spot = calcHotSpot(origin); //, clickInfo);
70097371 Rectangle boundary = new Rectangle();
70107372 boundary.x = spot.x - 30;
70117373 boundary.y = spot.y - 30;
70127374 boundary.width = spot.width + 60;
70137375 boundary.height = spot.height + 60;
7014
- info.g.setColor(Color.red);
7376
+ clickInfo.g.setColor(Color.red);
70157377 int spotw = spot.x + spot.width;
70167378 int spoth = spot.y + spot.height;
7017
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7379
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
70187380 // if (CameraPane.Xmin > spot.x)
70197381 // {
70207382 // CameraPane.Xmin = spot.x;
....@@ -7034,8 +7396,8 @@
70347396 spot.translate(32, 32);
70357397 spotw = spot.x + spot.width;
70367398 spoth = spot.y + spot.height;
7037
- info.g.setColor(Color.blue);
7038
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7399
+ clickInfo.g.setColor(Color.cyan);
7400
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
70397401 // if (CameraPane.Xmin > spot.x)
70407402 // {
70417403 // CameraPane.Xmin = spot.x;
....@@ -7052,11 +7414,12 @@
70527414 // {
70537415 // CameraPane.Ymax = spoth;
70547416 // }
7055
- // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);
7056
- //info.g.drawLine(spotw, spoth, spotw - 15, spoth);
7417
+ // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
7418
+ //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
70577419 spot.translate(0, -32);
7058
- info.g.setColor(Color.green);
7059
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7420
+ clickInfo.g.setColor(Color.yellow);
7421
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7422
+ clickInfo.g.setColor(Color.green);
70607423 // if (CameraPane.Xmin > spot.x)
70617424 // {
70627425 // CameraPane.Xmin = spot.x;
....@@ -7073,8 +7436,8 @@
70737436 // {
70747437 // CameraPane.Ymax = spoth;
70757438 // }
7076
- info.g.drawArc(boundary.x, boundary.y,
7077
- boundary.width, boundary.height, 0, 360);
7439
+ clickInfo.g.drawArc(boundary.x + clickInfo.DX, boundary.y + clickInfo.DY,
7440
+ (int)(boundary.width * clickInfo.W), (int)(boundary.height * clickInfo.W), 0, 360);
70787441 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
70797442 // if (CameraPane.Xmin > boundary.x)
70807443 // {
....@@ -7096,7 +7459,8 @@
70967459 }
70977460 }
70987461
7099
- boolean doEditClick0(ClickInfo info, int level)
7462
+ boolean doEditClick0(//ClickInfo clickInfo,
7463
+ int level)
71007464 {
71017465 if (level == 0)
71027466 {
....@@ -7105,8 +7469,8 @@
71057469
71067470 boolean retval = false;
71077471
7108
- startX = info.x;
7109
- startY = info.y;
7472
+ startX = clickInfo.x;
7473
+ startY = clickInfo.y;
71107474
71117475 hitSomething = -1;
71127476 cVector origin = new cVector();
....@@ -7116,22 +7480,51 @@
71167480 {
71177481 centerPt = new Point(0, 0);
71187482 }
7119
- calcHotSpot(origin, info, centerPt, spot);
7120
- if (spot.contains(info.x, info.y))
7483
+ calcHotSpot(origin, //info,
7484
+ centerPt, spot);
7485
+ if (spot.contains(clickInfo.x, clickInfo.y))
71217486 {
71227487 hitSomething = hitCenter;
71237488 retval = true;
71247489 }
71257490 spot.translate(32, 0);
7126
- if (spot.contains(info.x, info.y))
7491
+ if (spot.contains(clickInfo.x, clickInfo.y))
71277492 {
71287493 hitSomething = hitRotate;
71297494 retval = true;
71307495 }
71317496 spot.translate(0, 32);
7132
- if (spot.contains(info.x, info.y))
7497
+ if (spot.contains(clickInfo.x, clickInfo.y))
71337498 {
71347499 hitSomething = hitScale;
7500
+
7501
+ double scale = 0.005f * clickInfo.camera.Distance();
7502
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
7503
+ double sign = 1;
7504
+ if (hScale < 0)
7505
+ {
7506
+ sign = -1;
7507
+ }
7508
+ hScale = sign*Math.pow(sign*hScale, scale * 50);
7509
+ if (hScale < 0.01)
7510
+ {
7511
+ //hScale = 0.01;
7512
+ }
7513
+
7514
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
7515
+ sign = 1;
7516
+ if (vScale < 0)
7517
+ {
7518
+ sign = -1;
7519
+ }
7520
+ vScale = sign*Math.pow(sign*vScale, scale * 50);
7521
+ if (vScale < 0.01)
7522
+ {
7523
+ //vScale = 0.01;
7524
+ }
7525
+
7526
+ clickInfo.scale = Math.sqrt(hScale*hScale + vScale*vScale);
7527
+
71357528 retval = true;
71367529 }
71377530
....@@ -7141,7 +7534,7 @@
71417534 }
71427535
71437536 //System.out.println("info.modifiers = " + info.modifiers);
7144
- modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META
7537
+ modified = (clickInfo.modifiers & CameraPane.SHIFT) != 0; // Was META
71457538 //System.out.println("modified = " + modified);
71467539 //new Exception().printStackTrace();
71477540 //viewCode = info.pane.renderCamera.viewCode;
....@@ -7169,7 +7562,8 @@
71697562 return true;
71707563 }
71717564
7172
- void doEditDrag0(ClickInfo info, boolean opposite)
7565
+ void doEditDrag0(//ClickInfo info,
7566
+ boolean opposite)
71737567 {
71747568 if (hitSomething == 0)
71757569 {
....@@ -7183,7 +7577,7 @@
71837577
71847578 //System.out.println("hitSomething = " + hitSomething);
71857579
7186
- double scale = 0.005f * info.camera.Distance();
7580
+ double scale = 0.005f * clickInfo.camera.Distance();
71877581
71887582 cVector xlate = new cVector();
71897583 //cVector xlate2 = new cVector();
....@@ -7217,8 +7611,8 @@
72177611 toParent[3][i] = xlate.get(i);
72187612 LA.matInvert(toParent, fromParent);
72197613 */
7220
- cVector delta = LA.newVector(0, 0, startY - info.y);
7221
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7614
+ cVector delta = LA.newVector(0, 0, startY - clickInfo.y);
7615
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
72227616
72237617 LA.matCopy(startMat, toParent);
72247618 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7227,7 +7621,7 @@
72277621 } else
72287622 {
72297623 //LA.xformDir(delta, info.camera.fromScreen, delta);
7230
- cVector up = new cVector(info.camera.up);
7624
+ cVector up = new cVector(clickInfo.camera.up);
72317625 cVector away = new cVector();
72327626 //cVector right2 = new cVector();
72337627 //LA.vecCross(up, cVector.Z, right);
....@@ -7244,19 +7638,19 @@
72447638 LA.xformDir(up, ClickInfo.matbuffer, up);
72457639 // if (!CameraPane.LOCALTRANSFORM)
72467640 LA.xformDir(up, Globals.theRenderer.RenderCamera().toScreen, up);
7247
- LA.xformDir(info.camera.away, ClickInfo.matbuffer, away);
7641
+ LA.xformDir(clickInfo.camera.away, ClickInfo.matbuffer, away);
72487642 // if (!CameraPane.LOCALTRANSFORM)
72497643 LA.xformDir(away, Globals.theRenderer.RenderCamera().toScreen, away);
72507644 //LA.vecCross(up, cVector.Z, right2);
72517645
7252
- cVector delta = LA.newVector(info.x - startX, startY - info.y, 0);
7646
+ cVector delta = LA.newVector(clickInfo.x - startX, startY - clickInfo.y, 0);
72537647
72547648 //System.out.println("DELTA0 = " + delta);
72557649 //System.out.println("AWAY = " + info.camera.away);
72567650 //System.out.println("UP = " + info.camera.up);
72577651 if (away.z > 0)
72587652 {
7259
- if (info.camera.up.x == 0) // LA.vecDot(right, right2)<0)
7653
+ if (clickInfo.camera.up.x == 0) // LA.vecDot(right, right2)<0)
72607654 {
72617655 delta.x = -delta.x;
72627656 } else
....@@ -7271,7 +7665,7 @@
72717665 //System.out.println("DELTA1 = " + delta);
72727666 LA.xformDir(delta, ClickInfo.matbuffer, delta);
72737667 //System.out.println("DELTA2 = " + delta);
7274
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7668
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
72757669 LA.matCopy(startMat, toParent);
72767670 //System.out.println("DELTA3 = " + delta);
72777671 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7281,8 +7675,8 @@
72817675 break;
72827676
72837677 case hitRotate: // rotate
7284
- int dx = info.x - centerPt.x;
7285
- int dy = -(info.y - centerPt.y);
7678
+ int dx = clickInfo.x - centerPt.x;
7679
+ int dy = -(clickInfo.y - centerPt.y);
72867680 double angle = (double) Math.atan2(dx, dy);
72877681 angle = -(1.570796 - angle);
72887682
....@@ -7305,7 +7699,7 @@
73057699 }
73067700 /**/
73077701
7308
- switch (info.pane.RenderCamera().viewCode)
7702
+ switch (clickInfo.pane.RenderCamera().viewCode)
73097703 {
73107704 case 1: // '\001'
73117705 LA.matZRotate(toParent, angle);
....@@ -7332,7 +7726,7 @@
73327726 break;
73337727
73347728 case hitScale: // scale
7335
- double hScale = (double) (info.x - centerPt.x) / 32;
7729
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
73367730 double sign = 1;
73377731 if (hScale < 0)
73387732 {
....@@ -7344,7 +7738,7 @@
73447738 //hScale = 0.01;
73457739 }
73467740
7347
- double vScale = (double) (info.y - centerPt.y) / 32;
7741
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
73487742 sign = 1;
73497743 if (vScale < 0)
73507744 {
....@@ -7355,6 +7749,7 @@
73557749 {
73567750 //vScale = 0.01;
73577751 }
7752
+
73587753 LA.matCopy(startMat, toParent);
73597754 /**/
73607755 for (int i = 0; i < 3; i++)
....@@ -7364,29 +7759,30 @@
73647759 }
73657760 /**/
73667761
7367
- double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2);
7762
+ double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / clickInfo.scale;
73687763
73697764 if (totalScale < 0.01)
73707765 {
73717766 totalScale = 0.01;
73727767 }
73737768
7374
- switch (info.pane.RenderCamera().viewCode)
7769
+ switch (clickInfo.pane.RenderCamera().viewCode)
73757770 {
73767771 case 3: // '\001'
7377
- if (modified)
7772
+ if (modified || opposite)
73787773 {
73797774 //LA.matScale(toParent, 1, hScale, vScale);
73807775 LA.matScale(toParent, totalScale, 1, 1);
73817776 } // vScale, 1);
73827777 else
73837778 {
7779
+ // EXCEPTION!
73847780 LA.matScale(toParent, totalScale, totalScale, totalScale);
73857781 } // vScale, 1);
73867782 break;
73877783
73887784 case 2: // '\002'
7389
- if (modified)
7785
+ if (modified || opposite)
73907786 {
73917787 //LA.matScale(toParent, hScale, 1, vScale);
73927788 LA.matScale(toParent, 1, totalScale, 1);
....@@ -7397,7 +7793,7 @@
73977793 break;
73987794
73997795 case 1: // '\003'
7400
- if (modified)
7796
+ if (modified || opposite)
74017797 {
74027798 //LA.matScale(toParent, hScale, vScale, 1);
74037799 LA.matScale(toParent, 1, 1, totalScale);
....@@ -7437,7 +7833,7 @@
74377833 } // NEW ...
74387834
74397835
7440
- info.pane.repaint();
7836
+ clickInfo.pane.repaint();
74417837 }
74427838
74437839 boolean overflow = false;
....@@ -7617,6 +8013,10 @@
76178013 editWindow = null;
76188014 } // ?
76198015 }
8016
+ else
8017
+ {
8018
+ //editWindow.closeUI();
8019
+ }
76208020 }
76218021
76228022 boolean root; // patch for edit windows
....@@ -7774,6 +8174,10 @@
77748174 }
77758175
77768176 transient ObjEditor editWindow;
8177
+ transient ObjEditor manipWindow;
8178
+
8179
+ transient boolean pinned;
8180
+
77778181 transient ObjectUI objectUI;
77788182 public static int povDepth = 0;
77798183 private static cVector tbMin = new cVector();