snapshot changes

This commit is contained in:
Bitl 2020-09-18 16:13:51 -07:00
parent 3c99ae760e
commit 9524b8782a
32 changed files with 918 additions and 5592 deletions

View File

@ -1,8 +1,10 @@
#region Usings #region Usings
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Reflection.Emit; using System.Reflection.Emit;
using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Windows.Forms; using System.Windows.Forms;
using System.Xml; using System.Xml;
@ -21,7 +23,9 @@ public enum RobloxFileType
Face, Face,
TShirt, TShirt,
Shirt, Shirt,
Pants Pants,
//for downloading script assets
//Script
} }
#endregion #endregion
@ -325,6 +329,7 @@ public static class RobloxXML
try try
{ {
var v = from nodes in doc.Descendants("Item") var v = from nodes in doc.Descendants("Item")
where nodes.Attribute("class").Value == itemClassValue where nodes.Attribute("class").Value == itemClassValue
select nodes; select nodes;
@ -349,7 +354,13 @@ public static class RobloxXML
if (string.IsNullOrWhiteSpace(meshname)) if (string.IsNullOrWhiteSpace(meshname))
{ {
string url = item3.Value; string url = item3.Value;
string urlFixed = url.Replace("&", "&").Replace("amp;", "&"); string newurl = "assetdelivery.roblox.com/v1/asset/?id=";
string urlFixed = url.Replace("http://", "https://")
.Replace("?version=1&id=", "?id=")
.Replace("www.roblox.com/asset/?id=", newurl)
.Replace("assetgame.roblox.com/asset/?id=", newurl)
.Replace("&", "&")
.Replace("amp;", "&");
string peram = "id="; string peram = "id=";
if (string.IsNullOrWhiteSpace(name)) if (string.IsNullOrWhiteSpace(name))
@ -379,7 +390,7 @@ public static class RobloxXML
{ {
string url = item3.Value; string url = item3.Value;
string rbxassetid = "rbxassetid://"; string rbxassetid = "rbxassetid://";
string urlFixed = "https://www.roblox.com/asset/?id=" + url.After(rbxassetid); string urlFixed = "https://assetdelivery.roblox.com/v1/asset/?id=" + url.After(rbxassetid);
string peram = "id="; string peram = "id=";
if (string.IsNullOrWhiteSpace(name)) if (string.IsNullOrWhiteSpace(name))
@ -405,7 +416,6 @@ public static class RobloxXML
} }
} }
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -417,6 +427,80 @@ public static class RobloxXML
} }
} }
//TODO: actually download the script assets instead of fixing the scripts lol. fixing the scripts won't work anyways because we don't support https natively.
/*
public static void DownloadScriptFromNodes(string filepath, string itemClassValue)
{
string oldfile = File.ReadAllText(filepath);
string fixedfile = RemoveInvalidXmlChars(ReplaceHexadecimalSymbols(oldfile));
XDocument doc = XDocument.Parse(fixedfile);
try
{
var v = from nodes in doc.Descendants("Item")
where nodes.Attribute("class").Value == itemClassValue
select nodes;
foreach (var item in v)
{
var v2 = from nodes in item.Descendants("Properties")
select nodes;
foreach (var item2 in v2)
{
var v3 = from nodes in doc.Descendants("ProtectedString")
where nodes.Attribute("name").Value == "Source"
select nodes;
foreach (var item3 in v3)
{
string newurl = "assetdelivery.roblox.com/v1/asset/?id=";
item3.Value.Replace("http://", "https://")
.Replace("?version=1&id=", "?id=")
.Replace("www.roblox.com/asset/?id=", newurl)
.Replace("assetgame.roblox.com/asset/?id=", newurl);
}
}
}
}
catch (Exception ex)
{
MessageBox.Show("The download has experienced an error: " + ex.Message, "Novetus Asset Localizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
finally
{
doc.Save(filepath);
}
}
public static void DownloadFromScript(string filepath)
{
string[] file = File.ReadAllLines(filepath);
try
{
foreach (var line in file)
{
if (line.Contains("www.roblox.com/asset/?id=") || line.Contains("assetgame.roblox.com/asset/?id="))
{
string newurl = "assetdelivery.roblox.com/v1/asset/?id=";
line.Replace("http://", "https://")
.Replace("?version=1&id=", "?id=")
.Replace("www.roblox.com/asset/?id=", newurl)
.Replace("assetgame.roblox.com/asset/?id=", newurl);
}
}
}
catch (Exception ex)
{
MessageBox.Show("The download has experienced an error: " + ex.Message, "Novetus Asset Localizer", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
finally
{
File.WriteAllLines(filepath, file);
}
}*/
public static string GetStringForXMLType(XMLTypes type) public static string GetStringForXMLType(XMLTypes type)
{ {
switch (type) switch (type)

View File

@ -7,6 +7,7 @@ using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using System.Windows.Forms;
#endregion #endregion
#region Simple HTTP Server #region Simple HTTP Server
@ -174,6 +175,7 @@ public class SimpleHTTPServer
private void Process(HttpListenerContext context) private void Process(HttpListenerContext context)
{ {
bool HasLoaded = false;
string filename = context.Request.Url.AbsolutePath; string filename = context.Request.Url.AbsolutePath;
filename = filename.Substring(1); filename = filename.Substring(1);
@ -210,6 +212,7 @@ public class SimpleHTTPServer
context.Response.OutputStream.Write(input, 0, input.Length); context.Response.OutputStream.Write(input, 0, input.Length);
context.Response.StatusCode = (int)HttpStatusCode.OK; context.Response.StatusCode = (int)HttpStatusCode.OK;
context.Response.OutputStream.Flush(); context.Response.OutputStream.Flush();
HasLoaded = true;
} }
else else
{ {
@ -229,6 +232,7 @@ public class SimpleHTTPServer
context.Response.StatusCode = (int)HttpStatusCode.OK; context.Response.StatusCode = (int)HttpStatusCode.OK;
context.Response.OutputStream.Flush(); context.Response.OutputStream.Flush();
HasLoaded = true;
} }
} }
catch (Exception) catch (Exception)
@ -238,7 +242,10 @@ public class SimpleHTTPServer
} }
context.Response.OutputStream.Close(); if (HasLoaded)
{
context.Response.OutputStream.Close();
}
} }
private void Initialize(string path, int port) private void Initialize(string path, int port)

View File

@ -1,195 +0,0 @@
partial class AssetLocalizer
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AssetLocalizer));
this.button1 = new System.Windows.Forms.Button();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label2 = new System.Windows.Forms.Label();
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(12, 120);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(254, 21);
this.button1.TabIndex = 0;
this.button1.Text = "Browse and Localize Asset";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"RBXL",
"RBXM",
"Hat",
"Head",
"Face",
"Shirt",
"T-Shirt",
"Pants"});
this.comboBox1.Location = new System.Drawing.Point(81, 12);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(185, 21);
this.comboBox1.TabIndex = 1;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// label2
//
this.label2.Location = new System.Drawing.Point(12, 144);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(254, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Idle";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// backgroundWorker1
//
this.backgroundWorker1.WorkerReportsProgress = true;
this.backgroundWorker1.WorkerSupportsCancellation = true;
this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork);
this.backgroundWorker1.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.backgroundWorker1_ProgressChanged);
this.backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorker1_RunWorkerCompleted);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(140, 39);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(126, 20);
this.textBox1.TabIndex = 4;
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 42);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(125, 13);
this.label1.TabIndex = 5;
this.label1.Text = "Asset Name (Items Only):";
//
// comboBox2
//
this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Items.AddRange(new object[] {
"None"});
this.comboBox2.Location = new System.Drawing.Point(140, 65);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(126, 21);
this.comboBox2.TabIndex = 6;
this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 68);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(118, 13);
this.label3.TabIndex = 7;
this.label3.Text = "Uses Mesh (Hats Only):";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 15);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(63, 13);
this.label4.TabIndex = 8;
this.label4.Text = "Asset Type:";
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(12, 160);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(254, 16);
this.progressBar1.TabIndex = 9;
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(93, 97);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(96, 17);
this.checkBox1.TabIndex = 10;
this.checkBox1.Text = "Save Backups";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// AssetLocalizer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.ClientSize = new System.Drawing.Size(278, 188);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.comboBox2);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label2);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "AssetLocalizer";
this.Text = "Novetus Asset Localizer";
this.Closing += new System.ComponentModel.CancelEventHandler(this.AssetLocalizer_Close);
this.Load += new System.EventHandler(this.AssetLocalizer_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label2;
private System.ComponentModel.BackgroundWorker backgroundWorker1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.CheckBox checkBox1;
}

View File

