Code: Select all
dirPath = rapi.getDirForFilePath(rapi.getInputName())
Code: Select all
tex = open(dirPath + '/texfolder/' +texName,'rb').read()
texture = rapi.loadTexByHandler(tex,'.dds')
texture.name = texName.split('.dds')[0] #//you can leave the .split() away if you want
texList.append(texture)
mdl.setModelMaterials(NoeModelMaterials(texList, matList))