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 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) { } }