private MaterialCollection CreateMaterialCollection(string name, Dictionary <string, RMaterial> materialByName, Matl matl) { var collection = new MaterialCollection(name); for (int i = 0; i < matl.Entries.Length; i++) { // Pass a reference to the render material to enable real time updates. materialByName.TryGetValue(matl.Entries[i].MaterialLabel, out RMaterial? rMaterial); var material = CreateMaterial(matl.Entries[i], i, rMaterial); collection.Materials.Add(material); } return(collection); }
public MaterialSaveEventArgs(MaterialCollection materialCollection, string filePath) { MaterialCollection = materialCollection; FilePath = filePath; }