I'm not sure whether this belongs into this cathegory, but here it goes anyway:
I've decided to write an export script for PSK files based on the specifications on UDN for Blender. Because the specs were like "this struct then that struct" I had to use C++ to transcribe it into binary. So there are two scripts involved, one Python script, which dumps the data into an ASCII format (works, included only for completeness) and one that makes a PSK (and later a PSA as well) out of the file. Well, should make, that is, since the only thing the resulting file does is crash UnrealED (General Protection Fault in MeshSkelLOD or something). Since PSK is binary I cannot get any feedback on what I'm doing wrong except that something crashes UED. I had to guess on a few instances (like in what order the members of a struct need to be written into a file, I assumed in order of declaration).
http://mitglied.lycos.de/KDR_11k/files/code/export_ask.py.txt
http://mitglied.lycos.de/KDR_11k/files/code/psk_compiler.cpp.txt
http://mitglied.lycos.de/KDR_11k/files/code/bla.ask.txt
All files are txt for better hotlinking (they're ASCII so you can view them with that extension as well). The CPP requires the struct definitions you can get from UDN (where they describe the binary file formats). The ASK (ASCII PSK...) is the model I tried to import.
Can anyone figure out what I did wrong?
I've decided to write an export script for PSK files based on the specifications on UDN for Blender. Because the specs were like "this struct then that struct" I had to use C++ to transcribe it into binary. So there are two scripts involved, one Python script, which dumps the data into an ASCII format (works, included only for completeness) and one that makes a PSK (and later a PSA as well) out of the file. Well, should make, that is, since the only thing the resulting file does is crash UnrealED (General Protection Fault in MeshSkelLOD or something). Since PSK is binary I cannot get any feedback on what I'm doing wrong except that something crashes UED. I had to guess on a few instances (like in what order the members of a struct need to be written into a file, I assumed in order of declaration).
http://mitglied.lycos.de/KDR_11k/files/code/export_ask.py.txt
http://mitglied.lycos.de/KDR_11k/files/code/psk_compiler.cpp.txt
http://mitglied.lycos.de/KDR_11k/files/code/bla.ask.txt
All files are txt for better hotlinking (they're ASCII so you can view them with that extension as well). The CPP requires the struct definitions you can get from UDN (where they describe the binary file formats). The ASK (ASCII PSK...) is the model I tried to import.
Can anyone figure out what I did wrong?