Code: Select all
class NoeTexture:
def __init__(self, name, width, height, pixelData, pixelType = noesis.NOESISTEX_RGBA32):
self.name = name
self.width = width
self.height = height
self.pixelData = pixelData
self.pixelType = pixelType
self.flags = 0
self.mipCount = 0
Edit:
FML, found it right after posting:
Code: Select all
data = rapi.imageEncodeRaw(pixelData, width, height, ".png")
Found that textures are not included by default on export. This line is needed as well.
Code: Select all
texList = rapi.loadMdlTextures(mdl)
I'm getting 0 bytes of output from "data = rapi.imageEncodeRaw(pixelData, width, height, ".png")", is there a code snippet for encoding png's?