@ -1,125 +0,0 @@
#region Usings
using System;
using System.ComponentModel;
using System.IO;
using System.Windows.Forms;
#endregion
#region Asset Localizer
public partial class AssetLocalizer : Form
{
#region Private Variables
private RobloxFileType currentType;
private string path;
private string name;
private string meshname;
#endregion
#region Constructor
public AssetLocalizer()
{
InitializeComponent();
}
#endregion
#region Form Events
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog robloxFileDialog = SDKFuncs.LoadROBLOXFileDialog(currentType);
if (robloxFileDialog.ShowDialog() == DialogResult.OK)
{
path = robloxFileDialog.FileName;
backgroundWorker1.RunWorkerAsync();
}
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
currentType = SDKFuncs.SelectROBLOXFileType(comboBox1.SelectedIndex);
}
private void AssetLocalizer_Load(object sender, EventArgs e)
{
checkBox1.Checked = GlobalVars.UserConfiguration.AssetLocalizerSaveBackups;
comboBox1.SelectedItem = "RBXL";
comboBox2.SelectedItem = "None";
if (Directory.Exists(GlobalPaths.hatdirFonts))
{
DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.hatdirFonts);
FileInfo[] Files = dinfo.GetFiles("*.mesh");
foreach (FileInfo file in Files)
{
if (file.Name.Equals(String.Empty))
{
continue;
}
comboBox2.Items.Add(file.Name);
}
}
GlobalFuncs.CreateAssetCacheDirectories();
}
// This event handler is where the time-consuming work is done.
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
SDKFuncs.LocalizeAsset(currentType, worker, path, name, meshname);
}
// This event handler updates the progress.
private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
label2.Text = SDKFuncs.GetProgressString(currentType, e.ProgressPercentage);
progressBar1.Value = e.ProgressPercentage;
}
// This event handler deals with the results of the background operation.
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
switch (e)
{
case RunWorkerCompletedEventArgs can when can.Cancelled:
label2.Text = "Canceled!";
break;
case RunWorkerCompletedEventArgs err when err.Error != null:
label2.Text = "Error: " + e.Error.Message;
break;
default:
label2.Text = "Done!";
break;
}
}
void AssetLocalizer_Close(object sender, CancelEventArgs e)
{
backgroundWorker1.CancelAsync();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
name = textBox1.Text;
}
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox2.SelectedItem.ToString() == "None")
{
meshname = "";
}
else
{
meshname = comboBox2.SelectedItem.ToString();
}
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
GlobalVars.UserConfiguration.AssetLocalizerSaveBackups = checkBox1.Checked;
}
#endregion
}
#endregion

View File

