.. | .. |
---|
881 | 881 | |
---|
882 | 882 | if (marked && Globals.isLIVE() && live && |
---|
883 | 883 | //TEMP21aug2018 |
---|
884 | | - (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) && |
---|
| 884 | + (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) && |
---|
885 | 885 | currentframe != Globals.framecount) |
---|
886 | 886 | { |
---|
887 | 887 | currentframe = Globals.framecount; |
---|
.. | .. |
---|
893 | 893 | |
---|
894 | 894 | boolean changedir = random && Math.random() < 0.01; // && !link2master; |
---|
895 | 895 | |
---|
896 | | - if (transformcount*factor > maxcount || (step == 1 && changedir)) |
---|
| 896 | + if (transformcount*factor >= maxcount && (rewind || random) || |
---|
| 897 | + (step == 1 && changedir)) |
---|
897 | 898 | { |
---|
898 | 899 | countdown = 1; |
---|
899 | 900 | delay = speedup?8:1; |
---|
.. | .. |
---|
965 | 966 | if (material == null || material.multiply) |
---|
966 | 967 | return true; |
---|
967 | 968 | |
---|
| 969 | + // Transparent objects are dynamic because we have to sort the triangles. |
---|
968 | 970 | return material.opacity > 0.99; |
---|
969 | 971 | } |
---|
970 | 972 | |
---|
.. | .. |
---|
2386 | 2388 | } |
---|
2387 | 2389 | */ |
---|
2388 | 2390 | } |
---|
| 2391 | + else |
---|
| 2392 | + { |
---|
| 2393 | + //((ObjEditor)editWindow).SetupUI2(null); |
---|
| 2394 | + } |
---|
2389 | 2395 | } |
---|
2390 | 2396 | |
---|
2391 | 2397 | void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root) |
---|
.. | .. |
---|
3503 | 3509 | if (blockloop) |
---|
3504 | 3510 | return; |
---|
3505 | 3511 | |
---|
3506 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3512 | + if (//marked || // does not make sense |
---|
| 3513 | + (bRep != null || material != null)) // borderline... |
---|
3507 | 3514 | live = h; |
---|
3508 | 3515 | |
---|
3509 | 3516 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3524 | 3531 | return; |
---|
3525 | 3532 | |
---|
3526 | 3533 | //if (bRep != null) |
---|
3527 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3534 | + if (//marked || // does not make sense |
---|
| 3535 | + (bRep != null || material != null)) // borderline... |
---|
3528 | 3536 | link2master = h; |
---|
3529 | 3537 | |
---|
3530 | 3538 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3544 | 3552 | if (blockloop) |
---|
3545 | 3553 | return; |
---|
3546 | 3554 | |
---|
3547 | | - if (marked || (bRep != null && material != null)) // borderline... |
---|
| 3555 | + if (//marked || // does not make sense |
---|
| 3556 | + (bRep != null || material != null)) // borderline... |
---|
3548 | 3557 | hide = h; |
---|
3549 | 3558 | |
---|
3550 | 3559 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3564 | 3573 | if (blockloop) |
---|
3565 | 3574 | return; |
---|
3566 | 3575 | |
---|
3567 | | - if (bRep != null && material != null) // borderline... |
---|
| 3576 | + if (bRep != null || material != null) // borderline... |
---|
3568 | 3577 | marked = h; |
---|
3569 | 3578 | |
---|
3570 | 3579 | for (int i = 0; i < Size(); i++) |
---|
.. | .. |
---|
3574 | 3583 | continue; |
---|
3575 | 3584 | blockloop = true; |
---|
3576 | 3585 | 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); |
---|
3577 | 3626 | blockloop = false; |
---|
3578 | 3627 | // release(i); |
---|
3579 | 3628 | } |
---|
.. | .. |
---|
5702 | 5751 | support = support; |
---|
5703 | 5752 | |
---|
5704 | 5753 | //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); |
---|
5706 | 5755 | |
---|
5707 | 5756 | if (!usecalllists && bRep != null && bRep.displaylist > 0) |
---|
5708 | 5757 | { |
---|
.. | .. |
---|
5723 | 5772 | |
---|
5724 | 5773 | if (!selectmode && //display.DrawMode() != display.SELECTION && |
---|
5725 | 5774 | //(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))) |
---|
5727 | 5776 | { |
---|
5728 | 5777 | Globals.lighttouched = true; |
---|
5729 | 5778 | } // all panes... |
---|
.. | .. |
---|
6315 | 6364 | // dec 2012 |
---|
6316 | 6365 | new Exception().printStackTrace(); |
---|
6317 | 6366 | return; |
---|
| 6367 | + } |
---|
| 6368 | + |
---|
| 6369 | + if (dontselect) |
---|
| 6370 | + { |
---|
| 6371 | + //bRep.GenerateNormalsMINE(); |
---|
6318 | 6372 | } |
---|
6319 | 6373 | |
---|
6320 | 6374 | display.DrawGeometry(bRep, flipV, selectmode); |
---|
.. | .. |
---|
7752 | 7806 | editWindow = null; |
---|
7753 | 7807 | } // ? |
---|
7754 | 7808 | } |
---|
| 7809 | + else |
---|
| 7810 | + { |
---|
| 7811 | + //editWindow.closeUI(); |
---|
| 7812 | + } |
---|
7755 | 7813 | } |
---|
7756 | 7814 | |
---|
7757 | 7815 | boolean root; // patch for edit windows |
---|