|
|
@ -701,6 +701,9 @@ 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 == None: |
|
|
|
|
|
|
|
raise ExportError("CubeMap '{}' has no cube image!".format(texture.name)) |
|
|
|
|
|
|
|
else: |
|
|
|
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 |
|
|
@ -719,7 +722,7 @@ class MaterialConverter: |
|
|
|
# to a big "finalize" save step to prevent races. The texture cache would |
|
|
|
# to a big "finalize" save step to prevent races. The texture cache would |
|
|
|
# prevent that as well, so we could theoretically slice-and-dice the single |
|
|
|
# prevent that as well, so we could theoretically slice-and-dice the single |
|
|
|
# image here... but... meh. Offloading taim. |
|
|
|
# image here... but... meh. Offloading taim. |
|
|
|
self.export_prepared_image(texture=texture, owner=layer, |
|
|
|
self.export_prepared_image(texture=texture, owner=layer, indent=3, |
|
|
|
alpha_type=TextureAlpha.opaque, mipmap=True, |
|
|
|
alpha_type=TextureAlpha.opaque, mipmap=True, |
|
|
|
allowed_formats={"DDS"}, is_cube_map=True, tag="cubemap") |
|
|
|
allowed_formats={"DDS"}, is_cube_map=True, tag="cubemap") |
|
|
|
|
|
|
|
|
|
|
|