@ -1,174 +0,0 @@
/*
* Created by SharpDevelop.
* User: BITL
* Date: 10/31/2018
* Time: 11:55 AM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
partial class ItemMaker
{
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing)
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ItemMaker));
this.button1 = new System.Windows.Forms.Button();
this.textBox2 = new System.Windows.Forms.TextBox();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(3, 80);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(238, 23);
this.button1.TabIndex = 1;
this.button1.Text = "Create!";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1Click);
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(98, 25);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(76, 20);
this.textBox2.TabIndex = 2;
//
// numericUpDown1
//
this.numericUpDown1.Location = new System.Drawing.Point(193, 25);
this.numericUpDown1.Maximum = new decimal(new int[] {
99,
0,
0,
0});
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(36, 20);
this.numericUpDown1.TabIndex = 3;
//
// label2
//
this.label2.Location = new System.Drawing.Point(116, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 14);
this.label2.TabIndex = 6;
this.label2.Text = "Item ID";
//
// label3
//
this.label3.Location = new System.Drawing.Point(190, 9);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(42, 14);
this.label3.TabIndex = 7;
this.label3.Text = "Version";
this.label3.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"http://www.roblox.com/",
"http://assetgame.roblox.com/",
"https://assetdelivery.roblox.com/",
"https://www.roblox.com/catalog/",
"https://www.roblox.com/library/"});
this.comboBox1.Location = new System.Drawing.Point(3, 53);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(238, 21);
this.comboBox1.TabIndex = 8;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.ComboBox1SelectedIndexChanged);
//
// checkBox1
//
this.checkBox1.Location = new System.Drawing.Point(12, 109);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(220, 24);
this.checkBox1.TabIndex = 9;
this.checkBox1.Text = "Disable Help Message on Item Creation";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.CheckBox1CheckedChanged);
//
// label1
//
this.label1.Location = new System.Drawing.Point(33, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 14);
this.label1.TabIndex = 11;
this.label1.Text = "Name";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(12, 25);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(76, 20);
this.textBox1.TabIndex = 12;
//
// ItemMaker
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.ClientSize = new System.Drawing.Size(244, 136);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Controls.Add(this.checkBox1);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.numericUpDown1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "ItemMaker";
this.Text = "Novetus Item SDK";
this.Load += new System.EventHandler(this.ItemMakerLoad);
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
}

View File

@ -1,68 +0,0 @@
#region Usings
using System;
using System.Windows.Forms;
#endregion
#region Item SDK
public partial class ItemMaker : Form
{
#region Private Variables
private string url = "http://www.roblox.com/asset?id=";
private bool isWebSite = false;
#endregion
#region Constructor
public ItemMaker()
{
InitializeComponent();
}
#endregion
#region Form Events
void Button1Click(object sender, EventArgs e)
{
SDKFuncs.StartItemDownload(textBox1.Text, url, textBox2.Text, Convert.ToInt32(numericUpDown1.Value), isWebSite);
}
void ComboBox1SelectedIndexChanged(object sender, EventArgs e)
{
switch (comboBox1.SelectedIndex)
{
case 1:
url = "http://assetgame.roblox.com/asset/?id=";
isWebSite = false;
break;
case 2:
url = "https://assetdelivery.roblox.com/v1/asset/?id=";
isWebSite = false;
break;
case 3:
url = "https://www.roblox.com/catalog/";
isWebSite = true;
break;
case 4:
url = "https://www.roblox.com/library/";
isWebSite = true;
break;
default:
url = "http://www.roblox.com/asset?id=";
isWebSite = false;
break;
}
}
void ItemMakerLoad(object sender, EventArgs e)
{
comboBox1.SelectedItem = "http://www.roblox.com/";
isWebSite = false;
checkBox1.Checked = GlobalVars.UserConfiguration.DisabledItemMakerHelp;
}
void CheckBox1CheckedChanged(object sender, EventArgs e)
{
GlobalVars.UserConfiguration.DisabledItemMakerHelp = checkBox1.Checked;
}
#endregion
}
#endregion

File diff suppressed because it is too large Load Diff

View File

@ -1,125 +0,0 @@
partial class Obj2MeshV1GUI
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Obj2MeshV1GUI));
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.label4 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(12, 34);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(239, 23);
this.button1.TabIndex = 0;
this.button1.Text = "Browse for mesh and convert...";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(48, 74);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(167, 13);
this.label1.TabIndex = 1;
this.label1.Text = "RBXMeshConverter built by coke.";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(64, 10);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(74, 13);
this.label2.TabIndex = 2;
this.label2.Text = "Mesh Version:";
//
// numericUpDown1
//
this.numericUpDown1.Location = new System.Drawing.Point(144, 8);
this.numericUpDown1.Maximum = new decimal(new int[] {
2,
0,
0,
0});
this.numericUpDown1.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(56, 20);
this.numericUpDown1.TabIndex = 3;
this.numericUpDown1.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// label4
//
this.label4.Location = new System.Drawing.Point(12, 60);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(239, 14);
this.label4.TabIndex = 5;
this.label4.Text = "Ready";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// Obj2MeshV1GUI
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(263, 92);
this.Controls.Add(this.label4);
this.Controls.Add(this.numericUpDown1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.button1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "Obj2MeshV1GUI";
this.Text = "RBXMeshConverter";
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.Label label4;
}

View File

@ -1,60 +0,0 @@
#region Usings
using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
#endregion
#region RBXMeshConverter GUI
public partial class Obj2MeshV1GUI : Form
{
#region Private Variables
private OpenFileDialog openFileDialog1;
#endregion
#region Constructor
public Obj2MeshV1GUI()
{
InitializeComponent();
openFileDialog1 = new OpenFileDialog()
{
FileName = "Select a .OBJ file",
Filter = "Wavefront .obj file (*.obj)|*.obj",
Title = "Open model .obj"
};
}
#endregion
#region Form Events
private void button1_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
ProcessOBJ(GlobalPaths.ConfigDirData + "\\RBXMeshConverter.exe", openFileDialog1.FileName);
}
}
private void ProcessOBJ(string EXEName, string FileName)
{
label4.Text = "Loading utility...";
Process proc = new Process();
proc.StartInfo.FileName = EXEName;
proc.StartInfo.Arguments = "-f " + FileName + " -v " + numericUpDown1.Value;
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.UseShellExecute = false;
proc.EnableRaisingEvents = true;
proc.Exited += new EventHandler(OBJ2MeshV1Exited);
proc.Start();
label4.Text = "Converting OBJ to ROBLOX Mesh v" + numericUpDown1.Value + "...";
}
void OBJ2MeshV1Exited(object sender, EventArgs e)
{
label4.Text = "Ready";
string properName = Path.GetFileName(openFileDialog1.FileName) + ".mesh";
MessageBox.Show("File " + properName + " created!");
}
#endregion
}
#endregion

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
#region Usings #region Usings
using NLog.Filters;
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
@ -11,16 +12,14 @@ using System.Windows.Forms;
#region SDKApps #region SDKApps
enum SDKApps enum SDKApps
{ {
ItemSDK = 0, ClientSDK = 0,
ClientSDK = 1, AssetSDK = 1,
ClientScriptDoc = 2, ClientScriptDoc = 2,
AssetLocalizer = 3, SplashTester = 3,
SplashTester = 4, ScriptGenerator = 4,
Obj2MeshV1GUI = 5, LegacyPlaceConverter = 5,
ScriptGenerator = 6, DiogenesEditor = 6,
LegacyPlaceConverter = 7, ClientScriptTester = 7
DiogenesEditor = 8,
ClientScriptTester = 9
} }
#endregion #endregion
@ -30,10 +29,25 @@ class SDKFuncs
#region Asset Localizer #region Asset Localizer
public static OpenFileDialog LoadROBLOXFileDialog(RobloxFileType type) public static OpenFileDialog LoadROBLOXFileDialog(RobloxFileType type)
{ {
string typeFilter = "";
switch (type)
{
case RobloxFileType.RBXL:
typeFilter = "ROBLOX Level (*.rbxl)|*.rbxl|ROBLOX Level (*.rbxlx)|*.rbxlx";
break;
/*case RobloxFileType.Script:
typeFilter = "Lua Script (*.lua)|*.lua";
break;*/
default:
typeFilter = "ROBLOX Model (*.rbxm)|*.rbxm";
break;
}
OpenFileDialog openFileDialog1 = new OpenFileDialog OpenFileDialog openFileDialog1 = new OpenFileDialog
{ {
Filter = (type == RobloxFileType.RBXL) ? "ROBLOX Level (*.rbxl)|*.rbxl|ROBLOX Level (*.rbxlx)|*.rbxlx" : "ROBLOX Model (*.rbxm)|*.rbxm", Filter = typeFilter,
Title = "Open ROBLOX level or model" Title = "Open ROBLOX level or model",
}; };
return openFileDialog1; return openFileDialog1;
@ -66,6 +80,9 @@ class SDKFuncs
case 7: case 7:
type = RobloxFileType.Pants; type = RobloxFileType.Pants;
break; break;
//case 8:
//type = RobloxFileType.Script;
//break;
default: default:
type = RobloxFileType.RBXL; type = RobloxFileType.RBXL;
break; break;
@ -125,50 +142,62 @@ class SDKFuncs
case 90: case 90:
progressString = "Downloading RBXL Linked LocalScripts..."; progressString = "Downloading RBXL Linked LocalScripts...";
break; break;
//case 95:
//progressString = "Fixing RBXL Scripts...";
//break;
//case 97:
//progressString = "Fixing RBXL LocalScripts...";
//break;
} }
break; break;
case RobloxFileType.RBXM: case RobloxFileType.RBXM:
switch (percent) switch (percent)
{ {
case 0: case 0:
progressString = "Downloading RBXL Meshes and Textures..."; progressString = "Downloading RBXM Meshes and Textures...";
break; break;
case 10: case 10:
progressString = "Downloading RBXL Skybox Textures..."; progressString = "Downloading RBXM Skybox Textures...";
break; break;
case 15: case 15:
progressString = "Downloading RBXL Decal Textures..."; progressString = "Downloading RBXM Decal Textures...";
break; break;
case 20: case 20:
progressString = "Downloading RBXL Textures..."; progressString = "Downloading RBXM Textures...";
break; break;
case 25: case 25:
progressString = "Downloading RBXL Tool Textures..."; progressString = "Downloading RBXM Tool Textures...";
break; break;
case 30: case 30:
progressString = "Downloading RBXL HopperBin Textures..."; progressString = "Downloading RBXM HopperBin Textures...";
break; break;
case 40: case 40:
progressString = "Downloading RBXL Sounds..."; progressString = "Downloading RBXM Sounds...";
break; break;
case 50: case 50:
progressString = "Downloading RBXL GUI Textures..."; progressString = "Downloading RBXM GUI Textures...";
break; break;
case 60: case 60:
progressString = "Downloading RBXL Shirt Textures..."; progressString = "Downloading RBXM Shirt Textures...";
break; break;
case 65: case 65:
progressString = "Downloading RBXL T-Shirt Textures..."; progressString = "Downloading RBXM T-Shirt Textures...";
break; break;
case 70: case 70:
progressString = "Downloading RBXL Pants Textures..."; progressString = "Downloading RBXM Pants Textures...";
break; break;
case 80: case 80:
progressString = "Downloading RBXL Linked Scripts..."; progressString = "Downloading RBXM Linked Scripts...";
break; break;
case 90: case 90:
progressString = "Downloading RBXL Linked LocalScripts..."; progressString = "Downloading RBXM Linked LocalScripts...";
break; break;
//case 95:
//progressString = "Fixing RBXM Scripts...";
//break;
//case 97:
//progressString = "Fixing RBXM LocalScripts...";
//break;
} }
break; break;
case RobloxFileType.Hat: case RobloxFileType.Hat:
@ -233,6 +262,16 @@ class SDKFuncs
break; break;
} }
break; break;
/*
case RobloxFileType.Script:
//script
switch (percent)
{
case 0:
progressString = "Fixing Script...";
break;
}
break;*/
default: default:
progressString = "Idle"; progressString = "Idle";
break; break;
@ -305,6 +344,12 @@ class SDKFuncs
RobloxXML.DownloadFromNodes(path, RobloxDefs.Script); RobloxXML.DownloadFromNodes(path, RobloxDefs.Script);
worker.ReportProgress(90); worker.ReportProgress(90);
RobloxXML.DownloadFromNodes(path, RobloxDefs.LocalScript); RobloxXML.DownloadFromNodes(path, RobloxDefs.LocalScript);
//localize any scripts that are not handled
/*
worker.ReportProgress(95);
RobloxXML.DownloadScriptFromNodes(path, "Script");
worker.ReportProgress(97);
RobloxXML.DownloadScriptFromNodes(path, "LocalScript");*/
worker.ReportProgress(100); worker.ReportProgress(100);
break; break;
case RobloxFileType.RBXM: case RobloxFileType.RBXM:
@ -363,6 +408,12 @@ class SDKFuncs
RobloxXML.DownloadFromNodes(path, RobloxDefs.Script); RobloxXML.DownloadFromNodes(path, RobloxDefs.Script);
worker.ReportProgress(90); worker.ReportProgress(90);
RobloxXML.DownloadFromNodes(path, RobloxDefs.LocalScript); RobloxXML.DownloadFromNodes(path, RobloxDefs.LocalScript);
//localize any scripts that are not handled
/*
worker.ReportProgress(95);
RobloxXML.DownloadScriptFromNodes(path, "Script");
worker.ReportProgress(97);
RobloxXML.DownloadScriptFromNodes(path, "LocalScript");*/
worker.ReportProgress(100); worker.ReportProgress(100);
break; break;
case RobloxFileType.Hat: case RobloxFileType.Hat:
@ -500,6 +551,27 @@ class SDKFuncs
RobloxXML.DownloadFromNodes(path, RobloxDefs.ItemPantsTexture, itemname); RobloxXML.DownloadFromNodes(path, RobloxDefs.ItemPantsTexture, itemname);
worker.ReportProgress(100); worker.ReportProgress(100);
break; break;
/*case RobloxFileType.Script:
if (GlobalVars.UserConfiguration.AssetLocalizerSaveBackups)
{
try
{
worker.ReportProgress(0);
File.Copy(path, path.Replace(".lua", " BAK.lua"));
}
catch (Exception)
{
worker.ReportProgress(100);
}
}
else
{
worker.ReportProgress(0);
}
RobloxXML.DownloadFromScript(path);
worker.ReportProgress(100);
break;*/
default: default:
worker.ReportProgress(100); worker.ReportProgress(100);
break; break;
@ -587,25 +659,21 @@ class SDKFuncs
switch (index) switch (index)
{ {
case 1: case 1:
return SDKApps.ClientSDK; return SDKApps.AssetSDK;
case 2: case 2:
return SDKApps.ClientScriptDoc; return SDKApps.ClientScriptDoc;
case 3: case 3:
return SDKApps.AssetLocalizer;
case 4:
return SDKApps.SplashTester; return SDKApps.SplashTester;
case 5: case 4:
return SDKApps.Obj2MeshV1GUI;
case 6:
return SDKApps.ScriptGenerator; return SDKApps.ScriptGenerator;
case 7: case 5:
return SDKApps.LegacyPlaceConverter; return SDKApps.LegacyPlaceConverter;
case 8: case 6:
return SDKApps.DiogenesEditor; return SDKApps.DiogenesEditor;
case 9: case 7:
return SDKApps.ClientScriptTester; return SDKApps.ClientScriptTester;
default: default:
return SDKApps.ItemSDK; return SDKApps.ClientSDK;
} }
} }
#endregion #endregion

