private void CreateMaterialButtons() { var i = 0; MaterialWidget materialWidget; while ((materialWidget = MaterialWidget.Create(this, i)) != null) { if (!_editor.Materials.HasMaterial(i)) { i++; continue; } _materialWidgets.Add(materialWidget); i++; } }
private void RefreshMaterialButtons() { var i = 0; MaterialWidget materialWidget; while ((materialWidget = MaterialWidget.Create(this, i)) != null) { if (!_editor.Materials.HasMaterial(i)) { i++; continue; } materialWidget.SetMaterial(_editor.Materials[i]); i++; } }