8,288
edits
Paradox-01 (talk | contribs) mNo edit summary |
Paradox-01 (talk | contribs) m (added OniSplitConvert function to Oni Class (code snippet)) |
||
Line 27: | Line 27: | ||
: GetXSI - returns Mod Tool path (type string) (e.g. C:\Softimage\Softimage_Mod_Tool_7.5\Application\bin) | : GetXSI - returns Mod Tool path (type string) (e.g. C:\Softimage\Softimage_Mod_Tool_7.5\Application\bin) | ||
: GetOniSplit - outputs an array with (0) as path (type string) and (1) as version (type string) | : GetOniSplit - outputs an array with (0) as path (type string) and (1) as version (type string) | ||
: OniSplitConvert - tells OniSplit to do something (needed inputs: OniSplit path, command, output path, input path) | |||
Imports System.IO ' for files and directories | Imports System.IO ' for files and directories | ||
Line 113: | Line 113: | ||
End If | End If | ||
End Function | |||
' example | |||
' Oni.OniSplitConvert(OSpath, "-extract:xml", outputFolder, inputFolder) | |||
Shared Function OniSplitConvert(OSpath As String, cmd As String, input As String, output As String) | |||
Dim objProcess As System.Diagnostics.Process | |||
Try | |||
' the quotes are used to prevent possible errors by paths with spaces | |||
objProcess = Process.Start(OSpath, cmd & " " & """" & output & """" & " " & """" & input & """") | |||
objProcess.WaitForExit() | |||
objProcess.Close() | |||
Catch | |||
MessageBox.Show("Could not start: " & OSpath & " " & cmd & " " & """" & output & """" & " " & """" & input & """") | |||
End Try | |||
End Function | End Function | ||
edits