View File

@ -1544,6 +1544,12 @@ public class GlobalFuncs
{ {
Directory.CreateDirectory(GlobalPaths.AssetCacheDirScripts); Directory.CreateDirectory(GlobalPaths.AssetCacheDirScripts);
} }
/*
if (!Directory.Exists(GlobalPaths.AssetCacheDirScriptAssets))
{
Directory.CreateDirectory(GlobalPaths.AssetCacheDirScriptAssets);
}*/
} }
public static string MultiLine(params string[] args) public static string MultiLine(params string[] args)

View File

@ -66,6 +66,7 @@ public class GlobalPaths
public static readonly string AssetCacheDirTextures = AssetCacheDir + DirTextures; public static readonly string AssetCacheDirTextures = AssetCacheDir + DirTextures;
public static readonly string AssetCacheDirTexturesGUI = AssetCacheDirTextures + "\\gui"; public static readonly string AssetCacheDirTexturesGUI = AssetCacheDirTextures + "\\gui";
public static readonly string AssetCacheDirScripts = AssetCacheDir + DirScripts; public static readonly string AssetCacheDirScripts = AssetCacheDir + DirScripts;
//public static readonly string AssetCacheDirScriptAssets = AssetCacheDir + "\\scriptassets";
public static readonly string AssetCacheGameDir = GlobalPaths.SharedDataGameDir + "assetcache/"; public static readonly string AssetCacheGameDir = GlobalPaths.SharedDataGameDir + "assetcache/";
public static readonly string AssetCacheFontsGameDir = AssetCacheGameDir + FontsGameDir; public static readonly string AssetCacheFontsGameDir = AssetCacheGameDir + FontsGameDir;
@ -74,6 +75,7 @@ public class GlobalPaths
public static readonly string AssetCacheTexturesGameDir = AssetCacheGameDir + TexturesGameDir; public static readonly string AssetCacheTexturesGameDir = AssetCacheGameDir + TexturesGameDir;
public static readonly string AssetCacheTexturesGUIGameDir = AssetCacheTexturesGameDir + "gui/"; public static readonly string AssetCacheTexturesGUIGameDir = AssetCacheTexturesGameDir + "gui/";
public static readonly string AssetCacheScriptsGameDir = AssetCacheGameDir + ScriptsGameDir; public static readonly string AssetCacheScriptsGameDir = AssetCacheGameDir + ScriptsGameDir;
//public static readonly string AssetCacheScriptAssetsGameDir = AssetCacheGameDir + "scriptassets/";
#endregion #endregion
#region Item Dirs #region Item Dirs

View File

