.. | .. |
---|
22 | 22 | //static final long serialVersionUID = -607422624994562685L; |
---|
23 | 23 | static final long serialVersionUID = 5022536242724664900L; |
---|
24 | 24 | |
---|
| 25 | + // Use GetUUID for backward compatibility with null. |
---|
25 | 26 | private UUID uuid = UUID.randomUUID(); |
---|
26 | 27 | |
---|
27 | 28 | // TEMPORARY for mocap undo. No need to be transient. |
---|
.. | .. |
---|
29 | 30 | Object3D saveskeleton; |
---|
30 | 31 | // |
---|
31 | 32 | |
---|
32 | | - byte[] versions[]; |
---|
| 33 | + String skyboxname; |
---|
| 34 | + String skyboxext; |
---|
| 35 | + |
---|
| 36 | + Object3D versionlist[]; |
---|
33 | 37 | int versionindex = -1; |
---|
34 | 38 | |
---|
35 | 39 | ScriptNode scriptnode; |
---|
.. | .. |
---|
219 | 223 | // o.bRep.support = null; |
---|
220 | 224 | // } |
---|
221 | 225 | o.selection = this.selection; |
---|
222 | | - o.versions = this.versions; |
---|
| 226 | + o.versionlist = this.versionlist; |
---|
223 | 227 | o.versionindex = this.versionindex; |
---|
224 | 228 | |
---|
225 | 229 | if (this.support != null) |
---|
.. | .. |
---|
242 | 246 | // this.support = null; |
---|
243 | 247 | // this.fileparent = null; |
---|
244 | 248 | } |
---|
| 249 | + |
---|
| 250 | +// Object3D GetObject(java.util.UUID uuid) |
---|
| 251 | +// { |
---|
| 252 | +// if (this.uuid.equals(uuid)) |
---|
| 253 | +// return this; |
---|
| 254 | +// |
---|
| 255 | +// if (blockloop) |
---|
| 256 | +// return null; |
---|
| 257 | +// |
---|
| 258 | +// blockloop = true; |
---|
| 259 | +// |
---|
| 260 | +// for (int i=0; i<Size(); i++) |
---|
| 261 | +// { |
---|
| 262 | +// Object3D o = get(i).GetObject(uuid); |
---|
| 263 | +// |
---|
| 264 | +// if (o != null) |
---|
| 265 | +// return o; |
---|
| 266 | +// } |
---|
| 267 | +// |
---|
| 268 | +// blockloop = false; |
---|
| 269 | +// |
---|
| 270 | +// return null; |
---|
| 271 | +// } |
---|
245 | 272 | |
---|
246 | 273 | void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable) |
---|
247 | 274 | { |
---|
.. | .. |
---|
277 | 304 | |
---|
278 | 305 | this.selection = o.selection; |
---|
279 | 306 | |
---|
280 | | - this.versions = o.versions; |
---|
| 307 | + this.versionlist = o.versionlist; |
---|
281 | 308 | this.versionindex = o.versionindex; |
---|
282 | 309 | // July 2019 if (this.bRep != null) |
---|
283 | 310 | // this.bRep.support = o.transientrep; |
---|
.. | .. |
---|
1011 | 1038 | |
---|
1012 | 1039 | if (material == null || material.multiply) |
---|
1013 | 1040 | return true; |
---|
| 1041 | + |
---|
| 1042 | + if (projectedVertices != null && projectedVertices.length > 2 && projectedVertices[2].y >= 10000) |
---|
| 1043 | + return false; |
---|
1014 | 1044 | |
---|
1015 | 1045 | // Transparent objects are dynamic because we have to sort the triangles. |
---|
1016 | 1046 | return material.opacity > 0.99; |
---|
.. | .. |
---|
2438 | 2468 | else |
---|
2439 | 2469 | { |
---|
2440 | 2470 | //((ObjEditor)editWindow).SetupUI2(null); |
---|
| 2471 | + if (objectUI != null) |
---|
| 2472 | + ((ObjEditor)objectUI).pinButton.setSelected(pinned); |
---|
| 2473 | + else |
---|
| 2474 | + //new Exception().printStackTrace(); |
---|
| 2475 | + System.err.println("objectUI is null"); |
---|
2441 | 2476 | } |
---|
2442 | 2477 | } |
---|
2443 | 2478 | |
---|
.. | .. |
---|
5906 | 5941 | if (support != null) |
---|
5907 | 5942 | support = support; |
---|
5908 | 5943 | |
---|
5909 | | - //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
5910 | | - boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 5944 | + boolean usecalllists = !IsLive() && IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 5945 | + //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch); |
---|
| 5946 | + |
---|
| 5947 | + //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass. |
---|
5911 | 5948 | |
---|
5912 | 5949 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5913 | 5950 | { |
---|
.. | .. |
---|
5917 | 5954 | // usecalllists &= !(parent instanceof RandomNode); |
---|
5918 | 5955 | // usecalllists = false; |
---|
5919 | 5956 | |
---|
5920 | | - if (GetBRep() != null) |
---|
5921 | | - usecalllists = usecalllists; |
---|
| 5957 | + if (display.DrawMode() == display.SHADOW) |
---|
| 5958 | + //GetBRep() != null) |
---|
| 5959 | + usecalllists = !!usecalllists; |
---|
5922 | 5960 | //System.out.println("draw " + this); |
---|
5923 | 5961 | //new Exception().printStackTrace(); |
---|
5924 | 5962 | |
---|
.. | .. |
---|
5940 | 5978 | if (!(this instanceof Composite)) |
---|
5941 | 5979 | touched = false; |
---|
5942 | 5980 | //if (displaylist == -1 && usecalllists) |
---|
5943 | | - if ((bRep != null && bRep.displaylist <= 0) && usecalllists) // june 2013 |
---|
| 5981 | + if (bRep.displaylist <= 0 && usecalllists) // && display.DrawMode() == display.DEFAULT) // june 2013 |
---|
5944 | 5982 | { |
---|
5945 | 5983 | bRep.displaylist = display.GenList(); |
---|
5946 | 5984 | assert(bRep.displaylist != 0); |
---|
.. | .. |
---|
5951 | 5989 | |
---|
5952 | 5990 | //System.out.println("\tnew list " + list); |
---|
5953 | 5991 | //gl.glDrawBuffer(gl.GL_NONE); |
---|
5954 | | - if (usecalllists) |
---|
| 5992 | + if (usecalllists && bRep.displaylist > 0) |
---|
5955 | 5993 | { |
---|
5956 | 5994 | // System.err.println("new list " + bRep.displaylist + " for " + this); |
---|
5957 | 5995 | display.NewList(bRep.displaylist); |
---|
.. | .. |
---|
5960 | 5998 | CallList(display, root, selected, blocked); |
---|
5961 | 5999 | |
---|
5962 | 6000 | // compiled = true; |
---|
5963 | | - if (usecalllists) |
---|
| 6001 | + if (usecalllists && bRep.displaylist > 0) |
---|
5964 | 6002 | { |
---|
5965 | 6003 | // System.err.println("end list " + bRep.displaylist + " for " + this); |
---|
5966 | 6004 | display.EndList(); |
---|
.. | .. |
---|
7490 | 7528 | hitSomething = hitScale; |
---|
7491 | 7529 | |
---|
7492 | 7530 | double scale = 0.005f * clickInfo.camera.Distance(); |
---|
7493 | | - double hScale = (double) (clickInfo.x /*- centerPt.x*/) / 32; |
---|
| 7531 | + double hScale = (double) (clickInfo.x - centerPt.x) / 32; |
---|
7494 | 7532 | double sign = 1; |
---|
7495 | 7533 | if (hScale < 0) |
---|
7496 | 7534 | { |
---|
.. | .. |
---|
7502 | 7540 | //hScale = 0.01; |
---|
7503 | 7541 | } |
---|
7504 | 7542 | |
---|
7505 | | - double vScale = (double) (clickInfo.y /*- centerPt.y*/) / 32; |
---|
| 7543 | + double vScale = (double) (clickInfo.y - centerPt.y) / 32; |
---|
7506 | 7544 | sign = 1; |
---|
7507 | 7545 | if (vScale < 0) |
---|
7508 | 7546 | { |
---|
.. | .. |
---|
7717 | 7755 | break; |
---|
7718 | 7756 | |
---|
7719 | 7757 | case hitScale: // scale |
---|
7720 | | - double hScale = (double) (clickInfo.x /*- centerPt.x*/) / 32; |
---|
| 7758 | + double hScale = (double) (clickInfo.x - centerPt.x) / 32; |
---|
7721 | 7759 | double sign = 1; |
---|
7722 | 7760 | if (hScale < 0) |
---|
7723 | 7761 | { |
---|
.. | .. |
---|
7729 | 7767 | //hScale = 0.01; |
---|
7730 | 7768 | } |
---|
7731 | 7769 | |
---|
7732 | | - double vScale = (double) (clickInfo.y /*- centerPt.y*/) / 32; |
---|
| 7770 | + double vScale = (double) (clickInfo.y - centerPt.y) / 32; |
---|
7733 | 7771 | sign = 1; |
---|
7734 | 7772 | if (vScale < 0) |
---|
7735 | 7773 | { |
---|