.. | .. |
---|
29 | 29 | Object3D saveskeleton; |
---|
30 | 30 | // |
---|
31 | 31 | |
---|
| 32 | + byte[] versions[]; |
---|
| 33 | + int versionindex = -1; |
---|
| 34 | + |
---|
32 | 35 | ScriptNode scriptnode; |
---|
33 | 36 | |
---|
34 | 37 | void InitOthers() |
---|
.. | .. |
---|
215 | 218 | // o.transientrep = this.bRep.support; |
---|
216 | 219 | // o.bRep.support = null; |
---|
217 | 220 | // } |
---|
| 221 | + o.selection = this.selection; |
---|
| 222 | + o.versions = this.versions; |
---|
| 223 | + o.versionindex = this.versionindex; |
---|
218 | 224 | |
---|
219 | 225 | if (this.support != null) |
---|
220 | 226 | { |
---|
.. | .. |
---|
268 | 274 | { |
---|
269 | 275 | this.support.bRep = o.transientrep; |
---|
270 | 276 | } |
---|
| 277 | + |
---|
| 278 | + this.selection = o.selection; |
---|
| 279 | + |
---|
| 280 | + this.versions = o.versions; |
---|
| 281 | + this.versionindex = o.versionindex; |
---|
271 | 282 | // July 2019 if (this.bRep != null) |
---|
272 | 283 | // this.bRep.support = o.transientrep; |
---|
273 | 284 | // this.support = o.support; |
---|
.. | .. |
---|
415 | 426 | } |
---|
416 | 427 | |
---|
417 | 428 | boolean live = false; |
---|
| 429 | + transient boolean keepdontselect; |
---|
418 | 430 | boolean dontselect = false; |
---|
419 | 431 | boolean hide = false; |
---|
420 | 432 | boolean link2master = false; // performs reset support/master at each frame |
---|
.. | .. |
---|
3106 | 3118 | { |
---|
3107 | 3119 | if (bRep != null) |
---|
3108 | 3120 | { |
---|
3109 | | - bRep.GenerateNormalsMINE(); |
---|
| 3121 | + bRep.MergeNormals(); //.GenerateNormalsMINE(); |
---|
3110 | 3122 | Touch(); |
---|
3111 | 3123 | } |
---|
3112 | 3124 | } |
---|
.. | .. |
---|
5409 | 5421 | blockloop = false; |
---|
5410 | 5422 | } |
---|
5411 | 5423 | |
---|
| 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 | + |
---|
5412 | 5469 | boolean IsSelected() |
---|
5413 | 5470 | { |
---|
5414 | 5471 | if (parent == null) |
---|
.. | .. |
---|
5718 | 5775 | } |
---|
5719 | 5776 | } |
---|
5720 | 5777 | |
---|
| 5778 | + void EmbedTextures(boolean embed) |
---|
| 5779 | + { |
---|
| 5780 | + if (blockloop) |
---|
| 5781 | + return; |
---|
| 5782 | + |
---|
| 5783 | + //if (GetTextures() != null) |
---|
| 5784 | + if (embed) |
---|
| 5785 | + CameraPane.EmbedTextures(GetTextures()); |
---|
| 5786 | + else |
---|
| 5787 | + { |
---|
| 5788 | + GetTextures().pigmentdata = null; |
---|
| 5789 | + GetTextures().bumpdata = null; |
---|
| 5790 | + GetTextures().pw = 0; |
---|
| 5791 | + GetTextures().ph = 0; |
---|
| 5792 | + GetTextures().bw = 0; |
---|
| 5793 | + GetTextures().bh = 0; |
---|
| 5794 | + } |
---|
| 5795 | + |
---|
| 5796 | + int nb = Size(); |
---|
| 5797 | + for (int i = 0; i < nb; i++) |
---|
| 5798 | + { |
---|
| 5799 | + Object3D child = (Object3D) get(i); |
---|
| 5800 | + |
---|
| 5801 | + if (child == null) |
---|
| 5802 | + continue; |
---|
| 5803 | + |
---|
| 5804 | + blockloop = true; |
---|
| 5805 | + child.EmbedTextures(embed); |
---|
| 5806 | + blockloop = false; |
---|
| 5807 | + } |
---|
| 5808 | + } |
---|
| 5809 | + |
---|
5721 | 5810 | void draw(iCameraPane display, Object3D /*Composite*/ root, boolean selected, boolean blocked) |
---|
5722 | 5811 | { |
---|
5723 | 5812 | Draw(display, root, selected, blocked); |
---|