mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-27 06:50:23 +00:00
More fixes
This commit is contained in:
parent
f48529590c
commit
d4419ec67a
7 changed files with 17 additions and 8 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -75,10 +75,10 @@ namespace FirstPlugin
|
|||
switch (Folder.Type)
|
||||
{
|
||||
case BCRESGroupType.Models:
|
||||
Folder.AddNode(new CMDLWrapper((Model)section) { BcresParent = this } );
|
||||
Folder.AddNode(new CMDLWrapper((Model)section, this));
|
||||
break;
|
||||
case BCRESGroupType.Textures:
|
||||
Folder.AddNode(new TXOBWrapper((Texture)section) { BcresParent = this });
|
||||
Folder.AddNode(new TXOBWrapper((Texture)section, this));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,8 +20,12 @@ namespace FirstPlugin
|
|||
ImageKey = "Model";
|
||||
SelectedImageKey = "Model";
|
||||
}
|
||||
public CMDLWrapper(Model model) : base() { LoadModel(model); }
|
||||
|
||||
public CMDLWrapper(Model model, BCRES bcres) : base()
|
||||
{
|
||||
BcresParent = bcres;
|
||||
LoadModel(model, bcres);
|
||||
}
|
||||
|
||||
public override void OnClick(TreeView treeview) {
|
||||
BcresParent.LoadEditors(this, OnPropertyChanged);
|
||||
|
@ -32,18 +36,19 @@ namespace FirstPlugin
|
|||
|
||||
}
|
||||
|
||||
public void LoadModel(Model model)
|
||||
public void LoadModel(Model model, BCRES bcres)
|
||||
{
|
||||
BcresParent = bcres;
|
||||
|
||||
Model = model;
|
||||
Text = model.Name;
|
||||
|
||||
var MaterialFolder = new TreeNode();
|
||||
var MaterialFolder = new TreeNode("Materials");
|
||||
Nodes.Add(MaterialFolder);
|
||||
foreach (var material in model.Materials.Values)
|
||||
{
|
||||
var matWrapper = new MTOBWrapper();
|
||||
var matWrapper = new MTOBWrapper() { BcresParent = bcres };
|
||||
matWrapper.Load(material);
|
||||
matWrapper.BcresParent = BcresParent;
|
||||
MaterialFolder.Nodes.Add(matWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,11 @@ namespace FirstPlugin
|
|||
ImageKey = "Texture";
|
||||
SelectedImageKey = "Texture";
|
||||
}
|
||||
public TXOBWrapper(Texture texture) : base() { LoadTexture(texture); }
|
||||
public TXOBWrapper(Texture texture, BCRES bcres) : base()
|
||||
{
|
||||
BcresParent = bcres;
|
||||
LoadTexture(texture);
|
||||
}
|
||||
|
||||
|
||||
public override TEX_FORMAT[] SupportedFormats
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue