SHARE
TWEET

Sonic R

Shadowth117 Aug 19th, 2019 128 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             Console.WriteLine("Models");
  2.             var models = new ModelList(@"L:\Sonic Adventure DX\SA2 Split\resource\gd_PC\sonicmdl.bin");
  3.  
  4.             // Export Code. Comment after first usage if desired
  5.             Console.WriteLine("Export");
  6.             for(int i = 0; i < models.Count; i++)
  7.             {
  8.                 try
  9.                 {
  10.                     models[i].Export(@"L:\Sonic Adventure DX\SA2 Split\resource\gd_PC\sonicmdl\sonicmdl_" + i + ".dae", sonicTextures);
  11.                 }
  12.                 catch
  13.                 {
  14.                     Console.WriteLine("Portion " + i + " export failed");
  15.                 }
  16.             }
  17.  
  18.             Console.WriteLine("Textures");
  19.             var sonicTextures = new List<string>()
  20.             {
  21.                 "stx_newspin",
  22.                 "so_lvup00",
  23.                 "mstx_ref0",
  24.                 "soitem00",
  25.                 "soitem01",
  26.                 "soitemx",
  27.                 "sonic_soapshoes",
  28.                 "stx_00",
  29.                 "stx_01",
  30.                 "stx_ref00",
  31.                 "s_wind"
  32.             };
  33.             Console.WriteLine(models.Count);
  34.            
  35.             models[ 10 ].RootNode = ChunkAssimpImporter.Animated.Import(@"E:\Downloads\sonicmdl\SA2DummyLightDash.FBX");
  36.             models[ 11 ].RootNode = ChunkAssimpImporter.Animated.Import(@"E:\Downloads\sonicmdl\SA2DummyLightDash.FBX");
  37.            
  38.             models[ 16 ].RootNode = ChunkAssimpImporter.Animated.Import(@"E:\Downloads\sonicmdl\SA2Ready.FBX");
  39.             models[ 17 ].RootNode = ChunkAssimpImporter.Animated.Import(@"E:\Downloads\sonicmdl\SA2Bounce.FBX");
  40.             models[ 24 ].RootNode = ChunkAssimpImporter.Animated.Import(@"E:\Downloads\sonicmdl\SA2DummyUpgrade.FBX");
  41.             models[ 25 ].RootNode = ChunkAssimpImporter.Animated.Import(@"E:\Downloads\sonicmdl\SA2DummyUpgrade.FBX");
  42.            
  43.             models[ 26 ].RootNode = ChunkAssimpImporter.Animated.Import(@"E:\Downloads\sonicmdl\SA2Dummy.FBX");
  44.  
  45.             models[ 29 ].RootNode = ChunkAssimpImporter.Animated.Import(@"E:\Downloads\sonicmdl\SA2LightDash.FBX");
  46.             models[ 30 ].RootNode = ChunkAssimpImporter.Animated.Import(@"E:\Downloads\sonicmdl\SA2Ready.FBX");
  47.             models[ 47 ].RootNode = ChunkAssimpImporter.Animated.Import(@"E:\Downloads\sonicmdl\SA2Ready.FBX");
  48.             SavePRS(models, @"E:\Downloads\sonicmdl\sonicmdl.prs");
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top