private void btnForceTrigger_Click(object sender, RoutedEventArgs e) { SourceFileItem file = _dataGrid.SelectedItem as SourceFileItem; if (file != null) { FileWatcherModel.Execute(file); } return; var mPropertiesService = VEFModule.UnityContainer.Resolve(typeof(IPropertiesService), "") as IPropertiesService; SourceFileItem filex = _dataGrid.SelectedItem as SourceFileItem; if (filex.FileType == FileType.fbx) { FBXFileConverter test = new FBXFileConverter(); test.Convert(filex.SourceFilePath, filex.DestinationFolder, filex.DestinationFileName); string fbxfilename = @"F:\Projekte\coop\XGame\_devFolder\Work\Character\[email protected]"; string skeletonfilename = @"F:\Projekte\coop\XGame\data\assets\TestModel.SKELETON"; string meshfilename = @"F:\Projekte\coop\XGame\data\assets\TestModel.MESH"; string logfilename = "log.txt"; string animname = "WalkBase"; int start = Int32.MinValue; int stop = Int32.MaxValue; float rate = 0; DLL_FBXToOgre tmp = new DLL_FBXToOgre(); tmp.Test_AddFBXAnimationToExisting(fbxfilename, skeletonfilename, meshfilename, logfilename, animname, start, stop, rate); } }
public void Convert(string sourceFilename, string destinationFolder, string destinationFileName) { // string fbxfilename = @"F:\Projekte\Game\3d Models\SFV\Ryu-Final\Ryu\ryu.FBX"; string outmeshfilename = Path.Combine(destinationFolder, destinationFileName); //"test.MESH"; string animname = ""; string logfilename = "log.txt"; string frame0name = "BaseFBXFrame0Anim"; bool copyUniqueTextures = false; int bindframe = 0; DLL_FBXToOgre tmp = new DLL_FBXToOgre(); bool result = tmp.Test_ExportOgreFromFBX(sourceFilename, outmeshfilename, logfilename, animname, frame0name, copyUniqueTextures, bindframe); }
private void btn_Test_Click(object sender, RoutedEventArgs e) { //Convert(); //return; string fbxfilename = @"F:\Projekte\coop\XGame\_devFolder\Work\Character\[email protected]"; string skeletonfilename = @"F:\Projekte\coop\XGame\data\assets\TestModel\TestModel.SKELETON"; string meshfilename = @"F:\Projekte\coop\XGame\data\assets\TestModel.MESH"; string logfilename = "log.txt"; string animname = "Idle"; int start = Int32.MinValue; int stop = Int32.MaxValue; float rate = 0; DLL_FBXToOgre tmp = new DLL_FBXToOgre(); tmp.Test_AddFBXAnimationToExisting(fbxfilename, skeletonfilename, meshfilename, logfilename, animname, start, stop, rate); }
public static void Execute(SourceFileItem sourceFileItem) { if (sourceFileItem.FileType == FileType.fbx) { FBXFileConverter test = new FBXFileConverter(); test.Convert(sourceFileItem.SourceFilePath, sourceFileItem.DestinationFolder, sourceFileItem.DestinationFileName); } else if (sourceFileItem.FileType == FileType.fbx_Animation) { // FBXFileConverter test = new FBXFileConverter(); // test.Convert(fileItemWatcher.SourceFilePath, fileItemWatcher.DestinationFolder, fileItemWatcher.DestinationFileName); //FBXFileConverter test = new FBXFileConverter(); //test.Convert(sourceFileItem.SourceFilePath, sourceFileItem.DestinationFolder, sourceFileItem.DestinationFileName); //string fbxfilename = @"F:\Projekte\coop\XGame\_devFolder\Work\Character\[email protected]"; //string skeletonfilename = @"F:\Projekte\coop\XGame\data\assets\TestModel.SKELETON"; //string meshfilename = @"F:\Projekte\coop\XGame\data\assets\TestModel.MESH"; string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(sourceFileItem.DestinationFileName); if (!sourceFileItem.SourceFilePath.Contains("@")) { (VEFModule.UnityContainer.Resolve(typeof(ILoggerService), "") as ILoggerService).Log("Filename contains no @animationName", LogCategory.Error, LogPriority.Medium); return; } string animName = Path.GetFileNameWithoutExtension(sourceFileItem.SourceFilePath).Split('@')[1]; string logfilename = "log.txt"; // string animname = "WalkBase"; int start = Int32.MinValue; int stop = Int32.MaxValue; float rate = 0; DLL_FBXToOgre tmp = new DLL_FBXToOgre(); tmp.Test_AddFBXAnimationToExisting(sourceFileItem.SourceFilePath, Path.Combine(sourceFileItem.DestinationFolder, fileNameWithoutExtension + ".SKELETON"), Path.Combine(sourceFileItem.DestinationFolder, fileNameWithoutExtension + ".MESH"), logfilename, animName, start, stop, rate); } else if (sourceFileItem.FileType == FileType.Script) { } }
private void Convert() { //opts.outputmeshfile = opts.fbxfile.substr(0, opts.fbxfile.length() - 4) + ".MESH"; //opts.inputskeletonfile = opts.fbxfile.substr(0, opts.fbxfile.length() - 4) + ".SKELETON"; //opts.inputmeshfile = opts.fbxfile.substr(0, opts.fbxfile.length() - 4) + ".MESH"; //opts.frame0Name = "BaseFBXFrame0Anim"; //opts.quickexportAnimName = "BaseFBXFileAnim"; // string fbxfilename = @"F:\Projekte\Game\3d Models\Work\fighter\test\test.fbx"; string fbxfilename = @"F:\Projekte\Game\3d Models\SFV\Ryu-Final\Ryu\ryu.FBX"; string outmeshfilename = "test.MESH"; string animname = ""; string logfilename = "log.txt"; string frame0name = "BaseFBXFrame0Anim"; bool copyUniqueTextures = false; int bindframe = 0; DLL_FBXToOgre tmp = new DLL_FBXToOgre(); bool result = tmp.Test_ExportOgreFromFBX(fbxfilename, outmeshfilename, logfilename, animname, frame0name, copyUniqueTextures, bindframe); }