AcTools.Kn5File.Kn5.ExportFbxWithIniAsync C# (CSharp) Method

ExportFbxWithIniAsync() public method

public ExportFbxWithIniAsync ( string fbxFilename, IProgress progress = null, CancellationToken cancellation = default(CancellationToken) ) : Task
fbxFilename string
progress IProgress
cancellation CancellationToken
return Task
        public async Task ExportFbxWithIniAsync(string fbxFilename, IProgress<string> progress = null, CancellationToken cancellation = default(CancellationToken)) {
            var colladaFilename = fbxFilename + ".dae";

            progress?.Report("Exporting to Collada format…");
            await Task.Run(() => ExportCollada(colladaFilename), cancellation);
            if (cancellation.IsCancellationRequested) return;

            progress?.Report("Convert Collada to FBX…");
            await Task.Run(() => ConvertColladaToFbx(colladaFilename, fbxFilename), cancellation);
            if (cancellation.IsCancellationRequested) return;

            progress?.Report("Saving INI-file…");
            await Task.Run(() => ExportIni(fbxFilename + ".ini", Path.GetFileName(fbxFilename)), cancellation);
        }