mirror of
https://github.com/aelurum/AssetStudio.git
synced 2026-11-15 19:28:48 -05:00
[CLI] Add flag to allow removing container path prefix.
- Added --strip-path-prefix flag
This commit is contained in:
@@ -125,6 +125,7 @@ namespace AssetStudioCLI.Options
|
||||
public static Option<int> o_maxParallelExportTasks;
|
||||
public static Option<ExportListType> o_exportAssetList;
|
||||
public static Option<string> o_assemblyPath;
|
||||
public static Option<string> o_stripPathPrefix;
|
||||
public static Option<UnityVersion> o_unityVersion;
|
||||
public static Option<bool> f_decompressToDisk;
|
||||
public static Option<bool> f_notRestoreExtensionName;
|
||||
@@ -534,6 +535,14 @@ namespace AssetStudioCLI.Options
|
||||
optionExample: "",
|
||||
optionHelpGroup: HelpGroups.Advanced
|
||||
);
|
||||
o_stripPathPrefix = new GroupedOption<string>
|
||||
(
|
||||
optionDefaultValue: "",
|
||||
optionName: "--strip-path-prefix <path>",
|
||||
optionDescription: "Specify a path prefix to be stripped from exported asset paths\n",
|
||||
optionExample: "Example: \"--strip-path-prefix assets/models/char/\"\n",
|
||||
optionHelpGroup: HelpGroups.Advanced
|
||||
);
|
||||
o_unityVersion = new GroupedOption<UnityVersion>
|
||||
(
|
||||
optionDefaultValue: null,
|
||||
@@ -1245,6 +1254,13 @@ namespace AssetStudioCLI.Options
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case "--strip-path-prefix":
|
||||
o_stripPathPrefix.Value = Path.Combine(Path.GetDirectoryName(value), Path.GetFileName(value));
|
||||
if (!o_stripPathPrefix.Value.EndsWith(Path.DirectorySeparatorChar.ToString()))
|
||||
{
|
||||
o_stripPathPrefix.Value += Path.DirectorySeparatorChar;
|
||||
}
|
||||
break;
|
||||
case "--unity-version":
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user