1
0
mirror of synced 2024-11-29 09:44:32 +01:00

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