Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public MaterialSaveEventArgs(MaterialCollection materialCollection, string filePath)
 {
     MaterialCollection = materialCollection;
     FilePath           = filePath;
 }