public TLValueKeyFrame(TLTransformer Transformer, double Time, double Value, double Minimum, double Maximum, TLInterpolationType InType, TLInterpolationType OutType, float SliceTop, float SliceHeight) : base(Transformer, Time, SliceTop, SliceHeight) { SetValue(Value); FInType = InType; FOutType = OutType; FMinValue = Minimum; FMaxValue = Maximum; }
private TLBaseKeyFrame AddKeyFrame(double Time, double Value, TLInterpolationType InType, TLInterpolationType OutType) { //called via configpinchanged and gui-doubleclick float sliceheight = FPin.Height / FPin.SliceCount; float slicetop = FPin.Top + FSliceIndex * sliceheight; TLValueKeyFrame k = new TLValueKeyFrame(FPin.Transformer, Time, Value, FMinValue, FMaxValue, InType, OutType, slicetop, sliceheight); FKeyFrames.Add(k); return(k); }
public void SetKeyFrameTypes(TLInterpolationType InType, TLInterpolationType OutType) { FCurrentInType = InType; FCurrentOutType = OutType; foreach (TLValueKeyFrame k in KeyFrames) { if (k.Selected) { k.InType = InType; k.OutType = OutType; } } }
public TLValuePin(IPluginHost Host, TLTransformer Transformer, int Order, XmlNode PinSettings) : base(Host, Transformer, Order, PinSettings, true, true) { InitializeComponent(); //only load slices after all super constructors have been executed: XmlAttribute attr = PinSettings.Attributes.GetNamedItem("SliceCount") as XmlAttribute; LoadSlices(int.Parse(attr.Value)); try { attr = PinSettings.Attributes.GetNamedItem("InterpolationIn") as XmlAttribute; FInterpolationIN = (TLInterpolationType)Enum.Parse(typeof(TLInterpolationType), attr.Value); } catch { FInterpolationIN = TLInterpolationType.Cubic; } try { attr = PinSettings.Attributes.GetNamedItem("Minimum") as XmlAttribute; MinIO.Value = double.Parse(attr.Value, TimelinerPlugin.GNumberFormat); } catch { MinIO.Value = -1; } try { attr = PinSettings.Attributes.GetNamedItem("Maximum") as XmlAttribute; MaxIO.Value = double.Parse(attr.Value, TimelinerPlugin.GNumberFormat); } catch { MaxIO.Value = 1; } MinIO.Minimum = MaxIO.Minimum = double.MinValue; MinIO.Maximum = MaxIO.Maximum = double.MaxValue; }
private void RadioButtonClick(object sender, EventArgs e) { if (sender == StepRadio) { FInterpolationIN = TLInterpolationType.Step; } else if (sender == LinearRadio) { FInterpolationIN = TLInterpolationType.Linear; } else if (sender == CubicRadio) { FInterpolationIN = TLInterpolationType.Cubic; } UpdateInterpolationInState(); SaveKeyFrames(); UpdateView(); PinChanged(); }