.. | .. |
---|
687 | 687 | { |
---|
688 | 688 | if (maxcount != 1) |
---|
689 | 689 | { |
---|
690 | | - new Exception().printStackTrace(); |
---|
| 690 | + //new Exception().printStackTrace(); |
---|
691 | 691 | } |
---|
692 | 692 | |
---|
693 | 693 | toParentMarked = LA.newMatrix(); |
---|
.. | .. |
---|
2369 | 2369 | |
---|
2370 | 2370 | InitOthers(); |
---|
2371 | 2371 | |
---|
2372 | | - if (this instanceof Camera) |
---|
2373 | | - { |
---|
2374 | | - material.shift = 90; |
---|
2375 | | - } |
---|
2376 | | - |
---|
2377 | 2372 | material.multiply = multiply; |
---|
2378 | 2373 | |
---|
2379 | 2374 | if (multiply) |
---|
.. | .. |
---|
3622 | 3617 | |
---|
3623 | 3618 | void ClearMaterials() |
---|
3624 | 3619 | { |
---|
| 3620 | + if (blockloop) |
---|
| 3621 | + return; |
---|
| 3622 | + |
---|
| 3623 | + blockloop = true; |
---|
| 3624 | + |
---|
3625 | 3625 | ClearMaterial(); |
---|
3626 | | - for (int i = 0; i < size(); i++) |
---|
| 3626 | + for (int i = 0; i < Size(); i++) |
---|
3627 | 3627 | { |
---|
3628 | | - Object3D child = (Object3D) reserve(i); |
---|
| 3628 | + Object3D child = (Object3D) get(i); |
---|
3629 | 3629 | if (child == null) |
---|
3630 | 3630 | continue; |
---|
3631 | 3631 | child.ClearMaterials(); |
---|
3632 | | - release(i); |
---|
3633 | 3632 | } |
---|
| 3633 | + |
---|
| 3634 | + blockloop = false; |
---|
| 3635 | + } |
---|
| 3636 | + |
---|
| 3637 | + void ClearVersionList() |
---|
| 3638 | + { |
---|
| 3639 | + this.versionlist = null; |
---|
| 3640 | + this.versionindex = -1; |
---|
| 3641 | + this.versiontable = null; |
---|
| 3642 | + } |
---|
| 3643 | + |
---|
| 3644 | + void ClearVersions() |
---|
| 3645 | + { |
---|
| 3646 | + if (blockloop) |
---|
| 3647 | + return; |
---|
| 3648 | + |
---|
| 3649 | + blockloop = true; |
---|
| 3650 | + |
---|
| 3651 | + ClearVersionList(); |
---|
| 3652 | + for (int i = 0; i < Size(); i++) |
---|
| 3653 | + { |
---|
| 3654 | + Object3D child = (Object3D) get(i); |
---|
| 3655 | + if (child == null) |
---|
| 3656 | + continue; |
---|
| 3657 | + child.ClearVersions(); |
---|
| 3658 | + } |
---|
| 3659 | + |
---|
| 3660 | + blockloop = false; |
---|
3634 | 3661 | } |
---|
3635 | 3662 | |
---|
3636 | 3663 | void FlipV(boolean flip) |
---|
.. | .. |
---|
7684 | 7711 | |
---|
7685 | 7712 | scale *= 0.05f * Globals.theRenderer.RenderCamera().Distance(); |
---|
7686 | 7713 | |
---|
7687 | | - if (modified || opposite) |
---|
| 7714 | + // Modified could snap |
---|
| 7715 | + if (//modified || |
---|
| 7716 | + opposite) |
---|
7688 | 7717 | { |
---|
7689 | 7718 | //assert(false); |
---|
7690 | 7719 | /* |
---|
.. | .. |
---|
7778 | 7807 | |
---|
7779 | 7808 | if (modified) |
---|
7780 | 7809 | { |
---|
7781 | | - // Rotate 90 degrees |
---|
| 7810 | + // Rotate 45 degrees |
---|
7782 | 7811 | angle /= (Math.PI / 4); |
---|
7783 | 7812 | angle = Math.floor(angle + 0.5); |
---|
7784 | 7813 | angle *= (Math.PI / 4); |
---|
.. | .. |
---|
7864 | 7893 | case 3: // '\001' |
---|
7865 | 7894 | if (modified || opposite) |
---|
7866 | 7895 | { |
---|
7867 | | - if (modified && opposite) |
---|
| 7896 | + if (modified) // && opposite) |
---|
7868 | 7897 | LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
7869 | 7898 | else |
---|
7870 | 7899 | //LA.matScale(toParent, 1, hScale, vScale); |
---|
.. | .. |
---|
7880 | 7909 | case 2: // '\002' |
---|
7881 | 7910 | if (modified || opposite) |
---|
7882 | 7911 | { |
---|
7883 | | - if (modified && opposite) |
---|
| 7912 | + if (modified) // && opposite) |
---|
7884 | 7913 | LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
7885 | 7914 | else |
---|
7886 | 7915 | //LA.matScale(toParent, hScale, 1, vScale); |
---|
.. | .. |
---|
7894 | 7923 | case 1: // '\003' |
---|
7895 | 7924 | if (modified || opposite) |
---|
7896 | 7925 | { |
---|
7897 | | - if (modified && opposite) |
---|
| 7926 | + if (modified) // && opposite) |
---|
7898 | 7927 | LA.matScale(toParent, totalScale, totalScale, totalScale); |
---|
7899 | 7928 | else |
---|
7900 | 7929 | //LA.matScale(toParent, hScale, vScale, 1); |
---|