.. | .. |
---|
24 | 24 | |
---|
25 | 25 | private UUID uuid = UUID.randomUUID(); |
---|
26 | 26 | |
---|
27 | | - // TEMPORARY for mocap undo |
---|
28 | | - mocap.reader.BVHReader.BVHResult bvh; |
---|
29 | | - Object3D skeleton; |
---|
| 27 | + // TEMPORARY for mocap undo. No need to be transient. |
---|
| 28 | + mocap.reader.BVHReader.BVHResult savebvh; |
---|
| 29 | + Object3D saveskeleton; |
---|
30 | 30 | // |
---|
31 | 31 | |
---|
| 32 | + byte[] versions[] = new byte[100][]; |
---|
| 33 | + int versionindex = -1; |
---|
| 34 | + |
---|
32 | 35 | ScriptNode scriptnode; |
---|
33 | 36 | |
---|
34 | 37 | void InitOthers() |
---|
.. | .. |
---|
170 | 173 | |
---|
171 | 174 | void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
172 | 175 | { |
---|
| 176 | + Object3D o; |
---|
| 177 | + |
---|
173 | 178 | if (hashtable.containsKey(GetUUID())) |
---|
174 | 179 | { |
---|
175 | | - Object3D o = hashtable.get(GetUUID()); |
---|
| 180 | + o = hashtable.get(GetUUID()); |
---|
176 | 181 | |
---|
177 | 182 | Grafreed.Assert(this.bRep == o.bRep); |
---|
178 | | - if (this.bRep != null) |
---|
179 | | - assert(this.bRep.support == o.transientrep); |
---|
| 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); |
---|
180 | 191 | |
---|
181 | | - return; |
---|
| 192 | + hashtable.put(GetUUID(), o); |
---|
182 | 193 | } |
---|
183 | 194 | |
---|
184 | | - Object3D o = new Object3D("copy of " + this.name); |
---|
185 | | - |
---|
186 | | - hashtable.put(GetUUID(), o); |
---|
187 | | - |
---|
188 | | - for (int i=0; i<Size(); i++) |
---|
| 195 | + if (!blockloop) |
---|
189 | 196 | { |
---|
190 | | - get(i).ExtractBigData(hashtable); |
---|
| 197 | + blockloop = true; |
---|
| 198 | + |
---|
| 199 | + for (int i=0; i<Size(); i++) |
---|
| 200 | + { |
---|
| 201 | + get(i).ExtractBigData(hashtable); |
---|
| 202 | + } |
---|
| 203 | + |
---|
| 204 | + blockloop = false; |
---|
191 | 205 | } |
---|
192 | 206 | |
---|
193 | 207 | ExtractBigData(o); |
---|
.. | .. |
---|
195 | 209 | |
---|
196 | 210 | void ExtractBigData(Object3D o) |
---|
197 | 211 | { |
---|
| 212 | + if (o.bRep != null) |
---|
| 213 | + Grafreed.Assert(o.bRep == this.bRep); |
---|
| 214 | + |
---|
198 | 215 | o.bRep = this.bRep; |
---|
199 | | - if (this.bRep != null) |
---|
| 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) |
---|
200 | 224 | { |
---|
201 | | - o.transientrep = this.bRep.support; |
---|
202 | | - o.bRep.support = null; |
---|
| 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; |
---|
203 | 230 | } |
---|
204 | 231 | |
---|
205 | 232 | // o.support = this.support; |
---|
.. | .. |
---|
219 | 246 | if (!hashtable.containsKey(GetUUID())) |
---|
220 | 247 | return; |
---|
221 | 248 | |
---|
| 249 | + Object3D o = hashtable.get(GetUUID()); |
---|
| 250 | + |
---|
| 251 | + RestoreBigData(o); |
---|
| 252 | + |
---|
222 | 253 | if (blockloop) |
---|
223 | 254 | return; |
---|
224 | 255 | |
---|
225 | 256 | blockloop = true; |
---|
226 | | - |
---|
227 | | - Object3D o = hashtable.get(GetUUID()); |
---|
228 | | - |
---|
229 | | - RestoreBigData(o); |
---|
230 | 257 | |
---|
231 | 258 | //hashtable.remove(GetUUID()); |
---|
232 | 259 | |
---|
.. | .. |
---|
241 | 268 | void RestoreBigData(Object3D o) |
---|
242 | 269 | { |
---|
243 | 270 | this.bRep = o.bRep; |
---|
244 | | - if (this.bRep != null) |
---|
245 | | - this.bRep.support = o.transientrep; |
---|
| 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; |
---|
246 | 279 | // this.support = o.support; |
---|
247 | 280 | // this.fileparent = o.fileparent; |
---|
248 | 281 | } |
---|
.. | .. |
---|
1374 | 1407 | toParent = LA.newMatrix(); |
---|
1375 | 1408 | fromParent = LA.newMatrix(); |
---|
1376 | 1409 | } |
---|
| 1410 | + |
---|
1377 | 1411 | LA.matCopy(other.toParent, toParent); |
---|
1378 | 1412 | LA.matCopy(other.fromParent, fromParent); |
---|
1379 | 1413 | |
---|
.. | .. |
---|
5043 | 5077 | |
---|
5044 | 5078 | if (child == null) |
---|
5045 | 5079 | continue; |
---|
| 5080 | + |
---|
5046 | 5081 | if (child.HasTransparency() && child.size() != 0) |
---|
5047 | 5082 | { |
---|
5048 | 5083 | cTreePath leaf = child.Select(indexcount, deselect); |
---|
.. | .. |
---|
5797 | 5832 | |
---|
5798 | 5833 | if (!selectmode && //display.DrawMode() != display.SELECTION && |
---|
5799 | 5834 | //(touched || (bRep != null && bRep.displaylist <= 0))) |
---|
5800 | | - (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched || (bRep != null && bRep.displaylist <= 0))) |
---|
| 5835 | + (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && Globals.COMPUTESHADOWWHENLIVE)) // || (bRep != null && bRep.displaylist <= 0))) |
---|
5801 | 5836 | { |
---|
5802 | 5837 | Globals.lighttouched = true; |
---|
5803 | 5838 | } // all panes... |
---|
.. | .. |
---|
5929 | 5964 | if (GetBRep() != null) |
---|
5930 | 5965 | { |
---|
5931 | 5966 | display.NextIndex(); |
---|
| 5967 | + |
---|
5932 | 5968 | // vertex color conflict : gl.glCallList(list); |
---|
5933 | 5969 | DrawNode(display, root, selected); |
---|
5934 | 5970 | if (this instanceof BezierPatch) |
---|
.. | .. |
---|
7286 | 7322 | // { |
---|
7287 | 7323 | // CameraPane.Ymax = spoth; |
---|
7288 | 7324 | // } |
---|
7289 | | - info.g.drawArc(boundary.x, boundary.y, |
---|
7290 | | - 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); |
---|
7291 | 7327 | //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360); |
---|
7292 | 7328 | // if (CameraPane.Xmin > boundary.x) |
---|
7293 | 7329 | // { |
---|