예제 #1
0
 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;
 }
예제 #2
0
        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);
        }
예제 #3
0
        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;
                }
            }
        }
예제 #4
0
        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;
        }
예제 #5
0
        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();
        }