Outline is pretty much the same, except there's 24 bytes in the mesh struct after the vert and index counts.
Code: Select all
Struct Mesh {
66 bytes
int32 numVerts
int32 numIdx
24 bytes
numVerts Vertex
numIdx indices
}


Code: Select all
Struct Mesh {
66 bytes
int32 numVerts
int32 numIdx
24 bytes
numVerts Vertex
numIdx indices
}

finale00 wrote:Didn't bother with the bone name
Outline is pretty much the same, except there's 24 bytes in the mesh struct after the vert and index counts.
Code: Select all
Struct Mesh { 66 bytes int32 numVerts int32 numIdx 24 bytes numVerts Vertex numIdx indices }


Code: Select all
#Noesis Python model import+export test module, imports/exports some data from/to a
made-up format
from inc_noesis import *
import noesis
#rapi methods should only be used during handler callbacks
import rapi
#registerNoesisTypes is called by Noesis to allow the script to register formats.
#Do not implement this function in script files unless you want them to be dedicated format
modules!
def registerNoesisTypes():
handle = noesis.register("Bots", ".bsc")
noesis.setHandlerTypeCheck(handle, noepyCheckType)
noesis.setHandlerLoadModel(handle, noepyLoadModel) #see also noepyLoadModelRPG
#noesis.setHandlerWriteModel(handle, noepyWriteModel)
#noesis.setHandlerWriteAnim(handle, noepyWriteAnim)
noesis.logPopup()
#print("The log can be useful for catching debug prints from preview loads.\nBut don't
leave it on when you release your script, or it will probably annoy people.")
return 1
NOEPY_HEADER = "GXXM0124"
#check if it's this type based on the data
def noepyCheckType(data):
bs = NoeBitStream(data)
if len(data) < 16:
return 0
if bs.readBytes(16).decode("ASCII").rstrip("\0") != NOEPY_HEADER:
return 0
return 1
#load the model
def noepyLoadModel(data, mdlList):
ctx = rapi.rpgCreateContext()
bs = NoeBitStream(data)
rapi.rpgClearBufferBinds()
return 1


