Load materials
This commit is contained in:
parent
880e48f35d
commit
b897c22732
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 New Issue
Block a user