@ -0,0 +1,430 @@
partial class AssetSDK
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AssetSDK));
this.AssetDownloader = new System.Windows.Forms.GroupBox();
this.AssetDownloader_AssetNameBox = new System.Windows.Forms.TextBox();
this.AssetDownloader_AssetNameText = new System.Windows.Forms.Label();
this.AssetDownloader_LoadHelpMessage = new System.Windows.Forms.CheckBox();
this.AssetDownloader_URLSelection = new System.Windows.Forms.ComboBox();
this.AssetDownloader_AssetVersionText = new System.Windows.Forms.Label();
this.AssetDownloader_AssetIDText = new System.Windows.Forms.Label();
this.AssetDownloader_AssetVersionSelector = new System.Windows.Forms.NumericUpDown();
this.AssetDownloader_AssetIDBox = new System.Windows.Forms.TextBox();
this.AssetDownloader_AssetDownloaderButton = new System.Windows.Forms.Button();
this.AssetLocalization = new System.Windows.Forms.GroupBox();
this.AssetLocalization_SaveBackups = new System.Windows.Forms.CheckBox();
this.AssetLocalization_StatusBar = new System.Windows.Forms.ProgressBar();
this.AssetLocalization_AssetTypeText = new System.Windows.Forms.Label();
this.AssetLocalization_UsesHatMeshText = new System.Windows.Forms.Label();
this.AssetLocalization_UsesHatMeshBox = new System.Windows.Forms.ComboBox();
this.AssetLocalization_ItemNameText = new System.Windows.Forms.Label();
this.AssetLocalization_ItemNameBox = new System.Windows.Forms.TextBox();
this.AssetLocalization_StatusText = new System.Windows.Forms.Label();
this.AssetLocalization_AssetTypeBox = new System.Windows.Forms.ComboBox();
this.AssetLocalization_LocalizeButton = new System.Windows.Forms.Button();
this.MeshConverter = new System.Windows.Forms.GroupBox();
this.MeshConverter_StatusText = new System.Windows.Forms.Label();
this.MeshConverter_MeshVersionSelector = new System.Windows.Forms.NumericUpDown();
this.MeshConverter_MeshVersionText = new System.Windows.Forms.Label();
this.MeshConverter_CreditText = new System.Windows.Forms.Label();
this.MeshConverter_ConvertButton = new System.Windows.Forms.Button();
this.AssetLocalization_BackgroundWorker = new System.ComponentModel.BackgroundWorker();
this.AssetDownloader.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.AssetDownloader_AssetVersionSelector)).BeginInit();
this.AssetLocalization.SuspendLayout();
this.MeshConverter.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.MeshConverter_MeshVersionSelector)).BeginInit();
this.SuspendLayout();
//
// AssetDownloader
//
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetNameBox);
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetNameText);
this.AssetDownloader.Controls.Add(this.AssetDownloader_LoadHelpMessage);
this.AssetDownloader.Controls.Add(this.AssetDownloader_URLSelection);
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetVersionText);
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetIDText);
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetVersionSelector);
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetIDBox);
this.AssetDownloader.Controls.Add(this.AssetDownloader_AssetDownloaderButton);
this.AssetDownloader.Location = new System.Drawing.Point(12, 12);
this.AssetDownloader.Name = "AssetDownloader";
this.AssetDownloader.Size = new System.Drawing.Size(260, 142);
this.AssetDownloader.TabIndex = 0;
this.AssetDownloader.TabStop = false;
this.AssetDownloader.Text = "Asset Downloader";
//
// AssetDownloader_AssetNameBox
//
this.AssetDownloader_AssetNameBox.Location = new System.Drawing.Point(16, 30);
this.AssetDownloader_AssetNameBox.Name = "AssetDownloader_AssetNameBox";
this.AssetDownloader_AssetNameBox.Size = new System.Drawing.Size(76, 20);
this.AssetDownloader_AssetNameBox.TabIndex = 21;
//
// AssetDownloader_AssetNameText
//
this.AssetDownloader_AssetNameText.Location = new System.Drawing.Point(37, 14);
this.AssetDownloader_AssetNameText.Name = "AssetDownloader_AssetNameText";
this.AssetDownloader_AssetNameText.Size = new System.Drawing.Size(35, 14);
this.AssetDownloader_AssetNameText.TabIndex = 20;
this.AssetDownloader_AssetNameText.Text = "Name";
//
// AssetDownloader_LoadHelpMessage
//
this.AssetDownloader_LoadHelpMessage.Location = new System.Drawing.Point(16, 112);
this.AssetDownloader_LoadHelpMessage.Name = "AssetDownloader_LoadHelpMessage";
this.AssetDownloader_LoadHelpMessage.Size = new System.Drawing.Size(220, 24);
this.AssetDownloader_LoadHelpMessage.TabIndex = 19;
this.AssetDownloader_LoadHelpMessage.Text = "Disable Help Message on File Creation";
this.AssetDownloader_LoadHelpMessage.UseVisualStyleBackColor = true;
this.AssetDownloader_LoadHelpMessage.CheckedChanged += new System.EventHandler(this.AssetDownloader_LoadHelpMessage_CheckedChanged);
//
// AssetDownloader_URLSelection
//
this.AssetDownloader_URLSelection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.AssetDownloader_URLSelection.FormattingEnabled = true;
this.AssetDownloader_URLSelection.Items.AddRange(new object[] {
"https://assetdelivery.roblox.com/",
"https://www.roblox.com/catalog/",
"https://www.roblox.com/library/"});
this.AssetDownloader_URLSelection.Location = new System.Drawing.Point(7, 58);
this.AssetDownloader_URLSelection.Name = "AssetDownloader_URLSelection";
this.AssetDownloader_URLSelection.Size = new System.Drawing.Size(242, 21);
this.AssetDownloader_URLSelection.TabIndex = 18;
this.AssetDownloader_URLSelection.SelectedIndexChanged += new System.EventHandler(this.AssetDownloader_URLSelection_SelectedIndexChanged);
//
// AssetDownloader_AssetVersionText
//
this.AssetDownloader_AssetVersionText.Location = new System.Drawing.Point(194, 14);
this.AssetDownloader_AssetVersionText.Name = "AssetDownloader_AssetVersionText";
this.AssetDownloader_AssetVersionText.Size = new System.Drawing.Size(55, 14);
this.AssetDownloader_AssetVersionText.TabIndex = 17;
this.AssetDownloader_AssetVersionText.Text = "Version";
this.AssetDownloader_AssetVersionText.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// AssetDownloader_AssetIDText
//
this.AssetDownloader_AssetIDText.Location = new System.Drawing.Point(120, 14);
this.AssetDownloader_AssetIDText.Name = "AssetDownloader_AssetIDText";
this.AssetDownloader_AssetIDText.Size = new System.Drawing.Size(41, 14);
this.AssetDownloader_AssetIDText.TabIndex = 16;
this.AssetDownloader_AssetIDText.Text = "Item ID";
//
// AssetDownloader_AssetVersionSelector
//
this.AssetDownloader_AssetVersionSelector.Location = new System.Drawing.Point(197, 30);
this.AssetDownloader_AssetVersionSelector.Maximum = new decimal(new int[] {
99,
0,
0,
0});
this.AssetDownloader_AssetVersionSelector.Name = "AssetDownloader_AssetVersionSelector";
this.AssetDownloader_AssetVersionSelector.Size = new System.Drawing.Size(52, 20);
this.AssetDownloader_AssetVersionSelector.TabIndex = 15;
//
// AssetDownloader_AssetIDBox
//
this.AssetDownloader_AssetIDBox.Location = new System.Drawing.Point(102, 30);
this.AssetDownloader_AssetIDBox.Name = "AssetDownloader_AssetIDBox";
this.AssetDownloader_AssetIDBox.Size = new System.Drawing.Size(76, 20);
this.AssetDownloader_AssetIDBox.TabIndex = 14;
//
// AssetDownloader_AssetDownloaderButton
//
this.AssetDownloader_AssetDownloaderButton.Location = new System.Drawing.Point(7, 85);
this.AssetDownloader_AssetDownloaderButton.Name = "AssetDownloader_AssetDownloaderButton";
this.AssetDownloader_AssetDownloaderButton.Size = new System.Drawing.Size(242, 23);
this.AssetDownloader_AssetDownloaderButton.TabIndex = 13;
this.AssetDownloader_AssetDownloaderButton.Text = "Download!";
this.AssetDownloader_AssetDownloaderButton.UseVisualStyleBackColor = true;
this.AssetDownloader_AssetDownloaderButton.Click += new System.EventHandler(this.AssetDownloader_AssetDownloaderButton_Click);
//
// AssetLocalization
//
this.AssetLocalization.Controls.Add(this.AssetLocalization_SaveBackups);
this.AssetLocalization.Controls.Add(this.AssetLocalization_StatusBar);
this.AssetLocalization.Controls.Add(this.AssetLocalization_AssetTypeText);
this.AssetLocalization.Controls.Add(this.AssetLocalization_UsesHatMeshText);
this.AssetLocalization.Controls.Add(this.AssetLocalization_UsesHatMeshBox);
this.AssetLocalization.Controls.Add(this.AssetLocalization_ItemNameText);
this.AssetLocalization.Controls.Add(this.AssetLocalization_ItemNameBox);
this.AssetLocalization.Controls.Add(this.AssetLocalization_StatusText);
this.AssetLocalization.Controls.Add(this.AssetLocalization_AssetTypeBox);
this.AssetLocalization.Controls.Add(this.AssetLocalization_LocalizeButton);
this.AssetLocalization.Location = new System.Drawing.Point(278, 42);
this.AssetLocalization.Name = "AssetLocalization";
this.AssetLocalization.Size = new System.Drawing.Size(267, 182);
this.AssetLocalization.TabIndex = 1;
this.AssetLocalization.TabStop = false;
this.AssetLocalization.Text = "Asset Localization";
//
// AssetLocalization_SaveBackups
//
this.AssetLocalization_SaveBackups.AutoSize = true;
this.AssetLocalization_SaveBackups.Location = new System.Drawing.Point(87, 98);
this.AssetLocalization_SaveBackups.Name = "AssetLocalization_SaveBackups";
this.AssetLocalization_SaveBackups.Size = new System.Drawing.Size(96, 17);
this.AssetLocalization_SaveBackups.TabIndex = 20;
this.AssetLocalization_SaveBackups.Text = "Save Backups";
this.AssetLocalization_SaveBackups.UseVisualStyleBackColor = true;
this.AssetLocalization_SaveBackups.CheckedChanged += new System.EventHandler(this.AssetLocalization_SaveBackups_CheckedChanged);
//
// AssetLocalization_StatusBar
//
this.AssetLocalization_StatusBar.Location = new System.Drawing.Point(6, 161);
this.AssetLocalization_StatusBar.Name = "AssetLocalization_StatusBar";
this.AssetLocalization_StatusBar.Size = new System.Drawing.Size(254, 16);
this.AssetLocalization_StatusBar.TabIndex = 19;
//
// AssetLocalization_AssetTypeText
//
this.AssetLocalization_AssetTypeText.AutoSize = true;
this.AssetLocalization_AssetTypeText.Location = new System.Drawing.Point(6, 16);
this.AssetLocalization_AssetTypeText.Name = "AssetLocalization_AssetTypeText";
this.AssetLocalization_AssetTypeText.Size = new System.Drawing.Size(63, 13);
this.AssetLocalization_AssetTypeText.TabIndex = 18;
this.AssetLocalization_AssetTypeText.Text = "Asset Type:";
//
// AssetLocalization_UsesHatMeshText
//
this.AssetLocalization_UsesHatMeshText.AutoSize = true;
this.AssetLocalization_UsesHatMeshText.Location = new System.Drawing.Point(6, 69);
this.AssetLocalization_UsesHatMeshText.Name = "AssetLocalization_UsesHatMeshText";
this.AssetLocalization_UsesHatMeshText.Size = new System.Drawing.Size(118, 13);
this.AssetLocalization_UsesHatMeshText.TabIndex = 17;
this.AssetLocalization_UsesHatMeshText.Text = "Uses Mesh (Hats Only):";
//
// AssetLocalization_UsesHatMeshBox
//
this.AssetLocalization_UsesHatMeshBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.AssetLocalization_UsesHatMeshBox.FormattingEnabled = true;
this.AssetLocalization_UsesHatMeshBox.Items.AddRange(new object[] {
"None"});
this.AssetLocalization_UsesHatMeshBox.Location = new System.Drawing.Point(134, 66);
this.AssetLocalization_UsesHatMeshBox.Name = "AssetLocalization_UsesHatMeshBox";
this.AssetLocalization_UsesHatMeshBox.Size = new System.Drawing.Size(126, 21);
this.AssetLocalization_UsesHatMeshBox.TabIndex = 16;
this.AssetLocalization_UsesHatMeshBox.SelectedIndexChanged += new System.EventHandler(this.AssetLocalization_UsesHatMeshBox_SelectedIndexChanged);
//
// AssetLocalization_ItemNameText
//
this.AssetLocalization_ItemNameText.AutoSize = true;
this.AssetLocalization_ItemNameText.Location = new System.Drawing.Point(6, 43);
this.AssetLocalization_ItemNameText.Name = "AssetLocalization_ItemNameText";
this.AssetLocalization_ItemNameText.Size = new System.Drawing.Size(125, 13);
this.AssetLocalization_ItemNameText.TabIndex = 15;
this.AssetLocalization_ItemNameText.Text = "Asset Name (Items Only):";
//
// AssetLocalization_ItemNameBox
//
this.AssetLocalization_ItemNameBox.Location = new System.Drawing.Point(134, 40);
this.AssetLocalization_ItemNameBox.Name = "AssetLocalization_ItemNameBox";
this.AssetLocalization_ItemNameBox.Size = new System.Drawing.Size(126, 20);
this.AssetLocalization_ItemNameBox.TabIndex = 14;
this.AssetLocalization_ItemNameBox.TextChanged += new System.EventHandler(this.AssetLocalization_ItemNameBox_TextChanged);
//
// AssetLocalization_StatusText
//
this.AssetLocalization_StatusText.Location = new System.Drawing.Point(6, 145);
this.AssetLocalization_StatusText.Name = "AssetLocalization_StatusText";
this.AssetLocalization_StatusText.Size = new System.Drawing.Size(254, 13);
this.AssetLocalization_StatusText.TabIndex = 13;
this.AssetLocalization_StatusText.Text = "Idle";
this.AssetLocalization_StatusText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// AssetLocalization_AssetTypeBox
//
this.AssetLocalization_AssetTypeBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.AssetLocalization_AssetTypeBox.FormattingEnabled = true;
this.AssetLocalization_AssetTypeBox.Items.AddRange(new object[] {
"RBXL",
"RBXM",
"Hat",
"Head",
"Face",
"Shirt",
"T-Shirt",
"Pants",
"Lua Script"});
this.AssetLocalization_AssetTypeBox.Location = new System.Drawing.Point(75, 13);
this.AssetLocalization_AssetTypeBox.Name = "AssetLocalization_AssetTypeBox";
this.AssetLocalization_AssetTypeBox.Size = new System.Drawing.Size(185, 21);
this.AssetLocalization_AssetTypeBox.TabIndex = 12;
this.AssetLocalization_AssetTypeBox.SelectedIndexChanged += new System.EventHandler(this.AssetLocalization_AssetTypeBox_SelectedIndexChanged);
//
// AssetLocalization_LocalizeButton
//
this.AssetLocalization_LocalizeButton.Location = new System.Drawing.Point(6, 121);
this.AssetLocalization_LocalizeButton.Name = "AssetLocalization_LocalizeButton";
this.AssetLocalization_LocalizeButton.Size = new System.Drawing.Size(254, 21);
this.AssetLocalization_LocalizeButton.TabIndex = 11;
this.AssetLocalization_LocalizeButton.Text = "Browse and Localize Model/Place";
this.AssetLocalization_LocalizeButton.UseVisualStyleBackColor = true;
this.AssetLocalization_LocalizeButton.Click += new System.EventHandler(this.AssetLocalization_LocalizeButton_Click);
//
// MeshConverter
//
this.MeshConverter.Controls.Add(this.MeshConverter_StatusText);
this.MeshConverter.Controls.Add(this.MeshConverter_MeshVersionSelector);
this.MeshConverter.Controls.Add(this.MeshConverter_MeshVersionText);
this.MeshConverter.Controls.Add(this.MeshConverter_CreditText);
this.MeshConverter.Controls.Add(this.MeshConverter_ConvertButton);
this.MeshConverter.Location = new System.Drawing.Point(10, 160);
this.MeshConverter.Name = "MeshConverter";
this.MeshConverter.Size = new System.Drawing.Size(262, 106);
this.MeshConverter.TabIndex = 2;
this.MeshConverter.TabStop = false;
this.MeshConverter.Text = "Mesh Converter";
//
// MeshConverter_StatusText
//
this.MeshConverter_StatusText.Location = new System.Drawing.Point(12, 66);
this.MeshConverter_StatusText.Name = "MeshConverter_StatusText";
this.MeshConverter_StatusText.Size = new System.Drawing.Size(239, 14);
this.MeshConverter_StatusText.TabIndex = 10;
this.MeshConverter_StatusText.Text = "Ready";
this.MeshConverter_StatusText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// MeshConverter_MeshVersionSelector
//
this.MeshConverter_MeshVersionSelector.Location = new System.Drawing.Point(144, 14);
this.MeshConverter_MeshVersionSelector.Maximum = new decimal(new int[] {
2,
0,
0,
0});
this.MeshConverter_MeshVersionSelector.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.MeshConverter_MeshVersionSelector.Name = "MeshConverter_MeshVersionSelector";
this.MeshConverter_MeshVersionSelector.Size = new System.Drawing.Size(56, 20);
this.MeshConverter_MeshVersionSelector.TabIndex = 9;
this.MeshConverter_MeshVersionSelector.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// MeshConverter_MeshVersionText
//
this.MeshConverter_MeshVersionText.AutoSize = true;
this.MeshConverter_MeshVersionText.Location = new System.Drawing.Point(64, 16);
this.MeshConverter_MeshVersionText.Name = "MeshConverter_MeshVersionText";
this.MeshConverter_MeshVersionText.Size = new System.Drawing.Size(74, 13);
this.MeshConverter_MeshVersionText.TabIndex = 8;
this.MeshConverter_MeshVersionText.Text = "Mesh Version:";
//
// MeshConverter_CreditText
//
this.MeshConverter_CreditText.AutoSize = true;
this.MeshConverter_CreditText.Location = new System.Drawing.Point(48, 80);
this.MeshConverter_CreditText.Name = "MeshConverter_CreditText";
this.MeshConverter_CreditText.Size = new System.Drawing.Size(167, 13);
this.MeshConverter_CreditText.TabIndex = 7;
this.MeshConverter_CreditText.Text = "RBXMeshConverter built by coke.";
//
// MeshConverter_ConvertButton
//
this.MeshConverter_ConvertButton.Location = new System.Drawing.Point(12, 40);
this.MeshConverter_ConvertButton.Name = "MeshConverter_ConvertButton";
this.MeshConverter_ConvertButton.Size = new System.Drawing.Size(239, 23);
this.MeshConverter_ConvertButton.TabIndex = 6;
this.MeshConverter_ConvertButton.Text = "Browse for mesh and convert...";
this.MeshConverter_ConvertButton.UseVisualStyleBackColor = true;
this.MeshConverter_ConvertButton.Click += new System.EventHandler(this.MeshConverter_ConvertButton_Click);
//
// AssetLocalization_BackgroundWorker
//
this.AssetLocalization_BackgroundWorker.WorkerReportsProgress = true;
this.AssetLocalization_BackgroundWorker.WorkerSupportsCancellation = true;
this.AssetLocalization_BackgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.AssetLocalization_BackgroundWorker_DoWork);
this.AssetLocalization_BackgroundWorker.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.AssetLocalization_BackgroundWorker_ProgressChanged);
this.AssetLocalization_BackgroundWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.AssetLocalization_BackgroundWorker_RunWorkerCompleted);
//
// AssetSDK
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.ClientSize = new System.Drawing.Size(556, 280);
this.Controls.Add(this.MeshConverter);
this.Controls.Add(this.AssetLocalization);
this.Controls.Add(this.AssetDownloader);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "AssetSDK";
this.Text = "Novetus Asset SDK";
this.Closing += new System.ComponentModel.CancelEventHandler(this.AssetSDK_Close);
this.Load += new System.EventHandler(this.AssetSDK_Load);
this.AssetDownloader.ResumeLayout(false);
this.AssetDownloader.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.AssetDownloader_AssetVersionSelector)).EndInit();
this.AssetLocalization.ResumeLayout(false);
this.AssetLocalization.PerformLayout();
this.MeshConverter.ResumeLayout(false);
this.MeshConverter.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.MeshConverter_MeshVersionSelector)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox AssetDownloader;
private System.Windows.Forms.GroupBox AssetLocalization;
private System.Windows.Forms.GroupBox MeshConverter;
private System.Windows.Forms.Label MeshConverter_StatusText;
private System.Windows.Forms.NumericUpDown MeshConverter_MeshVersionSelector;
private System.Windows.Forms.Label MeshConverter_MeshVersionText;
private System.Windows.Forms.Label MeshConverter_CreditText;
private System.Windows.Forms.Button MeshConverter_ConvertButton;
private System.Windows.Forms.CheckBox AssetLocalization_SaveBackups;
private System.Windows.Forms.ProgressBar AssetLocalization_StatusBar;
private System.Windows.Forms.Label AssetLocalization_AssetTypeText;
private System.Windows.Forms.Label AssetLocalization_UsesHatMeshText;
private System.Windows.Forms.ComboBox AssetLocalization_UsesHatMeshBox;
private System.Windows.Forms.Label AssetLocalization_ItemNameText;
private System.Windows.Forms.TextBox AssetLocalization_ItemNameBox;
private System.Windows.Forms.Label AssetLocalization_StatusText;
private System.Windows.Forms.ComboBox AssetLocalization_AssetTypeBox;
private System.Windows.Forms.Button AssetLocalization_LocalizeButton;
private System.Windows.Forms.TextBox AssetDownloader_AssetNameBox;
private System.Windows.Forms.Label AssetDownloader_AssetNameText;
private System.Windows.Forms.CheckBox AssetDownloader_LoadHelpMessage;
private System.Windows.Forms.ComboBox AssetDownloader_URLSelection;
private System.Windows.Forms.Label AssetDownloader_AssetVersionText;
private System.Windows.Forms.Label AssetDownloader_AssetIDText;
private System.Windows.Forms.NumericUpDown AssetDownloader_AssetVersionSelector;
private System.Windows.Forms.TextBox AssetDownloader_AssetIDBox;
private System.Windows.Forms.Button AssetDownloader_AssetDownloaderButton;
private System.ComponentModel.BackgroundWorker AssetLocalization_BackgroundWorker;
}

