Load materials

This commit is contained in:
KillzXGaming 2019-05-09 16:08:45 -04:00
parent 880e48f35d
commit b897c22732
5 changed files with 11 additions and 2 deletions

Binary file not shown.

View file

@ -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);
}
}

View file

@ -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);
}
}
}
}