- [Core] fix bug with export part for Materials.
This commit is contained in:
@@ -374,7 +374,7 @@ namespace AssetStudio.GUI
|
||||
: new ModelConverter(m_Animator, options);
|
||||
if (options.exportMaterials)
|
||||
{
|
||||
var materialExportPath = Path.Combine(exportFullPath, "Materials");
|
||||
var materialExportPath = Path.Combine(Path.GetDirectoryName(exportFullPath), "Materials");
|
||||
Directory.CreateDirectory(materialExportPath);
|
||||
foreach (var material in options.materials)
|
||||
{
|
||||
@@ -404,8 +404,8 @@ namespace AssetStudio.GUI
|
||||
collectAnimations = Properties.Settings.Default.collectAnimations,
|
||||
exportMaterials = Properties.Settings.Default.exportMaterials,
|
||||
materials = new HashSet<Material>(),
|
||||
uvs = JsonConvert.DeserializeObject<Dictionary<string, (bool, int)>>(Properties.Settings.Default.uvs, new JsonSerializerSettings() { DefaultValueHandling = DefaultValueHandling.Populate }),
|
||||
texs = JsonConvert.DeserializeObject<Dictionary<string, int>>(Properties.Settings.Default.texs, new JsonSerializerSettings() { DefaultValueHandling = DefaultValueHandling.Populate }),
|
||||
uvs = JsonConvert.DeserializeObject<Dictionary<string, (bool, int)>>(Properties.Settings.Default.uvs),
|
||||
texs = JsonConvert.DeserializeObject<Dictionary<string, int>>(Properties.Settings.Default.texs),
|
||||
};
|
||||
var convert = animationList != null
|
||||
? new ModelConverter(gameObject, options, animationList.Select(x => (AnimationClip)x.Asset).ToArray())
|
||||
@@ -449,7 +449,7 @@ namespace AssetStudio.GUI
|
||||
: new ModelConverter(rootName, gameObject, options);
|
||||
if (options.exportMaterials)
|
||||
{
|
||||
var materialExportPath = Path.Combine(exportPath, "Materials");
|
||||
var materialExportPath = Path.Combine(Path.GetDirectoryName(exportPath), "Materials");
|
||||
Directory.CreateDirectory(materialExportPath);
|
||||
foreach (var material in options.materials)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user