├── SB3UtilityGUI
├── HF-Logo.ico
├── ApplicationException.cs
├── Program.cs
├── FormLog.cs
├── Properties
│ └── AssemblyInfo.cs
├── ApplicationException.Designer.cs
├── Settings.cs
└── AboutBox.cs
├── SB3UtilityHelp
├── Resource Item File.items
├── Content Layout.content
└── Plugins.aml
├── Plugins
├── SyntaxHighlightingTextBox
│ ├── SyntaxHighlightingTextBox.cs
│ ├── Win32.cs
│ ├── SyntaxHighlightingTextBox.resx
│ ├── HighlightDescriptor.cs
│ ├── AssemblyInfo.cs
│ ├── SeperaratorCollection.cs
│ └── HighlightDescriptorCollection.cs
├── UnityBase
│ ├── unity3d
│ │ ├── Component.cs
│ │ ├── Flare.cs
│ │ ├── RuntimeAnimatorController.cs
│ │ ├── SpriteRenderer.cs
│ │ ├── LinkToGameObject.cs
│ │ ├── LinkToGameObject223.cs
│ │ ├── LinkToGameObject225.cs
│ │ ├── FlareLayer.cs
│ │ ├── AudioListener.cs
│ │ ├── MeshFilter.cs
│ │ ├── MultiLink.cs
│ │ ├── BoxCollider.cs
│ │ ├── SphereCollider.cs
│ │ ├── MeshCollider.cs
│ │ ├── CapsuleCollider.cs
│ │ ├── ParticleRenderer.cs
│ │ ├── RigidBody.cs
│ │ ├── ParticleSystemRenderer.cs
│ │ ├── Cubemap.cs
│ │ ├── Projector.cs
│ │ ├── ParticleAnimator.cs
│ │ ├── MonoScript.cs
│ │ └── AudioClip.cs
│ ├── ExternalAsset.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── NotLoaded.cs
├── SB3UtilityPlugins
│ ├── Example.cs
│ ├── pp
│ │ ├── swapfile.cs
│ │ ├── lst.cs
│ │ ├── Texture.cs
│ │ ├── xa.cs
│ │ ├── xx.cs
│ │ ├── FormPPSave.cs
│ │ ├── FormXXSnapBorders.cs
│ │ ├── FormXXNormals.cs
│ │ ├── ToolOutput.cs
│ │ ├── FormXXConvert.cs
│ │ ├── ToolOutputEditor.cs
│ │ ├── FormXADragDrop.cs
│ │ ├── FormPPSubfileChange.cs
│ │ ├── FormPPRename.cs
│ │ ├── FormPPSave.Designer.cs
│ │ ├── FormPPMultiRename.cs
│ │ └── FormPPRename.Designer.cs
│ ├── ImportBinary.cs
│ ├── ScriptHelper.cs
│ ├── SetProperty.cs
│ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Resources.Designer.cs
├── SB3UtilityPP
│ ├── xxFormatDiff.txt
│ ├── lstParser.cs
│ ├── WakeariStream.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── ppSwapfile.cs
│ └── Ema.cs
├── NIFPlugin
│ ├── Nif.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
├── SB3UtilityNIF
│ ├── SB3UtilityNIF.vcxproj.filters
│ └── SB3UtilityNIF.h
├── UnityPlugin
│ ├── Settings.cs
│ ├── FormNormalsAndTangents.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Settings.settings
│ │ └── Resources.Designer.cs
│ └── app.config
└── SB3UtilityFBX
│ ├── SB3UtilityFBX.vcxproj.filters
│ └── AssemblyInfo.cpp
├── SB3Utility
├── IWriteFile.cs
├── IRenderObject.cs
├── IReadFile.cs
├── Report.cs
├── ScriptMain.cs
├── RawFile.cs
├── Plugin.cs
├── XmlComments.cs
├── ObjChildren.cs
└── Properties
│ └── AssemblyInfo.cs
├── SB3UtilityScript
├── App.config
├── Program.cs
└── Properties
│ └── AssemblyInfo.cs
├── ODFPlugin
├── odfFile.cs
├── odfFolder.cs
├── FormAnimViewDragDrop.cs
├── Settings.cs
├── Properties
│ ├── Settings.settings
│ ├── AssemblyInfo.cs
│ └── Resources.Designer.cs
├── app.config
├── FormAnimView.cs
└── FormMeshViewDragDrop.cs
├── AiDroidPlugin
├── FPK
│ ├── REA.cs
│ ├── REM.cs
│ ├── FormREADragDrop.cs
│ ├── fpk.cs
│ └── FormREMDragDrop.cs
├── Properties
│ ├── Settings.settings
│ ├── AssemblyInfo.cs
│ └── Resources.Designer.cs
├── app.config
└── AiDroidPlugin.ChangeLog.txt
├── SB3UtilityFBX.sln
├── AiDroidBase
├── FPK
│ ├── reaOps.cs
│ ├── REAParser.cs
│ └── REAStructures.cs
├── Properties
│ └── AssemblyInfo.cs
└── AiDroidBase.csproj
├── ODFBase
├── Properties
│ └── AssemblyInfo.cs
└── odf
│ ├── odfFileSection.cs
│ └── odaOps.cs
└── PPD_Preview_Clothes
├── Properties
└── AssemblyInfo.cs
├── sviex.cs
└── PPDPreviewClothes.Designer.cs
/SB3UtilityGUI/HF-Logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enimaroah/SB3Utility/HEAD/SB3UtilityGUI/HF-Logo.ico
--------------------------------------------------------------------------------
/SB3UtilityHelp/Resource Item File.items:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Plugins/SyntaxHighlightingTextBox/SyntaxHighlightingTextBox.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/enimaroah/SB3Utility/HEAD/Plugins/SyntaxHighlightingTextBox/SyntaxHighlightingTextBox.cs
--------------------------------------------------------------------------------
/SB3Utility/IWriteFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.IO;
5 |
6 | namespace SB3Utility
7 | {
8 | public interface IWriteFile
9 | {
10 | string Name { get; set; }
11 | void WriteTo(Stream stream);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/SB3UtilityScript/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/SB3UtilityHelp/Content Layout.content:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/SB3UtilityGUI/ApplicationException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace SB3Utility
5 | {
6 | public partial class ApplicationException : Form
7 | {
8 | public ApplicationException(Exception ex)
9 | {
10 | InitializeComponent();
11 | textBoxErrorText.Text = ex.ToString();
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/SB3Utility/IRenderObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using SlimDX;
5 | using SlimDX.Direct3D9;
6 |
7 | namespace SB3Utility
8 | {
9 | public interface IRenderObject
10 | {
11 | BoundingBox Bounds { get; }
12 | AnimationController AnimationController { get; }
13 |
14 | void Render();
15 | void ResetPose();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/SB3Utility/IReadFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 |
6 | namespace SB3Utility
7 | {
8 | public interface IReadFile
9 | {
10 | string Name { get; set; }
11 | Stream CreateReadStream();
12 | }
13 |
14 | public interface NeedsSourceStreamForWriting
15 | {
16 | Stream SourceStream { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/unity3d/Component.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 |
3 | namespace UnityPlugin
4 | {
5 | public interface Component
6 | {
7 | AssetCabinet file { get; set; }
8 | int pathID { get; set; }
9 | UnityClassID classID1 { get; set; }
10 | UnityClassID classID2 { get; set; }
11 |
12 | void LoadFrom(Stream stream);
13 | void WriteTo(Stream stream);
14 | }
15 |
16 | public interface StoresReferences { }
17 | }
18 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/Example.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SB3Utility
6 | {
7 | [Plugin]
8 | public class Example
9 | {
10 | [Plugin]
11 | public static float DoStuff([DefaultVar]float a)
12 | {
13 | return a;
14 | }
15 |
16 | [Plugin]
17 | public float DoStuffInstance([DefaultVar]float a)
18 | {
19 | return a;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/pp/swapfile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SB3Utility
6 | {
7 | public static partial class Plugins
8 | {
9 | [Plugin]
10 | public static ppSwapfile OpenSwapfile([DefaultVar]ppParser ppParser, IWriteFile parserToSwap)
11 | {
12 | ppSwapfile swap = new ppSwapfile(ppParser.FilePath, parserToSwap);
13 | return swap;
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/SB3Utility/Report.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SB3Utility
4 | {
5 | public static class Report
6 | {
7 | public static event Action Log;
8 | public static event Action Status;
9 |
10 | public static void ReportLog(string msg)
11 | {
12 | if (Log != null)
13 | {
14 | Log(msg);
15 | }
16 | }
17 |
18 | public static void ReportStatus(string msg)
19 | {
20 | if (Status != null)
21 | {
22 | Status(msg);
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/unity3d/Flare.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | namespace UnityPlugin
6 | {
7 | public abstract class Flare : Component
8 | {
9 | public AssetCabinet file { get; set; }
10 | public int pathID { get; set; }
11 | public UnityClassID classID1 { get; set; }
12 | public UnityClassID classID2 { get; set; }
13 |
14 | public abstract void LoadFrom(Stream stream);
15 | public abstract void WriteTo(Stream stream);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/ODFPlugin/odfFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.IO;
5 |
6 | using SB3Utility;
7 |
8 | namespace ODFPlugin
9 | {
10 | public static partial class Plugins
11 | {
12 | [Plugin]
13 | public static odfParser OpenODF([DefaultVar]string path)
14 | {
15 | return new odfParser(path);
16 | }
17 |
18 | [Plugin]
19 | public static void WriteODF([DefaultVar]odfParser parser)
20 | {
21 | parser.WriteArchive(parser.ODFPath, true);
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/unity3d/RuntimeAnimatorController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | namespace UnityPlugin
6 | {
7 | public abstract class RuntimeAnimatorController : Component, StoresReferences
8 | {
9 | public AssetCabinet file { get; set; }
10 | public int pathID { get; set; }
11 | public UnityClassID classID1 { get; set; }
12 | public UnityClassID classID2 { get; set; }
13 |
14 | public abstract void LoadFrom(Stream stream);
15 | public abstract void WriteTo(Stream stream);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/pp/lst.cs:
--------------------------------------------------------------------------------
1 | namespace SB3Utility
2 | {
3 | public static partial class Plugins
4 | {
5 | [Plugin]
6 | public static lstParser OpenLST([DefaultVar]ppParser parser, string name)
7 | {
8 | for (int i = 0; i < parser.Subfiles.Count; i++)
9 | {
10 | if (parser.Subfiles[i].Name == name)
11 | {
12 | IReadFile subfile = parser.Subfiles[i] as IReadFile;
13 | if (subfile != null)
14 | {
15 | return new lstParser(subfile.CreateReadStream(), subfile.Name);
16 | }
17 |
18 | break;
19 | }
20 | }
21 | return null;
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/ExternalAsset.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | namespace UnityPlugin
6 | {
7 | public class ExternalAsset : Component
8 | {
9 | public AssetCabinet file { get; set; }
10 | public int pathID { get; set; }
11 | public UnityClassID classID1 { get; set; }
12 | public UnityClassID classID2 { get; set; }
13 |
14 | public int FileID { get; set; }
15 | public int PathID { get; set; }
16 |
17 | public void LoadFrom(Stream stream)
18 | {
19 | throw new NotImplementedException();
20 | }
21 |
22 | public void WriteTo(Stream stream)
23 | {
24 | throw new NotImplementedException();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/pp/Texture.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.IO;
5 |
6 | namespace SB3Utility
7 | {
8 | public static partial class Plugins
9 | {
10 | [Plugin]
11 | public static ImportedTexture ImportEmaTexture(Stream stream, string name)
12 | {
13 | return new Ema(stream, name).ImportedTexture();
14 | }
15 |
16 | [Plugin]
17 | public static ImportedTexture ImportTexture(Stream stream, string name)
18 | {
19 | return new ImportedTexture(stream, name);
20 | }
21 |
22 | [Plugin]
23 | public static ImportedTexture ImportTexture([DefaultVar]string path)
24 | {
25 | return new ImportedTexture(path);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/ODFPlugin/odfFolder.cs:
--------------------------------------------------------------------------------
1 | #pragma warning disable 1591
2 | using System;
3 |
4 | using SB3Utility;
5 |
6 | namespace ODFPlugin
7 | {
8 | public static partial class Plugins
9 | {
10 | ///
11 | /// "Parses" a folder of an .odf file from the specified path.
12 | ///
13 | /// [DefaultVar] Path of the file.
14 | /// A odfParser that represents the folder of the .odf file.
15 | [Plugin]
16 | public static string OpenODFFolderOf([DefaultVar]string path)
17 | {
18 | /* ppFormat format = ppFormat.GetFormat(path);
19 | if (format == null)
20 | {
21 | throw new Exception("Couldn't auto-detect the ppFormat");
22 | }*/
23 | throw new Exception("not implemented");
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/ImportBinary.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.IO;
5 |
6 | namespace SB3Utility
7 | {
8 | public static partial class Plugins
9 | {
10 | [Plugin]
11 | public static byte[] ImportBinary([DefaultVar]string path)
12 | {
13 | using (BinaryReader reader = new BinaryReader(File.OpenRead(path)))
14 | {
15 | return reader.ReadBytes((int)reader.BaseStream.Length);
16 | }
17 | }
18 |
19 | [Plugin]
20 | public static byte[] ImportBinary([DefaultVar]string path, int offset, int count)
21 | {
22 | using (BinaryReader reader = new BinaryReader(File.OpenRead(path)))
23 | {
24 | reader.BaseStream.Seek(offset, SeekOrigin.Begin);
25 | return reader.ReadBytes(count);
26 | }
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPP/xxFormatDiff.txt:
--------------------------------------------------------------------------------
1 | xx
2 | ==
3 | Header: (>= 1) 26, (< 1) 21
4 | Footer: (>= 2) 10
5 |
6 | Frame
7 | =====
8 | Unknown1: (>= 7) 32, (< 7) 16
9 | Unknown2: (>= 7) 64, (< 7) 16
10 | Name2: (>= 6) name
11 |
12 | Submesh
13 | =======
14 | Unknown1: (>= 7) 64, (< 7) 16
15 | Unknown2: (>= 7) 20
16 | Unknown3: (>= 2) 100
17 | Unknown4: (>= 7) 284, (>= 3) 64
18 | Unknown5: (>= 8) 21, (>= 5) 20
19 | Unknown6: (>= 6 && < 7) 28
20 |
21 | Vertex
22 | ======
23 | Index: (>= 4) ushort, (< 4) int
24 | Unknown1: (>= 4) 20
25 |
26 | Material
27 | ========
28 | Unknown1: (>= 0) 88, (< 0) 4
29 |
30 |
31 | Files affected:
32 | xxParser.cs
33 | xxReplace.cs: Create()
34 | Structures.cs: WriteTo(), Clone()
35 | xxOps.cs: CopyUnknowns(), ConvertFormat()
36 | Plugins\pp\FormXX.cs
37 | Plugins\pp\FormXXEditHex.cs
38 | Plugins\pp\xxEditor.cs
--------------------------------------------------------------------------------
/SB3Utility/ScriptMain.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.IO;
5 |
6 | namespace SB3Utility
7 | {
8 | public class ScriptMain
9 | {
10 | public ScriptExecutor ScriptEnvironment { get; protected set; }
11 |
12 | public ScriptMain()
13 | {
14 | ScriptEnvironment = new ScriptExecutor();
15 | }
16 |
17 | public void LoadPlugin(string path)
18 | {
19 | PluginManager.LoadPlugin(path);
20 | }
21 |
22 | public object RunScript(string path)
23 | {
24 | ScriptParser parser = new ScriptParser(path);
25 | return ScriptEnvironment.RunScript(parser);
26 | }
27 |
28 | public object RunScript(Stream stream, string scriptName)
29 | {
30 | ScriptParser parser = new ScriptParser(stream, scriptName);
31 | return ScriptEnvironment.RunScript(parser);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/ODFPlugin/FormAnimViewDragDrop.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | using SB3Utility;
10 |
11 | namespace ODFPlugin
12 | {
13 | public partial class FormAnimViewDragDrop : Form
14 | {
15 | public ReplaceAnimationMethod ReplaceMethod { get; protected set; }
16 |
17 | private odfEditor editor;
18 |
19 | public FormAnimViewDragDrop(odfEditor destEditor, bool morphOrAnimation)
20 | {
21 | InitializeComponent();
22 | editor = destEditor;
23 |
24 | if (morphOrAnimation)
25 | panelMorphList.BringToFront();
26 | else
27 | {
28 | panelAnimation.BringToFront();
29 | comboBoxMethod.Items.AddRange(Enum.GetNames(typeof(ReplaceAnimationMethod)));
30 | }
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/pp/xa.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.IO;
5 |
6 | namespace SB3Utility
7 | {
8 | public static partial class Plugins
9 | {
10 | [Plugin]
11 | public static xaParser OpenXA([DefaultVar]ppParser parser, string name)
12 | {
13 | for (int i = 0; i < parser.Subfiles.Count; i++)
14 | {
15 | if (parser.Subfiles[i].Name == name)
16 | {
17 | IReadFile subfile = parser.Subfiles[i] as IReadFile;
18 | if (subfile != null)
19 | {
20 | return new xaParser(subfile.CreateReadStream(), subfile.Name);
21 | }
22 |
23 | break;
24 | }
25 | }
26 | return null;
27 | }
28 |
29 | [Plugin]
30 | public static xaParser OpenXA([DefaultVar]string path)
31 | {
32 | return new xaParser(File.OpenRead(path), Path.GetFileName(path));
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Plugins/NIFPlugin/Nif.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | using SB3Utility;
5 |
6 | namespace NIFPlugin
7 | {
8 | public static partial class Plugins
9 | {
10 | [Plugin]
11 | [PluginOpensFile(".nif")]
12 | public static void WorkspaceNif(string path, string variable)
13 | {
14 | string importVar = Gui.Scripting.GetNextVariable("importNif");
15 | var importer = (Nif.Importer)Gui.Scripting.RunScript(importVar + " = ImportNif(path=\"" + path + "\")");
16 |
17 | string editorVar = Gui.Scripting.GetNextVariable("importedEditor");
18 | var editor = (ImportedEditor)Gui.Scripting.RunScript(editorVar + " = ImportedEditor(" + importVar + ")");
19 |
20 | new FormWorkspace(path, importer, editorVar, editor);
21 | }
22 |
23 | [Plugin]
24 | public static Nif.Importer ImportNif([DefaultVar]string path)
25 | {
26 | return new Nif.Importer(path);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/SB3UtilityGUI/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | namespace SB3Utility
5 | {
6 | static class Program
7 | {
8 | ///
9 | /// The main entry point for the application.
10 | ///
11 | [STAThread]
12 | static void Main(string[] args)
13 | {
14 | try
15 | {
16 | if (args.Length > 0 && !CommandLineArgumentHandler.StartServer(args))
17 | {
18 | CommandLineArgumentHandler.OpenFiles(args);
19 | return;
20 | }
21 |
22 | Application.EnableVisualStyles();
23 | Application.SetCompatibleTextRenderingDefault(false);
24 | Application.Run(new MDIParent());
25 |
26 | if (CommandLineArgumentHandler.SB3UtilityIsServer())
27 | {
28 | CommandLineArgumentHandler.StopServer();
29 | }
30 | }
31 | catch (Exception ex)
32 | {
33 | Application.Run(new ApplicationException(ex));
34 | }
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/AiDroidPlugin/FPK/REA.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 |
6 | using SB3Utility;
7 |
8 | namespace AiDroidPlugin
9 | {
10 | public static partial class Plugins
11 | {
12 | [Plugin]
13 | public static reaParser OpenREA([DefaultVar]fpkParser parser, string name)
14 | {
15 | for (int i = 0; i < parser.Subfiles.Count; i++)
16 | {
17 | if (parser.Subfiles[i].Name == name)
18 | {
19 | IReadFile subfile = parser.Subfiles[i] as IReadFile;
20 | if (subfile != null)
21 | {
22 | return new reaParser(subfile.CreateReadStream(), subfile.Name, parser.FilePath);
23 | }
24 |
25 | break;
26 | }
27 | }
28 | return null;
29 | }
30 |
31 | [Plugin]
32 | public static reaParser OpenREA([DefaultVar]string path)
33 | {
34 | return new reaParser(File.OpenRead(path), Path.GetFileName(path), path);
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/AiDroidPlugin/FPK/REM.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 |
6 | using SB3Utility;
7 |
8 | namespace AiDroidPlugin
9 | {
10 | public static partial class Plugins
11 | {
12 | [Plugin]
13 | public static remParser OpenREM([DefaultVar]fpkParser parser, string name)
14 | {
15 | for (int i = 0; i < parser.Subfiles.Count; i++)
16 | {
17 | if (parser.Subfiles[i].Name == name)
18 | {
19 | IReadFile subfile = parser.Subfiles[i] as IReadFile;
20 | if (subfile != null)
21 | {
22 | return new remParser(subfile.CreateReadStream(), subfile.Name, parser.FilePath);
23 | }
24 |
25 | break;
26 | }
27 | }
28 | return null;
29 | }
30 |
31 | [Plugin]
32 | public static remParser OpenREM([DefaultVar]string path)
33 | {
34 | return new remParser(File.OpenRead(path), Path.GetFileName(path), path);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/SB3Utility/RawFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 |
6 | namespace SB3Utility
7 | {
8 | public class RawFile : IReadFile, IWriteFile
9 | {
10 | public string Name { get; set; }
11 | public string FilePath { get; protected set; }
12 |
13 | public RawFile(string path)
14 | {
15 | FilePath = path;
16 | Name = Path.GetFileName(FilePath);
17 | }
18 |
19 | public Stream CreateReadStream()
20 | {
21 | return File.OpenRead(FilePath);
22 | }
23 |
24 | public void WriteTo(Stream stream)
25 | {
26 | using (BinaryReader reader = new BinaryReader(CreateReadStream()))
27 | {
28 | BinaryWriter writer = new BinaryWriter(stream);
29 | byte[] buf;
30 | while ((buf = reader.ReadBytes(Utility.BufSize)).Length == Utility.BufSize)
31 | {
32 | writer.Write(buf);
33 | }
34 | writer.Write(buf);
35 | }
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityNIF/SB3UtilityNIF.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 |
14 |
15 | Header Files
16 |
17 |
18 |
19 |
20 | Source Files
21 |
22 |
23 |
--------------------------------------------------------------------------------
/SB3UtilityFBX.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual C++ Express 2010
4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SB3UtilityFBX", "SB3UtilityFBX\SB3UtilityFBX.vcxproj", "{120B541E-0A9D-4871-9315-679CB97109E2}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Win32 = Debug|Win32
9 | Release|Win32 = Release|Win32
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {120B541E-0A9D-4871-9315-679CB97109E2}.Debug|Win32.ActiveCfg = Debug|Win32
13 | {120B541E-0A9D-4871-9315-679CB97109E2}.Debug|Win32.Build.0 = Debug|Win32
14 | {120B541E-0A9D-4871-9315-679CB97109E2}.Release|Win32.ActiveCfg = Release|Win32
15 | {120B541E-0A9D-4871-9315-679CB97109E2}.Release|Win32.Build.0 = Release|Win32
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/AiDroidPlugin/FPK/FormREADragDrop.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Forms;
3 |
4 | using SB3Utility;
5 |
6 | namespace AiDroidPlugin
7 | {
8 | public partial class FormREADragDrop : Form
9 | {
10 | public ReplaceAnimationMethod ReplaceMethod { get; protected set; }
11 |
12 | private reaEditor editor;
13 |
14 | public FormREADragDrop(reaEditor destEditor)
15 | {
16 | InitializeComponent();
17 | editor = destEditor;
18 |
19 | comboBoxMethod.Items.AddRange(Enum.GetNames(typeof(ReplaceAnimationMethod)));
20 | }
21 |
22 | private void comboBoxMethod_SelectedIndexChanged(object sender, EventArgs e)
23 | {
24 | if (comboBoxMethod.SelectedIndex == (int)ReplaceAnimationMethod.Append)
25 | {
26 | if (numericPosition.Value == 0)
27 | {
28 | numericPosition.Value = 10;
29 | }
30 | }
31 | else
32 | {
33 | if (numericPosition.Value == 10)
34 | {
35 | numericPosition.Value = 0;
36 | }
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPP/lstParser.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 |
6 | namespace SB3Utility
7 | {
8 | public class lstParser : IWriteFile
9 | {
10 | public string Name { get; set; }
11 | public string Text { get; set; }
12 |
13 | public lstParser(Stream stream, string name)
14 | {
15 | this.Name = name;
16 |
17 | using (BinaryReader reader = new BinaryReader(stream))
18 | {
19 | List byteList = new List();
20 | try
21 | {
22 | for (; true; )
23 | {
24 | byteList.Add(reader.ReadByte());
25 | }
26 | }
27 | catch (EndOfStreamException) { }
28 | this.Text += Utility.EncodingShiftJIS.GetString(byteList.ToArray());
29 | }
30 | }
31 |
32 | public void WriteTo(Stream stream)
33 | {
34 | BinaryWriter writer = new BinaryWriter(stream);
35 | writer.Write(Utility.EncodingShiftJIS.GetBytes(this.Text.ToCharArray()));
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/ScriptHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SB3Utility
6 | {
7 | public static class ScriptHelper
8 | {
9 | public static void SetProperty(string obj, string name, object value)
10 | {
11 | Gui.Scripting.RunScript("SetProperty(obj=" + obj + ", name=\"" + name + "\", value=[" + value + "])");
12 | }
13 |
14 | public static string String(string variable, object value)
15 | {
16 | return variable + "=\"" + value + "\"";
17 | }
18 |
19 | public static string Bytes(string variable, object value)
20 | {
21 | return variable + "=[" + value + "]";
22 | }
23 |
24 | public static string Parameters(string[] parameters)
25 | {
26 | StringBuilder sb = new StringBuilder();
27 | for (int i = 0; i < parameters.Length; i++)
28 | {
29 | sb.Append(parameters[i]);
30 | sb.Append(", ");
31 | }
32 | return sb.ToString(0, sb.Length - 2);
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/pp/xx.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.IO;
5 |
6 | namespace SB3Utility
7 | {
8 | public static partial class Plugins
9 | {
10 | [Plugin]
11 | public static xxParser OpenXX([DefaultVar]ppParser parser, string name)
12 | {
13 | for (int i = 0; i < parser.Subfiles.Count; i++)
14 | {
15 | if (parser.Subfiles[i].Name == name)
16 | {
17 | IReadFile subfile = parser.Subfiles[i] as IReadFile;
18 | if (subfile != null)
19 | {
20 | return new xxParser(subfile.CreateReadStream(), subfile.Name);
21 | }
22 |
23 | break;
24 | }
25 | }
26 | return null;
27 | }
28 |
29 | [Plugin]
30 | public static xxParser OpenXX([DefaultVar]string path)
31 | {
32 | return new xxParser(File.OpenRead(path), Path.GetFileName(path));
33 | }
34 |
35 | [Plugin]
36 | public static void ConvertXX([DefaultVar]xxParser parser, int format)
37 | {
38 | xx.ConvertFormat(parser, format);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/SB3Utility/Plugin.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace SB3Utility
6 | {
7 | [AttributeUsage(AttributeTargets.Parameter)]
8 | public class DefaultVar : Attribute
9 | {
10 | }
11 |
12 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
13 | public class Plugin : Attribute
14 | {
15 | }
16 |
17 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple=true)]
18 | public class PluginOpensFile : Attribute
19 | {
20 | public string FileExtension { get; protected set; }
21 |
22 | public PluginOpensFile(string ext)
23 | {
24 | this.FileExtension = ext;
25 | }
26 | }
27 |
28 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
29 | public class PluginTool : Attribute
30 | {
31 | public string Name { get; protected set; }
32 | public string Shortcut { get; protected set; }
33 |
34 | public PluginTool(string name, string shortcut)
35 | {
36 | this.Name = name;
37 | this.Shortcut = shortcut;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/SetProperty.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Reflection;
5 |
6 | namespace SB3Utility
7 | {
8 | public static partial class Plugins
9 | {
10 | [Plugin]
11 | public static void SetProperty(object obj, string name, object value)
12 | {
13 | var type = obj.GetType();
14 | type.GetProperty(name).SetValue(obj, value, null);
15 | }
16 |
17 | [Plugin]
18 | public static void SetIndexed(object obj, int index, object value)
19 | {
20 | var type = obj.GetType();
21 | if (type.IsArray)
22 | {
23 | ((Array)obj).SetValue(value, index);
24 | }
25 | else
26 | {
27 | var attributes = type.GetCustomAttributes(typeof(DefaultMemberAttribute), true);
28 | if (attributes.Length > 0)
29 | {
30 | var indexerName = ((DefaultMemberAttribute)attributes[0]).MemberName;
31 | type.GetProperty(indexerName).SetValue(obj, value, new object[] { index });
32 | }
33 | else
34 | {
35 | throw new Exception(obj.ToString() + " can't be indexed.");
36 | }
37 | }
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/SB3Utility/XmlComments.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Reflection;
4 | using System.IO;
5 | using System.Xml.Linq;
6 |
7 | namespace SB3Utility
8 | {
9 | public class XmlComments
10 | {
11 | public string Name;
12 | public string Description;
13 | public Dictionary Parameters;
14 | public string Returns = null;
15 |
16 | public XmlComments(XElement element)
17 | {
18 | string ns = element.Name.NamespaceName;
19 | XName xname = XName.Get("name", ns);
20 |
21 | Name = element.Attribute(xname).Value;
22 | Parameters = new Dictionary();
23 |
24 | foreach (var child in element.Elements())
25 | {
26 | switch (child.Name.LocalName.ToLowerInvariant())
27 | {
28 | case "summary":
29 | Description = child.Value.Trim();
30 | break;
31 | case "param":
32 | Parameters.Add(child.Attribute(xname).Value, child.Value.Trim());
33 | break;
34 | case "returns":
35 | Returns = child.Value;
36 | break;
37 | default:
38 | break;
39 | }
40 | }
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/SB3UtilityScript/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 |
4 | namespace SB3Utility
5 | {
6 | public class Program
7 | {
8 | public static int Main(string[] args)
9 | {
10 | try
11 | {
12 | Thread.CurrentThread.CurrentCulture = Utility.CultureUS;
13 |
14 | if (args.Length <= 0)
15 | {
16 | Console.WriteLine("Usage: SB3UtilityScript \"scriptPath.txt\"");
17 | }
18 | else
19 | {
20 | for (int i = 0; i < args.Length; i++)
21 | {
22 | ScriptMain script = new ScriptMain();
23 | Report.Log += new Action(Logger);
24 | script.LoadPlugin((string)script.ScriptEnvironment.Variables[ScriptExecutor.PluginDirectoryName] + "SB3UtilityPlugins.dll");
25 | script.RunScript(args[i]);
26 | }
27 | }
28 |
29 | return 0;
30 | }
31 | catch (Exception ex)
32 | {
33 | Exception inner = ex;
34 | while (inner != null)
35 | {
36 | Console.WriteLine(inner.Message);
37 | inner = inner.InnerException;
38 | }
39 |
40 | return -1;
41 | }
42 | }
43 |
44 | static void Logger(string s)
45 | {
46 | Console.WriteLine(s);
47 | }
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/unity3d/SpriteRenderer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using SlimDX;
5 |
6 | using SB3Utility;
7 |
8 | namespace UnityPlugin
9 | {
10 | public class SpriteRenderer : MeshRenderer, Component
11 | {
12 | public PPtr m_Sprite { get; set; }
13 | public Color4 m_Color { get; set; }
14 |
15 | public SpriteRenderer(AssetCabinet file, int pathID, UnityClassID classID1, UnityClassID classID2)
16 | : base(file, pathID, classID1, classID2) { }
17 |
18 | public SpriteRenderer(AssetCabinet file) :
19 | this(file, 0, UnityClassID.SpriteRenderer, UnityClassID.SpriteRenderer)
20 | {
21 | file.ReplaceSubfile(-1, this, null);
22 |
23 | base.SetDefaults();
24 | }
25 |
26 | public new void LoadFrom(Stream stream)
27 | {
28 | base.LoadFrom(stream);
29 |
30 | BinaryReader reader = new BinaryReader(stream);
31 | m_Sprite = new PPtr(stream, file);
32 | m_Color = reader.ReadColor4();
33 | }
34 |
35 | public new void WriteTo(Stream stream)
36 | {
37 | base.WriteTo(stream);
38 |
39 | BinaryWriter writer = new BinaryWriter(stream);
40 | m_Sprite.WriteTo(stream);
41 | writer.Write(m_Color);
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/AiDroidPlugin/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | True
7 |
8 |
9 | False
10 |
11 |
12 | True
13 |
14 |
15 | True
16 |
17 |
18 | .RE-M
19 |
20 |
21 |
--------------------------------------------------------------------------------
/AiDroidBase/FPK/reaOps.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 |
3 | using SB3Utility;
4 |
5 | namespace AiDroidPlugin
6 | {
7 | public static partial class rea
8 | {
9 | public static reaAnimationTrack FindTrack(remId trackName, reaParser parser)
10 | {
11 | foreach (reaAnimationTrack track in parser.ANIC)
12 | {
13 | if (track.boneFrame == trackName)
14 | {
15 | return track;
16 | }
17 | }
18 |
19 | return null;
20 | }
21 |
22 | public static void SaveREA(reaParser parser, string destPath, bool keepBackup)
23 | {
24 | DirectoryInfo dir = new DirectoryInfo(Path.GetDirectoryName(destPath));
25 |
26 | string backup = null;
27 | if (keepBackup && File.Exists(destPath))
28 | {
29 | backup = Utility.GetDestFile(dir, Path.GetFileNameWithoutExtension(destPath) + ".bak", Path.GetExtension(destPath));
30 | File.Move(destPath, backup);
31 | }
32 |
33 | try
34 | {
35 | using (BufferedStream bufStr = new BufferedStream(File.OpenWrite(destPath)))
36 | {
37 | parser.WriteTo(bufStr);
38 | }
39 | }
40 | catch
41 | {
42 | if (File.Exists(backup))
43 | {
44 | if (File.Exists(destPath))
45 | File.Delete(destPath);
46 | File.Move(backup, destPath);
47 | }
48 | }
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/unity3d/LinkToGameObject.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | namespace UnityPlugin
6 | {
7 | public class LinkToGameObject : Component, LinkedByGameObject, StoresReferences
8 | {
9 | public AssetCabinet file { get; set; }
10 | public int pathID { get; set; }
11 | public UnityClassID classID1 { get; set; }
12 | public UnityClassID classID2 { get; set; }
13 |
14 | public PPtr m_GameObject { get; set; }
15 |
16 | public LinkToGameObject(AssetCabinet file, int pathID, UnityClassID classID1, UnityClassID classID2)
17 | {
18 | this.file = file;
19 | this.pathID = pathID;
20 | this.classID1 = classID1;
21 | this.classID2 = classID2;
22 | }
23 |
24 | public LinkToGameObject(AssetCabinet file) :
25 | this(file, 0, UnityClassID.LinkToGameObject, UnityClassID.LinkToGameObject)
26 | {
27 | file.ReplaceSubfile(-1, this, null);
28 | }
29 |
30 | public void LoadFrom(Stream stream)
31 | {
32 | BinaryReader reader = new BinaryReader(stream);
33 | m_GameObject = new PPtr(stream, file);
34 | }
35 |
36 | public void WriteTo(Stream stream)
37 | {
38 | BinaryWriter writer = new BinaryWriter(stream);
39 | m_GameObject.WriteTo(stream);
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/SB3UtilityGUI/FormLog.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using WeifenLuo.WinFormsUI.Docking;
10 |
11 | namespace SB3Utility
12 | {
13 | public partial class FormLog : DockContent
14 | {
15 | public FormLog()
16 | {
17 | InitializeComponent();
18 |
19 | richTextBox1.AllowDrop = true;
20 | richTextBox1.DragEnter += new DragEventHandler(richTextBox1_DragEnter);
21 | richTextBox1.DragDrop += new DragEventHandler(richTextBox1_DragDrop);
22 | }
23 |
24 | public void Logger(string s)
25 | {
26 | richTextBox1.SuspendLayout();
27 | richTextBox1.AppendText(s + Environment.NewLine);
28 | richTextBox1.SelectionStart = richTextBox1.Text.Length;
29 | richTextBox1.ScrollToCaret();
30 | richTextBox1.ResumeLayout();
31 | }
32 |
33 | void richTextBox1_DragEnter(object sender, DragEventArgs e)
34 | {
35 | Gui.Docking.DockDragEnter(sender, e);
36 | }
37 |
38 | void richTextBox1_DragDrop(object sender, DragEventArgs e)
39 | {
40 | Gui.Docking.DockDragDrop(sender, e);
41 | }
42 |
43 | private void clearToolStripMenuItem_Click(object sender, EventArgs e)
44 | {
45 | richTextBox1.Text = String.Empty;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/ODFPlugin/Settings.cs:
--------------------------------------------------------------------------------
1 | namespace ODFPlugin.Properties {
2 |
3 |
4 | // This class allows you to handle specific events on the settings class:
5 | // The SettingChanging event is raised before a setting's value is changed.
6 | // The PropertyChanged event is raised after a setting's value is changed.
7 | // The SettingsLoaded event is raised after the setting values are loaded.
8 | // The SettingsSaving event is raised before the setting values are saved.
9 | internal sealed partial class Settings {
10 |
11 | public Settings() {
12 | // // To add event handlers for saving and changing settings, uncomment the lines below:
13 | //
14 | // this.SettingChanging += this.SettingChangingEventHandler;
15 | //
16 | // this.SettingsSaving += this.SettingsSavingEventHandler;
17 | //
18 | }
19 |
20 | private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
21 | // Add code to handle the SettingChangingEvent event here.
22 | }
23 |
24 | private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
25 | // Add code to handle the SettingsSaving event here.
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Plugins/UnityPlugin/Settings.cs:
--------------------------------------------------------------------------------
1 | namespace UnityPlugin.Properties {
2 |
3 |
4 | // This class allows you to handle specific events on the settings class:
5 | // The SettingChanging event is raised before a setting's value is changed.
6 | // The PropertyChanged event is raised after a setting's value is changed.
7 | // The SettingsLoaded event is raised after the setting values are loaded.
8 | // The SettingsSaving event is raised before the setting values are saved.
9 | internal sealed partial class Settings {
10 |
11 | public Settings() {
12 | // // To add event handlers for saving and changing settings, uncomment the lines below:
13 | //
14 | // this.SettingChanging += this.SettingChangingEventHandler;
15 | //
16 | // this.SettingsSaving += this.SettingsSavingEventHandler;
17 | //
18 | }
19 |
20 | private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
21 | // Add code to handle the SettingChangingEvent event here.
22 | }
23 |
24 | private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
25 | // Add code to handle the SettingsSaving event here.
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/pp/FormPPSave.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace SB3Utility
11 | {
12 | public partial class FormPPSave : Form
13 | {
14 | BackgroundWorker worker;
15 |
16 | public FormPPSave(BackgroundWorker worker)
17 | {
18 | InitializeComponent();
19 |
20 | this.worker = worker;
21 | worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
22 | worker.ProgressChanged += new ProgressChangedEventHandler(worker_ProgressChanged);
23 |
24 | this.Shown += new EventHandler(FormPPSave_Shown);
25 | }
26 |
27 | void FormPPSave_Shown(object sender, EventArgs e)
28 | {
29 | worker.RunWorkerAsync();
30 | }
31 |
32 | void worker_ProgressChanged(object sender, ProgressChangedEventArgs e)
33 | {
34 | progressBar1.Value = e.ProgressPercentage;
35 | }
36 |
37 | void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
38 | {
39 | if (e.Cancelled)
40 | {
41 | this.DialogResult = DialogResult.Cancel;
42 | }
43 | if (e.Error != null)
44 | {
45 | Utility.ReportException(e.Error);
46 | this.DialogResult = DialogResult.Cancel;
47 | }
48 |
49 | Close();
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityFBX/SB3UtilityFBX.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;xsd
11 |
12 |
13 |
14 |
15 | Source Files
16 |
17 |
18 | Source Files
19 |
20 |
21 | Source Files
22 |
23 |
24 | Source Files
25 |
26 |
27 | Source Files
28 |
29 |
30 |
31 |
32 | Header Files
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/unity3d/LinkToGameObject223.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | namespace UnityPlugin
6 | {
7 | public class LinkToGameObject223 : Component, LinkedByGameObject, StoresReferences
8 | {
9 | public AssetCabinet file { get; set; }
10 | public int pathID { get; set; }
11 | public UnityClassID classID1 { get; set; }
12 | public UnityClassID classID2 { get; set; }
13 |
14 | public PPtr m_GameObject { get; set; }
15 | public byte[] Data { get; set; }
16 |
17 | public LinkToGameObject223(AssetCabinet file, int pathID, UnityClassID classID1, UnityClassID classID2)
18 | {
19 | this.file = file;
20 | this.pathID = pathID;
21 | this.classID1 = classID1;
22 | this.classID2 = classID2;
23 | }
24 |
25 | public LinkToGameObject223(AssetCabinet file) :
26 | this(file, 0, UnityClassID.LinkToGameObject223, UnityClassID.LinkToGameObject223)
27 | {
28 | file.ReplaceSubfile(-1, this, null);
29 | }
30 |
31 | public void LoadFrom(Stream stream)
32 | {
33 | BinaryReader reader = new BinaryReader(stream);
34 | m_GameObject = new PPtr(stream, file);
35 | Data = reader.ReadBytes(30);
36 | }
37 |
38 | public void WriteTo(Stream stream)
39 | {
40 | BinaryWriter writer = new BinaryWriter(stream);
41 | m_GameObject.WriteTo(stream);
42 | writer.Write(Data);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/unity3d/LinkToGameObject225.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | namespace UnityPlugin
6 | {
7 | public class LinkToGameObject225 : Component, LinkedByGameObject, StoresReferences
8 | {
9 | public AssetCabinet file { get; set; }
10 | public int pathID { get; set; }
11 | public UnityClassID classID1 { get; set; }
12 | public UnityClassID classID2 { get; set; }
13 |
14 | public PPtr m_GameObject { get; set; }
15 | public byte[] Data { get; set; }
16 |
17 | public LinkToGameObject225(AssetCabinet file, int pathID, UnityClassID classID1, UnityClassID classID2)
18 | {
19 | this.file = file;
20 | this.pathID = pathID;
21 | this.classID1 = classID1;
22 | this.classID2 = classID2;
23 | }
24 |
25 | public LinkToGameObject225(AssetCabinet file) :
26 | this(file, 0, UnityClassID.LinkToGameObject225, UnityClassID.LinkToGameObject225)
27 | {
28 | file.ReplaceSubfile(-1, this, null);
29 | }
30 |
31 | public void LoadFrom(Stream stream)
32 | {
33 | BinaryReader reader = new BinaryReader(stream);
34 | m_GameObject = new PPtr(stream, file);
35 | Data = reader.ReadBytes(12);
36 | }
37 |
38 | public void WriteTo(Stream stream)
39 | {
40 | BinaryWriter writer = new BinaryWriter(stream);
41 | m_GameObject.WriteTo(stream);
42 | writer.Write(Data);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/AiDroidPlugin/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | True
12 |
13 |
14 | False
15 |
16 |
17 | True
18 |
19 |
20 | True
21 |
22 |
23 | .RE-M
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/SB3Utility/ObjChildren.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.IO;
5 |
6 | namespace SB3Utility
7 | {
8 | public interface IObjChild
9 | {
10 | dynamic Parent { get; set; }
11 | }
12 |
13 | public abstract class ObjChildren : IEnumerable where T : IObjChild
14 | {
15 | protected List children;
16 |
17 | public T this[int i]
18 | {
19 | get { return (T)children[i]; }
20 | }
21 |
22 | public int Count
23 | {
24 | get { return children.Count; }
25 | }
26 |
27 | public void InitChildren(int count)
28 | {
29 | children = new List(count);
30 | }
31 |
32 | public void AddChild(T obj)
33 | {
34 | children.Add(obj);
35 | obj.Parent = this;
36 | }
37 |
38 | public void InsertChild(int i, T obj)
39 | {
40 | children.Insert(i, obj);
41 | obj.Parent = this;
42 | }
43 |
44 | public void RemoveChild(T obj)
45 | {
46 | obj.Parent = null;
47 | children.Remove(obj);
48 | }
49 |
50 | public void RemoveChild(int i)
51 | {
52 | children[i].Parent = null;
53 | children.RemoveAt(i);
54 | }
55 |
56 | public int IndexOf(T obj)
57 | {
58 | return children.IndexOf(obj);
59 | }
60 |
61 | public IEnumerator GetEnumerator()
62 | {
63 | return children.GetEnumerator();
64 | }
65 |
66 | IEnumerator IEnumerable.GetEnumerator()
67 | {
68 | return GetEnumerator();
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/ODFPlugin/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | False
7 |
8 |
9 | False
10 |
11 |
12 | True
13 |
14 |
15 | False
16 |
17 |
18 | False
19 |
20 |
21 | FBX 2014.1
22 |
23 |
24 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityFBX/AssemblyInfo.cpp:
--------------------------------------------------------------------------------
1 | using namespace System;
2 | using namespace System::Reflection;
3 | using namespace System::Runtime::CompilerServices;
4 | using namespace System::Runtime::InteropServices;
5 | using namespace System::Security::Permissions;
6 |
7 | //
8 | // General Information about an assembly is controlled through the following
9 | // set of attributes. Change these attribute values to modify the information
10 | // associated with an assembly.
11 | //
12 | [assembly:AssemblyTitleAttribute("SB3UtilityFBX")];
13 | [assembly:AssemblyDescriptionAttribute("")];
14 | [assembly:AssemblyConfigurationAttribute("")];
15 | [assembly:AssemblyCompanyAttribute("")];
16 | [assembly:AssemblyProductAttribute("SB3UtilityFBX")];
17 | [assembly:AssemblyCopyrightAttribute("Copyright (c) 2009")];
18 | [assembly:AssemblyTrademarkAttribute("")];
19 | [assembly:AssemblyCultureAttribute("")];
20 |
21 | //
22 | // Version information for an assembly consists of the following four values:
23 | //
24 | // Major Version
25 | // Minor Version
26 | // Build Number
27 | // Revision
28 | //
29 | // You can specify all the value or you can default the Revision and Build Numbers
30 | // by using the '*' as shown below:
31 |
32 | [assembly:AssemblyVersionAttribute("1.0.*")];
33 |
34 | [assembly:ComVisible(false)];
35 |
36 | [assembly:CLSCompliantAttribute(true)];
37 |
38 | [assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];
39 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/unity3d/FlareLayer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 |
6 | using SB3Utility;
7 |
8 | namespace UnityPlugin
9 | {
10 | class FlareLayer : Component, LinkedByGameObject, StoresReferences
11 | {
12 | public AssetCabinet file { get; set; }
13 | public int pathID { get; set; }
14 | public UnityClassID classID1 { get; set; }
15 | public UnityClassID classID2 { get; set; }
16 |
17 | public PPtr m_GameObject { get; set; }
18 | public byte m_Enabled { get; set; }
19 |
20 | public FlareLayer(AssetCabinet file, int pathID, UnityClassID classID1, UnityClassID classID2)
21 | {
22 | this.file = file;
23 | this.pathID = pathID;
24 | this.classID1 = classID1;
25 | this.classID2 = classID2;
26 | }
27 |
28 | public FlareLayer(AssetCabinet file) :
29 | this(file, 0, UnityClassID.FlareLayer, UnityClassID.FlareLayer)
30 | {
31 | file.ReplaceSubfile(-1, this, null);
32 | }
33 |
34 | public void LoadFrom(Stream stream)
35 | {
36 | BinaryReader reader = new BinaryReader(stream);
37 | m_GameObject = new PPtr(stream, file);
38 | m_Enabled = reader.ReadByte();
39 | stream.Position += 3;
40 | }
41 |
42 | public void WriteTo(Stream stream)
43 | {
44 | BinaryWriter writer = new BinaryWriter(stream);
45 | m_GameObject.WriteTo(stream);
46 | writer.Write(m_Enabled);
47 | stream.Position += 3;
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/unity3d/AudioListener.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 |
6 | using SB3Utility;
7 |
8 | namespace UnityPlugin
9 | {
10 | class AudioListener : Component, LinkedByGameObject, StoresReferences
11 | {
12 | public AssetCabinet file { get; set; }
13 | public int pathID { get; set; }
14 | public UnityClassID classID1 { get; set; }
15 | public UnityClassID classID2 { get; set; }
16 |
17 | public PPtr m_GameObject { get; set; }
18 | public byte m_Enabled { get; set; }
19 |
20 | public AudioListener(AssetCabinet file, int pathID, UnityClassID classID1, UnityClassID classID2)
21 | {
22 | this.file = file;
23 | this.pathID = pathID;
24 | this.classID1 = classID1;
25 | this.classID2 = classID2;
26 | }
27 |
28 | public AudioListener(AssetCabinet file) :
29 | this(file, 0, UnityClassID.AudioListener, UnityClassID.AudioListener)
30 | {
31 | file.ReplaceSubfile(-1, this, null);
32 | }
33 |
34 | public void LoadFrom(Stream stream)
35 | {
36 | BinaryReader reader = new BinaryReader(stream);
37 | m_GameObject = new PPtr(stream, file);
38 | m_Enabled = reader.ReadByte();
39 | stream.Position += 3;
40 | }
41 |
42 | public void WriteTo(Stream stream)
43 | {
44 | BinaryWriter writer = new BinaryWriter(stream);
45 | m_GameObject.WriteTo(stream);
46 | writer.Write(m_Enabled);
47 | stream.Position += 3;
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/pp/FormXXSnapBorders.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Windows.Forms;
4 |
5 | namespace SB3Utility
6 | {
7 | public partial class FormXXSnapBorders : Form
8 | {
9 | private SizeF startSize;
10 |
11 | public FormXXSnapBorders(string targetSubmeshes)
12 | {
13 | InitializeComponent();
14 | Text += targetSubmeshes;
15 | startSize = new SizeF(Width, Height);
16 | this.SaveDesignSizes();
17 | }
18 |
19 | private void FormXXDragDrop_Shown(object sender, EventArgs e)
20 | {
21 | Size dialogSize = (Size)Gui.Config["DialogXXSnapBordersSize"];
22 | if (dialogSize.Width != 0 && dialogSize.Height != 0)
23 | {
24 | Width = dialogSize.Width;
25 | Height = dialogSize.Height;
26 | this.ResizeControls(startSize);
27 | }
28 | else
29 | {
30 | Width = (int)startSize.Width;
31 | Height = (int)startSize.Height;
32 | this.ResetControls();
33 | }
34 | }
35 |
36 | private void FormXXDragDrop_Resize(object sender, EventArgs e)
37 | {
38 | this.ResizeControls(startSize);
39 | }
40 |
41 | private void FormXXDragDrop_VisibleChanged(object sender, EventArgs e)
42 | {
43 | if (!Visible)
44 | {
45 | if (Width < (int)startSize.Width || Height < (int)startSize.Height)
46 | {
47 | Gui.Config["DialogXXSnapBordersSize"] = new Size(0, 0);
48 | }
49 | else
50 | {
51 | Gui.Config["DialogXXSnapBordersSize"] = this.Size;
52 | }
53 | }
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/pp/FormXXNormals.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace SB3Utility
10 | {
11 | public partial class FormXXNormals : Form
12 | {
13 | private SizeF startSize;
14 |
15 | public FormXXNormals()
16 | {
17 | InitializeComponent();
18 | startSize = new SizeF(Width, Height);
19 | this.SaveDesignSizes();
20 | }
21 |
22 | private void FormXXDragDrop_Shown(object sender, EventArgs e)
23 | {
24 | Size dialogSize = (Size)Gui.Config["DialogXXNormalsSize"];
25 | if (dialogSize.Width != 0 && dialogSize.Height != 0)
26 | {
27 | Width = dialogSize.Width;
28 | Height = dialogSize.Height;
29 | this.ResizeControls(startSize);
30 | }
31 | else
32 | {
33 | Width = (int)startSize.Width;
34 | Height = (int)startSize.Height;
35 | this.ResetControls();
36 | }
37 | }
38 |
39 | private void FormXXDragDrop_Resize(object sender, EventArgs e)
40 | {
41 | this.ResizeControls(startSize);
42 | }
43 |
44 | private void FormXXDragDrop_VisibleChanged(object sender, EventArgs e)
45 | {
46 | if (!Visible)
47 | {
48 | if (Width < (int)startSize.Width || Height < (int)startSize.Height)
49 | {
50 | Gui.Config["DialogXXNormalsSize"] = new Size(0, 0);
51 | }
52 | else
53 | {
54 | Gui.Config["DialogXXNormalsSize"] = this.Size;
55 | }
56 | }
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/ODFPlugin/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | False
12 |
13 |
14 | False
15 |
16 |
17 | True
18 |
19 |
20 | False
21 |
22 |
23 | False
24 |
25 |
26 | FBX 2014.1
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/SB3Utility/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SB3Utility")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SB3Utility")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("79b75d94-dcd9-429e-96a4-879ba903ac8f")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ODFPlugin/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ODFPlugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("ODFPlugin")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("78145566-8dc6-4cbe-aa43-6ac4df17e553")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.*")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPP/WakeariStream.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.IO;
5 | using System.Security.Cryptography;
6 |
7 | namespace SB3Utility
8 | {
9 | public class WakeariStream : CryptoStream
10 | {
11 | private int lastOffset = 0;
12 |
13 | public byte[] LastBytes { get; protected set; }
14 |
15 | public WakeariStream(Stream stream, ICryptoTransform transform, CryptoStreamMode mode)
16 | : base(stream, transform, mode)
17 | {
18 | LastBytes = new byte[20];
19 | }
20 |
21 | public override void Write(byte[] buffer, int offset, int count)
22 | {
23 | if (count >= 20)
24 | {
25 | Array.Copy(buffer, offset + count - 20, LastBytes, 0, 20);
26 | lastOffset = 20;
27 | }
28 | else
29 | {
30 | int total = lastOffset + count;
31 | if (total > 20)
32 | {
33 | int shift = total - 20;
34 | int copy = 20 - count;
35 | for (int i = 0; i < copy; i++)
36 | {
37 | LastBytes[i] = LastBytes[shift + i];
38 | }
39 |
40 | for (int i = count; i < count; i++)
41 | {
42 | LastBytes[i + copy] = buffer[offset + i];
43 | }
44 | lastOffset = 20;
45 | }
46 | else
47 | {
48 | for (int i = 0; i < count; i++)
49 | {
50 | LastBytes[i + lastOffset] = buffer[offset + i];
51 | }
52 | lastOffset += count;
53 | }
54 | }
55 |
56 | base.Write(buffer, offset, count);
57 | }
58 |
59 | public override void Close()
60 | {
61 | LastBytes = null;
62 | base.Close();
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/Plugins/UnityPlugin/FormNormalsAndTangents.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace SB3Utility
10 | {
11 | public partial class FormNormalsAndTangents : Form
12 | {
13 | private SizeF startSize;
14 |
15 | public FormNormalsAndTangents()
16 | {
17 | InitializeComponent();
18 | startSize = new SizeF(Width, Height);
19 | this.SaveDesignSizes();
20 | }
21 |
22 | private void FormNormalsAndTagents_Shown(object sender, EventArgs e)
23 | {
24 | Size dialogSize = (Size)Gui.Config["DialogXXNormalsSize"];
25 | if (dialogSize.Width != 0 && dialogSize.Height != 0)
26 | {
27 | Width = dialogSize.Width;
28 | Height = dialogSize.Height;
29 | this.ResizeControls(startSize);
30 | }
31 | else
32 | {
33 | Width = (int)startSize.Width;
34 | Height = (int)startSize.Height;
35 | this.ResetControls();
36 | }
37 | }
38 |
39 | private void FormNormalsAndTagents_Resize(object sender, EventArgs e)
40 | {
41 | this.ResizeControls(startSize);
42 | }
43 |
44 | private void FormNormalsAndTagents_VisibleChanged(object sender, EventArgs e)
45 | {
46 | if (!Visible)
47 | {
48 | if (Width < (int)startSize.Width || Height < (int)startSize.Height)
49 | {
50 | Gui.Config["DialogXXNormalsSize"] = new Size(0, 0);
51 | }
52 | else
53 | {
54 | Gui.Config["DialogXXNormalsSize"] = this.Size;
55 | }
56 | }
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/SB3UtilityGUI/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SB3UtilityGUI")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SB3UtilityGUI")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("db3d30f5-7de6-44df-98a9-5f687f258d76")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ODFBase/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ODFStructure")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("ODFStructure")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("704a0d4f-c672-423c-becf-391bb86131ea")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.*")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPP/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SB3UtilityPP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SB3UtilityPP")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("51277abf-8d1b-4a71-8f03-fec314a4c16d")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/SB3UtilityScript/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SB3UtilityScript")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SB3UtilityScript")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("cd0140d9-c497-4069-8f91-708d940a1f69")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/AiDroidBase/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("AiDroidBase")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("AiDroidBase")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("45dddcc4-9832-4b61-8c9a-304dab72be88")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.*")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Plugins/NIFPlugin/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("NIFPlugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("NIFPlugin")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("adfbfbb5-8ae1-4160-bbcf-c032a345c8db")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("UnityBase")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("UnityBase")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("f0db7c7d-f5e1-4ff3-b23e-7c09c374bbfd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/AiDroidPlugin/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("AiDroidPlugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("AiDroidPlugin")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("f0a1e2da-aa04-47de-9acf-3166d466a9b8")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.*")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SB3UtilityPlugins")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SB3UtilityPlugins")]
13 | [assembly: AssemblyCopyright("Copyright © 2012")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("e6b0366f-883c-4b2d-8141-172400e7970c")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Plugins/UnityPlugin/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("UnityPlugin")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("UnityPlugin")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("85f101b3-5f54-48a2-969d-0053a7f7379b")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/PPD_Preview_Clothes/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("PPD_Preview_Clothes")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("PPD_Preview_Clothes")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2013")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("68108e21-5b00-41dd-a766-d3f1ab93fc3b")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.*")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/NotLoaded.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | using SB3Utility;
6 |
7 | namespace UnityPlugin
8 | {
9 | public class NotLoaded : NeedsSourceStreamForWriting, Component
10 | {
11 | public uint offset;
12 | public uint size;
13 |
14 | public AssetCabinet file { get; set; }
15 | public int pathID
16 | {
17 | get { return replacement != null ? replacement.pathID : _pathID; }
18 | set { _pathID = value; }
19 | }
20 | private int _pathID { get; set; }
21 | public UnityClassID classID1 { get; set; }
22 | public UnityClassID classID2 { get; set; }
23 | public Component replacement { get; set; }
24 |
25 | public string Name { get; set; }
26 |
27 | public NotLoaded(AssetCabinet file, int pathID, UnityClassID classID1, UnityClassID classID2)
28 | {
29 | this.file = file;
30 | this.pathID = pathID;
31 | this.classID1 = classID1;
32 | this.classID2 = classID2;
33 | }
34 |
35 | public Stream SourceStream { get; set; }
36 |
37 | public void LoadFrom(Stream stream)
38 | {
39 | throw new NotImplementedException();
40 | }
41 |
42 | public void WriteTo(Stream stream)
43 | {
44 | BinaryWriter writer = new BinaryWriter(stream);
45 | BinaryReader reader = new BinaryReader(SourceStream);
46 | SourceStream.Position = offset;
47 | for (uint count = 0; count < size; )
48 | {
49 | uint len = count + Utility.BufSize > size ? size - count : Utility.BufSize;
50 | byte[] buf = reader.ReadBytes(len);
51 | writer.Write(buf);
52 | count += len;
53 | }
54 | }
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/unity3d/MeshFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Text;
5 |
6 | namespace UnityPlugin
7 | {
8 | public class MeshFilter : Component, LinkedByGameObject, StoresReferences
9 | {
10 | public AssetCabinet file { get; set; }
11 | public int pathID { get; set; }
12 | public UnityClassID classID1 { get; set; }
13 | public UnityClassID classID2 { get; set; }
14 |
15 | public PPtr m_GameObject { get; set; }
16 | public PPtr m_Mesh { get; set; }
17 |
18 | public MeshFilter(AssetCabinet file, int pathID, UnityClassID classID1, UnityClassID classID2)
19 | {
20 | this.file = file;
21 | this.pathID = pathID;
22 | this.classID1 = classID1;
23 | this.classID2 = classID2;
24 | }
25 |
26 | public MeshFilter(AssetCabinet file) :
27 | this(file, 0, UnityClassID.MeshFilter, UnityClassID.MeshFilter)
28 | {
29 | file.ReplaceSubfile(-1, this, null);
30 | }
31 |
32 | public void LoadFrom(Stream stream)
33 | {
34 | m_GameObject = new PPtr(stream, file);
35 | m_Mesh = new PPtr(stream, file);
36 | }
37 |
38 | public void WriteTo(Stream stream)
39 | {
40 | m_GameObject.WriteTo(stream);
41 | m_Mesh.WriteTo(stream);
42 | }
43 |
44 | public MeshFilter Clone(AssetCabinet file)
45 | {
46 | file.MergeTypeDefinition(this.file, UnityClassID.MeshFilter);
47 |
48 | MeshFilter filter = new MeshFilter(file);
49 | filter.m_Mesh = new PPtr(m_Mesh.instance != null ? m_Mesh.instance.Clone(file) : null);
50 | return filter;
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/pp/ToolOutput.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 |
3 | namespace SB3Utility
4 | {
5 | public class ToolOutputParser : IWriteFile
6 | {
7 | public byte[] contents;
8 | public bool readFromOtherParser;
9 |
10 | public ToolOutputParser(Stream stream, string name)
11 | : this(stream)
12 | {
13 | this.Name = name;
14 | }
15 |
16 | public ToolOutputParser(Stream stream)
17 | {
18 | using (BinaryReader reader = new BinaryReader(stream))
19 | {
20 | contents = reader.ReadToEnd();
21 | }
22 | }
23 |
24 | public string Name { get; set; }
25 |
26 | public void WriteTo(Stream stream)
27 | {
28 | BinaryWriter writer = new BinaryWriter(stream);
29 | writer.Write(contents);
30 | }
31 | }
32 |
33 | public static partial class Plugins
34 | {
35 | [Plugin]
36 | public static ToolOutputParser OpenToolOutput([DefaultVar]ppParser parser, string name)
37 | {
38 | for (int i = 0; i < parser.Subfiles.Count; i++)
39 | {
40 | if (parser.Subfiles[i].Name == name)
41 | {
42 | IReadFile subfile = parser.Subfiles[i] as IReadFile;
43 | if (subfile != null)
44 | {
45 | return new ToolOutputParser(subfile.CreateReadStream(), subfile.Name);
46 | }
47 | IWriteFile writeFile = parser.Subfiles[i] as IWriteFile;
48 | if (writeFile != null)
49 | {
50 | using (MemoryStream memStream = new MemoryStream())
51 | {
52 | writeFile.WriteTo(memStream);
53 | memStream.Position = 0;
54 | ToolOutputParser outParser = new ToolOutputParser(memStream, writeFile.Name);
55 | outParser.readFromOtherParser = true;
56 | return outParser;
57 | }
58 | }
59 | break;
60 | }
61 | }
62 | return null;
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/Plugins/UnityPlugin/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | True
7 |
8 |
9 | .unit-y3d
10 |
11 |
12 | .asse-ts
13 |
14 |
15 | .none
16 |
17 |
18 | 0, 0
19 |
20 |
21 | .\StringToHash\ArgToHash.exe
22 |
23 |
24 | -nolog -batchmode -nographics -server
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Plugins/UnityPlugin/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | True
12 |
13 |
14 | .unit-y3d
15 |
16 |
17 | .asse-ts
18 |
19 |
20 | .none
21 |
22 |
23 | 0, 0
24 |
25 |
26 | .\StringToHash\ArgToHash.exe
27 |
28 |
29 | -nolog -batchmode -nographics -server
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Plugins/SyntaxHighlightingTextBox/Win32.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime;
3 | using System.Runtime.InteropServices;
4 |
5 | using HWND = System.IntPtr;
6 |
7 | namespace UrielGuy.SyntaxHighlightingTextBox
8 | {
9 | ///
10 | /// Summary description for Win32.
11 | ///
12 | public class Win32
13 | {
14 | private Win32()
15 | {
16 | }
17 |
18 | public const int WM_USER = 0x400;
19 | public const int WM_PAINT = 0xF;
20 | public const int WM_KEYDOWN = 0x100;
21 | public const int WM_KEYUP = 0x101;
22 | public const int WM_CHAR = 0x102;
23 |
24 | public const int EM_GETSCROLLPOS = (WM_USER + 221);
25 | public const int EM_SETSCROLLPOS = (WM_USER + 222);
26 |
27 | public const int VK_BACK = 0x08;
28 | public const int VK_TAB = 0x09;
29 |
30 | public const int VK_SHIFT = 0x10;
31 | public const int VK_CONTROL = 0x11;
32 | public const int VK_MENU = 0x12;
33 | public const int VK_LEFT = 0x25;
34 | public const int VK_UP = 0x26;
35 | public const int VK_RIGHT = 0x27;
36 | public const int VK_DOWN = 0x28;
37 | public const int VK_DELETE = 0x2E;
38 | public const int VK_NUMLOCK = 0x90;
39 |
40 | public const short KS_ON = 0x01;
41 | public const short KS_KEYDOWN = 0x80;
42 |
43 | [StructLayout(LayoutKind.Sequential)]
44 | public struct POINT
45 | {
46 | public int x;
47 | public int y;
48 | }
49 |
50 | [DllImport("user32")] public static extern int SendMessage(HWND hwnd, int wMsg, int wParam, IntPtr lParam);
51 | [DllImport("user32")] public static extern int PostMessage(HWND hwnd, int wMsg, int wParam, int lParam);
52 | [DllImport("user32")] public static extern short GetKeyState(int nVirtKey);
53 | [DllImport("user32")] public static extern int LockWindowUpdate(HWND hwnd);
54 |
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Plugins/SB3UtilityPlugins/pp/FormXXConvert.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Text;
7 | using System.Windows.Forms;
8 |
9 | namespace SB3Utility
10 | {
11 | public partial class FormXXConvert : Form
12 | {
13 | public int Format { get; protected set; }
14 |
15 | private SizeF startSize;
16 |
17 | public FormXXConvert(int format)
18 | {
19 | InitializeComponent();
20 | startSize = new SizeF(Width, Height);
21 | this.SaveDesignSizes();
22 |
23 | Format = format;
24 | numericUpDown1.Value = format;
25 | numericUpDown1.ValueChanged += new EventHandler(numericUpDown1_ValueChanged);
26 | }
27 |
28 | private void numericUpDown1_ValueChanged(object sender, EventArgs e)
29 | {
30 | Format = Decimal.ToInt32(numericUpDown1.Value);
31 | }
32 |
33 | private void FormXXConvert_Shown(object sender, EventArgs e)
34 | {
35 | Size dialogSize = (Size)Gui.Config["DialogXXConvertSize"];
36 | if (dialogSize.Width != 0 && dialogSize.Height != 0)
37 | {
38 | Width = dialogSize.Width;
39 | Height = dialogSize.Height;
40 | this.ResizeControls(startSize);
41 | }
42 | else
43 | {
44 | Width = (int)startSize.Width;
45 | Height = (int)startSize.Height;
46 | this.ResetControls();
47 | }
48 | }
49 |
50 | private void FormXXConvert_Resize(object sender, EventArgs e)
51 | {
52 | this.ResizeControls(startSize);
53 | }
54 |
55 | private void FormXXConvert_VisibleChanged(object sender, EventArgs e)
56 | {
57 | if (!Visible)
58 | {
59 | if (Width < (int)startSize.Width || Height < (int)startSize.Height)
60 | {
61 | Gui.Config["DialogXXConvertSize"] = new Size(0, 0);
62 | }
63 | else
64 | {
65 | Gui.Config["DialogXXConvertSize"] = this.Size;
66 | }
67 | }
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/Plugins/SyntaxHighlightingTextBox/SyntaxHighlightingTextBox.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | text/microsoft-resx
32 |
33 |
34 | 1.0.0.0
35 |
36 |
37 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
38 |
39 |
40 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
41 |
42 |
43 |
--------------------------------------------------------------------------------
/Plugins/UnityBase/unity3d/MultiLink.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 |
5 | using SB3Utility;
6 |
7 | namespace UnityPlugin
8 | {
9 | public class MultiLink : Component, StoresReferences
10 | {
11 | public AssetCabinet file { get; set; }
12 | public int pathID { get; set; }
13 | public UnityClassID classID1 { get; set; }
14 | public UnityClassID classID2 { get; set; }
15 |
16 | public PPtr m_GameObject { get; set; }
17 | public float[] Unknown1 { get; set; }
18 | public List> Links { get; set; }
19 | public float[] Unknown2 { get; set; }
20 |
21 | public MultiLink(AssetCabinet file, int pathID, UnityClassID classID1, UnityClassID classID2)
22 | {
23 | this.file = file;
24 | this.pathID = pathID;
25 | this.classID1 = classID1;
26 | this.classID2 = classID2;
27 | }
28 |
29 | public MultiLink(AssetCabinet file) :
30 | this(file, 0, UnityClassID.MultiLink, UnityClassID.MultiLink)
31 | {
32 | file.ReplaceSubfile(-1, this, null);
33 | }
34 |
35 | public void LoadFrom(Stream stream)
36 | {
37 | BinaryReader reader = new BinaryReader(stream);
38 | long pos = stream.Position;
39 | m_GameObject = new PPtr(stream, file);
40 | Unknown1 = reader.ReadSingleArray(10);
41 |
42 | int numLinks = 1 + reader.ReadInt32();
43 | Links = new List>(numLinks);
44 | for (int i = 0; i < numLinks; i++)
45 | {
46 | Links.Add(new PPtr