Beispiel #1
0
        public override void SaveKeyFrames()
        {
            FKeyTime.SliceCount    = FKeyFrames.Count;
            FKeyValue.SliceCount   = FKeyFrames.Count;
            FKeyInType.SliceCount  = FKeyFrames.Count;
            FKeyOutType.SliceCount = FKeyFrames.Count;

            FKeyFrames.Sort(delegate(TLBaseKeyFrame k0, TLBaseKeyFrame k1) { return(k0.Time.CompareTo(k1.Time)); });

            for (int i = 0; i < FKeyFrames.Count; i++)
            {
                FKeyTime.SetValue(i, FKeyFrames[i].Time);
                FKeyValue.SetValue(i, (FKeyFrames[i] as TLValueKeyFrame).Value);
                FKeyInType.SetValue(i, (int)(FKeyFrames[i] as TLValueKeyFrame).InType);
                FKeyOutType.SetValue(i, (int)(FKeyFrames[i] as TLValueKeyFrame).OutType);
            }
        }
Beispiel #2
0
        protected override void CreatePins()
        {
            FHost.CreateValueConfig(FPin.Name + "-Time" + FSliceIndex.ToString(), 1, null, TSliceMode.Dynamic, TPinVisibility.Hidden, out FKeyTime);
            FKeyTime.SliceCount = 0;
            FKeyTime.SetSubType(double.MinValue, double.MaxValue, 0.001D, 0, false, false, false);

            FHost.CreateValueConfig(FPin.Name + "-Value" + FSliceIndex.ToString(), 1, null, TSliceMode.Dynamic, TPinVisibility.Hidden, out FKeyValue);
            FKeyValue.SliceCount = 0;
            FKeyValue.SetSubType(double.MinValue, double.MaxValue, 0.001D, 0, false, false, false);

            FHost.CreateValueConfig(FPin.Name + "-InType" + FSliceIndex.ToString(), 1, null, TSliceMode.Dynamic, TPinVisibility.Hidden, out FKeyInType);
            FKeyInType.SliceCount = 0;
            FKeyInType.SetSubType(0, 5, 1, 0, false, false, true);

            FHost.CreateValueConfig(FPin.Name + "-OutType" + FSliceIndex.ToString(), 1, null, TSliceMode.Dynamic, TPinVisibility.Hidden, out FKeyOutType);
            FKeyOutType.SliceCount = 0;
            FKeyOutType.SetSubType(0, 5, 1, 0, false, false, true);
        }
Beispiel #3
0
        public override void Configurate(IPluginConfig Input, bool FirstFrame)
        {
            //if Input = last ConfigInput created!
            if (Input == FKeyOutType && FirstFrame)
            {
                FKeyFrames.Clear();
                //System.Windows.Forms.MessageBox.Show("FKeyOutType: " + FKeyOutType.SliceCount.ToString());
                double time, val, intype, outtype;
                for (int i = 0; i < FKeyOutType.SliceCount; i++)
                {
                    FKeyTime.GetValue(i, out time);
                    FKeyValue.GetValue(i, out val);
                    FKeyInType.GetValue(i, out intype);
                    FKeyOutType.GetValue(i, out outtype);
                    AddKeyFrame(time, val, (TLInterpolationType)intype, (TLInterpolationType)outtype);
                }

                FKeyFrames.Sort(delegate(TLBaseKeyFrame k0, TLBaseKeyFrame k1) { return(k0.Time.CompareTo(k1.Time)); });
            }

            base.Configurate(Input, FirstFrame);
        }