View File

@ -0,0 +1,220 @@
#region Usings
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
#endregion
public partial class AssetSDK : Form
{
#region Private Variables
//localizer
private RobloxFileType currentType;
private string path;
private string name;
private string meshname;
//downloader
private string url = "https://assetdelivery.roblox.com/v1/asset/?id=";
private bool isWebSite = false;
//obj2mesh
private OpenFileDialog MeshConverter_OpenOBJDialog;
#endregion
#region Constructor
public AssetSDK()
{
InitializeComponent();
//meshconverter
MeshConverter_OpenOBJDialog = new OpenFileDialog()
{
FileName = "Select a .OBJ file",
Filter = "Wavefront .obj file (*.obj)|*.obj",
Title = "Open model .obj"
};
}
#endregion
#region Form Events
#region Load/Close Events
private void AssetSDK_Load(object sender, EventArgs e)
{
//asset downloader
AssetDownloader_URLSelection.SelectedItem = "https://assetdelivery.roblox.com";
isWebSite = false;
AssetDownloader_LoadHelpMessage.Checked = GlobalVars.UserConfiguration.DisabledItemMakerHelp;
//asset localizer
AssetLocalization_SaveBackups.Checked = GlobalVars.UserConfiguration.AssetLocalizerSaveBackups;
AssetLocalization_AssetTypeBox.SelectedItem = "RBXL";
AssetLocalization_UsesHatMeshBox.SelectedItem = "None";
if (Directory.Exists(GlobalPaths.hatdirFonts))
{
DirectoryInfo dinfo = new DirectoryInfo(GlobalPaths.hatdirFonts);
FileInfo[] Files = dinfo.GetFiles("*.mesh");
foreach (FileInfo file in Files)
{
if (file.Name.Equals(String.Empty))
{
continue;
}
AssetLocalization_UsesHatMeshBox.Items.Add(file.Name);
}
}
GlobalFuncs.CreateAssetCacheDirectories();
}
void AssetSDK_Close(object sender, CancelEventArgs e)
{
//asset localizer
AssetLocalization_BackgroundWorker.CancelAsync();
}
#endregion
#region Asset Downloader
private void AssetDownloader_URLSelection_SelectedIndexChanged(object sender, EventArgs e)
{
switch (AssetDownloader_URLSelection.SelectedIndex)
{
case 1:
url = "https://www.roblox.com/catalog/";
isWebSite = true;
break;
case 2:
url = "https://www.roblox.com/library/";
isWebSite = true;
break;
default:
//use defaults
break;
}
}
private void AssetDownloader_AssetDownloaderButton_Click(object sender, EventArgs e)
{
SDKFuncs.StartItemDownload(
AssetDownloader_AssetNameBox.Text,
url,
AssetDownloader_AssetIDBox.Text,
Convert.ToInt32(AssetDownloader_AssetVersionSelector.Value),
isWebSite);
}
private void AssetDownloader_LoadHelpMessage_CheckedChanged(object sender, EventArgs e)
{
GlobalVars.UserConfiguration.DisabledItemMakerHelp = AssetDownloader_LoadHelpMessage.Checked;
}
#endregion
#region Asset Localizer
private void AssetLocalization_AssetTypeBox_SelectedIndexChanged(object sender, EventArgs e)
{
currentType = SDKFuncs.SelectROBLOXFileType(AssetLocalization_AssetTypeBox.SelectedIndex);
}
private void AssetLocalization_ItemNameBox_TextChanged(object sender, EventArgs e)
{
name = AssetLocalization_ItemNameBox.Text;
}
private void AssetLocalization_UsesHatMeshBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (AssetLocalization_UsesHatMeshBox.SelectedItem.ToString() == "None")
{
meshname = "";
}
else
{
meshname = AssetLocalization_UsesHatMeshBox.SelectedItem.ToString();
}
}
private void AssetLocalization_SaveBackups_CheckedChanged(object sender, EventArgs e)
{
GlobalVars.UserConfiguration.AssetLocalizerSaveBackups = AssetLocalization_SaveBackups.Checked;
}
private void AssetLocalization_LocalizeButton_Click(object sender, EventArgs e)
{
OpenFileDialog robloxFileDialog = SDKFuncs.LoadROBLOXFileDialog(currentType);
if (robloxFileDialog.ShowDialog() == DialogResult.OK)
{
path = robloxFileDialog.FileName;
AssetLocalization_BackgroundWorker.RunWorkerAsync();
}
}
// This event handler is where the time-consuming work is done.
private void AssetLocalization_BackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
BackgroundWorker worker = sender as BackgroundWorker;
SDKFuncs.LocalizeAsset(currentType, worker, path, name, meshname);
}
// This event handler updates the progress.
private void AssetLocalization_BackgroundWorker_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
AssetLocalization_StatusText.Text = SDKFuncs.GetProgressString(currentType, e.ProgressPercentage);
AssetLocalization_StatusBar.Value = e.ProgressPercentage;
}
// This event handler deals with the results of the background operation.
private void AssetLocalization_BackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
switch (e)
{
case RunWorkerCompletedEventArgs can when can.Cancelled:
AssetLocalization_StatusText.Text = "Canceled!";
break;
case RunWorkerCompletedEventArgs err when err.Error != null:
AssetLocalization_StatusText.Text = "Error: " + e.Error.Message;
break;
default:
AssetLocalization_StatusText.Text = "Done!";
break;
}
}
#endregion
#region Mesh Converter
private void MeshConverter_ConvertButton_Click(object sender, EventArgs e)
{
if (MeshConverter_OpenOBJDialog.ShowDialog() == DialogResult.OK)
{
MeshConverter_ProcessOBJ(GlobalPaths.ConfigDirData + "\\RBXMeshConverter.exe", MeshConverter_OpenOBJDialog.FileName);
}
}
private void MeshConverter_ProcessOBJ(string EXEName, string FileName)
{
MeshConverter_StatusText.Text = "Loading utility...";
Process proc = new Process();
proc.StartInfo.FileName = EXEName;
proc.StartInfo.Arguments = "-f " + FileName + " -v " + MeshConverter_MeshVersionSelector.Value;
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.UseShellExecute = false;
proc.EnableRaisingEvents = true;
proc.Exited += new EventHandler(OBJ2MeshV1Exited);
proc.Start();
MeshConverter_StatusText.Text = "Converting OBJ to ROBLOX Mesh v" + MeshConverter_MeshVersionSelector.Value + "...";
}
void OBJ2MeshV1Exited(object sender, EventArgs e)
{
MeshConverter_StatusText.Text = "Ready";
string properName = Path.GetFileName(MeshConverter_OpenOBJDialog.FileName) + ".mesh";
MessageBox.Show("File " + properName + " created!");
}
#endregion
#endregion
}

