- [CLI] allow exported flags to override configs.
This commit is contained in:
@@ -51,6 +51,8 @@ namespace AssetStudio.CLI
|
|||||||
var classTypeFilter = Array.Empty<ClassIDType>();
|
var classTypeFilter = Array.Empty<ClassIDType>();
|
||||||
if (!o.TypeFilter.IsNullOrEmpty())
|
if (!o.TypeFilter.IsNullOrEmpty())
|
||||||
{
|
{
|
||||||
|
var exportTexture2D = false;
|
||||||
|
var exportMaterial = false;
|
||||||
var classTypeFilterList = new List<ClassIDType>();
|
var classTypeFilterList = new List<ClassIDType>();
|
||||||
for (int i = 0; i < o.TypeFilter.Length; i++)
|
for (int i = 0; i < o.TypeFilter.Length; i++)
|
||||||
{
|
{
|
||||||
@@ -71,6 +73,15 @@ namespace AssetStudio.CLI
|
|||||||
|
|
||||||
type = (ClassIDType)Enum.Parse(typeof(ClassIDType), typeStr, true);
|
type = (ClassIDType)Enum.Parse(typeof(ClassIDType), typeStr, true);
|
||||||
|
|
||||||
|
if (type == ClassIDType.Texture2D)
|
||||||
|
{
|
||||||
|
exportTexture2D = flag.HasFlag(TypeFlag.Export);
|
||||||
|
}
|
||||||
|
else if (type == ClassIDType.Material)
|
||||||
|
{
|
||||||
|
exportMaterial = flag.HasFlag(TypeFlag.Export);
|
||||||
|
}
|
||||||
|
|
||||||
TypeFlags.SetType(type, flag.HasFlag(TypeFlag.Parse), flag.HasFlag(TypeFlag.Export));
|
TypeFlags.SetType(type, flag.HasFlag(TypeFlag.Parse), flag.HasFlag(TypeFlag.Export));
|
||||||
|
|
||||||
classTypeFilterList.Add(type);
|
classTypeFilterList.Add(type);
|
||||||
@@ -86,10 +97,10 @@ namespace AssetStudio.CLI
|
|||||||
|
|
||||||
if (ClassIDType.GameObject.CanExport() || ClassIDType.Animator.CanExport())
|
if (ClassIDType.GameObject.CanExport() || ClassIDType.Animator.CanExport())
|
||||||
{
|
{
|
||||||
TypeFlags.SetType(ClassIDType.Texture2D, true, false);
|
TypeFlags.SetType(ClassIDType.Texture2D, true, exportTexture2D);
|
||||||
if (Settings.Default.exportMaterials)
|
if (Settings.Default.exportMaterials)
|
||||||
{
|
{
|
||||||
TypeFlags.SetType(ClassIDType.Material, true, false);
|
TypeFlags.SetType(ClassIDType.Material, true, exportMaterial);
|
||||||
}
|
}
|
||||||
if (ClassIDType.GameObject.CanExport())
|
if (ClassIDType.GameObject.CanExport())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user