From 7b6b5ba546450e71ecc812356952b594acc5add5 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Sun, 16 Jun 2019 12:44:54 -0400
Subject: [PATCH] Fix shadow touched.
---
ObjEditor.java | 15 +++++++++++----
Globals.java | 2 ++
Object3D.java | 4 +++-
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/Globals.java b/Globals.java
index f6ac3a4..3e1e257 100644
--- a/Globals.java
+++ b/Globals.java
@@ -8,6 +8,8 @@
private static boolean LIVE = false;
public static boolean RENDERSHADOW = true;
+ public static boolean MOUSEDRAGGED = false;
+
// Hold on calculation when moving camera
public static boolean FREEZEONMOVE = false; // true;
diff --git a/ObjEditor.java b/ObjEditor.java
index 747c30b..9cf4839 100644
--- a/ObjEditor.java
+++ b/ObjEditor.java
@@ -419,10 +419,10 @@
e.printStackTrace();
}
- String selection = infoarea.getText();
- java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection);
- java.awt.datatransfer.Clipboard clipboard =
- Toolkit.getDefaultToolkit().getSystemClipboard();
+// String selection = infoarea.getText();
+// java.awt.datatransfer.StringSelection data = new java.awt.datatransfer.StringSelection(selection);
+// java.awt.datatransfer.Clipboard clipboard =
+// Toolkit.getDefaultToolkit().getSystemClipboard();
//clipboard.setContents(data, data);
}
@@ -4295,6 +4295,7 @@
try
{
+ // Try compressed version first.
java.io.FileInputStream istream = new java.io.FileInputStream(fullname);
java.util.zip.GZIPInputStream zstream = new java.util.zip.GZIPInputStream(istream);
java.io.ObjectInputStream p = new java.io.ObjectInputStream(zstream);
@@ -4364,6 +4365,12 @@
void LoadIt(Object obj)
{
+ if (obj == null)
+ {
+ // Invalid file
+ return;
+ }
+
System.out.println("Loaded " + obj);
//new Exception().printStackTrace();
Object3D readobj = (Object3D) obj;
diff --git a/Object3D.java b/Object3D.java
index 04e109f..23e2d98 100644
--- a/Object3D.java
+++ b/Object3D.java
@@ -5673,10 +5673,12 @@
boolean selectmode = display.DrawMode() == display.SELECTION || display.IsDebugSelection();
if (!selectmode && //display.DrawMode() != display.SELECTION &&
- (touched || (bRep != null && bRep.displaylist <= 0)))
+ //(touched || (bRep != null && bRep.displaylist <= 0)))
+ (Globals.isLIVE() || touched && (bRep != null && bRep.displaylist <= 0)))
{
Globals.lighttouched = true;
} // all panes...
+
//if (usecalllists && display.DrawMode() != display.SELECTION && display.DrawMode() != display.SHADOW &&
if (bRep != null && usecalllists && !selectmode && // june 2013 display.DrawMode() != display.SHADOW &&
(touched || (bRep != null && bRep.displaylist <= 0)))
--
Gitblit v1.6.2