removed objconverter. make everything generate pdbs
This commit is contained in:
parent
175e7a2b19
commit
3ebde728e5
|
|
@ -68,6 +68,8 @@
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
<DefineConstants>TRACE;CMD;NOVETUS_APPS</DefineConstants>
|
<DefineConstants>TRACE;CMD;NOVETUS_APPS</DefineConstants>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="Microsoft.CSharp">
|
<Reference Include="Microsoft.CSharp">
|
||||||
|
|
|
||||||
|
|
@ -1,100 +0,0 @@
|
||||||
#region Usings
|
|
||||||
using ObjLoader.Loader.Data.VertexData;
|
|
||||||
using ObjLoader.Loader.Loaders;
|
|
||||||
using System;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Icon Loader
|
|
||||||
|
|
||||||
public class OBJConverter
|
|
||||||
{
|
|
||||||
private OpenFileDialog openFileDialog1;
|
|
||||||
private string installOutcome = "";
|
|
||||||
|
|
||||||
public OBJConverter()
|
|
||||||
{
|
|
||||||
openFileDialog1 = new OpenFileDialog()
|
|
||||||
{
|
|
||||||
FileName = "Select an .obj file",
|
|
||||||
Filter = "Wavefront OBJ file (*.obj)|*.obj",
|
|
||||||
Title = "Open .obj"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setInstallOutcome(string text)
|
|
||||||
{
|
|
||||||
installOutcome = text;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string getInstallOutcome()
|
|
||||||
{
|
|
||||||
return installOutcome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ConvertOBJ()
|
|
||||||
{
|
|
||||||
if (openFileDialog1.ShowDialog() == DialogResult.OK)
|
|
||||||
{
|
|
||||||
using (Stream str = openFileDialog1.OpenFile())
|
|
||||||
{
|
|
||||||
Directory.SetCurrentDirectory(Path.GetDirectoryName(openFileDialog1.FileName));
|
|
||||||
var materialStreamProvider = new MaterialStreamProvider();
|
|
||||||
var objLoaderFactory = new ObjLoaderFactory();
|
|
||||||
var objLoader = objLoaderFactory.Create(materialStreamProvider);
|
|
||||||
var fileStream = materialStreamProvider.Open(openFileDialog1.FileName);
|
|
||||||
var result = objLoader.Load(fileStream);
|
|
||||||
|
|
||||||
MessageBox.Show(result.Vertices.Count.ToString());
|
|
||||||
MessageBox.Show(result.Normals.Count.ToString());
|
|
||||||
|
|
||||||
string testString = "";
|
|
||||||
testString += "version 1.00\n";
|
|
||||||
testString += result.Groups.First().Faces.Count + "\n";
|
|
||||||
for (int i = 0; i < result.Vertices.Count; ++i)
|
|
||||||
{
|
|
||||||
Vertex vert = result.Vertices[i];
|
|
||||||
|
|
||||||
Normal norm;
|
|
||||||
if (i >= result.Normals.Count)
|
|
||||||
{
|
|
||||||
norm = new Normal(0, 0, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
norm = result.Normals[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
Texture tex;
|
|
||||||
if (i >= result.Textures.Count)
|
|
||||||
{
|
|
||||||
tex = new Texture(0, 0);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tex = result.Textures[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
testString += "[" +
|
|
||||||
(vert.X * 0.5) + "," +
|
|
||||||
(vert.Y * 0.5) + "," +
|
|
||||||
(vert.Z * 0.5) + "]" +
|
|
||||||
"[" + norm.X + "," +
|
|
||||||
norm.Y + "," +
|
|
||||||
norm.Z + "]" +
|
|
||||||
"[" + tex.X + "," +
|
|
||||||
tex.Y + ",0]";
|
|
||||||
}
|
|
||||||
|
|
||||||
MessageBox.Show(testString);
|
|
||||||
Clipboard.SetText(testString);
|
|
||||||
|
|
||||||
Directory.SetCurrentDirectory(GlobalPaths.RootPath);
|
|
||||||
str.Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
Binary file not shown.
|
|
@ -53,7 +53,6 @@
|
||||||
this.listView1 = new System.Windows.Forms.ListView();
|
this.listView1 = new System.Windows.Forms.ListView();
|
||||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||||
this.TestButton = new System.Windows.Forms.Button();
|
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
|
|
@ -121,23 +120,12 @@
|
||||||
this.imageList1.Images.SetKeyName(8, "splash.png");
|
this.imageList1.Images.SetKeyName(8, "splash.png");
|
||||||
this.imageList1.Images.SetKeyName(9, "XMLContentEditor.png");
|
this.imageList1.Images.SetKeyName(9, "XMLContentEditor.png");
|
||||||
//
|
//
|
||||||
// TestButton
|
|
||||||
//
|
|
||||||
this.TestButton.Location = new System.Drawing.Point(15, 364);
|
|
||||||
this.TestButton.Name = "TestButton";
|
|
||||||
this.TestButton.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.TestButton.TabIndex = 16;
|
|
||||||
this.TestButton.Text = "OBJStats";
|
|
||||||
this.TestButton.UseVisualStyleBackColor = true;
|
|
||||||
this.TestButton.Click += new System.EventHandler(this.TestButton_Click);
|
|
||||||
//
|
|
||||||
// NovetusSDK
|
// NovetusSDK
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
||||||
this.ClientSize = new System.Drawing.Size(438, 399);
|
this.ClientSize = new System.Drawing.Size(438, 352);
|
||||||
this.Controls.Add(this.TestButton);
|
|
||||||
this.Controls.Add(this.listView1);
|
this.Controls.Add(this.listView1);
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.label1);
|
||||||
this.Controls.Add(this.pictureBox2);
|
this.Controls.Add(this.pictureBox2);
|
||||||
|
|
@ -161,5 +149,4 @@
|
||||||
private System.Windows.Forms.ListView listView1;
|
private System.Windows.Forms.ListView listView1;
|
||||||
private System.Windows.Forms.ColumnHeader columnHeader1;
|
private System.Windows.Forms.ColumnHeader columnHeader1;
|
||||||
private System.Windows.Forms.ImageList imageList1;
|
private System.Windows.Forms.ImageList imageList1;
|
||||||
private System.Windows.Forms.Button TestButton;
|
|
||||||
}
|
}
|
||||||
|
|
@ -123,12 +123,5 @@ public partial class NovetusSDK : Form
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
//remove upon test finish
|
|
||||||
private void TestButton_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
OBJConverter objconv = new OBJConverter();
|
|
||||||
objconv.ConvertOBJ();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN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
@ -71,11 +71,10 @@
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="CjClutter.ObjLoader.LoaderNet4">
|
|
||||||
<HintPath>Dependencies\CjClutter.ObjLoader.LoaderNet4.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="DotNetZip, Version=1.11.0.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
|
<Reference Include="DotNetZip, Version=1.11.0.0, Culture=neutral, PublicKeyToken=6583c7c814667745, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\DotNetZip.1.11.0\lib\net20\DotNetZip.dll</HintPath>
|
<HintPath>..\packages\DotNetZip.1.11.0\lib\net20\DotNetZip.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
|
@ -98,12 +97,6 @@
|
||||||
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
<Reference Include="NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\NLog.4.7.2\lib\net40-client\NLog.dll</HintPath>
|
<HintPath>..\packages\NLog.4.7.2\lib\net40-client\NLog.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="SharpGL, Version=3.1.1.0, Culture=neutral, PublicKeyToken=27fc851303210b27, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\SharpGL.3.1.1\lib\net40\SharpGL.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="SharpGL.SceneGraph, Version=3.1.1.0, Culture=neutral, PublicKeyToken=27fc851303210b27, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\SharpGL.SceneGraph.3.1.1\lib\net40\SharpGL.SceneGraph.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
|
|
@ -162,7 +155,6 @@
|
||||||
<Compile Include="Classes\Launcher\SplashLoader.cs" />
|
<Compile Include="Classes\Launcher\SplashLoader.cs" />
|
||||||
<Compile Include="Classes\LocalVars.cs" />
|
<Compile Include="Classes\LocalVars.cs" />
|
||||||
<Compile Include="Classes\SDK\Downloader.cs" />
|
<Compile Include="Classes\SDK\Downloader.cs" />
|
||||||
<Compile Include="Classes\SDK\OBJConverter.cs" />
|
|
||||||
<Compile Include="Classes\SDK\ROBLOXFileTypes.cs" />
|
<Compile Include="Classes\SDK\ROBLOXFileTypes.cs" />
|
||||||
<Compile Include="Forms\Decoder.cs">
|
<Compile Include="Forms\Decoder.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,4 @@
|
||||||
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
|
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net40" />
|
||||||
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
|
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net40" />
|
||||||
<package id="NLog" version="4.7.2" targetFramework="net40" />
|
<package id="NLog" version="4.7.2" targetFramework="net40" />
|
||||||
<package id="SharpGL" version="3.1.1" targetFramework="net40" />
|
|
||||||
<package id="SharpGL.SceneGraph" version="3.1.1" targetFramework="net40" />
|
|
||||||
</packages>
|
</packages>
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
<PlatformTarget>x86</PlatformTarget>
|
<PlatformTarget>x86</PlatformTarget>
|
||||||
<DebugType>none</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE;URI;NOVETUS_APPS</DefineConstants>
|
<DefineConstants>TRACE;URI;NOVETUS_APPS</DefineConstants>
|
||||||
|
|
@ -35,6 +35,7 @@
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
<FileAlignment>4096</FileAlignment>
|
<FileAlignment>4096</FileAlignment>
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ApplicationIcon>NovetusIcon.ico</ApplicationIcon>
|
<ApplicationIcon>NovetusIcon.ico</ApplicationIcon>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue