From 65bdec7ae2c99ca2102c55f92bd62b48c9f14847 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Tue, 01 Oct 2019 17:30:29 -0400
Subject: [PATCH] Disable project on ground + adam/eve/tom

---
 Object3D.java |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/Object3D.java b/Object3D.java
index 10bff2f..abd4fbd 100644
--- a/Object3D.java
+++ b/Object3D.java
@@ -41,6 +41,8 @@
         
     java.util.Hashtable<java.util.UUID, Object3D> versiontable; // = new java.util.Hashtable<java.util.UUID, Object3D>();
     
+    int tabIndex;
+    
     ScriptNode scriptnode;
 
     void deepCopyNode(Object3D other)
@@ -100,7 +102,7 @@
         other.softtouched = softtouched;
         
         other.random = random;
-        other.link2master = link2master;
+        other.link2master = Link2Support();
         other.transformcount = transformcount;
         other.marked = marked;
         other.skip = skip;
@@ -220,7 +222,7 @@
             return;
 
         transientsupport = support;
-        transientlink2master = link2master;
+        transientlink2master = Link2Support();
 
         support = null;
         link2master = false;
@@ -633,7 +635,10 @@
     transient boolean keepdontselect;
     boolean dontselect = false;
     boolean hide = false;
+    
     boolean link2master = false; // performs reset support/master at each frame (cannot rename due to serialization)
+    boolean link2support = false; // (cannot rename due to serialization)
+    
     boolean marked = false; // animation node
     boolean skip = false; // centroid issue
     boolean skipmocap = false; // mocap data
@@ -6154,7 +6159,7 @@
     boolean NeedSupport()
     {
         return
-                CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && link2master && /*live &&*/ support != null
+                CameraPane.SUPPORT && (!CameraPane.movingcamera || (!Globals.FREEZEONMOVE && Globals.isLIVE())) && Link2Support() && /*live &&*/ support != null
                  // PROBLEM with CROWD!!
                     && (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || Globals.CROWD);
     }
@@ -6177,6 +6182,11 @@
         return live && bRep != null;
     }
     
+    boolean Link2Support()
+    {
+        return link2master || link2support;
+    }
+    
     static cVector minima = new cVector();
     static cVector maxima = new cVector();
     static javax.vecmath.Point3d center = new javax.vecmath.Point3d();
@@ -6190,7 +6200,7 @@
         //    System.err.println("Draw " + this + " Frame # " + ((Mocap)((Merge)support).object).frame);
         }
         
-        if (live && link2master && support == null && !this.marked) // project on ground
+        if (false) // live && Link2Support() && support == null && !this.marked) // project on ground
         {
             getBounds(minima, maxima, true);
             center.x = (minima.x + maxima.x) / 2;
@@ -6265,7 +6275,7 @@
             support = support;
         
         boolean usecalllists = !IsDynamic() &&
-                                    IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
+                                    IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !Link2Support()); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
         //boolean usecalllists = false; //!IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
         
         //usecalllists &= display.DrawMode() == display.DEFAULT; // Don't compute list in shadow pass.
@@ -6373,7 +6383,7 @@
         {
             if (display.DrawMode() == iCameraPane.SHADOW)
             {
-                if (!link2master // tricky to cull in shadow mode.
+                if (!Link2Support() // tricky to cull in shadow mode.
                          && GetBRep().FrustumCull(this, null, display.LightCamera(), true))
                 {
                     //System.out.print("CULLED");
@@ -6846,7 +6856,7 @@
 
         //javax.media.opengl.GL gl = display.GetGL();
 
-        if (CameraPane.BOXMODE && !selected) // || CameraPane.movingcamera)
+        if (CameraPane.BOXMODE && !Link2Support()) //selected) // || CameraPane.movingcamera)
         {
             int fc = bRep.FaceCount();
             int vc = bRep.VertexCount();
@@ -8917,7 +8927,7 @@
         
         boolean touch = false;
         
-        if (bRep != null && link2master)
+        if (bRep != null && Link2Support())
         {
             if (bbox == null)
             {

--
Gitblit v1.6.2