From c67da2e5d8655704601d6d06e8bc60aabe212253 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sun, 23 Jun 2019 21:49:12 -0400
Subject: [PATCH] Compute shadow when live option.

---
 Object3D.java |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/Object3D.java b/Object3D.java
index 7b52765..45bb2a6 100644
--- a/Object3D.java
+++ b/Object3D.java
@@ -881,7 +881,7 @@
         
         if (marked && Globals.isLIVE() && live &&
                 //TEMP21aug2018
-                (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW) &&
+                (Globals.DrawMode() == iCameraPane.SHADOW || !Globals.RENDERSHADOW || !Globals.COMPUTESHADOWWHENLIVE) &&
                 currentframe != Globals.framecount)
         {
             currentframe = Globals.framecount;
@@ -966,6 +966,7 @@
         if (material == null || material.multiply)
             return true;
         
+        // Transparent objects are dynamic because we have to sort the triangles.
         return material.opacity > 0.99;
     }
     
@@ -2386,6 +2387,10 @@
         editWindow.show();
         }
          */
+        }
+        else
+        {
+            //((ObjEditor)editWindow).SetupUI2(null);
         }
     }
 
@@ -5746,7 +5751,7 @@
             support = support;
         
         //boolean usecalllists = IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null || !link2master); // !(this instanceof cSpring) && !(this instanceof BezierPatch);
-        boolean usecalllists = IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
+        boolean usecalllists = !IsLive(); // IsStatic() && GetBRep() != null && (!CameraPane.SUPPORT || support == null) && !link2master; // !(this instanceof cSpring) && !(this instanceof BezierPatch);
         
         if (!usecalllists && bRep != null && bRep.displaylist > 0)
         {
@@ -5767,7 +5772,7 @@
         
         if (!selectmode && //display.DrawMode() != display.SELECTION &&
                 //(touched || (bRep != null && bRep.displaylist <= 0)))
-                (Globals.isLIVE() || touched && (bRep != null && bRep.displaylist <= 0)))
+                (Globals.isLIVE() && Globals.COMPUTESHADOWWHENLIVE || touched && (bRep != null && bRep.displaylist <= 0)))
         {
             Globals.lighttouched = true;
         } // all panes...
@@ -6359,6 +6364,11 @@
                 // dec 2012
                 new Exception().printStackTrace();
                 return;
+            }
+            
+            if (dontselect)
+            {
+                //bRep.GenerateNormalsMINE();
             }
             
             display.DrawGeometry(bRep, flipV, selectmode);
@@ -7796,6 +7806,10 @@
             editWindow = null;
         } // ?
         }
+        else
+        {
+            //editWindow.closeUI();
+        }
     }
     
     boolean root; // patch for edit windows

--
Gitblit v1.6.2