.. | .. |
---|
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 | 32 | ScriptNode scriptnode; |
---|
.. | .. |
---|
170 | 170 | |
---|
171 | 171 | void ExtractBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
172 | 172 | { |
---|
| 173 | + Object3D o; |
---|
| 174 | + |
---|
173 | 175 | if (hashtable.containsKey(GetUUID())) |
---|
174 | 176 | { |
---|
175 | | - Object3D o = hashtable.get(GetUUID()); |
---|
| 177 | + o = hashtable.get(GetUUID()); |
---|
176 | 178 | |
---|
177 | 179 | Grafreed.Assert(this.bRep == o.bRep); |
---|
178 | | - if (this.bRep != null) |
---|
179 | | - assert(this.bRep.support == o.transientrep); |
---|
| 180 | + //if (this.bRep != null) |
---|
| 181 | + // assert(this.bRep.support == o.transientrep); |
---|
| 182 | + if (this.support != null) |
---|
| 183 | + assert(this.support.bRep == o.transientrep); |
---|
| 184 | + } |
---|
| 185 | + else |
---|
| 186 | + { |
---|
| 187 | + o = new Object3D("copy of " + this.name); |
---|
180 | 188 | |
---|
181 | | - return; |
---|
| 189 | + hashtable.put(GetUUID(), o); |
---|
182 | 190 | } |
---|
183 | 191 | |
---|
184 | | - Object3D o = new Object3D("copy of " + this.name); |
---|
185 | | - |
---|
186 | | - hashtable.put(GetUUID(), o); |
---|
187 | | - |
---|
188 | | - for (int i=0; i<Size(); i++) |
---|
| 192 | + if (!blockloop) |
---|
189 | 193 | { |
---|
190 | | - get(i).ExtractBigData(hashtable); |
---|
| 194 | + blockloop = true; |
---|
| 195 | + |
---|
| 196 | + for (int i=0; i<Size(); i++) |
---|
| 197 | + { |
---|
| 198 | + get(i).ExtractBigData(hashtable); |
---|
| 199 | + } |
---|
| 200 | + |
---|
| 201 | + blockloop = false; |
---|
191 | 202 | } |
---|
192 | 203 | |
---|
193 | 204 | ExtractBigData(o); |
---|
.. | .. |
---|
195 | 206 | |
---|
196 | 207 | void ExtractBigData(Object3D o) |
---|
197 | 208 | { |
---|
| 209 | + if (o.bRep != null) |
---|
| 210 | + Grafreed.Assert(o.bRep == this.bRep); |
---|
| 211 | + |
---|
198 | 212 | o.bRep = this.bRep; |
---|
199 | | - if (this.bRep != null) |
---|
| 213 | +// July 2019 if (this.bRep != null) |
---|
| 214 | +// { |
---|
| 215 | +// o.transientrep = this.bRep.support; |
---|
| 216 | +// o.bRep.support = null; |
---|
| 217 | +// } |
---|
| 218 | + |
---|
| 219 | + if (this.support != null) |
---|
200 | 220 | { |
---|
201 | | - o.transientrep = this.bRep.support; |
---|
202 | | - o.bRep.support = null; |
---|
| 221 | + if (o.transientrep != null) |
---|
| 222 | + Grafreed.Assert(o.transientrep == this.support.bRep); |
---|
| 223 | + |
---|
| 224 | + o.transientrep = this.support.bRep; |
---|
| 225 | + this.support.bRep = null; |
---|
203 | 226 | } |
---|
204 | 227 | |
---|
205 | 228 | // o.support = this.support; |
---|
.. | .. |
---|
219 | 242 | if (!hashtable.containsKey(GetUUID())) |
---|
220 | 243 | return; |
---|
221 | 244 | |
---|
| 245 | + Object3D o = hashtable.get(GetUUID()); |
---|
| 246 | + |
---|
| 247 | + RestoreBigData(o); |
---|
| 248 | + |
---|
222 | 249 | if (blockloop) |
---|
223 | 250 | return; |
---|
224 | 251 | |
---|
225 | 252 | blockloop = true; |
---|
226 | | - |
---|
227 | | - Object3D o = hashtable.get(GetUUID()); |
---|
228 | | - |
---|
229 | | - RestoreBigData(o); |
---|
230 | 253 | |
---|
231 | 254 | //hashtable.remove(GetUUID()); |
---|
232 | 255 | |
---|
.. | .. |
---|
241 | 264 | void RestoreBigData(Object3D o) |
---|
242 | 265 | { |
---|
243 | 266 | this.bRep = o.bRep; |
---|
244 | | - if (this.bRep != null) |
---|
245 | | - this.bRep.support = o.transientrep; |
---|
| 267 | + if (this.support != null && o.transientrep != null) |
---|
| 268 | + { |
---|
| 269 | + this.support.bRep = o.transientrep; |
---|
| 270 | + } |
---|
| 271 | +// July 2019 if (this.bRep != null) |
---|
| 272 | +// this.bRep.support = o.transientrep; |
---|
246 | 273 | // this.support = o.support; |
---|
247 | 274 | // this.fileparent = o.fileparent; |
---|
248 | 275 | } |
---|
.. | .. |
---|
1374 | 1401 | toParent = LA.newMatrix(); |
---|
1375 | 1402 | fromParent = LA.newMatrix(); |
---|
1376 | 1403 | } |
---|
| 1404 | + |
---|
1377 | 1405 | LA.matCopy(other.toParent, toParent); |
---|
1378 | 1406 | LA.matCopy(other.fromParent, fromParent); |
---|
1379 | 1407 | |
---|
.. | .. |
---|
5043 | 5071 | |
---|
5044 | 5072 | if (child == null) |
---|
5045 | 5073 | continue; |
---|
| 5074 | + |
---|
5046 | 5075 | if (child.HasTransparency() && child.size() != 0) |
---|
5047 | 5076 | { |
---|
5048 | 5077 | cTreePath leaf = child.Select(indexcount, deselect); |
---|
.. | .. |
---|
5797 | 5826 | |
---|
5798 | 5827 | if (!selectmode && //display.DrawMode() != display.SELECTION && |
---|
5799 | 5828 | //(touched || (bRep != null && bRep.displaylist <= 0))) |
---|
5800 | | - (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched || (bRep != null && bRep.displaylist <= 0))) |
---|
| 5829 | + (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && Globals.COMPUTESHADOWWHENLIVE)) // || (bRep != null && bRep.displaylist <= 0))) |
---|
5801 | 5830 | { |
---|
5802 | 5831 | Globals.lighttouched = true; |
---|
5803 | 5832 | } // all panes... |
---|
.. | .. |
---|
5929 | 5958 | if (GetBRep() != null) |
---|
5930 | 5959 | { |
---|
5931 | 5960 | display.NextIndex(); |
---|
| 5961 | + |
---|
5932 | 5962 | // vertex color conflict : gl.glCallList(list); |
---|
5933 | 5963 | DrawNode(display, root, selected); |
---|
5934 | 5964 | if (this instanceof BezierPatch) |
---|
.. | .. |
---|
7286 | 7316 | // { |
---|
7287 | 7317 | // CameraPane.Ymax = spoth; |
---|
7288 | 7318 | // } |
---|
7289 | | - info.g.drawArc(boundary.x, boundary.y, |
---|
7290 | | - boundary.width, boundary.height, 0, 360); |
---|
| 7319 | + info.g.drawArc(boundary.x + info.DX, boundary.y + info.DY, |
---|
| 7320 | + (int)(boundary.width * info.W), (int)(boundary.height * info.W), 0, 360); |
---|
7291 | 7321 | //info.g.drawArc(spot.x, spotw, spot.width/2, boundary.height/2, 0, 360); |
---|
7292 | 7322 | // if (CameraPane.Xmin > boundary.x) |
---|
7293 | 7323 | // { |
---|