Browse Source

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 <AdamJohnso@gmail.com>

* Update korman/exporter/material.py

---------

Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
pull/377/head
Patrick Dulebohn 1 year ago committed by GitHub
parent
commit
8d3387c330
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      korman/exporter/material.py

2
korman/exporter/material.py

@ -701,6 +701,8 @@ class MaterialConverter:
layer.texture = pl_env.key layer.texture = pl_env.key
def export_cubic_env(self, bo, layer, texture): 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 width, height = texture.image.size
# Sanity check: the image here should be 3x2 faces, so we should not have any # Sanity check: the image here should be 3x2 faces, so we should not have any

Loading…
Cancel
Save