Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new command to select the given keys. You can pass null to deselect all.
        /// </summary>
        public ChangeTangentCommand(CurveEditorControl2 control, long keyId, TangentSelectionMode selectedTangent)
            : base(control)
        {
            // Store the parameters.
            this.selectedTangent = selectedTangent;
            this.affectedKey = keyId;

            KeyWrapper key = control.Keys[keyId];

            prevTangentInValue = key.Key.TangentIn;
            prevTangentOutValue = key.Key.TangentOut;
            prevTangentInMode = key.TangentInMode;
            prevTangentOutMode = key.TangentOutMode;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new command to select the given keys. You can pass null to deselect all.
        /// </summary>
        public ChangeTangentCommand(CurveEditorControl2 control, long keyId, TangentSelectionMode selectedTangent)
            : base(control)
        {
            // Store the parameters.
            this.selectedTangent = selectedTangent;
            this.affectedKey     = keyId;

            KeyWrapper key = control.Keys[keyId];

            prevTangentInValue  = key.Key.TangentIn;
            prevTangentOutValue = key.Key.TangentOut;
            prevTangentInMode   = key.TangentInMode;
            prevTangentOutMode  = key.TangentOutMode;
        }