Normand Briere
2019-08-23 60cec91731a350fe67e9b5ffe7a00d70e9026314
Object3D.java
....@@ -271,6 +271,50 @@
271271 //
272272 // return null;
273273 // }
274
+
275
+ transient boolean tag;
276
+
277
+ void TagObjects(Object3D o, boolean tag)
278
+ {
279
+ if (blockloop)
280
+ return;
281
+
282
+ o.tag = tag;
283
+
284
+ if (o == this)
285
+ return;
286
+
287
+ blockloop = true;
288
+
289
+ for (int i=0; i<Size(); i++)
290
+ {
291
+ get(i).TagObjects(o, tag);
292
+ }
293
+
294
+ blockloop = false;
295
+ }
296
+
297
+ boolean HasTags()
298
+ {
299
+ if (blockloop)
300
+ return false;
301
+
302
+ blockloop = true;
303
+
304
+ boolean hasTags = false;
305
+
306
+ for (int i=0; i<Size(); i++)
307
+ {
308
+ hasTags |= get(i).tag || get(i).HasTags();
309
+
310
+ if (hasTags)
311
+ break;
312
+ }
313
+
314
+ blockloop = false;
315
+
316
+ return hasTags;
317
+ }
274318
275319 void RestoreBigData(java.util.Hashtable<java.util.UUID, Object3D> hashtable)
276320 {
....@@ -643,7 +687,7 @@
643687 {
644688 if (maxcount != 1)
645689 {
646
- new Exception().printStackTrace();
690
+ //new Exception().printStackTrace();
647691 }
648692
649693 toParentMarked = LA.newMatrix();
....@@ -2325,11 +2369,6 @@
23252369
23262370 InitOthers();
23272371
2328
- if (this instanceof Camera)
2329
- {
2330
- material.shift = 90;
2331
- }
2332
-
23332372 material.multiply = multiply;
23342373
23352374 if (multiply)
....@@ -3578,15 +3617,47 @@
35783617
35793618 void ClearMaterials()
35803619 {
3620
+ if (blockloop)
3621
+ return;
3622
+
3623
+ blockloop = true;
3624
+
35813625 ClearMaterial();
3582
- for (int i = 0; i < size(); i++)
3626
+ for (int i = 0; i < Size(); i++)
35833627 {
3584
- Object3D child = (Object3D) reserve(i);
3628
+ Object3D child = (Object3D) get(i);
35853629 if (child == null)
35863630 continue;
35873631 child.ClearMaterials();
3588
- release(i);
35893632 }
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;
35903661 }
35913662
35923663 void FlipV(boolean flip)
....@@ -7640,7 +7711,9 @@
76407711
76417712 scale *= 0.05f * Globals.theRenderer.RenderCamera().Distance();
76427713
7643
- if (modified || opposite)
7714
+ // Modified could snap
7715
+ if (//modified ||
7716
+ opposite)
76447717 {
76457718 //assert(false);
76467719 /*
....@@ -7734,7 +7807,7 @@
77347807
77357808 if (modified)
77367809 {
7737
- // Rotate 90 degrees
7810
+ // Rotate 45 degrees
77387811 angle /= (Math.PI / 4);
77397812 angle = Math.floor(angle + 0.5);
77407813 angle *= (Math.PI / 4);
....@@ -7820,7 +7893,7 @@
78207893 case 3: // '\001'
78217894 if (modified || opposite)
78227895 {
7823
- if (modified && opposite)
7896
+ if (modified) // && opposite)
78247897 LA.matScale(toParent, totalScale, totalScale, totalScale);
78257898 else
78267899 //LA.matScale(toParent, 1, hScale, vScale);
....@@ -7836,7 +7909,7 @@
78367909 case 2: // '\002'
78377910 if (modified || opposite)
78387911 {
7839
- if (modified && opposite)
7912
+ if (modified) // && opposite)
78407913 LA.matScale(toParent, totalScale, totalScale, totalScale);
78417914 else
78427915 //LA.matScale(toParent, hScale, 1, vScale);
....@@ -7850,7 +7923,7 @@
78507923 case 1: // '\003'
78517924 if (modified || opposite)
78527925 {
7853
- if (modified && opposite)
7926
+ if (modified) // && opposite)
78547927 LA.matScale(toParent, totalScale, totalScale, totalScale);
78557928 else
78567929 //LA.matScale(toParent, hScale, vScale, 1);