Changeset View
Changeset View
Standalone View
Standalone View
io_import_scene_unreal_psa_psk.py
| Context not available. | |||||
| verts = [] | verts = [] | ||||
| verts2 = [] | verts2 = [] | ||||
| while counter < recCount: | while counter < recCount: | ||||
| counter = counter + 1 | counter += 1 | ||||
| indata = unpack('3f', pskfile.read(12)) | indata = unpack('3f', pskfile.read(12)) | ||||
| #print(indata[0], indata[1], indata[2]) | #print(indata[0], indata[1], indata[2]) | ||||
| verts.extend([(indata[0], indata[1], indata[2])]) | verts.extend([(indata[0], indata[1], indata[2])]) | ||||
| Context not available. | |||||
| #UVCoords record format = [index to PNTS, U coord, v coord] | #UVCoords record format = [index to PNTS, U coord, v coord] | ||||
| printlog("[index to PNTS, U coord, v coord]\n"); | printlog("[index to PNTS, U coord, v coord]\n"); | ||||
| while counter < recCount: | while counter < recCount: | ||||
| counter = counter + 1 | counter += 1 | ||||
| indata = unpack('hhffhh', pskfile.read(16)) | indata = unpack('hhffhh', pskfile.read(16)) | ||||
| UVCoords.append([indata[0], indata[2], indata[3]]) | UVCoords.append([indata[0], indata[2], indata[3]]) | ||||
| printlog(str(indata[0]) + "|" + str(indata[2]) + "|" + str(indata[3]) + "\n") | printlog(str(indata[0]) + "|" + str(indata[2]) + "|" + str(indata[3]) + "\n") | ||||
| Context not available. | |||||
| #the psk values are: nWdgIdx1|WdgIdx2|WdgIdx3|MatIdx|AuxMatIdx|SmthGrp | #the psk values are: nWdgIdx1|WdgIdx2|WdgIdx3|MatIdx|AuxMatIdx|SmthGrp | ||||
| printlog("nWdgIdx1|WdgIdx2|WdgIdx3|MatIdx|AuxMatIdx|SmthGrp \n") | printlog("nWdgIdx1|WdgIdx2|WdgIdx3|MatIdx|AuxMatIdx|SmthGrp \n") | ||||
| while counter < recCount: | while counter < recCount: | ||||
| counter = counter + 1 | counter += 1 | ||||
| indata = unpack('hhhbbi', pskfile.read(12)) | indata = unpack('hhhbbi', pskfile.read(12)) | ||||
| printlog(str(indata[0]) + "|" + str(indata[1]) + "|" + str(indata[2]) + "|" + str(indata[3]) + "|" + | printlog(str(indata[0]) + "|" + str(indata[1]) + "|" + str(indata[2]) + "|" + str(indata[3]) + "|" + | ||||
| str(indata[4]) + "|" + str(indata[5]) + "\n") | str(indata[4]) + "|" + str(indata[5]) + "\n") | ||||
| Context not available. | |||||
| counter = 0 | counter = 0 | ||||
| materialcount = 0 | materialcount = 0 | ||||
| while counter < recCount: | while counter < recCount: | ||||
| counter = counter + 1 | counter += 1 | ||||
| indata = unpack('64s6i', pskfile.read(88)) | indata = unpack('64s6i', pskfile.read(88)) | ||||
| materialcount += 1 | materialcount += 1 | ||||
| print("Material", counter) | print("Material", counter) | ||||
| Context not available. | |||||
| createbone.bindmat.to_4x4() | createbone.bindmat.to_4x4() | ||||
| md5_bones.append(createbone) | md5_bones.append(createbone) | ||||
| counter = counter + 1 | counter += 1 | ||||
| bnstr = (str(indata[0])) | bnstr = (str(indata[0])) | ||||
| Bns.append(bnstr) | Bns.append(bnstr) | ||||
| Context not available. | |||||
| RWghts = [] | RWghts = [] | ||||
| counter = 0 | counter = 0 | ||||
| while counter < recCount: | while counter < recCount: | ||||
| counter = counter + 1 | counter += 1 | ||||
| indata = unpack('fii', pskfile.read(12)) | indata = unpack('fii', pskfile.read(12)) | ||||
| RWghts.append([indata[1], indata[2], indata[0]]) | RWghts.append([indata[1], indata[2], indata[0]]) | ||||
| #print("weight:", [indata[1], indata[2], indata[0]]) | #print("weight:", [indata[1], indata[2], indata[0]]) | ||||
| Context not available. | |||||