Normand Briere
2019-07-17 a5580a47d246c1272b10adba68070f6e13da5e41
Object3D.java
....@@ -24,6 +24,14 @@
2424
2525 private UUID uuid = UUID.randomUUID();
2626
27
+ // TEMPORARY for mocap undo. No need to be transient.
28
+ mocap.reader.BVHReader.BVHResult savebvh;
29
+ Object3D saveskeleton;
30
+ //
31
+
32
+ byte[] versions[] = new byte[100][];
33
+ int versionindex = -1;
34
+
2735 ScriptNode scriptnode;
2836
2937 void InitOthers()
....@@ -104,125 +112,173 @@
104112
105113 // transient boolean reduced; // for morph reduction
106114
107
-transient com.bulletphysics.linearmath.Transform cache; // for fast merge
108
-transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
115
+ transient com.bulletphysics.linearmath.Transform cache; // for fast merge
116
+ transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
109117
110
-transient Object3D transientsupport; // for cloning
111
-transient boolean transientlink2master;
118
+ transient Object3D transientsupport; // for cloning
119
+ transient boolean transientlink2master;
112120
113
-void SaveSupports()
114
-{
115
- if (blockloop)
116
- return;
117
-
118
- transientsupport = support;
119
- transientlink2master = link2master;
120
-
121
- support = null;
122
- link2master = false;
123
-
124
- if (bRep != null)
121
+ void SaveSupports()
125122 {
126
- bRep.SaveSupports();
123
+ if (blockloop)
124
+ return;
125
+
126
+ transientsupport = support;
127
+ transientlink2master = link2master;
128
+
129
+ support = null;
130
+ link2master = false;
131
+
132
+ if (bRep != null)
133
+ {
134
+ bRep.SaveSupports();
135
+ }
136
+
137
+ for (int i = 0; i < Size(); i++)
138
+ {
139
+ Object3D child = (Object3D) get(i);
140
+ if (child == null)
141
+ continue;
142
+ blockloop = true;
143
+ child.SaveSupports();
144
+ blockloop = false;
145
+ }
127146 }
128
-
129
- for (int i = 0; i < Size(); i++)
130
- {
131
- Object3D child = (Object3D) get(i);
132
- if (child == null)
133
- continue;
134
- blockloop = true;
135
- child.SaveSupports();
136
- blockloop = false;
137
- }
138
-}
139147
140
-void RestoreSupports()
141
-{
142
- if (blockloop)
143
- return;
148
+ void RestoreSupports()
149
+ {
150
+ if (blockloop)
151
+ return;
144152
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
-}
153
+ support = transientsupport;
154
+ link2master = transientlink2master;
155
+ transientsupport = null;
156
+ transientlink2master = false;
165157
166
-void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
167
-{
168
- if (hashtable.containsKey(GetUUID()))
158
+ if (bRep != null)
159
+ {
160
+ bRep.RestoreSupports();
161
+ }
162
+
163
+ for (int i = 0; i < Size(); i++)
164
+ {
165
+ Object3D child = (Object3D) get(i);
166
+ if (child == null)
167
+ continue;
168
+ blockloop = true;
169
+ child.RestoreSupports();
170
+ blockloop = false;
171
+ }
172
+ }
173
+
174
+ void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
169175 {
176
+ Object3D o;
177
+
178
+ if (hashtable.containsKey(GetUUID()))
179
+ {
180
+ o = hashtable.get(GetUUID());
181
+
182
+ Grafreed.Assert(this.bRep == o.bRep);
183
+ //if (this.bRep != null)
184
+ // assert(this.bRep.support == o.transientrep);
185
+ if (this.support != null)
186
+ assert(this.support.bRep == o.transientrep);
187
+ }
188
+ else
189
+ {
190
+ o = new Object3D("copy of " + this.name);
191
+
192
+ hashtable.put(GetUUID(), o);
193
+ }
194
+
195
+ if (!blockloop)
196
+ {
197
+ blockloop = true;
198
+
199
+ for (int i=0; i<Size(); i++)
200
+ {
201
+ get(i).ExtractBigData(hashtable);
202
+ }
203
+
204
+ blockloop = false;
205
+ }
206
+
207
+ ExtractBigData(o);
208
+ }
209
+
210
+ void ExtractBigData(Object3D o)
211
+ {
212
+ if (o.bRep != null)
213
+ Grafreed.Assert(o.bRep == this.bRep);
214
+
215
+ o.bRep = this.bRep;
216
+// July 2019 if (this.bRep != null)
217
+// {
218
+// o.transientrep = this.bRep.support;
219
+// o.bRep.support = null;
220
+// }
221
+ o.selection = this.selection;
222
+
223
+ if (this.support != null)
224
+ {
225
+ if (o.transientrep != null)
226
+ Grafreed.Assert(o.transientrep == this.support.bRep);
227
+
228
+ o.transientrep = this.support.bRep;
229
+ this.support.bRep = null;
230
+ }
231
+
232
+ // o.support = this.support;
233
+ // o.fileparent = this.fileparent;
234
+ // if (this.bRep != null)
235
+ // o.bRep = this.bRep.support;
236
+
237
+ this.bRep = null;
238
+ // if (this.bRep != null)
239
+ // this.bRep.support = null;
240
+ // this.support = null;
241
+ // this.fileparent = null;
242
+ }
243
+
244
+ void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
245
+ {
246
+ if (!hashtable.containsKey(GetUUID()))
247
+ return;
248
+
170249 Object3D o = hashtable.get(GetUUID());
171250
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
-}
251
+ RestoreBigData(o);
205252
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);
253
+ if (blockloop)
254
+ return;
255
+
256
+ blockloop = true;
257
+
258
+ //hashtable.remove(GetUUID());
259
+
260
+ for (int i=0; i<Size(); i++)
261
+ {
262
+ get(i).RestoreBigData(hashtable);
263
+ }
264
+
265
+ blockloop = false;
224266 }
225
-}
267
+
268
+ void RestoreBigData(Object3D o)
269
+ {
270
+ this.bRep = o.bRep;
271
+ if (this.support != null && o.transientrep != null)
272
+ {
273
+ this.support.bRep = o.transientrep;
274
+ }
275
+
276
+ this.selection = o.selection;
277
+// July 2019 if (this.bRep != null)
278
+// this.bRep.support = o.transientrep;
279
+ // this.support = o.support;
280
+ // this.fileparent = o.fileparent;
281
+ }
226282
227283 // MOCAP SUPPORT
228284 double tx,ty,tz,rx,ry,rz;
....@@ -547,12 +603,14 @@
547603 toParent = LA.newMatrix();
548604 fromParent = LA.newMatrix();
549605 }
606
+
550607 if (toParentMarked == null)
551608 {
552609 if (maxcount != 1)
553610 {
554611 new Exception().printStackTrace();
555612 }
613
+
556614 toParentMarked = LA.newMatrix();
557615 fromParentMarked = LA.newMatrix();
558616 }
....@@ -863,7 +921,7 @@
863921
864922 if (marked && Globals.isLIVE() && live &&
865923 //TEMP21aug2018
866
- (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
924
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
867925 currentframe != Globals.framecount)
868926 {
869927 currentframe = Globals.framecount;
....@@ -875,7 +933,8 @@
875933
876934 boolean changedir = random && Math.random() < 0.01; // && !link2master;
877935
878
- if (transformcount*factor > maxcount || (step == 1 && changedir))
936
+ if (transformcount*factor >= maxcount && (rewind || random) ||
937
+ (step == 1 && changedir))
879938 {
880939 countdown = 1;
881940 delay = speedup?8:1;
....@@ -947,6 +1006,7 @@
9471006 if (material == null || material.multiply)
9481007 return true;
9491008
1009
+ // Transparent objects are dynamic because we have to sort the triangles.
9501010 return material.opacity > 0.99;
9511011 }
9521012
....@@ -1347,6 +1407,7 @@
13471407 toParent = LA.newMatrix();
13481408 fromParent = LA.newMatrix();
13491409 }
1410
+
13501411 LA.matCopy(other.toParent, toParent);
13511412 LA.matCopy(other.fromParent, fromParent);
13521413
....@@ -2368,6 +2429,10 @@
23682429 }
23692430 */
23702431 }
2432
+ else
2433
+ {
2434
+ //((ObjEditor)editWindow).SetupUI2(null);
2435
+ }
23712436 }
23722437
23732438 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -2409,6 +2474,14 @@
24092474 {
24102475 editWindow.refreshContents();
24112476 }
2477
+ else
2478
+ {
2479
+ if (manipWindow != null)
2480
+ {
2481
+ manipWindow.refreshContents();
2482
+ }
2483
+ }
2484
+
24122485 //if (parent != null)
24132486 //parent.refreshEditWindow();
24142487 }
....@@ -2693,6 +2766,18 @@
26932766 //Touch();
26942767 }
26952768
2769
+ void GenNormalsMeshS()
2770
+ {
2771
+ selection.GenNormalsMesh();
2772
+// for (int i=0; i<selection.size(); i++)
2773
+// {
2774
+// Object3D selectee = (Object3D) selection.elementAt(i);
2775
+// selectee.GenNormals(crease);
2776
+// }
2777
+
2778
+ //Touch();
2779
+ }
2780
+
26962781 void ClearColorsS()
26972782 {
26982783 selection.ClearColors();
....@@ -2824,6 +2909,24 @@
28242909 if (child == null)
28252910 continue;
28262911 child.GenNormals(crease);
2912
+// Children().release(i);
2913
+ }
2914
+ blockloop = false;
2915
+ }
2916
+
2917
+ void GenNormalsMesh()
2918
+ {
2919
+ if (blockloop)
2920
+ return;
2921
+
2922
+ blockloop = true;
2923
+ GenNormalsMesh0();
2924
+ for (int i = 0; i < Children().Size(); i++)
2925
+ {
2926
+ Object3D child = (Object3D) Children().get(i); // reserve(i);
2927
+ if (child == null)
2928
+ continue;
2929
+ child.GenNormalsMesh();
28272930 // Children().release(i);
28282931 }
28292932 blockloop = false;
....@@ -2992,6 +3095,15 @@
29923095 if (bRep != null)
29933096 {
29943097 bRep.GenerateNormals(crease);
3098
+ Touch();
3099
+ }
3100
+ }
3101
+
3102
+ void GenNormalsMesh0()
3103
+ {
3104
+ if (bRep != null)
3105
+ {
3106
+ bRep.GenerateNormalsMesh();
29953107 Touch();
29963108 }
29973109 }
....@@ -3446,7 +3558,8 @@
34463558 if (blockloop)
34473559 return;
34483560
3449
- if (marked || (bRep != null && material != null)) // borderline...
3561
+ if (//marked || // does not make sense
3562
+ (bRep != null || material != null)) // borderline...
34503563 live = h;
34513564
34523565 for (int i = 0; i < Size(); i++)
....@@ -3467,7 +3580,8 @@
34673580 return;
34683581
34693582 //if (bRep != null)
3470
- if (marked || (bRep != null && material != null)) // borderline...
3583
+ if (//marked || // does not make sense
3584
+ (bRep != null || material != null)) // borderline...
34713585 link2master = h;
34723586
34733587 for (int i = 0; i < Size(); i++)
....@@ -3487,7 +3601,8 @@
34873601 if (blockloop)
34883602 return;
34893603
3490
- if (marked || (bRep != null && material != null)) // borderline...
3604
+ if (//marked || // does not make sense
3605
+ (bRep != null || material != null)) // borderline...
34913606 hide = h;
34923607
34933608 for (int i = 0; i < Size(); i++)
....@@ -3507,7 +3622,7 @@
35073622 if (blockloop)
35083623 return;
35093624
3510
- if (bRep != null && material != null) // borderline...
3625
+ if (bRep != null || material != null) // borderline...
35113626 marked = h;
35123627
35133628 for (int i = 0; i < Size(); i++)
....@@ -3517,6 +3632,46 @@
35173632 continue;
35183633 blockloop = true;
35193634 child.MarkLeaves(h);
3635
+ blockloop = false;
3636
+ // release(i);
3637
+ }
3638
+ }
3639
+
3640
+ void RewindLeaves(boolean h)
3641
+ {
3642
+ if (blockloop)
3643
+ return;
3644
+
3645
+ if (bRep != null || material != null) // borderline...
3646
+ rewind = h;
3647
+
3648
+ for (int i = 0; i < Size(); i++)
3649
+ {
3650
+ Object3D child = (Object3D) get(i); // reserve(i);
3651
+ if (child == null)
3652
+ continue;
3653
+ blockloop = true;
3654
+ child.RewindLeaves(h);
3655
+ blockloop = false;
3656
+ // release(i);
3657
+ }
3658
+ }
3659
+
3660
+ void RandomLeaves(boolean h)
3661
+ {
3662
+ if (blockloop)
3663
+ return;
3664
+
3665
+ if (bRep != null || material != null) // borderline...
3666
+ random = h;
3667
+
3668
+ for (int i = 0; i < Size(); i++)
3669
+ {
3670
+ Object3D child = (Object3D) get(i); // reserve(i);
3671
+ if (child == null)
3672
+ continue;
3673
+ blockloop = true;
3674
+ child.RandomLeaves(h);
35203675 blockloop = false;
35213676 // release(i);
35223677 }
....@@ -4294,6 +4449,55 @@
42944449 }
42954450 }
42964451
4452
+ void RepairSOV()
4453
+ {
4454
+ if (blockloop)
4455
+ return;
4456
+
4457
+ String texname = this.GetPigmentTexture();
4458
+
4459
+ if (texname.startsWith("sov"))
4460
+ {
4461
+ String[] s = texname.split("/");
4462
+
4463
+ String[] sname = s[1].split("Color.pn");
4464
+
4465
+ texname = sname[0];
4466
+
4467
+ if (sname.length > 1)
4468
+ {
4469
+ texname += "Color.jpg";
4470
+ }
4471
+
4472
+ this.SetPigmentTexture("sov/" + texname);
4473
+ }
4474
+
4475
+ texname = this.GetBumpTexture();
4476
+
4477
+ if (texname.startsWith("sov"))
4478
+ {
4479
+ String[] s = texname.split("/");
4480
+
4481
+ String[] sname = s[1].split("Bump.pn");
4482
+
4483
+ texname = sname[0];
4484
+
4485
+ if (sname.length > 1)
4486
+ {
4487
+ texname += "Bump.jpg";
4488
+ }
4489
+
4490
+ this.SetBumpTexture("sov/" + texname);
4491
+ }
4492
+
4493
+ for (int i=0; i<Size(); i++)
4494
+ {
4495
+ blockloop = true;
4496
+ get(i).RepairSOV();
4497
+ blockloop = false;
4498
+ }
4499
+ }
4500
+
42974501 void RepairTexture()
42984502 {
42994503 if (this instanceof FileObject || blockloop)
....@@ -4808,6 +5012,14 @@
48085012 }
48095013 }
48105014
5015
+ ObjEditor GetWindow()
5016
+ {
5017
+ if (editWindow != null)
5018
+ return editWindow;
5019
+
5020
+ return manipWindow;
5021
+ }
5022
+
48115023 cTreePath Select(int indexcount, boolean deselect)
48125024 {
48135025 if (hide || dontselect)
....@@ -4844,10 +5056,11 @@
48445056 if (leaf != null)
48455057 {
48465058 cTreePath tp = new cTreePath(this, leaf);
4847
- if (editWindow != null)
5059
+ ObjEditor window = GetWindow();
5060
+ if (window != null)
48485061 {
48495062 //System.out.println("editWindow = " + editWindow + " vs " + this);
4850
- editWindow.Select(tp, deselect, true);
5063
+ window.Select(tp, deselect, true);
48515064 }
48525065
48535066 return tp;
....@@ -4864,6 +5077,7 @@
48645077
48655078 if (child == null)
48665079 continue;
5080
+
48675081 if (child.HasTransparency() && child.size() != 0)
48685082 {
48695083 cTreePath leaf = child.Select(indexcount, deselect);
....@@ -4873,9 +5087,10 @@
48735087 if (leaf != null)
48745088 {
48755089 cTreePath tp = new cTreePath(this, leaf);
4876
- if (editWindow != null)
5090
+ ObjEditor window = GetWindow();
5091
+ if (window != null)
48775092 {
4878
- editWindow.Select(tp, deselect, true);
5093
+ window.Select(tp, deselect, true);
48795094 }
48805095
48815096 return tp;
....@@ -5517,12 +5732,23 @@
55175732 boolean NeedSupport()
55185733 {
55195734 return
5520
- CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
5735
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
55215736 // PROBLEM with CROWD!!
55225737 && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
55235738 }
55245739
55255740 static boolean DEBUG_SELECTION = false;
5741
+
5742
+ boolean IsLive()
5743
+ {
5744
+ if (live)
5745
+ return true;
5746
+
5747
+ if (parent == null)
5748
+ return false;
5749
+
5750
+ return parent.IsLive();
5751
+ }
55265752
55275753 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
55285754 {
....@@ -5585,7 +5811,7 @@
55855811 support = support;
55865812
55875813 //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);
5814
+ boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
55895815
55905816 if (!usecalllists && bRep != null && bRep.displaylist > 0)
55915817 {
....@@ -5605,10 +5831,12 @@
56055831 boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
56065832
56075833 if (!selectmode && //display.DrawMode() != display.SELECTION &&
5608
- (touched || (bRep != null && bRep.displaylist <= 0)))
5834
+ //(touched || (bRep != null && bRep.displaylist <= 0)))
5835
+ (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && Globals.COMPUTESHADOWWHENLIVE)) // || (bRep != null && bRep.displaylist <= 0)))
56095836 {
56105837 Globals.lighttouched = true;
56115838 } // all panes...
5839
+
56125840 //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
56135841 if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
56145842 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5736,6 +5964,7 @@
57365964 if (GetBRep() != null)
57375965 {
57385966 display.NextIndex();
5967
+
57395968 // vertex color conflict : gl.glCallList(list);
57405969 DrawNode(display, root, selected);
57415970 if (this instanceof BezierPatch)
....@@ -5776,16 +6005,27 @@
57766005 tex = GetTextures();
57776006 }
57786007
5779
- boolean failed = false;
6008
+ boolean failedPigment = false;
6009
+ boolean failedBump = false;
57806010
57816011 try
57826012 {
5783
- display.BindTextures(tex, texres);
6013
+ display.BindPigmentTexture(tex, texres);
57846014 }
57856015 catch (Exception e)
57866016 {
57876017 System.err.println("FAILED: " + this);
5788
- failed = true;
6018
+ failedPigment = true;
6019
+ }
6020
+
6021
+ try
6022
+ {
6023
+ display.BindBumpTexture(tex, texres);
6024
+ }
6025
+ catch (Exception e)
6026
+ {
6027
+ //System.err.println("FAILED: " + this);
6028
+ failedBump = true;
57896029 }
57906030
57916031 if (!compiled)
....@@ -5808,8 +6048,11 @@
58086048 }
58096049 }
58106050
5811
- if (!failed)
5812
- display.ReleaseTextures(tex);
6051
+ if (!failedBump)
6052
+ display.ReleaseBumpTexture(tex);
6053
+
6054
+ if (!failedPigment)
6055
+ display.ReleasePigmentTexture(tex);
58136056
58146057 display.PopMaterial(this, selected);
58156058 }
....@@ -6182,6 +6425,11 @@
61826425 // dec 2012
61836426 new Exception().printStackTrace();
61846427 return;
6428
+ }
6429
+
6430
+ if (dontselect)
6431
+ {
6432
+ //bRep.GenerateNormalsMINE();
61856433 }
61866434
61876435 display.DrawGeometry(bRep, flipV, selectmode);
....@@ -7034,7 +7282,7 @@
70347282 spot.translate(32, 32);
70357283 spotw = spot.x + spot.width;
70367284 spoth = spot.y + spot.height;
7037
- info.g.setColor(Color.blue);
7285
+ info.g.setColor(Color.cyan);
70387286 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
70397287 // if (CameraPane.Xmin > spot.x)
70407288 // {
....@@ -7052,11 +7300,12 @@
70527300 // {
70537301 // CameraPane.Ymax = spoth;
70547302 // }
7055
- // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);
7056
- //info.g.drawLine(spotw, spoth, spotw - 15, spoth);
7303
+ // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
7304
+ //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
70577305 spot.translate(0, -32);
7058
- info.g.setColor(Color.green);
7306
+ info.g.setColor(Color.yellow);
70597307 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7308
+ info.g.setColor(Color.green);
70607309 // if (CameraPane.Xmin > spot.x)
70617310 // {
70627311 // CameraPane.Xmin = spot.x;
....@@ -7073,8 +7322,8 @@
70737322 // {
70747323 // CameraPane.Ymax = spoth;
70757324 // }
7076
- info.g.drawArc(boundary.x, boundary.y,
7077
- boundary.width, boundary.height, 0, 360);
7325
+ info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY,
7326
+ (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360);
70787327 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
70797328 // if (CameraPane.Xmin > boundary.x)
70807329 // {
....@@ -7374,19 +7623,20 @@
73747623 switch (info.pane.RenderCamera().viewCode)
73757624 {
73767625 case 3: // '\001'
7377
- if (modified)
7626
+ if (modified || opposite)
73787627 {
73797628 //LA.matScale(toParent, 1, hScale, vScale);
73807629 LA.matScale(toParent, totalScale, 1, 1);
73817630 } // vScale, 1);
73827631 else
73837632 {
7633
+ // EXCEPTION!
73847634 LA.matScale(toParent, totalScale, totalScale, totalScale);
73857635 } // vScale, 1);
73867636 break;
73877637
73887638 case 2: // '\002'
7389
- if (modified)
7639
+ if (modified || opposite)
73907640 {
73917641 //LA.matScale(toParent, hScale, 1, vScale);
73927642 LA.matScale(toParent, 1, totalScale, 1);
....@@ -7397,7 +7647,7 @@
73977647 break;
73987648
73997649 case 1: // '\003'
7400
- if (modified)
7650
+ if (modified || opposite)
74017651 {
74027652 //LA.matScale(toParent, hScale, vScale, 1);
74037653 LA.matScale(toParent, 1, 1, totalScale);
....@@ -7617,6 +7867,10 @@
76177867 editWindow = null;
76187868 } // ?
76197869 }
7870
+ else
7871
+ {
7872
+ //editWindow.closeUI();
7873
+ }
76207874 }
76217875
76227876 boolean root; // patch for edit windows
....@@ -7774,6 +8028,10 @@
77748028 }
77758029
77768030 transient ObjEditor editWindow;
8031
+ transient ObjEditor manipWindow;
8032
+
8033
+ transient boolean pinned;
8034
+
77778035 transient ObjectUI objectUI;
77788036 public static int povDepth = 0;
77798037 private static cVector tbMin = new cVector();