Normand Briere
2019-07-18 d7a17c35c443e2cb6c09eaa3cfeaf590a571faa1
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,178 @@
104112
105113 // transient boolean reduced; // for morph reduction
106114
107
-transient com.bulletphysics.linearmath.Transform cache; // for fast merge
108
-transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
115
+ transient com.bulletphysics.linearmath.Transform cache; // for fast merge
116
+ transient com.bulletphysics.linearmath.Transform cache_1; // for fast merge
109117
110
-transient Object3D transientsupport; // for cloning
111
-transient boolean transientlink2master;
118
+ transient Object3D transientsupport; // for cloning
119
+ transient boolean transientlink2master;
112120
113
-void SaveSupports()
114
-{
115
- if (blockloop)
116
- return;
117
-
118
- transientsupport = support;
119
- transientlink2master = link2master;
120
-
121
- support = null;
122
- link2master = false;
123
-
124
- if (bRep != null)
121
+ void SaveSupports()
125122 {
126
- bRep.SaveSupports();
123
+ if (blockloop)
124
+ return;
125
+
126
+ transientsupport = support;
127
+ transientlink2master = link2master;
128
+
129
+ support = null;
130
+ link2master = false;
131
+
132
+ if (bRep != null)
133
+ {
134
+ bRep.SaveSupports();
135
+ }
136
+
137
+ for (int i = 0; i < Size(); i++)
138
+ {
139
+ Object3D child = (Object3D) get(i);
140
+ if (child == null)
141
+ continue;
142
+ blockloop = true;
143
+ child.SaveSupports();
144
+ blockloop = false;
145
+ }
127146 }
128
-
129
- for (int i = 0; i < Size(); i++)
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
+ o.versions = this.versions;
223
+ o.versionindex = this.versionindex;
224
+
225
+ if (this.support != null)
226
+ {
227
+ if (o.transientrep != null)
228
+ Grafreed.Assert(o.transientrep == this.support.bRep);
229
+
230
+ o.transientrep = this.support.bRep;
231
+ this.support.bRep = null;
232
+ }
233
+
234
+ // o.support = this.support;
235
+ // o.fileparent = this.fileparent;
236
+ // if (this.bRep != null)
237
+ // o.bRep = this.bRep.support;
238
+
239
+ this.bRep = null;
240
+ // if (this.bRep != null)
241
+ // this.bRep.support = null;
242
+ // this.support = null;
243
+ // this.fileparent = null;
244
+ }
245
+
246
+ void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
247
+ {
248
+ if (!hashtable.containsKey(GetUUID()))
249
+ return;
250
+
170251 Object3D o = hashtable.get(GetUUID());
171252
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
-}
253
+ RestoreBigData(o);
205254
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);
255
+ if (blockloop)
256
+ return;
257
+
258
+ blockloop = true;
259
+
260
+ //hashtable.remove(GetUUID());
261
+
262
+ for (int i=0; i<Size(); i++)
263
+ {
264
+ get(i).RestoreBigData(hashtable);
265
+ }
266
+
267
+ blockloop = false;
224268 }
225
-}
269
+
270
+ void RestoreBigData(Object3D o)
271
+ {
272
+ this.bRep = o.bRep;
273
+ if (this.support != null && o.transientrep != null)
274
+ {
275
+ this.support.bRep = o.transientrep;
276
+ }
277
+
278
+ this.selection = o.selection;
279
+
280
+ this.versions = o.versions;
281
+ this.versionindex = o.versionindex;
282
+// July 2019 if (this.bRep != null)
283
+// this.bRep.support = o.transientrep;
284
+ // this.support = o.support;
285
+ // this.fileparent = o.fileparent;
286
+ }
226287
227288 // MOCAP SUPPORT
228289 double tx,ty,tz,rx,ry,rz;
....@@ -547,12 +608,14 @@
547608 toParent = LA.newMatrix();
548609 fromParent = LA.newMatrix();
549610 }
611
+
550612 if (toParentMarked == null)
551613 {
552614 if (maxcount != 1)
553615 {
554616 new Exception().printStackTrace();
555617 }
618
+
556619 toParentMarked = LA.newMatrix();
557620 fromParentMarked = LA.newMatrix();
558621 }
....@@ -863,7 +926,7 @@
863926
864927 if (marked && Globals.isLIVE() && live &&
865928 //TEMP21aug2018
866
- (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
929
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
867930 currentframe != Globals.framecount)
868931 {
869932 currentframe = Globals.framecount;
....@@ -875,7 +938,8 @@
875938
876939 boolean changedir = random && Math.random() < 0.01; // && !link2master;
877940
878
- if (transformcount*factor > maxcount || (step == 1 && changedir))
941
+ if (transformcount*factor >= maxcount && (rewind || random) ||
942
+ (step == 1 && changedir))
879943 {
880944 countdown = 1;
881945 delay = speedup?8:1;
....@@ -947,6 +1011,7 @@
9471011 if (material == null || material.multiply)
9481012 return true;
9491013
1014
+ // Transparent objects are dynamic because we have to sort the triangles.
9501015 return material.opacity > 0.99;
9511016 }
9521017
....@@ -1347,6 +1412,7 @@
13471412 toParent = LA.newMatrix();
13481413 fromParent = LA.newMatrix();
13491414 }
1415
+
13501416 LA.matCopy(other.toParent, toParent);
13511417 LA.matCopy(other.fromParent, fromParent);
13521418
....@@ -2368,6 +2434,10 @@
23682434 }
23692435 */
23702436 }
2437
+ else
2438
+ {
2439
+ //((ObjEditor)editWindow).SetupUI2(null);
2440
+ }
23712441 }
23722442
23732443 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -2409,6 +2479,14 @@
24092479 {
24102480 editWindow.refreshContents();
24112481 }
2482
+ else
2483
+ {
2484
+ if (manipWindow != null)
2485
+ {
2486
+ manipWindow.refreshContents();
2487
+ }
2488
+ }
2489
+
24122490 //if (parent != null)
24132491 //parent.refreshEditWindow();
24142492 }
....@@ -2693,6 +2771,18 @@
26932771 //Touch();
26942772 }
26952773
2774
+ void GenNormalsMeshS()
2775
+ {
2776
+ selection.GenNormalsMesh();
2777
+// for (int i=0; i<selection.size(); i++)
2778
+// {
2779
+// Object3D selectee = (Object3D) selection.elementAt(i);
2780
+// selectee.GenNormals(crease);
2781
+// }
2782
+
2783
+ //Touch();
2784
+ }
2785
+
26962786 void ClearColorsS()
26972787 {
26982788 selection.ClearColors();
....@@ -2824,6 +2914,24 @@
28242914 if (child == null)
28252915 continue;
28262916 child.GenNormals(crease);
2917
+// Children().release(i);
2918
+ }
2919
+ blockloop = false;
2920
+ }
2921
+
2922
+ void GenNormalsMesh()
2923
+ {
2924
+ if (blockloop)
2925
+ return;
2926
+
2927
+ blockloop = true;
2928
+ GenNormalsMesh0();
2929
+ for (int i = 0; i < Children().Size(); i++)
2930
+ {
2931
+ Object3D child = (Object3D) Children().get(i); // reserve(i);
2932
+ if (child == null)
2933
+ continue;
2934
+ child.GenNormalsMesh();
28272935 // Children().release(i);
28282936 }
28292937 blockloop = false;
....@@ -2992,6 +3100,15 @@
29923100 if (bRep != null)
29933101 {
29943102 bRep.GenerateNormals(crease);
3103
+ Touch();
3104
+ }
3105
+ }
3106
+
3107
+ void GenNormalsMesh0()
3108
+ {
3109
+ if (bRep != null)
3110
+ {
3111
+ bRep.GenerateNormalsMesh();
29953112 Touch();
29963113 }
29973114 }
....@@ -3446,7 +3563,8 @@
34463563 if (blockloop)
34473564 return;
34483565
3449
- if (marked || (bRep != null && material != null)) // borderline...
3566
+ if (//marked || // does not make sense
3567
+ (bRep != null || material != null)) // borderline...
34503568 live = h;
34513569
34523570 for (int i = 0; i < Size(); i++)
....@@ -3467,7 +3585,8 @@
34673585 return;
34683586
34693587 //if (bRep != null)
3470
- if (marked || (bRep != null && material != null)) // borderline...
3588
+ if (//marked || // does not make sense
3589
+ (bRep != null || material != null)) // borderline...
34713590 link2master = h;
34723591
34733592 for (int i = 0; i < Size(); i++)
....@@ -3487,7 +3606,8 @@
34873606 if (blockloop)
34883607 return;
34893608
3490
- if (marked || (bRep != null && material != null)) // borderline...
3609
+ if (//marked || // does not make sense
3610
+ (bRep != null || material != null)) // borderline...
34913611 hide = h;
34923612
34933613 for (int i = 0; i < Size(); i++)
....@@ -3507,7 +3627,7 @@
35073627 if (blockloop)
35083628 return;
35093629
3510
- if (bRep != null && material != null) // borderline...
3630
+ if (bRep != null || material != null) // borderline...
35113631 marked = h;
35123632
35133633 for (int i = 0; i < Size(); i++)
....@@ -3517,6 +3637,46 @@
35173637 continue;
35183638 blockloop = true;
35193639 child.MarkLeaves(h);
3640
+ blockloop = false;
3641
+ // release(i);
3642
+ }
3643
+ }
3644
+
3645
+ void RewindLeaves(boolean h)
3646
+ {
3647
+ if (blockloop)
3648
+ return;
3649
+
3650
+ if (bRep != null || material != null) // borderline...
3651
+ rewind = h;
3652
+
3653
+ for (int i = 0; i < Size(); i++)
3654
+ {
3655
+ Object3D child = (Object3D) get(i); // reserve(i);
3656
+ if (child == null)
3657
+ continue;
3658
+ blockloop = true;
3659
+ child.RewindLeaves(h);
3660
+ blockloop = false;
3661
+ // release(i);
3662
+ }
3663
+ }
3664
+
3665
+ void RandomLeaves(boolean h)
3666
+ {
3667
+ if (blockloop)
3668
+ return;
3669
+
3670
+ if (bRep != null || material != null) // borderline...
3671
+ random = h;
3672
+
3673
+ for (int i = 0; i < Size(); i++)
3674
+ {
3675
+ Object3D child = (Object3D) get(i); // reserve(i);
3676
+ if (child == null)
3677
+ continue;
3678
+ blockloop = true;
3679
+ child.RandomLeaves(h);
35203680 blockloop = false;
35213681 // release(i);
35223682 }
....@@ -4294,6 +4454,55 @@
42944454 }
42954455 }
42964456
4457
+ void RepairSOV()
4458
+ {
4459
+ if (blockloop)
4460
+ return;
4461
+
4462
+ String texname = this.GetPigmentTexture();
4463
+
4464
+ if (texname.startsWith("sov"))
4465
+ {
4466
+ String[] s = texname.split("/");
4467
+
4468
+ String[] sname = s[1].split("Color.pn");
4469
+
4470
+ texname = sname[0];
4471
+
4472
+ if (sname.length > 1)
4473
+ {
4474
+ texname += "Color.jpg";
4475
+ }
4476
+
4477
+ this.SetPigmentTexture("sov/" + texname);
4478
+ }
4479
+
4480
+ texname = this.GetBumpTexture();
4481
+
4482
+ if (texname.startsWith("sov"))
4483
+ {
4484
+ String[] s = texname.split("/");
4485
+
4486
+ String[] sname = s[1].split("Bump.pn");
4487
+
4488
+ texname = sname[0];
4489
+
4490
+ if (sname.length > 1)
4491
+ {
4492
+ texname += "Bump.jpg";
4493
+ }
4494
+
4495
+ this.SetBumpTexture("sov/" + texname);
4496
+ }
4497
+
4498
+ for (int i=0; i<Size(); i++)
4499
+ {
4500
+ blockloop = true;
4501
+ get(i).RepairSOV();
4502
+ blockloop = false;
4503
+ }
4504
+ }
4505
+
42974506 void RepairTexture()
42984507 {
42994508 if (this instanceof FileObject || blockloop)
....@@ -4808,6 +5017,14 @@
48085017 }
48095018 }
48105019
5020
+ ObjEditor GetWindow()
5021
+ {
5022
+ if (editWindow != null)
5023
+ return editWindow;
5024
+
5025
+ return manipWindow;
5026
+ }
5027
+
48115028 cTreePath Select(int indexcount, boolean deselect)
48125029 {
48135030 if (hide || dontselect)
....@@ -4844,10 +5061,11 @@
48445061 if (leaf != null)
48455062 {
48465063 cTreePath tp = new cTreePath(this, leaf);
4847
- if (editWindow != null)
5064
+ ObjEditor window = GetWindow();
5065
+ if (window != null)
48485066 {
48495067 //System.out.println("editWindow = " + editWindow + " vs " + this);
4850
- editWindow.Select(tp, deselect, true);
5068
+ window.Select(tp, deselect, true);
48515069 }
48525070
48535071 return tp;
....@@ -4864,6 +5082,7 @@
48645082
48655083 if (child == null)
48665084 continue;
5085
+
48675086 if (child.HasTransparency() && child.size() != 0)
48685087 {
48695088 cTreePath leaf = child.Select(indexcount, deselect);
....@@ -4873,9 +5092,10 @@
48735092 if (leaf != null)
48745093 {
48755094 cTreePath tp = new cTreePath(this, leaf);
4876
- if (editWindow != null)
5095
+ ObjEditor window = GetWindow();
5096
+ if (window != null)
48775097 {
4878
- editWindow.Select(tp, deselect, true);
5098
+ window.Select(tp, deselect, true);
48795099 }
48805100
48815101 return tp;
....@@ -5517,12 +5737,23 @@
55175737 boolean NeedSupport()
55185738 {
55195739 return
5520
- CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
5740
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
55215741 // PROBLEM with CROWD!!
55225742 && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
55235743 }
55245744
55255745 static boolean DEBUG_SELECTION = false;
5746
+
5747
+ boolean IsLive()
5748
+ {
5749
+ if (live)
5750
+ return true;
5751
+
5752
+ if (parent == null)
5753
+ return false;
5754
+
5755
+ return parent.IsLive();
5756
+ }
55265757
55275758 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
55285759 {
....@@ -5585,7 +5816,7 @@
55855816 support = support;
55865817
55875818 //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);
5819
+ boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
55895820
55905821 if (!usecalllists && bRep != null && bRep.displaylist > 0)
55915822 {
....@@ -5605,10 +5836,12 @@
56055836 boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
56065837
56075838 if (!selectmode && //display.DrawMode() != display.SELECTION &&
5608
- (touched || (bRep != null && bRep.displaylist <= 0)))
5839
+ //(touched || (bRep != null && bRep.displaylist <= 0)))
5840
+ (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && Globals.COMPUTESHADOWWHENLIVE)) // || (bRep != null && bRep.displaylist <= 0)))
56095841 {
56105842 Globals.lighttouched = true;
56115843 } // all panes...
5844
+
56125845 //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
56135846 if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
56145847 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5736,6 +5969,7 @@
57365969 if (GetBRep() != null)
57375970 {
57385971 display.NextIndex();
5972
+
57395973 // vertex color conflict : gl.glCallList(list);
57405974 DrawNode(display, root, selected);
57415975 if (this instanceof BezierPatch)
....@@ -5776,16 +6010,27 @@
57766010 tex = GetTextures();
57776011 }
57786012
5779
- boolean failed = false;
6013
+ boolean failedPigment = false;
6014
+ boolean failedBump = false;
57806015
57816016 try
57826017 {
5783
- display.BindTextures(tex, texres);
6018
+ display.BindPigmentTexture(tex, texres);
57846019 }
57856020 catch (Exception e)
57866021 {
57876022 System.err.println("FAILED: " + this);
5788
- failed = true;
6023
+ failedPigment = true;
6024
+ }
6025
+
6026
+ try
6027
+ {
6028
+ display.BindBumpTexture(tex, texres);
6029
+ }
6030
+ catch (Exception e)
6031
+ {
6032
+ //System.err.println("FAILED: " + this);
6033
+ failedBump = true;
57896034 }
57906035
57916036 if (!compiled)
....@@ -5808,8 +6053,11 @@
58086053 }
58096054 }
58106055
5811
- if (!failed)
5812
- display.ReleaseTextures(tex);
6056
+ if (!failedBump)
6057
+ display.ReleaseBumpTexture(tex);
6058
+
6059
+ if (!failedPigment)
6060
+ display.ReleasePigmentTexture(tex);
58136061
58146062 display.PopMaterial(this, selected);
58156063 }
....@@ -6182,6 +6430,11 @@
61826430 // dec 2012
61836431 new Exception().printStackTrace();
61846432 return;
6433
+ }
6434
+
6435
+ if (dontselect)
6436
+ {
6437
+ //bRep.GenerateNormalsMINE();
61856438 }
61866439
61876440 display.DrawGeometry(bRep, flipV, selectmode);
....@@ -7034,7 +7287,7 @@
70347287 spot.translate(32, 32);
70357288 spotw = spot.x + spot.width;
70367289 spoth = spot.y + spot.height;
7037
- info.g.setColor(Color.blue);
7290
+ info.g.setColor(Color.cyan);
70387291 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
70397292 // if (CameraPane.Xmin > spot.x)
70407293 // {
....@@ -7052,11 +7305,12 @@
70527305 // {
70537306 // CameraPane.Ymax = spoth;
70547307 // }
7055
- // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);
7056
- //info.g.drawLine(spotw, spoth, spotw - 15, spoth);
7308
+ // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - boundary.height/2); // 15
7309
+ //info.g.drawLine(spotw, spoth, spotw - boundary.width/2, spoth); // 15
70577310 spot.translate(0, -32);
7058
- info.g.setColor(Color.green);
7311
+ info.g.setColor(Color.yellow);
70597312 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7313
+ info.g.setColor(Color.green);
70607314 // if (CameraPane.Xmin > spot.x)
70617315 // {
70627316 // CameraPane.Xmin = spot.x;
....@@ -7073,8 +7327,8 @@
70737327 // {
70747328 // CameraPane.Ymax = spoth;
70757329 // }
7076
- info.g.drawArc(boundary.x, boundary.y,
7077
- boundary.width, boundary.height, 0, 360);
7330
+ info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY,
7331
+ (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360);
70787332 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
70797333 // if (CameraPane.Xmin > boundary.x)
70807334 // {
....@@ -7374,19 +7628,20 @@
73747628 switch (info.pane.RenderCamera().viewCode)
73757629 {
73767630 case 3: // '\001'
7377
- if (modified)
7631
+ if (modified || opposite)
73787632 {
73797633 //LA.matScale(toParent, 1, hScale, vScale);
73807634 LA.matScale(toParent, totalScale, 1, 1);
73817635 } // vScale, 1);
73827636 else
73837637 {
7638
+ // EXCEPTION!
73847639 LA.matScale(toParent, totalScale, totalScale, totalScale);
73857640 } // vScale, 1);
73867641 break;
73877642
73887643 case 2: // '\002'
7389
- if (modified)
7644
+ if (modified || opposite)
73907645 {
73917646 //LA.matScale(toParent, hScale, 1, vScale);
73927647 LA.matScale(toParent, 1, totalScale, 1);
....@@ -7397,7 +7652,7 @@
73977652 break;
73987653
73997654 case 1: // '\003'
7400
- if (modified)
7655
+ if (modified || opposite)
74017656 {
74027657 //LA.matScale(toParent, hScale, vScale, 1);
74037658 LA.matScale(toParent, 1, 1, totalScale);
....@@ -7617,6 +7872,10 @@
76177872 editWindow = null;
76187873 } // ?
76197874 }
7875
+ else
7876
+ {
7877
+ //editWindow.closeUI();
7878
+ }
76207879 }
76217880
76227881 boolean root; // patch for edit windows
....@@ -7774,6 +8033,10 @@
77748033 }
77758034
77768035 transient ObjEditor editWindow;
8036
+ transient ObjEditor manipWindow;
8037
+
8038
+ transient boolean pinned;
8039
+
77778040 transient ObjectUI objectUI;
77788041 public static int povDepth = 0;
77798042 private static cVector tbMin = new cVector();