1
0
mirror of synced 2024-11-12 02:00:50 +01:00

Some fixes

This commit is contained in:
KillzXGaming 2020-04-11 10:20:56 -04:00
parent 65532046c0
commit 9c138bd590
3 changed files with 15 additions and 4 deletions

View File

@ -78,9 +78,9 @@
this.chkSeperateTextureContainers.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkSeperateTextureContainers.Location = new System.Drawing.Point(12, 39);
this.chkSeperateTextureContainers.Name = "chkSeperateTextureContainers";
this.chkSeperateTextureContainers.Size = new System.Drawing.Size(180, 17);
this.chkSeperateTextureContainers.Size = new System.Drawing.Size(219, 17);
this.chkSeperateTextureContainers.TabIndex = 3;
this.chkSeperateTextureContainers.Text = "Use Folders for Texture Archives";
this.chkSeperateTextureContainers.Text = "Use Folders for Models/Texture Archives";
this.chkSeperateTextureContainers.UseVisualStyleBackColor = true;
//
// chkSeperateArchives

View File

@ -1488,6 +1488,13 @@ namespace Toolbox
}
else if (fileFormat is IExportableModel && exportMode == ExportMode.Models)
{
string name = fileFormat.FileName.Split('.').FirstOrDefault();
if (settings.SeperateTextureContainers)
outputFolder = Path.Combine(outputFolder, name);
if (!Directory.Exists(outputFolder))
Directory.CreateDirectory(outputFolder);
DAE.ExportSettings daesettings = new DAE.ExportSettings();
daesettings.SuppressConfirmDialog = true;
@ -1496,8 +1503,8 @@ namespace Toolbox
model.Objects = ((IExportableModel)fileFormat).ExportableMeshes;
var textures = ((IExportableModel)fileFormat).ExportableTextures.ToList();
var skeleton = ((IExportableModel)fileFormat).ExportableSkeleton;
string name = Path.GetFileNameWithoutExtension(fileFormat.FileName);
DAE.Export($"{outputFolder}/{name}.{extension}", daesettings, model, textures, skeleton);
string modelname = Path.GetFileNameWithoutExtension(fileFormat.FileName);
DAE.Export($"{outputFolder}/{modelname}.{extension}", daesettings, model, textures, skeleton);
}
fileFormat.Unload();

View File

@ -56,6 +56,10 @@
<Reference Include="DirectXTexNet, Version=1.0.0.3, Culture=neutral, PublicKeyToken=67e4f5ed452a4f5d, processorArchitecture=MSIL">
<HintPath>..\packages\DirectXTexNet.1.0.0-rc3\lib\net40\DirectXTexNet.dll</HintPath>
</Reference>
<Reference Include="GL_EditorFramework, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\GL_EditorFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="Octokit, Version=0.31.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>