Normand Briere
2019-06-23 8088590686a45e71278f9a52bb9cc37943dc0c37
Object3D.java
....@@ -14,11 +14,20 @@
1414 import //weka.core.
1515 matrix.Matrix;
1616
17
+import java.util.UUID;
18
+
1719 //import net.sourceforge.sizeof.SizeOf;
1820 public class Object3D extends Vector<Object3D> implements java.io.Serializable, iSendInfo //, aurelienribon.tweenengine.TweenAccessor<Object3D>
1921 {
2022 //static final long serialVersionUID = -607422624994562685L;
2123 static final long serialVersionUID = 5022536242724664900L;
24
+
25
+ private UUID uuid = UUID.randomUUID();
26
+
27
+ // TEMPORARY for mocap undo
28
+ mocap.reader.BVHReader.BVHResult bvh;
29
+ Object3D skeleton;
30
+ //
2231
2332 ScriptNode scriptnode;
2433
....@@ -100,64 +109,136 @@
100109
101110 // transient boolean reduced; // for morph reduction
102111
103
-transient com.bulletphysics.linearmath.Transform cache; // for fast merge
104
-transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
112
+ transient com.bulletphysics.linearmath.Transform cache; // for fast merge
113
+ transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
105114
106
-transient Object3D transientsupport; // for cloning
107
-transient boolean transientlink2master;
115
+ transient Object3D transientsupport; // for cloning
116
+ transient boolean transientlink2master;
108117
109
-void SaveSupports()
110
-{
111
- if (blockloop)
112
- return;
113
-
114
- transientsupport = support;
115
- transientlink2master = link2master;
116
-
117
- support = null;
118
- link2master = false;
119
-
120
- if (bRep != null)
118
+ void SaveSupports()
121119 {
122
- bRep.SaveSupports();
123
- }
124
-
125
- for (int i = 0; i < Size(); i++)
126
- {
127
- Object3D child = (Object3D) get(i);
128
- if (child == null)
129
- continue;
130
- blockloop = true;
131
- child.SaveSupports();
132
- blockloop = false;
133
- }
134
-}
120
+ if (blockloop)
121
+ return;
135122
136
-void RestoreSupports()
137
-{
138
- if (blockloop)
139
- return;
123
+ transientsupport = support;
124
+ transientlink2master = link2master;
140125
141
- support = transientsupport;
142
- link2master = transientlink2master;
143
- transientsupport = null;
144
- transientlink2master = false;
145
-
146
- if (bRep != null)
147
- {
148
- bRep.RestoreSupports();
126
+ support = null;
127
+ link2master = false;
128
+
129
+ if (bRep != null)
130
+ {
131
+ bRep.SaveSupports();
132
+ }
133
+
134
+ for (int i = 0; i < Size(); i++)
135
+ {
136
+ Object3D child = (Object3D) get(i);
137
+ if (child == null)
138
+ continue;
139
+ blockloop = true;
140
+ child.SaveSupports();
141
+ blockloop = false;
142
+ }
149143 }
150
-
151
- for (int i = 0; i < Size(); i++)
144
+
145
+ void RestoreSupports()
152146 {
153
- Object3D child = (Object3D) get(i);
154
- if (child == null)
155
- continue;
156
- blockloop = true;
157
- child.RestoreSupports();
158
- blockloop = false;
147
+ if (blockloop)
148
+ return;
149
+
150
+ support = transientsupport;
151
+ link2master = transientlink2master;
152
+ transientsupport = null;
153
+ transientlink2master = false;
154
+
155
+ if (bRep != null)
156
+ {
157
+ bRep.RestoreSupports();
158
+ }
159
+
160
+ for (int i = 0; i < Size(); i++)
161
+ {
162
+ Object3D child = (Object3D) get(i);
163
+ if (child == null)
164
+ continue;
165
+ blockloop = true;
166
+ child.RestoreSupports();
167
+ blockloop = false;
168
+ }
159169 }
160
-}
170
+
171
+ void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
172
+ {
173
+ if (hashtable.containsKey(GetUUID()))
174
+ {
175
+ Object3D o = hashtable.get(GetUUID());
176
+
177
+ Grafreed.Assert(this.bRep == o.bRep);
178
+ if (this.bRep != null)
179
+ assert(this.bRep.support == o.transientrep);
180
+
181
+ return;
182
+ }
183
+
184
+ Object3D o = new Object3D();
185
+
186
+ hashtable.put(GetUUID(), o);
187
+
188
+ for (int i=0; i<Size(); i++)
189
+ {
190
+ get(i).ExtractBigData(hashtable);
191
+ }
192
+
193
+ ExtractBigData(o);
194
+ }
195
+
196
+ void ExtractBigData(Object3D o)
197
+ {
198
+ o.bRep = this.bRep;
199
+ if (this.bRep != null)
200
+ {
201
+ o.transientrep = this.bRep.support;
202
+ o.bRep.support = null;
203
+ }
204
+
205
+ // o.support = this.support;
206
+ // o.fileparent = this.fileparent;
207
+ // if (this.bRep != null)
208
+ // o.bRep = this.bRep.support;
209
+
210
+ this.bRep = null;
211
+ // if (this.bRep != null)
212
+ // this.bRep.support = null;
213
+ // this.support = null;
214
+ // this.fileparent = null;
215
+ }
216
+
217
+ void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
218
+ {
219
+ if (!hashtable.containsKey(GetUUID()))
220
+ return;
221
+
222
+ Object3D o = hashtable.get(GetUUID());
223
+
224
+ RestoreBigData(o);
225
+
226
+ hashtable.remove(GetUUID());
227
+
228
+ for (int i=0; i<Size(); i++)
229
+ {
230
+ get(i).RestoreBigData(hashtable);
231
+ }
232
+ }
233
+
234
+ void RestoreBigData(Object3D o)
235
+ {
236
+ this.bRep = o.bRep;
237
+ if (this.bRep != null)
238
+ this.bRep.support = o.transientrep;
239
+ // this.support = o.support;
240
+ // this.fileparent = o.fileparent;
241
+ }
161242
162243 // MOCAP SUPPORT
163244 double tx,ty,tz,rx,ry,rz;
....@@ -482,12 +563,14 @@
482563 toParent = LA.newMatrix();
483564 fromParent = LA.newMatrix();
484565 }
566
+
485567 if (toParentMarked == null)
486568 {
487569 if (maxcount != 1)
488570 {
489571 new Exception().printStackTrace();
490572 }
573
+
491574 toParentMarked = LA.newMatrix();
492575 fromParentMarked = LA.newMatrix();
493576 }
....@@ -775,7 +858,7 @@
775858 if (step == 0)
776859 step = 1;
777860 if (maxcount == 0)
778
- maxcount = 2048; // 4;
861
+ maxcount = 128; // 2048; // 4;
779862 // if (acceleration == 0)
780863 // acceleration = 10;
781864 if (delay == 0) // serial
....@@ -810,7 +893,8 @@
810893
811894 boolean changedir = random && Math.random() < 0.01; // && !link2master;
812895
813
- if (transformcount*factor > maxcount || (step == 1 && changedir))
896
+ if (transformcount*factor >= maxcount && (rewind || random) ||
897
+ (step == 1 && changedir))
814898 {
815899 countdown = 1;
816900 delay = speedup?8:1;
....@@ -2303,6 +2387,10 @@
23032387 }
23042388 */
23052389 }
2390
+ else
2391
+ {
2392
+ //((ObjEditor)editWindow).SetupUI2(null);
2393
+ }
23062394 }
23072395
23082396 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -2628,6 +2716,18 @@
26282716 //Touch();
26292717 }
26302718
2719
+ void GenNormalsMeshS()
2720
+ {
2721
+ selection.GenNormalsMesh();
2722
+// for (int i=0; i<selection.size(); i++)
2723
+// {
2724
+// Object3D selectee = (Object3D) selection.elementAt(i);
2725
+// selectee.GenNormals(crease);
2726
+// }
2727
+
2728
+ //Touch();
2729
+ }
2730
+
26312731 void ClearColorsS()
26322732 {
26332733 selection.ClearColors();
....@@ -2759,6 +2859,24 @@
27592859 if (child == null)
27602860 continue;
27612861 child.GenNormals(crease);
2862
+// Children().release(i);
2863
+ }
2864
+ blockloop = false;
2865
+ }
2866
+
2867
+ void GenNormalsMesh()
2868
+ {
2869
+ if (blockloop)
2870
+ return;
2871
+
2872
+ blockloop = true;
2873
+ GenNormalsMesh0();
2874
+ for (int i = 0; i < Children().Size(); i++)
2875
+ {
2876
+ Object3D child = (Object3D) Children().get(i); // reserve(i);
2877
+ if (child == null)
2878
+ continue;
2879
+ child.GenNormalsMesh();
27622880 // Children().release(i);
27632881 }
27642882 blockloop = false;
....@@ -2927,6 +3045,15 @@
29273045 if (bRep != null)
29283046 {
29293047 bRep.GenerateNormals(crease);
3048
+ Touch();
3049
+ }
3050
+ }
3051
+
3052
+ void GenNormalsMesh0()
3053
+ {
3054
+ if (bRep != null)
3055
+ {
3056
+ bRep.GenerateNormalsMesh();
29303057 Touch();
29313058 }
29323059 }
....@@ -3381,7 +3508,8 @@
33813508 if (blockloop)
33823509 return;
33833510
3384
- if (marked || (bRep != null && material != null)) // borderline...
3511
+ if (//marked || // does not make sense
3512
+ (bRep != null || material != null)) // borderline...
33853513 live = h;
33863514
33873515 for (int i = 0; i < Size(); i++)
....@@ -3402,7 +3530,8 @@
34023530 return;
34033531
34043532 //if (bRep != null)
3405
- if (marked || (bRep != null && material != null)) // borderline...
3533
+ if (//marked || // does not make sense
3534
+ (bRep != null || material != null)) // borderline...
34063535 link2master = h;
34073536
34083537 for (int i = 0; i < Size(); i++)
....@@ -3422,7 +3551,8 @@
34223551 if (blockloop)
34233552 return;
34243553
3425
- if (marked || (bRep != null && material != null)) // borderline...
3554
+ if (//marked || // does not make sense
3555
+ (bRep != null || material != null)) // borderline...
34263556 hide = h;
34273557
34283558 for (int i = 0; i < Size(); i++)
....@@ -3442,7 +3572,7 @@
34423572 if (blockloop)
34433573 return;
34443574
3445
- if (bRep != null && material != null) // borderline...
3575
+ if (bRep != null || material != null) // borderline...
34463576 marked = h;
34473577
34483578 for (int i = 0; i < Size(); i++)
....@@ -3452,6 +3582,46 @@
34523582 continue;
34533583 blockloop = true;
34543584 child.MarkLeaves(h);
3585
+ blockloop = false;
3586
+ // release(i);
3587
+ }
3588
+ }
3589
+
3590
+ void RewindLeaves(boolean h)
3591
+ {
3592
+ if (blockloop)
3593
+ return;
3594
+
3595
+ if (bRep != null || material != null) // borderline...
3596
+ rewind = h;
3597
+
3598
+ for (int i = 0; i < Size(); i++)
3599
+ {
3600
+ Object3D child = (Object3D) get(i); // reserve(i);
3601
+ if (child == null)
3602
+ continue;
3603
+ blockloop = true;
3604
+ child.RewindLeaves(h);
3605
+ blockloop = false;
3606
+ // release(i);
3607
+ }
3608
+ }
3609
+
3610
+ void RandomLeaves(boolean h)
3611
+ {
3612
+ if (blockloop)
3613
+ return;
3614
+
3615
+ if (bRep != null || material != null) // borderline...
3616
+ random = h;
3617
+
3618
+ for (int i = 0; i < Size(); i++)
3619
+ {
3620
+ Object3D child = (Object3D) get(i); // reserve(i);
3621
+ if (child == null)
3622
+ continue;
3623
+ blockloop = true;
3624
+ child.RandomLeaves(h);
34553625 blockloop = false;
34563626 // release(i);
34573627 }
....@@ -4225,6 +4395,55 @@
42254395 {
42264396 blockloop = true;
42274397 get(i).RepairShadow();
4398
+ blockloop = false;
4399
+ }
4400
+ }
4401
+
4402
+ void RepairSOV()
4403
+ {
4404
+ if (blockloop)
4405
+ return;
4406
+
4407
+ String texname = this.GetPigmentTexture();
4408
+
4409
+ if (texname.startsWith("sov"))
4410
+ {
4411
+ String[] s = texname.split("/");
4412
+
4413
+ String[] sname = s[1].split("Color.pn");
4414
+
4415
+ texname = sname[0];
4416
+
4417
+ if (sname.length > 1)
4418
+ {
4419
+ texname += "Color.jpg";
4420
+ }
4421
+
4422
+ this.SetPigmentTexture("sov/" + texname);
4423
+ }
4424
+
4425
+ texname = this.GetBumpTexture();
4426
+
4427
+ if (texname.startsWith("sov"))
4428
+ {
4429
+ String[] s = texname.split("/");
4430
+
4431
+ String[] sname = s[1].split("Bump.pn");
4432
+
4433
+ texname = sname[0];
4434
+
4435
+ if (sname.length > 1)
4436
+ {
4437
+ texname += "Bump.jpg";
4438
+ }
4439
+
4440
+ this.SetBumpTexture("sov/" + texname);
4441
+ }
4442
+
4443
+ for (int i=0; i<Size(); i++)
4444
+ {
4445
+ blockloop = true;
4446
+ get(i).RepairSOV();
42284447 blockloop = false;
42294448 }
42304449 }
....@@ -5371,6 +5590,43 @@
53715590 }
53725591 }
53735592
5593
+ UUID GetUUID()
5594
+ {
5595
+ if (uuid == null)
5596
+ {
5597
+ // Serial
5598
+ uuid = UUID.randomUUID();
5599
+ }
5600
+
5601
+ return uuid;
5602
+ }
5603
+
5604
+ Object3D GetObject(UUID uid)
5605
+ {
5606
+ if (blockloop)
5607
+ return null;
5608
+
5609
+ if (GetUUID().equals(uid))
5610
+ return this;
5611
+
5612
+ int nb = Size();
5613
+ for (int i = 0; i < nb; i++)
5614
+ {
5615
+ Object3D child = (Object3D) get(i);
5616
+
5617
+ if (child == null)
5618
+ continue;
5619
+
5620
+ blockloop = true;
5621
+ Object3D obj = child.GetObject(uid);
5622
+ blockloop = false;
5623
+ if (obj != null)
5624
+ return obj;
5625
+ }
5626
+
5627
+ return null;
5628
+ }
5629
+
53745630 void SetBumpTexture(String tex)
53755631 {
53765632 if (GetTextures() == null)
....@@ -5415,12 +5671,23 @@
54155671 boolean NeedSupport()
54165672 {
54175673 return
5418
- CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
5674
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
54195675 // PROBLEM with CROWD!!
54205676 && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
54215677 }
54225678
54235679 static boolean DEBUG_SELECTION = false;
5680
+
5681
+ boolean IsLive()
5682
+ {
5683
+ if (live)
5684
+ return true;
5685
+
5686
+ if (parent == null)
5687
+ return false;
5688
+
5689
+ return parent.IsLive();
5690
+ }
54245691
54255692 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
54265693 {
....@@ -5483,7 +5750,7 @@
54835750 support = support;
54845751
54855752 //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5486
- boolean usecalllists = false; // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5753
+ boolean usecalllists = IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
54875754
54885755 if (!usecalllists && bRep != null && bRep.displaylist > 0)
54895756 {
....@@ -5503,10 +5770,12 @@
55035770 boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
55045771
55055772 if (!selectmode && //display.DrawMode() != display.SELECTION &&
5506
- (touched || (bRep != null && bRep.displaylist <= 0)))
5773
+ //(touched || (bRep != null && bRep.displaylist <= 0)))
5774
+ (Globals.isLIVE() || touched && (bRep != null && bRep.displaylist <= 0)))
55075775 {
55085776 Globals.lighttouched = true;
55095777 } // all panes...
5778
+
55105779 //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
55115780 if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
55125781 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5674,16 +5943,27 @@
56745943 tex = GetTextures();
56755944 }
56765945
5677
- boolean failed = false;
5946
+ boolean failedPigment = false;
5947
+ boolean failedBump = false;
56785948
56795949 try
56805950 {
5681
- display.BindTextures(tex, texres);
5951
+ display.BindPigmentTexture(tex, texres);
56825952 }
56835953 catch (Exception e)
56845954 {
56855955 System.err.println("FAILED: " + this);
5686
- failed = true;
5956
+ failedPigment = true;
5957
+ }
5958
+
5959
+ try
5960
+ {
5961
+ display.BindBumpTexture(tex, texres);
5962
+ }
5963
+ catch (Exception e)
5964
+ {
5965
+ //System.err.println("FAILED: " + this);
5966
+ failedBump = true;
56875967 }
56885968
56895969 if (!compiled)
....@@ -5706,8 +5986,11 @@
57065986 }
57075987 }
57085988
5709
- if (!failed)
5710
- display.ReleaseTextures(tex);
5989
+ if (!failedBump)
5990
+ display.ReleaseBumpTexture(tex);
5991
+
5992
+ if (!failedPigment)
5993
+ display.ReleasePigmentTexture(tex);
57115994
57125995 display.PopMaterial(this, selected);
57135996 }
....@@ -6080,6 +6363,11 @@
60806363 // dec 2012
60816364 new Exception().printStackTrace();
60826365 return;
6366
+ }
6367
+
6368
+ if (dontselect)
6369
+ {
6370
+ //bRep.GenerateNormalsMINE();
60836371 }
60846372
60856373 display.DrawGeometry(bRep, flipV, selectmode);
....@@ -6932,7 +7220,7 @@
69327220 spot.translate(32, 32);
69337221 spotw = spot.x + spot.width;
69347222 spoth = spot.y + spot.height;
6935
- info.g.setColor(Color.blue);
7223
+ info.g.setColor(Color.cyan);
69367224 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
69377225 // if (CameraPane.Xmin > spot.x)
69387226 // {
....@@ -6950,11 +7238,12 @@
69507238 // {
69517239 // CameraPane.Ymax = spoth;
69527240 // }
6953
- info.g.drawLine(spotw, spoth, spotw, spoth - 15);
6954
- info.g.drawLine(spotw, spoth, spotw - 15, spoth);
7241
+ // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
7242
+ //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
69557243 spot.translate(0, -32);
6956
- info.g.setColor(Color.green);
7244
+ info.g.setColor(Color.yellow);
69577245 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7246
+ info.g.setColor(Color.green);
69587247 // if (CameraPane.Xmin > spot.x)
69597248 // {
69607249 // CameraPane.Xmin = spot.x;
....@@ -7006,7 +7295,7 @@
70067295 startX = info.x;
70077296 startY = info.y;
70087297
7009
- hitSomething = 0;
7298
+ hitSomething = -1;
70107299 cVector origin = new cVector();
70117300 //LA.xformPos(origin, toParent, origin);
70127301 Rectangle spot = new Rectangle();
....@@ -7082,6 +7371,7 @@
70827371 //System.out.println("hitSomething = " + hitSomething);
70837372
70847373 double scale = 0.005f * info.camera.Distance();
7374
+
70857375 cVector xlate = new cVector();
70867376 //cVector xlate2 = new cVector();
70877377 switch (hitSomething)
....@@ -7230,24 +7520,27 @@
72307520
72317521 case hitScale: // scale
72327522 double hScale = (double) (info.x - centerPt.x) / 32;
7523
+ double sign = 1;
7524
+ if (hScale < 0)
7525
+ {
7526
+ sign = -1;
7527
+ }
7528
+ hScale = sign*Math.pow(sign*hScale, scale * 50);
72337529 if (hScale < 0.01)
72347530 {
7235
- hScale = 0.01;
7531
+ //hScale = 0.01;
72367532 }
7237
- hScale = Math.pow(hScale, scale * 50);
7238
- if (hScale < 0.01)
7239
- {
7240
- hScale = 0.01;
7241
- }
7533
+
72427534 double vScale = (double) (info.y - centerPt.y) / 32;
7243
- if (vScale < 0.01)
7535
+ sign = 1;
7536
+ if (vScale < 0)
72447537 {
7245
- vScale = 0.01;
7538
+ sign = -1;
72467539 }
7247
- vScale = Math.pow(vScale, scale * 50);
7540
+ vScale = sign*Math.pow(sign*vScale, scale * 50);
72487541 if (vScale < 0.01)
72497542 {
7250
- vScale = 0.01;
7543
+ //vScale = 0.01;
72517544 }
72527545 LA.matCopy(startMat, toParent);
72537546 /**/
....@@ -7258,39 +7551,47 @@
72587551 }
72597552 /**/
72607553
7554
+ double totalScale = Math.sqrt(hScale*hScale + vScale*vScale) / Math.sqrt(2);
7555
+
7556
+ if (totalScale < 0.01)
7557
+ {
7558
+ totalScale = 0.01;
7559
+ }
7560
+
72617561 switch (info.pane.RenderCamera().viewCode)
72627562 {
72637563 case 3: // '\001'
7264
- if (modified)
7564
+ if (modified || opposite)
72657565 {
72667566 //LA.matScale(toParent, 1, hScale, vScale);
7267
- LA.matScale(toParent, vScale, 1, 1);
7567
+ LA.matScale(toParent, totalScale, 1, 1);
72687568 } // vScale, 1);
72697569 else
72707570 {
7271
- LA.matScale(toParent, vScale, vScale, vScale);
7571
+ // EXCEPTION!
7572
+ LA.matScale(toParent, totalScale, totalScale, totalScale);
72727573 } // vScale, 1);
72737574 break;
72747575
72757576 case 2: // '\002'
7276
- if (modified)
7577
+ if (modified || opposite)
72777578 {
72787579 //LA.matScale(toParent, hScale, 1, vScale);
7279
- LA.matScale(toParent, 1, vScale, 1);
7580
+ LA.matScale(toParent, 1, totalScale, 1);
72807581 } else
72817582 {
7282
- LA.matScale(toParent, vScale, 1, vScale);
7583
+ LA.matScale(toParent, totalScale, 1, totalScale);
72837584 }
72847585 break;
72857586
72867587 case 1: // '\003'
7287
- if (modified)
7588
+ if (modified || opposite)
72887589 {
72897590 //LA.matScale(toParent, hScale, vScale, 1);
7290
- LA.matScale(toParent, 1, 1, vScale);
7591
+ LA.matScale(toParent, 1, 1, totalScale);
72917592 } else
72927593 {
7293
- LA.matScale(toParent, vScale, vScale, 1);
7594
+ LA.matScale(toParent, totalScale, totalScale, 1);
72947595 }
72957596 break;
72967597 }
....@@ -7431,7 +7732,7 @@
74317732 objname = name + " " + System.identityHashCode(this) + " (" + parent.name + " " + System.identityHashCode(parent) + ")";
74327733 } else
74337734 {
7434
- objname = GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count /*- 1*/) + ")")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ "";
7735
+ objname = GetName() + (Math.abs(count) == 1000 ? (count == 1000 ? " " : " * ") : (" (" + (count - 1) + ")")) + /*(IsSelected()?"(selected) ":"") + (touched?"(touched) ":"") */ "";
74357736 } // + super.toString();
74367737 //return name + " (" + (SizeOf.deepSizeOf(this)/1024) + "K) " + this.getClass().getName();
74377738
....@@ -7504,6 +7805,10 @@
75047805 editWindow = null;
75057806 } // ?
75067807 }
7808
+ else
7809
+ {
7810
+ //editWindow.closeUI();
7811
+ }
75077812 }
75087813
75097814 boolean root; // patch for edit windows
....@@ -7515,7 +7820,7 @@
75157820 /*transient*/ cVector2[] projectedVertices = new cVector2[0];
75167821
75177822 Object3D /*Composite*/ parent;
7518
- Object3D /*Composite*/ fileparent;
7823
+ Object3D /*Composite*/ fileparent; // In the case of FileObject
75197824
75207825 double[][] toParent; // dynamic matrix
75217826 double[][] fromParent;
....@@ -7679,9 +7984,9 @@
76797984 private static cVector edge2 = new cVector();
76807985 //private static cVector norm = new cVector();
76817986 /*transient private*/ int hitSomething;
7682
- private static final int hitCenter = 1;
7683
- private static final int hitScale = 2;
7684
- private static final int hitRotate = 3;
7987
+ static final int hitCenter = 1;
7988
+ static final int hitScale = 2;
7989
+ static final int hitRotate = 3;
76857990 /*transient*/ /*private*/ int viewCode; // Now used for transparency cache flag
76867991 /*transient*/ private Point centerPt;
76877992 /*transient*/ private int startX;