From cf7cfa1c792eebba606a48aa648893f6e4873263 Mon Sep 17 00:00:00 2001
From: Normand Briere <nbriere@noware.ca>
Date: Mon, 22 Jul 2019 23:03:04 -0400
Subject: [PATCH] Embed JPEG.

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

diff --git a/Object3D.java b/Object3D.java
index 2ccc4c6..1b9b4c0 100644
--- a/Object3D.java
+++ b/Object3D.java
@@ -5775,12 +5775,23 @@
         }
     }
     
-    void EmbedTextures()
+    void EmbedTextures(boolean embed)
     {
         if (blockloop)
             return;
         
-        CameraPane.EmbedTextures(texture);
+        //if (GetTextures() != null)
+        if (embed)
+            CameraPane.EmbedTextures(GetTextures());
+        else
+        {
+            GetTextures().pigmentdata = null;
+            GetTextures().bumpdata = null;
+            GetTextures().pw = 0;
+            GetTextures().ph = 0;
+            GetTextures().bw = 0;
+            GetTextures().bh = 0;
+        }
         
         int nb = Size();
         for (int i = 0; i < nb; i++)
@@ -5791,7 +5802,7 @@
                 continue;
 
             blockloop = true;
-            child.EmbedTextures();
+            child.EmbedTextures(embed);
             blockloop = false;
         }
     }

--
Gitblit v1.6.2