That's cool, and I don't mean to detract from your efforts, but is that really any less complicated than this?
Code: Select all
from inc_noesis import *
import noesis
import rapi
def registerNoesisTypes():
handle = noesis.register("Some format", ".someformat")
noesis.setHandlerTypeCheck(handle, noeCheckGeneric)
noesis.setHandlerLoadModel(handle, loadSomeFormat)
return 1
def loadSomeFormat(data, mdlList):
bs = NoeBitStream(data)
ctx = rapi.rpgCreateContext()
vcount = bs.readInt()
rapi.immBegin(noesis.RPGEO_TRIANGLE)
for i in range(0, vcount):
rapi.immVertex3([bs.readFloat(), bs.readFloat(), bs.readFloat()])
bs.seek(20, NOESEEK_REL)
rapi.immEnd()
mdlList.append(rapi.rpgConstructModel())
return 1
Noesis also already has all kinds of options for plugin/script reload shortcuts, and you can use tool scripts instead of format scripts if you prefer to just perform automated parsing and loading of a format. Maybe the problem is not so much that it's complicated as people aren't aware of how to use it.