private void addMaterial(Material m) { var mi = new MaterialItem(); mi.MaterialName = m.Name; mi.Material = m; if (m.Texture != null) { mi.SetThumbnail(m.Texture.GetThumbnail()); } flpMaterials.Controls.Add(mi); }
private void SetTexture(Texture t) { txtTexture.Text = t.Name; pbPreview.Image = t.GetThumbnail(); mi.SetThumbnail((Bitmap)pbPreview.Image); }