Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //--------------------------------------
- //--- 010 Editor v3.2.2 Script File
- //
- // File:
- // Author:
- // Revision:
- // Purpose:Copies collision data from one m2 to another.
- //--------------------------------------
- char sFile[], tFile[];
- int sIndex, tIndex;
- //int64 rPos;
- sFile = InputOpenFileName("Select source file...");
- tFile = InputOpenFileName("Select destination file...");
- sIndex = FileOpen(sFile);
- if(sIndex < 0)
- return;
- RunTemplate("M2Template1.bt");
- uint bt = M2_file.nBoundingTriangles;
- uint bv = M2_file.nBoundingVertices;
- uint bn = M2_file.nBoundingNormals;
- FileClose();
- tIndex = FileOpen(tFile);
- if(tIndex < 0)
- return;
- RunTemplate("M2Template1.bt");
- M2_file.nBoundingTriangles = bt;
- M2_file.nBoundingVertices = bv;
- M2_file.nBoundingNormals = bn;
- //rPos = FTell();
- //Printf( "Ending offset = %Ldr", rPos );
- //int64 getPos(FILE *file)
- {
- int64 file_end;
- fseek(file, 0, SEEK_END);
- file_end = FTell();
- return file_end;
- }
- Printf( "Ending offset = %Ldr", file_end );
- FileSave();
- FileClose();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement