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,117 +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++)
150
+
151
+ void RestoreSupports()
130152 {
131
- Object3D child = (Object3D) get(i);
132
- if (child == null)
133
- continue;
153
+ if (blockloop)
154
+ return;
155
+
156
+ support = transientsupport;
157
+ link2master = transientlink2master;
158
+ transientsupport = null;
159
+ transientlink2master = false;
160
+
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)
178
+ {
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
+
254
+ Object3D o = hashtable.get(GetUUID());
255
+
256
+ RestoreBigData(o);
257
+
258
+ if (blockloop)
259
+ return;
260
+
134261 blockloop = true;
135
- child.SaveSupports();
262
+
263
+ //hashtable.remove(GetUUID());
264
+
265
+ for (int i=0; i<Size(); i++)
266
+ {
267
+ get(i).RestoreBigData(hashtable);
268
+ }
269
+
136270 blockloop = false;
137271 }
138
-}
139272
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)
273
+ void RestoreBigData(Object3D o)
151274 {
152
- bRep.RestoreSupports();
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;
153289 }
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
-}
165
-
166
-void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
167
-{
168
- if (hashtable.containsKey(GetUUID()))
169
- return;
170
-
171
- Object3D o = new Object3D();
172
- o.bRep = this.bRep;
173
- if (this.bRep != null)
174
- {
175
- o.transientrep = this.bRep.support;
176
- o.bRep.support = null;
177
- }
178
-
179
-// o.support = this.support;
180
-// o.fileparent = this.fileparent;
181
-// if (this.bRep != null)
182
-// o.bRep = this.bRep.support;
183
-
184
- hashtable.put(GetUUID(), o);
185
-
186
- this.bRep = null;
187
-// if (this.bRep != null)
188
-// this.bRep.support = null;
189
-// this.support = null;
190
-// this.fileparent = null;
191
-
192
- for (int i=0; i<Size(); i++)
193
- {
194
- get(i).ExtractBigData(hashtable);
195
- }
196
-}
197
-
198
-void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
199
-{
200
- if (!hashtable.containsKey(GetUUID()))
201
- return;
202
-
203
- Object3D o = hashtable.get(GetUUID());
204
-
205
- this.bRep = o.bRep;
206
- if (this.bRep != null)
207
- this.bRep.support = o.transientrep;
208
-// this.support = o.support;
209
-// this.fileparent = o.fileparent;
210
-
211
- hashtable.remove(GetUUID());
212
-
213
- for (int i=0; i<Size(); i++)
214
- {
215
- get(i).RestoreBigData(hashtable);
216
- }
217
-}
218290
219291 // MOCAP SUPPORT
220292 double tx,ty,tz,rx,ry,rz;
....@@ -357,6 +429,7 @@
357429 }
358430
359431 boolean live = false;
432
+ transient boolean keepdontselect;
360433 boolean dontselect = false;
361434 boolean hide = false;
362435 boolean link2master = false; // performs reset support/master at each frame
....@@ -539,12 +612,14 @@
539612 toParent = LA.newMatrix();
540613 fromParent = LA.newMatrix();
541614 }
615
+
542616 if (toParentMarked == null)
543617 {
544618 if (maxcount != 1)
545619 {
546620 new Exception().printStackTrace();
547621 }
622
+
548623 toParentMarked = LA.newMatrix();
549624 fromParentMarked = LA.newMatrix();
550625 }
....@@ -855,7 +930,7 @@
855930
856931 if (marked && Globals.isLIVE() && live &&
857932 //TEMP21aug2018
858
- (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
933
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
859934 currentframe != Globals.framecount)
860935 {
861936 currentframe = Globals.framecount;
....@@ -867,7 +942,8 @@
867942
868943 boolean changedir = random && Math.random() < 0.01; // && !link2master;
869944
870
- if (transformcount*factor > maxcount || (step == 1 && changedir))
945
+ if (transformcount*factor >= maxcount && (rewind || random) ||
946
+ (step == 1 && changedir))
871947 {
872948 countdown = 1;
873949 delay = speedup?8:1;
....@@ -939,6 +1015,10 @@
9391015 if (material == null || material.multiply)
9401016 return true;
9411017
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.
9421022 return material.opacity > 0.99;
9431023 }
9441024
....@@ -1339,6 +1419,7 @@
13391419 toParent = LA.newMatrix();
13401420 fromParent = LA.newMatrix();
13411421 }
1422
+
13421423 LA.matCopy(other.toParent, toParent);
13431424 LA.matCopy(other.fromParent, fromParent);
13441425
....@@ -2360,6 +2441,10 @@
23602441 }
23612442 */
23622443 }
2444
+ else
2445
+ {
2446
+ //((ObjEditor)editWindow).SetupUI2(null);
2447
+ }
23632448 }
23642449
23652450 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -2401,6 +2486,14 @@
24012486 {
24022487 editWindow.refreshContents();
24032488 }
2489
+ else
2490
+ {
2491
+ if (manipWindow != null)
2492
+ {
2493
+ manipWindow.refreshContents();
2494
+ }
2495
+ }
2496
+
24042497 //if (parent != null)
24052498 //parent.refreshEditWindow();
24062499 }
....@@ -2480,7 +2573,8 @@
24802573 private static final int editSelf = 1;
24812574 private static final int editChild = 2;
24822575
2483
- void drawEditHandles(ClickInfo info, int level)
2576
+ void drawEditHandles(//ClickInfo info,
2577
+ int level)
24842578 {
24852579 if (level == 0)
24862580 {
....@@ -2488,7 +2582,8 @@
24882582 return;
24892583
24902584 Object3D selectee;
2491
- 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))
24922587 {
24932588 selectee = (Object3D) e.nextElement();
24942589 }
....@@ -2496,19 +2591,22 @@
24962591 } else
24972592 {
24982593 //super.
2499
- drawEditHandles0(info, level + 1);
2594
+ drawEditHandles0(//info,
2595
+ level + 1);
25002596 }
25012597 }
25022598
2503
- boolean doEditClick(ClickInfo info, int level)
2599
+ boolean doEditClick(//ClickInfo info,
2600
+ int level)
25042601 {
25052602 doSomething = 0;
25062603 if (level == 0)
25072604 {
2508
- return doParentClick(info);
2605
+ return doParentClick(); //info);
25092606 }
25102607 if (//super.
2511
- doEditClick0(info, level))
2608
+ doEditClick0(//info,
2609
+ level))
25122610 {
25132611 doSomething = 1;
25142612 return true;
....@@ -2518,7 +2616,7 @@
25182616 }
25192617 }
25202618
2521
- boolean doParentClick(ClickInfo info)
2619
+ boolean doParentClick() //ClickInfo info)
25222620 {
25232621 if (selection == null)
25242622 {
....@@ -2531,7 +2629,8 @@
25312629 for (java.util.Enumeration e = selection.elements(); e.hasMoreElements();)
25322630 {
25332631 Object3D selectee = (Object3D) e.nextElement();
2534
- if (selectee.doEditClick(info, 1))
2632
+ if (selectee.doEditClick(//info,
2633
+ 1))
25352634 {
25362635 childToDrag = selectee;
25372636 doSomething = 2;
....@@ -2543,13 +2642,15 @@
25432642 return retval;
25442643 }
25452644
2546
- void doEditDrag(ClickInfo info, boolean opposite)
2645
+ void doEditDrag(//ClickInfo clickInfo,
2646
+ boolean opposite)
25472647 {
25482648 switch (doSomething)
25492649 {
25502650 case 1: // '\001'
25512651 //super.
2552
- doEditDrag0(info, opposite);
2652
+ doEditDrag0(//clickInfo,
2653
+ opposite);
25532654 break;
25542655
25552656 case 2: // '\002'
....@@ -2562,11 +2663,13 @@
25622663 {
25632664 //sel.hitSomething = childToDrag.hitSomething;
25642665 //childToDrag.doEditDrag(info);
2565
- sel.doEditDrag(info, opposite);
2666
+ sel.doEditDrag(//clickInfo,
2667
+ opposite);
25662668 } else
25672669 {
25682670 //super.
2569
- doEditDrag0(info, opposite);
2671
+ doEditDrag0(//clickInfo,
2672
+ opposite);
25702673 }
25712674 }
25722675 break;
....@@ -2584,6 +2687,9 @@
25842687 {
25852688 deselectAll();
25862689 }
2690
+
2691
+ new Exception().printStackTrace();
2692
+
25872693 ClickInfo newInfo = new ClickInfo();
25882694 newInfo.flags = info.flags;
25892695 newInfo.bounds = info.bounds;
....@@ -2676,6 +2782,18 @@
26762782 void GenNormalsS(boolean crease)
26772783 {
26782784 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();
26792797 // for (int i=0; i<selection.size(); i++)
26802798 // {
26812799 // Object3D selectee = (Object3D) selection.elementAt(i);
....@@ -2816,6 +2934,24 @@
28162934 if (child == null)
28172935 continue;
28182936 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();
28192955 // Children().release(i);
28202956 }
28212957 blockloop = false;
....@@ -2988,11 +3124,20 @@
29883124 }
29893125 }
29903126
3127
+ void GenNormalsMesh0()
3128
+ {
3129
+ if (bRep != null)
3130
+ {
3131
+ bRep.GenerateNormalsMesh();
3132
+ Touch();
3133
+ }
3134
+ }
3135
+
29913136 void GenNormalsMINE0()
29923137 {
29933138 if (bRep != null)
29943139 {
2995
- bRep.GenerateNormalsMINE();
3140
+ bRep.MergeNormals(); //.GenerateNormalsMINE();
29963141 Touch();
29973142 }
29983143 }
....@@ -3438,7 +3583,8 @@
34383583 if (blockloop)
34393584 return;
34403585
3441
- if (marked || (bRep != null && material != null)) // borderline...
3586
+ if (//marked || // does not make sense
3587
+ (bRep != null || material != null)) // borderline...
34423588 live = h;
34433589
34443590 for (int i = 0; i < Size(); i++)
....@@ -3459,7 +3605,8 @@
34593605 return;
34603606
34613607 //if (bRep != null)
3462
- if (marked || (bRep != null && material != null)) // borderline...
3608
+ if (//marked || // does not make sense
3609
+ (bRep != null || material != null)) // borderline...
34633610 link2master = h;
34643611
34653612 for (int i = 0; i < Size(); i++)
....@@ -3479,7 +3626,8 @@
34793626 if (blockloop)
34803627 return;
34813628
3482
- if (marked || (bRep != null && material != null)) // borderline...
3629
+ if (//marked || // does not make sense
3630
+ (bRep != null || material != null)) // borderline...
34833631 hide = h;
34843632
34853633 for (int i = 0; i < Size(); i++)
....@@ -3499,7 +3647,7 @@
34993647 if (blockloop)
35003648 return;
35013649
3502
- if (bRep != null && material != null) // borderline...
3650
+ if (bRep != null || material != null) // borderline...
35033651 marked = h;
35043652
35053653 for (int i = 0; i < Size(); i++)
....@@ -3509,6 +3657,46 @@
35093657 continue;
35103658 blockloop = true;
35113659 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);
35123700 blockloop = false;
35133701 // release(i);
35143702 }
....@@ -4286,6 +4474,55 @@
42864474 }
42874475 }
42884476
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
+
42894526 void RepairTexture()
42904527 {
42914528 if (this instanceof FileObject || blockloop)
....@@ -4800,6 +5037,14 @@
48005037 }
48015038 }
48025039
5040
+ ObjEditor GetWindow()
5041
+ {
5042
+ if (editWindow != null)
5043
+ return editWindow;
5044
+
5045
+ return manipWindow;
5046
+ }
5047
+
48035048 cTreePath Select(int indexcount, boolean deselect)
48045049 {
48055050 if (hide || dontselect)
....@@ -4836,10 +5081,11 @@
48365081 if (leaf != null)
48375082 {
48385083 cTreePath tp = new cTreePath(this, leaf);
4839
- if (editWindow != null)
5084
+ ObjEditor window = GetWindow();
5085
+ if (window != null)
48405086 {
48415087 //System.out.println("editWindow = " + editWindow + " vs " + this);
4842
- editWindow.Select(tp, deselect, true);
5088
+ window.Select(tp, deselect, true);
48435089 }
48445090
48455091 return tp;
....@@ -4856,6 +5102,7 @@
48565102
48575103 if (child == null)
48585104 continue;
5105
+
48595106 if (child.HasTransparency() && child.size() != 0)
48605107 {
48615108 cTreePath leaf = child.Select(indexcount, deselect);
....@@ -4865,9 +5112,10 @@
48655112 if (leaf != null)
48665113 {
48675114 cTreePath tp = new cTreePath(this, leaf);
4868
- if (editWindow != null)
5115
+ ObjEditor window = GetWindow();
5116
+ if (window != null)
48695117 {
4870
- editWindow.Select(tp, deselect, true);
5118
+ window.Select(tp, deselect, true);
48715119 }
48725120
48735121 return tp;
....@@ -5192,6 +5440,51 @@
51925440 blockloop = false;
51935441 }
51945442
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
+
51955488 boolean IsSelected()
51965489 {
51975490 if (parent == null)
....@@ -5501,6 +5794,38 @@
55015794 }
55025795 }
55035796
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
+
55045829 void draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
55055830 {
55065831 Draw(display, root, selected, blocked);
....@@ -5509,12 +5834,23 @@
55095834 boolean NeedSupport()
55105835 {
55115836 return
5512
- CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
5837
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
55135838 // PROBLEM with CROWD!!
55145839 && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
55155840 }
55165841
55175842 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
+ }
55185854
55195855 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
55205856 {
....@@ -5576,8 +5912,10 @@
55765912 if (support != null)
55775913 support = support;
55785914
5579
- //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5580
- 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.
55815919
55825920 if (!usecalllists && bRep != null && bRep.displaylist > 0)
55835921 {
....@@ -5587,8 +5925,9 @@
55875925 // usecalllists &= !(parent instanceof RandomNode);
55885926 // usecalllists = false;
55895927
5590
- if (GetBRep() != null)
5591
- usecalllists = usecalllists;
5928
+ if (display.DrawMode() == display.SHADOW)
5929
+ //GetBRep() != null)
5930
+ usecalllists = !!usecalllists;
55925931 //System.out.println("draw " + this);
55935932 //new Exception().printStackTrace();
55945933
....@@ -5597,10 +5936,12 @@
55975936 boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
55985937
55995938 if (!selectmode && //display.DrawMode() != display.SELECTION &&
5600
- (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)))
56015941 {
56025942 Globals.lighttouched = true;
56035943 } // all panes...
5944
+
56045945 //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
56055946 if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
56065947 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5608,7 +5949,7 @@
56085949 if (!(this instanceof Composite))
56095950 touched = false;
56105951 //if (displaylist == -1 && usecalllists)
5611
- if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013
5952
+ if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013
56125953 {
56135954 bRep.displaylist = display.GenList();
56145955 assert(bRep.displaylist != 0);
....@@ -5619,7 +5960,7 @@
56195960
56205961 //System.out.println("\tnew list " + list);
56215962 //gl.glDrawBuffer(gl.GL_NONE);
5622
- if (usecalllists)
5963
+ if (usecalllists && bRep.displaylist > 0)
56235964 {
56245965 // System.err.println("new list " + bRep.displaylist + " for " + this);
56255966 display.NewList(bRep.displaylist);
....@@ -5628,7 +5969,7 @@
56285969 CallList(display, root, selected, blocked);
56295970
56305971 // compiled = true;
5631
- if (usecalllists)
5972
+ if (usecalllists && bRep.displaylist > 0)
56325973 {
56335974 // System.err.println("end list " + bRep.displaylist + " for " + this);
56345975 display.EndList();
....@@ -5728,6 +6069,7 @@
57286069 if (GetBRep() != null)
57296070 {
57306071 display.NextIndex();
6072
+
57316073 // vertex color conflict : gl.glCallList(list);
57326074 DrawNode(display, root, selected);
57336075 if (this instanceof BezierPatch)
....@@ -5768,16 +6110,27 @@
57686110 tex = GetTextures();
57696111 }
57706112
5771
- boolean failed = false;
6113
+ boolean failedPigment = false;
6114
+ boolean failedBump = false;
57726115
57736116 try
57746117 {
5775
- display.BindTextures(tex, texres);
6118
+ display.BindPigmentTexture(tex, texres);
57766119 }
57776120 catch (Exception e)
57786121 {
57796122 System.err.println("FAILED: " + this);
5780
- 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;
57816134 }
57826135
57836136 if (!compiled)
....@@ -5800,8 +6153,11 @@
58006153 }
58016154 }
58026155
5803
- if (!failed)
5804
- display.ReleaseTextures(tex);
6156
+ if (!failedBump)
6157
+ display.ReleaseBumpTexture(tex);
6158
+
6159
+ if (!failedPigment)
6160
+ display.ReleasePigmentTexture(tex);
58056161
58066162 display.PopMaterial(this, selected);
58076163 }
....@@ -6174,6 +6530,11 @@
61746530 // dec 2012
61756531 new Exception().printStackTrace();
61766532 return;
6533
+ }
6534
+
6535
+ if (dontselect)
6536
+ {
6537
+ //bRep.GenerateNormalsMINE();
61776538 }
61786539
61796540 display.DrawGeometry(bRep, flipV, selectmode);
....@@ -6959,20 +7320,23 @@
69597320 }
69607321 }
69617322
6962
- 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)
69637327 {
6964
- int hc = info.bounds.x + info.bounds.width / 2;
6965
- int vc = info.bounds.y + info.bounds.height / 2;
6966
- 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;
69677331 if (toscreen == null)
69687332 {
6969
- toscreen = new Camera(info.camera.viewCode).toScreen;
7333
+ toscreen = new Camera(clickInfo.camera.viewCode).toScreen;
69707334 }
69717335 cVector vec = in;
69727336 LA.xformPos(in, toscreen, in);
69737337 //System.out.println("Distance = " + info.camera.Distance());
6974
- vec.x *= 100 * info.camera.SCALE / info.camera.Distance();
6975
- 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();
69767340 outPt.x = hc + (int) vec.x;
69777341 outPt.y = vc - (int) vec.y;
69787342 outRec.x = outPt.x - 3;
....@@ -6980,15 +7344,18 @@
69807344 outRec.width = outRec.height = 6;
69817345 }
69827346
6983
- protected Rectangle calcHotSpot(cVector in, ClickInfo info)
7347
+ protected Rectangle calcHotSpot(cVector in//, ClickInfo clickInfo
7348
+ )
69847349 {
69857350 Point pt = new Point(0, 0);
69867351 Rectangle rec = new Rectangle();
6987
- calcHotSpot(in, info, pt, rec);
7352
+ calcHotSpot(in, //clickInfo,
7353
+ pt, rec);
69887354 return rec;
69897355 }
69907356
6991
- void drawEditHandles0(ClickInfo info, int level)
7357
+ void drawEditHandles0(//ClickInfo clickInfo,
7358
+ int level)
69927359 {
69937360 if (level == 0)
69947361 {
....@@ -6997,16 +7364,19 @@
69977364 {
69987365 cVector origin = new cVector();
69997366 //LA.xformPos(origin, toParent, origin);
7000
- Rectangle spot = calcHotSpot(origin, info);
7367
+ if (this.clickInfo == null)
7368
+ this.clickInfo = new ClickInfo();
7369
+
7370
+ Rectangle spot = calcHotSpot(origin); //, clickInfo);
70017371 Rectangle boundary = new Rectangle();
70027372 boundary.x = spot.x - 30;
70037373 boundary.y = spot.y - 30;
70047374 boundary.width = spot.width + 60;
70057375 boundary.height = spot.height + 60;
7006
- info.g.setColor(Color.red);
7376
+ clickInfo.g.setColor(Color.red);
70077377 int spotw = spot.x + spot.width;
70087378 int spoth = spot.y + spot.height;
7009
- info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7379
+ clickInfo.g.fillRect(spot.x, spot.y, spot.width, spot.height);
70107380 // if (CameraPane.Xmin > spot.x)
70117381 // {
70127382 // CameraPane.Xmin = spot.x;
....@@ -7026,8 +7396,8 @@
70267396 spot.translate(32, 32);
70277397 spotw = spot.x + spot.width;
70287398 spoth = spot.y + spot.height;
7029
- info.g.setColor(Color.blue);
7030
- 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);
70317401 // if (CameraPane.Xmin > spot.x)
70327402 // {
70337403 // CameraPane.Xmin = spot.x;
....@@ -7044,11 +7414,12 @@
70447414 // {
70457415 // CameraPane.Ymax = spoth;
70467416 // }
7047
- // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);
7048
- //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
70497419 spot.translate(0, -32);
7050
- info.g.setColor(Color.green);
7051
- 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);
70527423 // if (CameraPane.Xmin > spot.x)
70537424 // {
70547425 // CameraPane.Xmin = spot.x;
....@@ -7065,8 +7436,8 @@
70657436 // {
70667437 // CameraPane.Ymax = spoth;
70677438 // }
7068
- info.g.drawArc(boundary.x, boundary.y,
7069
- 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);
70707441 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
70717442 // if (CameraPane.Xmin > boundary.x)
70727443 // {
....@@ -7088,7 +7459,8 @@
70887459 }
70897460 }
70907461
7091
- boolean doEditClick0(ClickInfo info, int level)
7462
+ boolean doEditClick0(//ClickInfo clickInfo,
7463
+ int level)
70927464 {
70937465 if (level == 0)
70947466 {
....@@ -7097,8 +7469,8 @@
70977469
70987470 boolean retval = false;
70997471
7100
- startX = info.x;
7101
- startY = info.y;
7472
+ startX = clickInfo.x;
7473
+ startY = clickInfo.y;
71027474
71037475 hitSomething = -1;
71047476 cVector origin = new cVector();
....@@ -7108,22 +7480,51 @@
71087480 {
71097481 centerPt = new Point(0, 0);
71107482 }
7111
- calcHotSpot(origin, info, centerPt, spot);
7112
- if (spot.contains(info.x, info.y))
7483
+ calcHotSpot(origin, //info,
7484
+ centerPt, spot);
7485
+ if (spot.contains(clickInfo.x, clickInfo.y))
71137486 {
71147487 hitSomething = hitCenter;
71157488 retval = true;
71167489 }
71177490 spot.translate(32, 0);
7118
- if (spot.contains(info.x, info.y))
7491
+ if (spot.contains(clickInfo.x, clickInfo.y))
71197492 {
71207493 hitSomething = hitRotate;
71217494 retval = true;
71227495 }
71237496 spot.translate(0, 32);
7124
- if (spot.contains(info.x, info.y))
7497
+ if (spot.contains(clickInfo.x, clickInfo.y))
71257498 {
71267499 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
+
71277528 retval = true;
71287529 }
71297530
....@@ -7133,7 +7534,7 @@
71337534 }
71347535
71357536 //System.out.println("info.modifiers = " + info.modifiers);
7136
- modified = (info.modifiers & CameraPane.SHIFT) != 0; // Was META
7537
+ modified = (clickInfo.modifiers & CameraPane.SHIFT) != 0; // Was META
71377538 //System.out.println("modified = " + modified);
71387539 //new Exception().printStackTrace();
71397540 //viewCode = info.pane.renderCamera.viewCode;
....@@ -7161,7 +7562,8 @@
71617562 return true;
71627563 }
71637564
7164
- void doEditDrag0(ClickInfo info, boolean opposite)
7565
+ void doEditDrag0(//ClickInfo info,
7566
+ boolean opposite)
71657567 {
71667568 if (hitSomething == 0)
71677569 {
....@@ -7175,7 +7577,7 @@
71757577
71767578 //System.out.println("hitSomething = " + hitSomething);
71777579
7178
- double scale = 0.005f * info.camera.Distance();
7580
+ double scale = 0.005f * clickInfo.camera.Distance();
71797581
71807582 cVector xlate = new cVector();
71817583 //cVector xlate2 = new cVector();
....@@ -7209,8 +7611,8 @@
72097611 toParent[3][i] = xlate.get(i);
72107612 LA.matInvert(toParent, fromParent);
72117613 */
7212
- cVector delta = LA.newVector(0, 0, startY - info.y);
7213
- 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);
72147616
72157617 LA.matCopy(startMat, toParent);
72167618 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7219,7 +7621,7 @@
72197621 } else
72207622 {
72217623 //LA.xformDir(delta, info.camera.fromScreen, delta);
7222
- cVector up = new cVector(info.camera.up);
7624
+ cVector up = new cVector(clickInfo.camera.up);
72237625 cVector away = new cVector();
72247626 //cVector right2 = new cVector();
72257627 //LA.vecCross(up, cVector.Z, right);
....@@ -7236,19 +7638,19 @@
72367638 LA.xformDir(up, ClickInfo.matbuffer, up);
72377639 // if (!CameraPane.LOCALTRANSFORM)
72387640 LA.xformDir(up, Globals.theRenderer.RenderCamera().toScreen, up);
7239
- LA.xformDir(info.camera.away, ClickInfo.matbuffer, away);
7641
+ LA.xformDir(clickInfo.camera.away, ClickInfo.matbuffer, away);
72407642 // if (!CameraPane.LOCALTRANSFORM)
72417643 LA.xformDir(away, Globals.theRenderer.RenderCamera().toScreen, away);
72427644 //LA.vecCross(up, cVector.Z, right2);
72437645
7244
- cVector delta = LA.newVector(info.x - startX, startY - info.y, 0);
7646
+ cVector delta = LA.newVector(clickInfo.x - startX, startY - clickInfo.y, 0);
72457647
72467648 //System.out.println("DELTA0 = " + delta);
72477649 //System.out.println("AWAY = " + info.camera.away);
72487650 //System.out.println("UP = " + info.camera.up);
72497651 if (away.z > 0)
72507652 {
7251
- if (info.camera.up.x == 0) // LA.vecDot(right, right2)<0)
7653
+ if (clickInfo.camera.up.x == 0) // LA.vecDot(right, right2)<0)
72527654 {
72537655 delta.x = -delta.x;
72547656 } else
....@@ -7263,7 +7665,7 @@
72637665 //System.out.println("DELTA1 = " + delta);
72647666 LA.xformDir(delta, ClickInfo.matbuffer, delta);
72657667 //System.out.println("DELTA2 = " + delta);
7266
- LA.xformDir(delta, new Camera(info.camera.viewCode).fromScreen, delta);
7668
+ LA.xformDir(delta, new Camera(clickInfo.camera.viewCode).fromScreen, delta);
72677669 LA.matCopy(startMat, toParent);
72687670 //System.out.println("DELTA3 = " + delta);
72697671 LA.matTranslate(toParent, delta.x * scale, delta.y * scale, delta.z * scale);
....@@ -7273,8 +7675,8 @@
72737675 break;
72747676
72757677 case hitRotate: // rotate
7276
- int dx = info.x - centerPt.x;
7277
- int dy = -(info.y - centerPt.y);
7678
+ int dx = clickInfo.x - centerPt.x;
7679
+ int dy = -(clickInfo.y - centerPt.y);
72787680 double angle = (double) Math.atan2(dx, dy);
72797681 angle = -(1.570796 - angle);
72807682
....@@ -7297,7 +7699,7 @@
72977699 }
72987700 /**/
72997701
7300
- switch (info.pane.RenderCamera().viewCode)
7702
+ switch (clickInfo.pane.RenderCamera().viewCode)
73017703 {
73027704 case 1: // '\001'
73037705 LA.matZRotate(toParent, angle);
....@@ -7324,7 +7726,7 @@
73247726 break;
73257727
73267728 case hitScale: // scale
7327
- double hScale = (double) (info.x - centerPt.x) / 32;
7729
+ double hScale = (double) (clickInfo.x - centerPt.x) / 32;
73287730 double sign = 1;
73297731 if (hScale < 0)
73307732 {
....@@ -7336,7 +7738,7 @@
73367738 //hScale = 0.01;
73377739 }
73387740
7339
- double vScale = (double) (info.y - centerPt.y) / 32;
7741
+ double vScale = (double) (clickInfo.y - centerPt.y) / 32;
73407742 sign = 1;
73417743 if (vScale < 0)
73427744 {
....@@ -7347,6 +7749,7 @@
73477749 {
73487750 //vScale = 0.01;
73497751 }
7752
+
73507753 LA.matCopy(startMat, toParent);
73517754 /**/
73527755 for (int i = 0; i < 3; i++)
....@@ -7356,29 +7759,30 @@
73567759 }
73577760 /**/
73587761
7359
- double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2);
7762
+ double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / clickInfo.scale;
73607763
73617764 if (totalScale < 0.01)
73627765 {
73637766 totalScale = 0.01;
73647767 }
73657768
7366
- switch (info.pane.RenderCamera().viewCode)
7769
+ switch (clickInfo.pane.RenderCamera().viewCode)
73677770 {
73687771 case 3: // '\001'
7369
- if (modified)
7772
+ if (modified || opposite)
73707773 {
73717774 //LA.matScale(toParent, 1, hScale, vScale);
73727775 LA.matScale(toParent, totalScale, 1, 1);
73737776 } // vScale, 1);
73747777 else
73757778 {
7779
+ // EXCEPTION!
73767780 LA.matScale(toParent, totalScale, totalScale, totalScale);
73777781 } // vScale, 1);
73787782 break;
73797783
73807784 case 2: // '\002'
7381
- if (modified)
7785
+ if (modified || opposite)
73827786 {
73837787 //LA.matScale(toParent, hScale, 1, vScale);
73847788 LA.matScale(toParent, 1, totalScale, 1);
....@@ -7389,7 +7793,7 @@
73897793 break;
73907794
73917795 case 1: // '\003'
7392
- if (modified)
7796
+ if (modified || opposite)
73937797 {
73947798 //LA.matScale(toParent, hScale, vScale, 1);
73957799 LA.matScale(toParent, 1, 1, totalScale);
....@@ -7429,7 +7833,7 @@
74297833 } // NEW ...
74307834
74317835
7432
- info.pane.repaint();
7836
+ clickInfo.pane.repaint();
74337837 }
74347838
74357839 boolean overflow = false;
....@@ -7609,6 +8013,10 @@
76098013 editWindow = null;
76108014 } // ?
76118015 }
8016
+ else
8017
+ {
8018
+ //editWindow.closeUI();
8019
+ }
76128020 }
76138021
76148022 boolean root; // patch for edit windows
....@@ -7766,6 +8174,10 @@
77668174 }
77678175
77688176 transient ObjEditor editWindow;
8177
+ transient ObjEditor manipWindow;
8178
+
8179
+ transient boolean pinned;
8180
+
77698181 transient ObjectUI objectUI;
77708182 public static int povDepth = 0;
77718183 private static cVector tbMin = new cVector();