Which part of the code does that?In actually drawing a model in any API, you must also know the material at the time you're putting the triangles on the screen.
So for example this is the load function that I use
Code: Select all
def noepyLoadModel(data, mdlList):
ctx = rapi.rpgCreateContext()
#create custom parser and parse data
parser = CrucisFatalFake_LMD(data)
parser.parse_file()
#now make model and stuff
mdl = NoeModel(parser.meshList, None, None)
mdlList.append(mdl)
mdl.setModelMaterials(NoeModelMaterials(parser.texList, parser.matList))
return 1
Or is it when I'm creating the mesh?
Code: Select all
def create_mesh(self, meshName):
mesh = NoeMesh(self.idxList, self.vertList, meshName, self.animList)
mesh.uvs.extend(self.uvList)
self.meshList.append(mesh)
I used to just read one char at a time, check if it's null, and then just add them to a string, but maybe there's a better way?
And is there a function that I can call that will parse a standard DDS file? Like maybe just take the one that's already used to load a DDS, but give me a texture object instead. Whatever I write to get a dds texture object probably isn't going to be as great lol

