Normand Briere
2019-07-20 0a52bd4800459cd9935f360d7ca9555b6bea2146
Object3D.java
....@@ -29,6 +29,9 @@
2929 Object3D saveskeleton;
3030 //
3131
32
+ byte[] versions[];
33
+ int versionindex = -1;
34
+
3235 ScriptNode scriptnode;
3336
3437 void InitOthers()
....@@ -215,6 +218,9 @@
215218 // o.transientrep = this.bRep.support;
216219 // o.bRep.support = null;
217220 // }
221
+ o.selection = this.selection;
222
+ o.versions = this.versions;
223
+ o.versionindex = this.versionindex;
218224
219225 if (this.support != null)
220226 {
....@@ -268,6 +274,11 @@
268274 {
269275 this.support.bRep = o.transientrep;
270276 }
277
+
278
+ this.selection = o.selection;
279
+
280
+ this.versions = o.versions;
281
+ this.versionindex = o.versionindex;
271282 // July 2019 if (this.bRep != null)
272283 // this.bRep.support = o.transientrep;
273284 // this.support = o.support;
....@@ -415,6 +426,7 @@
415426 }
416427
417428 boolean live = false;
429
+ transient boolean keepdontselect;
418430 boolean dontselect = false;
419431 boolean hide = false;
420432 boolean link2master = false; // performs reset support/master at each frame
....@@ -3106,7 +3118,7 @@
31063118 {
31073119 if (bRep != null)
31083120 {
3109
- bRep.GenerateNormalsMINE();
3121
+ bRep.MergeNormals(); //.GenerateNormalsMINE();
31103122 Touch();
31113123 }
31123124 }
....@@ -5409,6 +5421,51 @@
54095421 blockloop = false;
54105422 }
54115423
5424
+ void ResetSelectable()
5425
+ {
5426
+ if (blockloop)
5427
+ return;
5428
+
5429
+ blockloop = true;
5430
+
5431
+ keepdontselect = dontselect;
5432
+ dontselect = true;
5433
+
5434
+ Object3D child;
5435
+ int nb = Size();
5436
+ for (int i = 0; i < nb; i++)
5437
+ {
5438
+ child = (Object3D) get(i);
5439
+ if (child == null)
5440
+ continue;
5441
+ child.ResetSelectable();
5442
+ }
5443
+
5444
+ blockloop = false;
5445
+ }
5446
+
5447
+ void RestoreSelectable()
5448
+ {
5449
+ if (blockloop)
5450
+ return;
5451
+
5452
+ blockloop = true;
5453
+
5454
+ dontselect = keepdontselect;
5455
+
5456
+ Object3D child;
5457
+ int nb = Size();
5458
+ for (int i = 0; i < nb; i++)
5459
+ {
5460
+ child = (Object3D) get(i);
5461
+ if (child == null)
5462
+ continue;
5463
+ child.RestoreSelectable();
5464
+ }
5465
+
5466
+ blockloop = false;
5467
+ }
5468
+
54125469 boolean IsSelected()
54135470 {
54145471 if (parent == null)