Normand Briere
2019-08-23 60cec91731a350fe67e9b5ffe7a00d70e9026314
Object3D.java
....@@ -687,7 +687,7 @@
687687 {
688688 if (maxcount != 1)
689689 {
690
- new Exception().printStackTrace();
690
+ //new Exception().printStackTrace();
691691 }
692692
693693 toParentMarked = LA.newMatrix();
....@@ -2369,11 +2369,6 @@
23692369
23702370 InitOthers();
23712371
2372
- if (this instanceof Camera)
2373
- {
2374
- material.shift = 90;
2375
- }
2376
-
23772372 material.multiply = multiply;
23782373
23792374 if (multiply)
....@@ -3622,15 +3617,47 @@
36223617
36233618 void ClearMaterials()
36243619 {
3620
+ if (blockloop)
3621
+ return;
3622
+
3623
+ blockloop = true;
3624
+
36253625 ClearMaterial();
3626
- for (int i = 0; i < size(); i++)
3626
+ for (int i = 0; i < Size(); i++)
36273627 {
3628
- Object3D child = (Object3D) reserve(i);
3628
+ Object3D child = (Object3D) get(i);
36293629 if (child == null)
36303630 continue;
36313631 child.ClearMaterials();
3632
- release(i);
36333632 }
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;
36343661 }
36353662
36363663 void FlipV(boolean flip)
....@@ -7684,7 +7711,9 @@
76847711
76857712 scale *= 0.05f * Globals.theRenderer.RenderCamera().Distance();
76867713
7687
- if (modified || opposite)
7714
+ // Modified could snap
7715
+ if (//modified ||
7716
+ opposite)
76887717 {
76897718 //assert(false);
76907719 /*
....@@ -7778,7 +7807,7 @@
77787807
77797808 if (modified)
77807809 {
7781
- // Rotate 90 degrees
7810
+ // Rotate 45 degrees
77827811 angle /= (Math.PI / 4);
77837812 angle = Math.floor(angle + 0.5);
77847813 angle *= (Math.PI / 4);
....@@ -7864,7 +7893,7 @@
78647893 case 3: // '\001'
78657894 if (modified || opposite)
78667895 {
7867
- if (modified && opposite)
7896
+ if (modified) // && opposite)
78687897 LA.matScale(toParent, totalScale, totalScale, totalScale);
78697898 else
78707899 //LA.matScale(toParent, 1, hScale, vScale);
....@@ -7880,7 +7909,7 @@
78807909 case 2: // '\002'
78817910 if (modified || opposite)
78827911 {
7883
- if (modified && opposite)
7912
+ if (modified) // && opposite)
78847913 LA.matScale(toParent, totalScale, totalScale, totalScale);
78857914 else
78867915 //LA.matScale(toParent, hScale, 1, vScale);
....@@ -7894,7 +7923,7 @@
78947923 case 1: // '\003'
78957924 if (modified || opposite)
78967925 {
7897
- if (modified && opposite)
7926
+ if (modified) // && opposite)
78987927 LA.matScale(toParent, totalScale, totalScale, totalScale);
78997928 else
79007929 //LA.matScale(toParent, hScale, vScale, 1);