From 0a52bd4800459cd9935f360d7ca9555b6bea2146 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Fri, 19 Jul 2019 20:56:44 -0400 Subject: [PATCH] CSG + paint mode. --- Object3D.java | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 53 insertions(+), 2 deletions(-) diff --git a/Object3D.java b/Object3D.java index b3a45b6..0fe5ff5 100644 --- a/Object3D.java +++ b/Object3D.java @@ -29,7 +29,7 @@ Object3D saveskeleton; // - byte[] versions[] = new byte[100][]; + byte[] versions[]; int versionindex = -1; ScriptNode scriptnode; @@ -219,6 +219,8 @@ // o.bRep.support = null; // } o.selection = this.selection; + o.versions = this.versions; + o.versionindex = this.versionindex; if (this.support != null) { @@ -274,6 +276,9 @@ } this.selection = o.selection; + + this.versions = o.versions; + this.versionindex = o.versionindex; // July 2019 if (this.bRep != null) // this.bRep.support = o.transientrep; // this.support = o.support; @@ -421,6 +426,7 @@ } boolean live = false; + transient boolean keepdontselect; boolean dontselect = false; boolean hide = false; boolean link2master = false; // performs reset support/master at each frame @@ -3112,7 +3118,7 @@ { if (bRep != null) { - bRep.GenerateNormalsMINE(); + bRep.MergeNormals(); //.GenerateNormalsMINE(); Touch(); } } @@ -5415,6 +5421,51 @@ blockloop = false; } + void ResetSelectable() + { + if (blockloop) + return; + + blockloop = true; + + keepdontselect = dontselect; + dontselect = true; + + Object3D child; + int nb = Size(); + for (int i = 0; i < nb; i++) + { + child = (Object3D) get(i); + if (child == null) + continue; + child.ResetSelectable(); + } + + blockloop = false; + } + + void RestoreSelectable() + { + if (blockloop) + return; + + blockloop = true; + + dontselect = keepdontselect; + + Object3D child; + int nb = Size(); + for (int i = 0; i < nb; i++) + { + child = (Object3D) get(i); + if (child == null) + continue; + child.RestoreSelectable(); + } + + blockloop = false; + } + boolean IsSelected() { if (parent == null) -- Gitblit v1.6.2