View File

@ -117,8 +117,8 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="AssetLocalization_BackgroundWorker.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>23, 12</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">

View File

@ -56,12 +56,10 @@
// //
this.listBox1.FormattingEnabled = true; this.listBox1.FormattingEnabled = true;
this.listBox1.Items.AddRange(new object[] { this.listBox1.Items.AddRange(new object[] {
"Item SDK",
"Client SDK", "Client SDK",
"Asset SDK",
"ClientScript Documentation", "ClientScript Documentation",
"Asset Localizer",
"Splash Tester", "Splash Tester",
"RBXMeshConverter GUI",
"ROBLOX Script Generator", "ROBLOX Script Generator",
"ROBLOX Legacy Place Converter", "ROBLOX Legacy Place Converter",
"Diogenes Editor", "Diogenes Editor",

View File

@ -45,26 +45,18 @@ public partial class NovetusSDK : Form
switch (selectedApp) switch (selectedApp)
{ {
case SDKApps.ClientSDK: case SDKApps.AssetSDK:
ClientinfoEditor cie = new ClientinfoEditor(); AssetSDK asset = new AssetSDK();
cie.Show(); asset.Show();
break; break;
case SDKApps.ClientScriptDoc: case SDKApps.ClientScriptDoc:
ClientScriptDocumentation csd = new ClientScriptDocumentation(); ClientScriptDocumentation csd = new ClientScriptDocumentation();
csd.Show(); csd.Show();
break; break;
case SDKApps.AssetLocalizer:
AssetLocalizer al = new AssetLocalizer();
al.Show();
break;
case SDKApps.SplashTester: case SDKApps.SplashTester:
SplashTester st = new SplashTester(); SplashTester st = new SplashTester();
st.Show(); st.Show();
break; break;
case SDKApps.Obj2MeshV1GUI:
Obj2MeshV1GUI obj = new Obj2MeshV1GUI();
obj.Show();
break;
case SDKApps.ScriptGenerator: case SDKApps.ScriptGenerator:
Process proc = new Process(); Process proc = new Process();
proc.StartInfo.FileName = GlobalPaths.ConfigDirData + "\\RSG.exe"; proc.StartInfo.FileName = GlobalPaths.ConfigDirData + "\\RSG.exe";
@ -92,8 +84,8 @@ public partial class NovetusSDK : Form
#endif #endif
break; break;
default: default:
ItemMaker im = new ItemMaker(); ClientinfoEditor cie = new ClientinfoEditor();
im.Show(); cie.Show();
break; break;
} }
} }

View File

@ -145,70 +145,6 @@
<Link>Forms\CharCustom\Extended\CharacterCustomizationExtended.designer.cs</Link> <Link>Forms\CharCustom\Extended\CharacterCustomizationExtended.designer.cs</Link>
<DependentUpon>CharacterCustomizationExtended.cs</DependentUpon> <DependentUpon>CharacterCustomizationExtended.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="..\NovetusCore\SDK\Forms\AssetLocalizer.cs">
<Link>Forms\SDK\AssetLocalizer.cs</Link>
<SubType>Form</SubType>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\AssetLocalizer.designer.cs">
<Link>Forms\SDK\AssetLocalizer.designer.cs</Link>
<DependentUpon>AssetLocalizer.cs</DependentUpon>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\ClientinfoCreator.cs">
<Link>Forms\SDK\ClientinfoCreator.cs</Link>
<SubType>Form</SubType>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\ClientinfoCreator.designer.cs">
<Link>Forms\SDK\ClientinfoCreator.designer.cs</Link>
<DependentUpon>ClientinfoCreator.cs</DependentUpon>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\ClientScriptDocumentation.cs">
<Link>Forms\SDK\ClientScriptDocumentation.cs</Link>
<SubType>Form</SubType>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\ClientScriptDocumentation.designer.cs">
<Link>Forms\SDK\ClientScriptDocumentation.designer.cs</Link>
<DependentUpon>ClientScriptDocumentation.cs</DependentUpon>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\DiogenesEditor.cs">
<Link>Forms\SDK\DiogenesEditor.cs</Link>
<SubType>Form</SubType>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\DiogenesEditor.designer.cs">
<Link>Forms\SDK\DiogenesEditor.designer.cs</Link>
<DependentUpon>DiogenesEditor.cs</DependentUpon>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\ItemMaker.cs">
<Link>Forms\SDK\ItemMaker.cs</Link>
<SubType>Form</SubType>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\ItemMaker.designer.cs">
<Link>Forms\SDK\ItemMaker.designer.cs</Link>
<DependentUpon>ItemMaker.cs</DependentUpon>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\NovetusSDK.cs">
<Link>Forms\SDK\NovetusSDK.cs</Link>
<SubType>Form</SubType>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\NovetusSDK.designer.cs">
<Link>Forms\SDK\NovetusSDK.designer.cs</Link>
<DependentUpon>NovetusSDK.cs</DependentUpon>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\Obj2MeshV1GUI.cs">
<Link>Forms\SDK\Obj2MeshV1GUI.cs</Link>
<SubType>Form</SubType>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\Obj2MeshV1GUI.designer.cs">
<Link>Forms\SDK\Obj2MeshV1GUI.designer.cs</Link>
<DependentUpon>Obj2MeshV1GUI.cs</DependentUpon>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\SplashTester.cs">
<Link>Forms\SDK\SplashTester.cs</Link>
<SubType>Form</SubType>
</Compile>
<Compile Include="..\NovetusCore\SDK\Forms\SplashTester.designer.cs">
<Link>Forms\SDK\SplashTester.designer.cs</Link>
<DependentUpon>SplashTester.cs</DependentUpon>
</Compile>
<Compile Include="Classes\Launcher\AddonLoader.cs" /> <Compile Include="Classes\Launcher\AddonLoader.cs" />
<Compile Include="Classes\Launcher\SplashLoader.cs" /> <Compile Include="Classes\Launcher\SplashLoader.cs" />
<Compile Include="Classes\LocalVars.cs" /> <Compile Include="Classes\LocalVars.cs" />
@ -230,6 +166,42 @@
<Compile Include="Forms\LauncherForm\Compact\LauncherFormCompactSettings.Designer.cs"> <Compile Include="Forms\LauncherForm\Compact\LauncherFormCompactSettings.Designer.cs">
<DependentUpon>LauncherFormCompactSettings.cs</DependentUpon> <DependentUpon>LauncherFormCompactSettings.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\SDK\AssetSDK.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SDK\AssetSDK.Designer.cs">
<DependentUpon>AssetSDK.cs</DependentUpon>
</Compile>
<Compile Include="Forms\SDK\ClientinfoCreator.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SDK\ClientinfoCreator.Designer.cs">
<DependentUpon>ClientinfoCreator.cs</DependentUpon>
</Compile>
<Compile Include="Forms\SDK\ClientScriptDocumentation.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SDK\ClientScriptDocumentation.Designer.cs">
<DependentUpon>ClientScriptDocumentation.cs</DependentUpon>
</Compile>
<Compile Include="Forms\SDK\DiogenesEditor.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SDK\DiogenesEditor.Designer.cs">
<DependentUpon>DiogenesEditor.cs</DependentUpon>
</Compile>
<Compile Include="Forms\SDK\NovetusSDK.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SDK\NovetusSDK.Designer.cs">
<DependentUpon>NovetusSDK.cs</DependentUpon>
</Compile>
<Compile Include="Forms\SDK\SplashTester.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SDK\SplashTester.Designer.cs">
<DependentUpon>SplashTester.cs</DependentUpon>
</Compile>
<Compile Include="Properties\Resources.Designer.cs"> <Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
@ -253,38 +225,6 @@
<Link>Forms\CharCustom\Extended\CharacterCustomizationExtended.resx</Link> <Link>Forms\CharCustom\Extended\CharacterCustomizationExtended.resx</Link>
<DependentUpon>CharacterCustomizationExtended.cs</DependentUpon> <DependentUpon>CharacterCustomizationExtended.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="..\NovetusCore\SDK\Forms\AssetLocalizer.resx">
<Link>Forms\SDK\AssetLocalizer.resx</Link>
<DependentUpon>AssetLocalizer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="..\NovetusCore\SDK\Forms\ClientinfoCreator.resx">
<Link>Forms\SDK\ClientinfoCreator.resx</Link>
<DependentUpon>ClientinfoCreator.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="..\NovetusCore\SDK\Forms\ClientScriptDocumentation.resx">
<Link>Forms\SDK\ClientScriptDocumentation.resx</Link>
<DependentUpon>ClientScriptDocumentation.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="..\NovetusCore\SDK\Forms\DiogenesEditor.resx">
<Link>Forms\SDK\DiogenesEditor.resx</Link>
<DependentUpon>DiogenesEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="..\NovetusCore\SDK\Forms\ItemMaker.resx">
<Link>Forms\SDK\ItemMaker.resx</Link>
<DependentUpon>ItemMaker.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="..\NovetusCore\SDK\Forms\NovetusSDK.resx">
<Link>Forms\SDK\NovetusSDK.resx</Link>
<DependentUpon>NovetusSDK.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="..\NovetusCore\SDK\Forms\Obj2MeshV1GUI.resx">
<Link>Forms\SDK\Obj2MeshV1GUI.resx</Link>
<DependentUpon>Obj2MeshV1GUI.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="..\NovetusCore\SDK\Forms\SplashTester.resx">
<Link>Forms\SDK\SplashTester.resx</Link>
<DependentUpon>SplashTester.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\CustomGraphicsOptions.resx"> <EmbeddedResource Include="Forms\CustomGraphicsOptions.resx">
<DependentUpon>CustomGraphicsOptions.cs</DependentUpon> <DependentUpon>CustomGraphicsOptions.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@ -297,6 +237,24 @@
<EmbeddedResource Include="Forms\LauncherForm\Extended\LauncherFormExtended.resx"> <EmbeddedResource Include="Forms\LauncherForm\Extended\LauncherFormExtended.resx">
<DependentUpon>LauncherFormExtended.cs</DependentUpon> <DependentUpon>LauncherFormExtended.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Forms\SDK\AssetSDK.resx">
<DependentUpon>AssetSDK.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SDK\ClientinfoCreator.resx">
<DependentUpon>ClientinfoCreator.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SDK\ClientScriptDocumentation.resx">
<DependentUpon>ClientScriptDocumentation.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SDK\DiogenesEditor.resx">
<DependentUpon>DiogenesEditor.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SDK\NovetusSDK.resx">
<DependentUpon>NovetusSDK.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\SDK\SplashTester.resx">
<DependentUpon>SplashTester.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx"> <EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>