public UIPositionModifierWindow(EffectPositionModifier mod, bool show) : base(mod, show) { posMod = mod; xCurveFunction = UpdateXCurve; yCurveFunction = UpdateYCurve; zCurveFunction = UpdateZCurve; GenerateCurveThumbs(mod); }
public UIPositionModifierWindow(EffectPositionModifier mod, bool show) : base((EffectModifier)mod, show) { posMod = mod; xCurveFunction = new CurveUpdateFunction(UpdateXCurve); yCurveFunction = new CurveUpdateFunction(UpdateYCurve); zCurveFunction = new CurveUpdateFunction(UpdateZCurve); GenerateCurveThumbs(mod); }
EffectModifier CreateNewModifier() { if (modifierTypes[modifierFlag] == "Position") { EffectPositionModifier newMod = new EffectPositionModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else if (modifierTypes[modifierFlag] == "Rotation") { EffectRotationModifier newMod = new EffectRotationModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else if (modifierTypes[modifierFlag] == "Scale") { EffectScaleModifier newMod = new EffectScaleModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else if (modifierTypes[modifierFlag] == "UV Scroll") { EffectUVScrollModifier newMod = new EffectUVScrollModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else if (modifierTypes[modifierFlag] == "Material Color") { EffectColorModifier newMod = new EffectColorModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else if (modifierTypes[modifierFlag] == "Material Float") { EffectFloatModifier newMod = new EffectFloatModifier(); newMod.fxName = newModifierName; newMod.transformName = transformOptions[transformFlag]; newMod.controllerName = controllerTypes[controllerFlag]; return(newMod); } else { return(null); } }
protected void GenerateCurveThumbs(EffectPositionModifier posMod) { miniXCurve = GraphUtils.GenerateCurveTexture(texWidth, texHeight, posMod.xCurve, Color.red); miniYCurve = GraphUtils.GenerateCurveTexture(texWidth, texHeight, posMod.yCurve, Color.blue); miniZCurve = GraphUtils.GenerateCurveTexture(texWidth, texHeight, posMod.zCurve, Color.green); }
public void OpenModifierEditWindow(EffectModifier fxMod) { foreach (UIModifierWindow editWin in editWindows.ToList()) { editWindows.Remove(editWin); } try { EffectColorModifier colMod = (EffectColorModifier)fxMod; if (colMod != null) { editWindows.Add(new UIColorModifierWindow(colMod, true)); } } catch (InvalidCastException e) { } try { EffectScaleModifier scaleMod = (EffectScaleModifier)fxMod; if (scaleMod != null) { editWindows.Add(new UIScaleModifierWindow(scaleMod, true)); } } catch (InvalidCastException e) { } try { EffectUVScrollModifier scrollMod = (EffectUVScrollModifier)fxMod; if (scrollMod != null) { editWindows.Add(new UIUVScrollModifierWindow(scrollMod, true)); } } catch (InvalidCastException e) { } try { EffectFloatModifier floatMod = (EffectFloatModifier)fxMod; if (floatMod != null) { editWindows.Add(new UIFloatModifierWindow(floatMod, true)); } } catch (InvalidCastException e) { } try { EffectPositionModifier posMod = (EffectPositionModifier)fxMod; if (posMod != null) { editWindows.Add(new UIPositionModifierWindow(posMod, true)); } } catch (InvalidCastException e) { } try { EffectRotationModifier rotMod = (EffectRotationModifier)fxMod; if (rotMod != null) { editWindows.Add(new UIRotationModifierWindow(rotMod, true)); } } catch (InvalidCastException e) { } }
public UIPositionModifierWindow(EffectPositionModifier mod, bool show) : base((EffectModifier)mod, show) { posMod = mod; GenerateCurveThumbs(mod); }