Normand Briere
2019-06-24 c67da2e5d8655704601d6d06e8bc60aabe212253
Object3D.java
....@@ -881,7 +881,7 @@
881881
882882 if (marked && Globals.isLIVE() && live &&
883883 //TEMP21aug2018
884
- (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
884
+ (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
885885 currentframe != Globals.framecount)
886886 {
887887 currentframe = Globals.framecount;
....@@ -893,7 +893,8 @@
893893
894894 boolean changedir = random && Math.random() < 0.01; // && !link2master;
895895
896
- if (transformcount*factor > maxcount || (step == 1 && changedir))
896
+ if (transformcount*factor >= maxcount && (rewind || random) ||
897
+ (step == 1 && changedir))
897898 {
898899 countdown = 1;
899900 delay = speedup?8:1;
....@@ -965,6 +966,7 @@
965966 if (material == null || material.multiply)
966967 return true;
967968
969
+ // Transparent objects are dynamic because we have to sort the triangles.
968970 return material.opacity > 0.99;
969971 }
970972
....@@ -2386,6 +2388,10 @@
23862388 }
23872389 */
23882390 }
2391
+ else
2392
+ {
2393
+ //((ObjEditor)editWindow).SetupUI2(null);
2394
+ }
23892395 }
23902396
23912397 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -3503,7 +3509,8 @@
35033509 if (blockloop)
35043510 return;
35053511
3506
- if (marked || (bRep != null && material != null)) // borderline...
3512
+ if (//marked || // does not make sense
3513
+ (bRep != null || material != null)) // borderline...
35073514 live = h;
35083515
35093516 for (int i = 0; i < Size(); i++)
....@@ -3524,7 +3531,8 @@
35243531 return;
35253532
35263533 //if (bRep != null)
3527
- if (marked || (bRep != null && material != null)) // borderline...
3534
+ if (//marked || // does not make sense
3535
+ (bRep != null || material != null)) // borderline...
35283536 link2master = h;
35293537
35303538 for (int i = 0; i < Size(); i++)
....@@ -3544,7 +3552,8 @@
35443552 if (blockloop)
35453553 return;
35463554
3547
- if (marked || (bRep != null && material != null)) // borderline...
3555
+ if (//marked || // does not make sense
3556
+ (bRep != null || material != null)) // borderline...
35483557 hide = h;
35493558
35503559 for (int i = 0; i < Size(); i++)
....@@ -3564,7 +3573,7 @@
35643573 if (blockloop)
35653574 return;
35663575
3567
- if (bRep != null && material != null) // borderline...
3576
+ if (bRep != null || material != null) // borderline...
35683577 marked = h;
35693578
35703579 for (int i = 0; i < Size(); i++)
....@@ -3574,6 +3583,46 @@
35743583 continue;
35753584 blockloop = true;
35763585 child.MarkLeaves(h);
3586
+ blockloop = false;
3587
+ // release(i);
3588
+ }
3589
+ }
3590
+
3591
+ void RewindLeaves(boolean h)
3592
+ {
3593
+ if (blockloop)
3594
+ return;
3595
+
3596
+ if (bRep != null || material != null) // borderline...
3597
+ rewind = h;
3598
+
3599
+ for (int i = 0; i < Size(); i++)
3600
+ {
3601
+ Object3D child = (Object3D) get(i); // reserve(i);
3602
+ if (child == null)
3603
+ continue;
3604
+ blockloop = true;
3605
+ child.RewindLeaves(h);
3606
+ blockloop = false;
3607
+ // release(i);
3608
+ }
3609
+ }
3610
+
3611
+ void RandomLeaves(boolean h)
3612
+ {
3613
+ if (blockloop)
3614
+ return;
3615
+
3616
+ if (bRep != null || material != null) // borderline...
3617
+ random = h;
3618
+
3619
+ for (int i = 0; i < Size(); i++)
3620
+ {
3621
+ Object3D child = (Object3D) get(i); // reserve(i);
3622
+ if (child == null)
3623
+ continue;
3624
+ blockloop = true;
3625
+ child.RandomLeaves(h);
35773626 blockloop = false;
35783627 // release(i);
35793628 }
....@@ -5702,7 +5751,7 @@
57025751 support = support;
57035752
57045753 //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5705
- boolean usecalllists = IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
5754
+ boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
57065755
57075756 if (!usecalllists && bRep != null && bRep.displaylist > 0)
57085757 {
....@@ -5723,7 +5772,7 @@
57235772
57245773 if (!selectmode && //display.DrawMode() != display.SELECTION &&
57255774 //(touched || (bRep != null && bRep.displaylist <= 0)))
5726
- (Globals.isLIVE() || touched && (bRep != null && bRep.displaylist <= 0)))
5775
+ (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && (bRep != null && bRep.displaylist <= 0)))
57275776 {
57285777 Globals.lighttouched = true;
57295778 } // all panes...
....@@ -6315,6 +6364,11 @@
63156364 // dec 2012
63166365 new Exception().printStackTrace();
63176366 return;
6367
+ }
6368
+
6369
+ if (dontselect)
6370
+ {
6371
+ //bRep.GenerateNormalsMINE();
63186372 }
63196373
63206374 display.DrawGeometry(bRep, flipV, selectmode);
....@@ -7752,6 +7806,10 @@
77527806 editWindow = null;
77537807 } // ?
77547808 }
7809
+ else
7810
+ {
7811
+ //editWindow.closeUI();
7812
+ }
77557813 }
77567814
77577815 boolean root; // patch for edit windows