public UILightEditWindow(WaterfallModel modelToEdit, bool show) : base(show) { model = modelToEdit; Utils.Log($"[UILightEditWindow]: Started editing lights on {modelToEdit.ToString()}", LogType.UI); light = modelToEdit.lights.First(); GetLightValues(); WindowPosition = new Rect(Screen.width / 2 - 200, Screen.height / 2f, 400, 100); }
public UIMaterialEditWindow OpenMaterialEditWindow(WaterfallModel mdl) { if (materialEditWindow != null) { materialEditWindow.ChangeMaterial(mdl); } else { materialEditWindow = new UIMaterialEditWindow(mdl, true); } return(materialEditWindow); }
public UILightEditWindow OpenLightEditWindow(WaterfallModel mdl) { if (lightEditWindow != null) { lightEditWindow.ChangeLight(mdl); } else { lightEditWindow = new UILightEditWindow(mdl, true); } return(lightEditWindow); }
WaterfallEffect CreateNewEffect() { WaterfallModel model = new WaterfallModel(modelOptions[modelFlag], shaderOptions[shaderFlag]); WaterfallEffect newFX = new WaterfallEffect(parentName, model ); newFX.name = newEffectName; return(newFX); }
public UIMaterialEditWindow(WaterfallModel modelToEdit, bool show) : base(show) { model = modelToEdit; Utils.Log($"[UIMaterialEditWindow]: Started editing materials on {modelToEdit.ToString()}"); materialList = new string[model.materials.Count]; for (int i = 0; i < model.materials.Count; i++) { materialList[i] = $"{model.materials[i].transformName} ({model.materials[i].materials[0].name.Split('(').First()})"; } matl = modelToEdit.materials[materialID]; InitializeShaderProperties(matl.materials[0]); WindowPosition = new Rect(Screen.width / 2 - 200, Screen.height / 2f, 400, 100); }
public void ChangeMaterial(WaterfallModel modelToEdit) { model = modelToEdit; Utils.Log($"[UIMaterialEditWindow]: Started editing materials on {modelToEdit.ToString()}", LogType.UI); materialID = 0; materialList = new string[model.materials.Count]; for (int i = 0; i < model.materials.Count; i++) { materialList[i] = model.materials[i].materials[0].name; } matl = modelToEdit.materials[materialID]; showWindow = true; InitializeShaderProperties(matl.materials[0]); WindowPosition = new Rect(Screen.width / 2 - 200, Screen.height / 2f, 400, 100); }
public void ChangeLight(WaterfallModel modelToEdit) { model = modelToEdit; Utils.Log($"[UILightEditWindow]: Started editing lights on {modelToEdit}", LogType.UI); light = modelToEdit.lights.First(); if (colorEdit) { WaterfallUI.Instance.OpenColorEditWindow(light.color); } GetLightValues(); showWindow = true; GUI.BringWindowToFront(windowID); }
public void ChangeLight(WaterfallModel modelToEdit) { model = modelToEdit; Utils.Log($"[UILightEditWindow]: Started editing lights on {modelToEdit.ToString()}", LogType.UI); light = modelToEdit.lights.First(); if (colorEdit) { WaterfallUI.Instance.OpenColorEditWindow(light.color); } GetLightValues(); showWindow = true; WindowPosition = new Rect(Screen.width / 2 - 200, Screen.height / 2f, 400, 100); }
WaterfallEffect CreateNewEffect() { WaterfallModel model; if (shaders.Count == 0) { model = new WaterfallModel( models[modelFlag], null, randomizeSeed); } else { model = new WaterfallModel( models[modelFlag], shaders[shaderFlag], randomizeSeed); } WaterfallEffect newFX; if (WaterfallUI.Instance.selectedTemplate == null) { Utils.Log($"[UIAddEffectWindow]: Creating effect", LogType.UI); newFX = new WaterfallEffect(parentName, model ); } else { Utils.Log($"[UIAddEffectWindow]: Creating effect as part of template {WaterfallUI.Instance.selectedTemplate.templateName}", LogType.UI); newFX = new WaterfallEffect(parentName, model, WaterfallUI.Instance.selectedTemplate ); } newFX.name = newEffectName; return(newFX); }
public UIModelEditWindow(WaterfallModel modelToEdit, bool show) : base(show) { model = modelToEdit; }