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,117 +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++)
147
+
148
+ void RestoreSupports()
130149 {
131
- Object3D child = (Object3D) get(i);
132
- if (child == null)
133
- continue;
150
+ if (blockloop)
151
+ return;
152
+
153
+ support = transientsupport;
154
+ link2master = transientlink2master;
155
+ transientsupport = null;
156
+ transientlink2master = false;
157
+
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)
175
+ {
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
+
251
+ Object3D o = hashtable.get(GetUUID());
252
+
253
+ RestoreBigData(o);
254
+
255
+ if (blockloop)
256
+ return;
257
+
134258 blockloop = true;
135
- child.SaveSupports();
259
+
260
+ //hashtable.remove(GetUUID());
261
+
262
+ for (int i=0; i<Size(); i++)
263
+ {
264
+ get(i).RestoreBigData(hashtable);
265
+ }
266
+
136267 blockloop = false;
137268 }
138
-}
139269
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)
270
+ void RestoreBigData(Object3D o)
151271 {
152
- bRep.RestoreSupports();
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;
153286 }
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
-}
218287
219288 // MOCAP SUPPORT
220289 double tx,ty,tz,rx,ry,rz;
....@@ -539,12 +608,14 @@
539608 toParent = LA.newMatrix();
540609 fromParent = LA.newMatrix();
541610 }
611
+
542612 if (toParentMarked == null)
543613 {
544614 if (maxcount != 1)
545615 {
546616 new Exception().printStackTrace();
547617 }
618
+
548619 toParentMarked = LA.newMatrix();
549620 fromParentMarked = LA.newMatrix();
550621 }
....@@ -855,7 +926,7 @@
855926
856927 if (marked && Globals.isLIVE() && live &&
857928 //TEMP21aug2018
858
- (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
929
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
859930 currentframe != Globals.framecount)
860931 {
861932 currentframe = Globals.framecount;
....@@ -867,7 +938,8 @@
867938
868939 boolean changedir = random && Math.random() < 0.01; // && !link2master;
869940
870
- if (transformcount*factor > maxcount || (step == 1 && changedir))
941
+ if (transformcount*factor >= maxcount && (rewind || random) ||
942
+ (step == 1 && changedir))
871943 {
872944 countdown = 1;
873945 delay = speedup?8:1;
....@@ -939,6 +1011,7 @@
9391011 if (material == null || material.multiply)
9401012 return true;
9411013
1014
+ // Transparent objects are dynamic because we have to sort the triangles.
9421015 return material.opacity > 0.99;
9431016 }
9441017
....@@ -1339,6 +1412,7 @@
13391412 toParent = LA.newMatrix();
13401413 fromParent = LA.newMatrix();
13411414 }
1415
+
13421416 LA.matCopy(other.toParent, toParent);
13431417 LA.matCopy(other.fromParent, fromParent);
13441418
....@@ -2360,6 +2434,10 @@
23602434 }
23612435 */
23622436 }
2437
+ else
2438
+ {
2439
+ //((ObjEditor)editWindow).SetupUI2(null);
2440
+ }
23632441 }
23642442
23652443 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -2401,6 +2479,14 @@
24012479 {
24022480 editWindow.refreshContents();
24032481 }
2482
+ else
2483
+ {
2484
+ if (manipWindow != null)
2485
+ {
2486
+ manipWindow.refreshContents();
2487
+ }
2488
+ }
2489
+
24042490 //if (parent != null)
24052491 //parent.refreshEditWindow();
24062492 }
....@@ -2685,6 +2771,18 @@
26852771 //Touch();
26862772 }
26872773
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
+
26882786 void ClearColorsS()
26892787 {
26902788 selection.ClearColors();
....@@ -2816,6 +2914,24 @@
28162914 if (child == null)
28172915 continue;
28182916 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();
28192935 // Children().release(i);
28202936 }
28212937 blockloop = false;
....@@ -2984,6 +3100,15 @@
29843100 if (bRep != null)
29853101 {
29863102 bRep.GenerateNormals(crease);
3103
+ Touch();
3104
+ }
3105
+ }
3106
+
3107
+ void GenNormalsMesh0()
3108
+ {
3109
+ if (bRep != null)
3110
+ {
3111
+ bRep.GenerateNormalsMesh();
29873112 Touch();
29883113 }
29893114 }
....@@ -3438,7 +3563,8 @@
34383563 if (blockloop)
34393564 return;
34403565
3441
- if (marked || (bRep != null && material != null)) // borderline...
3566
+ if (//marked || // does not make sense
3567
+ (bRep != null || material != null)) // borderline...
34423568 live = h;
34433569
34443570 for (int i = 0; i < Size(); i++)
....@@ -3459,7 +3585,8 @@
34593585 return;
34603586
34613587 //if (bRep != null)
3462
- if (marked || (bRep != null && material != null)) // borderline...
3588
+ if (//marked || // does not make sense
3589
+ (bRep != null || material != null)) // borderline...
34633590 link2master = h;
34643591
34653592 for (int i = 0; i < Size(); i++)
....@@ -3479,7 +3606,8 @@
34793606 if (blockloop)
34803607 return;
34813608
3482
- if (marked || (bRep != null && material != null)) // borderline...
3609
+ if (//marked || // does not make sense
3610
+ (bRep != null || material != null)) // borderline...
34833611 hide = h;
34843612
34853613 for (int i = 0; i < Size(); i++)
....@@ -3499,7 +3627,7 @@
34993627 if (blockloop)
35003628 return;
35013629
3502
- if (bRep != null && material != null) // borderline...
3630
+ if (bRep != null || material != null) // borderline...
35033631 marked = h;
35043632
35053633 for (int i = 0; i < Size(); i++)
....@@ -3509,6 +3637,46 @@
35093637 continue;
35103638 blockloop = true;
35113639 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);
35123680 blockloop = false;
35133681 // release(i);
35143682 }
....@@ -4286,6 +4454,55 @@
42864454 }
42874455 }
42884456
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
+
42894506 void RepairTexture()
42904507 {
42914508 if (this instanceof FileObject || blockloop)
....@@ -4800,6 +5017,14 @@
48005017 }
48015018 }
48025019
5020
+ ObjEditor GetWindow()
5021
+ {
5022
+ if (editWindow != null)
5023
+ return editWindow;
5024
+
5025
+ return manipWindow;
5026
+ }
5027
+
48035028 cTreePath Select(int indexcount, boolean deselect)
48045029 {
48055030 if (hide || dontselect)
....@@ -4836,10 +5061,11 @@
48365061 if (leaf != null)
48375062 {
48385063 cTreePath tp = new cTreePath(this, leaf);
4839
- if (editWindow != null)
5064
+ ObjEditor window = GetWindow();
5065
+ if (window != null)
48405066 {
48415067 //System.out.println("editWindow = " + editWindow + " vs " + this);
4842
- editWindow.Select(tp, deselect, true);
5068
+ window.Select(tp, deselect, true);
48435069 }
48445070
48455071 return tp;
....@@ -4856,6 +5082,7 @@
48565082
48575083 if (child == null)
48585084 continue;
5085
+
48595086 if (child.HasTransparency() && child.size() != 0)
48605087 {
48615088 cTreePath leaf = child.Select(indexcount, deselect);
....@@ -4865,9 +5092,10 @@
48655092 if (leaf != null)
48665093 {
48675094 cTreePath tp = new cTreePath(this, leaf);
4868
- if (editWindow != null)
5095
+ ObjEditor window = GetWindow();
5096
+ if (window != null)
48695097 {
4870
- editWindow.Select(tp, deselect, true);
5098
+ window.Select(tp, deselect, true);
48715099 }
48725100
48735101 return tp;
....@@ -5509,12 +5737,23 @@
55095737 boolean NeedSupport()
55105738 {
55115739 return
5512
- CameraPane.SUPPORT && (!CameraPane.movingcamera || !Globals.FREEZEONMOVE) && link2master && /*live &&*/ support != null
5740
+ CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
55135741 // PROBLEM with CROWD!!
55145742 && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
55155743 }
55165744
55175745 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
+ }
55185757
55195758 void Draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked)
55205759 {
....@@ -5577,7 +5816,7 @@
55775816 support = support;
55785817
55795818 //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);
5819
+ boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
55815820
55825821 if (!usecalllists && bRep != null && bRep.displaylist > 0)
55835822 {
....@@ -5597,10 +5836,12 @@
55975836 boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
55985837
55995838 if (!selectmode && //display.DrawMode() != display.SELECTION &&
5600
- (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)))
56015841 {
56025842 Globals.lighttouched = true;
56035843 } // all panes...
5844
+
56045845 //if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
56055846 if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
56065847 (touched || (bRep != null && bRep.displaylist <= 0)))
....@@ -5728,6 +5969,7 @@
57285969 if (GetBRep() != null)
57295970 {
57305971 display.NextIndex();
5972
+
57315973 // vertex color conflict : gl.glCallList(list);
57325974 DrawNode(display, root, selected);
57335975 if (this instanceof BezierPatch)
....@@ -5768,16 +6010,27 @@
57686010 tex = GetTextures();
57696011 }
57706012
5771
- boolean failed = false;
6013
+ boolean failedPigment = false;
6014
+ boolean failedBump = false;
57726015
57736016 try
57746017 {
5775
- display.BindTextures(tex, texres);
6018
+ display.BindPigmentTexture(tex, texres);
57766019 }
57776020 catch (Exception e)
57786021 {
57796022 System.err.println("FAILED: " + this);
5780
- 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;
57816034 }
57826035
57836036 if (!compiled)
....@@ -5800,8 +6053,11 @@
58006053 }
58016054 }
58026055
5803
- if (!failed)
5804
- display.ReleaseTextures(tex);
6056
+ if (!failedBump)
6057
+ display.ReleaseBumpTexture(tex);
6058
+
6059
+ if (!failedPigment)
6060
+ display.ReleasePigmentTexture(tex);
58056061
58066062 display.PopMaterial(this, selected);
58076063 }
....@@ -6174,6 +6430,11 @@
61746430 // dec 2012
61756431 new Exception().printStackTrace();
61766432 return;
6433
+ }
6434
+
6435
+ if (dontselect)
6436
+ {
6437
+ //bRep.GenerateNormalsMINE();
61776438 }
61786439
61796440 display.DrawGeometry(bRep, flipV, selectmode);
....@@ -7026,7 +7287,7 @@
70267287 spot.translate(32, 32);
70277288 spotw = spot.x + spot.width;
70287289 spoth = spot.y + spot.height;
7029
- info.g.setColor(Color.blue);
7290
+ info.g.setColor(Color.cyan);
70307291 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
70317292 // if (CameraPane.Xmin > spot.x)
70327293 // {
....@@ -7044,11 +7305,12 @@
70447305 // {
70457306 // CameraPane.Ymax = spoth;
70467307 // }
7047
- // bonhommes info.g.drawLine(spotw, spoth, spotw, spoth - 15);
7048
- //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
70497310 spot.translate(0, -32);
7050
- info.g.setColor(Color.green);
7311
+ info.g.setColor(Color.yellow);
70517312 info.g.fillRect(spot.x, spot.y, spot.width, spot.height);
7313
+ info.g.setColor(Color.green);
70527314 // if (CameraPane.Xmin > spot.x)
70537315 // {
70547316 // CameraPane.Xmin = spot.x;
....@@ -7065,8 +7327,8 @@
70657327 // {
70667328 // CameraPane.Ymax = spoth;
70677329 // }
7068
- info.g.drawArc(boundary.x, boundary.y,
7069
- 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);
70707332 //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360);
70717333 // if (CameraPane.Xmin > boundary.x)
70727334 // {
....@@ -7366,19 +7628,20 @@
73667628 switch (info.pane.RenderCamera().viewCode)
73677629 {
73687630 case 3: // '\001'
7369
- if (modified)
7631
+ if (modified || opposite)
73707632 {
73717633 //LA.matScale(toParent, 1, hScale, vScale);
73727634 LA.matScale(toParent, totalScale, 1, 1);
73737635 } // vScale, 1);
73747636 else
73757637 {
7638
+ // EXCEPTION!
73767639 LA.matScale(toParent, totalScale, totalScale, totalScale);
73777640 } // vScale, 1);
73787641 break;
73797642
73807643 case 2: // '\002'
7381
- if (modified)
7644
+ if (modified || opposite)
73827645 {
73837646 //LA.matScale(toParent, hScale, 1, vScale);
73847647 LA.matScale(toParent, 1, totalScale, 1);
....@@ -7389,7 +7652,7 @@
73897652 break;
73907653
73917654 case 1: // '\003'
7392
- if (modified)
7655
+ if (modified || opposite)
73937656 {
73947657 //LA.matScale(toParent, hScale, vScale, 1);
73957658 LA.matScale(toParent, 1, 1, totalScale);
....@@ -7609,6 +7872,10 @@
76097872 editWindow = null;
76107873 } // ?
76117874 }
7875
+ else
7876
+ {
7877
+ //editWindow.closeUI();
7878
+ }
76127879 }
76137880
76147881 boolean root; // patch for edit windows
....@@ -7766,6 +8033,10 @@
77668033 }
77678034
77688035 transient ObjEditor editWindow;
8036
+ transient ObjEditor manipWindow;
8037
+
8038
+ transient boolean pinned;
8039
+
77698040 transient ObjectUI objectUI;
77708041 public static int povDepth = 0;
77718042 private static cVector tbMin = new cVector();