From 8d3387c330cae9bef8561706850398f446fd61f3 Mon Sep 17 00:00:00 2001 From: Patrick Dulebohn <40325124+DoobesURU@users.noreply.github.com> Date: Sun, 16 Jul 2023 14:40:17 -0400 Subject: [PATCH] Fix CubeMap "No image" Bug (#374) * Fix CubeMap Bug * Adds a sanity check that raises an error if a CubeMap doesn't have an image. * Refine coding * Adjust a few things per Hoikas' suggestion * Update korman/exporter/material.py Fix line of code per Hoikas' suggestion Co-authored-by: Adam Johnson * Update korman/exporter/material.py --------- Co-authored-by: Adam Johnson --- korman/exporter/material.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/korman/exporter/material.py b/korman/exporter/material.py index 5214786..1d9df22 100644 --- a/korman/exporter/material.py +++ b/korman/exporter/material.py @@ -701,6 +701,8 @@ class MaterialConverter: layer.texture = pl_env.key def export_cubic_env(self, bo, layer, texture): + if texture.image is None: + raise ExportError(f"CubeMap '{texture.name}' has no cube image!") width, height = texture.image.size # Sanity check: the image here should be 3x2 faces, so we should not have any