mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-16 01:37:55 +00:00
Load materials
This commit is contained in:
parent
880e48f35d
commit
b897c22732
5 changed files with 11 additions and 2 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -87,11 +87,11 @@ namespace FirstPlugin
|
|||
public void LoadEditors(TreeNode Wrapper, Action OnPropertyChanged)
|
||||
{
|
||||
if (Wrapper is MTOBWrapper) {
|
||||
LoadPropertyGrid(Wrapper, OnPropertyChanged);
|
||||
LoadPropertyGrid(((MTOBWrapper)Wrapper).Material, OnPropertyChanged);
|
||||
}
|
||||
|
||||
if (Wrapper is CMDLWrapper) {
|
||||
LoadPropertyGrid(Wrapper, OnPropertyChanged);
|
||||
LoadPropertyGrid(((CMDLWrapper)Wrapper).Model, OnPropertyChanged);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,15 @@ namespace FirstPlugin
|
|||
{
|
||||
Model = model;
|
||||
Text = model.Name;
|
||||
|
||||
var MaterialFolder = new TreeNode();
|
||||
Nodes.Add(MaterialFolder);
|
||||
foreach (var material in model.Materials.Values)
|
||||
{
|
||||
var matWrapper = new MTOBWrapper();
|
||||
matWrapper.Load(material);
|
||||
MaterialFolder.Nodes.Add(matWrapper);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue