diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-29 01:34:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-29 01:35:04 +0400 |
commit | a91c4ac99fd4d766834a42ace4a670dfa824813b (patch) | |
tree | a14c2bd9e7d6b5d792b3db7e72f5bd0147ff1745 /source/blender/editors/animation/keyframing.c | |
parent | 5d51de3bea3ae500446587ebfc53c297afdbed82 (diff) |
Ignore user-preferences when inserting keys from Python
Diffstat (limited to 'source/blender/editors/animation/keyframing.c')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 9008d330c21..8a02aed15bc 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -396,11 +396,18 @@ int insert_vert_fcurve(FCurve *fcu, float x, float y, short flag) beztr.vec[2][0] = x + 1.0f; beztr.vec[2][1] = y; beztr.f1 = beztr.f2 = beztr.f3 = SELECT; - beztr.h1 = beztr.h2 = U.keyhandles_new; /* use default handle type here */ - //BEZKEYTYPE(&beztr)= scene->keytype; /* default keyframe type */ - /* use default interpolation mode, with exceptions for int/discrete values */ - beztr.ipo = U.ipo_new; + if (flag & INSERTKEY_NO_USERPREF) { + beztr.h1 = beztr.h2 = HD_AUTO_ANIM; + beztr.ipo = BEZT_IPO_BEZ; + } + else { + beztr.h1 = beztr.h2 = U.keyhandles_new; /* use default handle type here */ + //BEZKEYTYPE(&beztr)= scene->keytype; /* default keyframe type */ + + /* use default interpolation mode, with exceptions for int/discrete values */ + beztr.ipo = U.ipo_new; + } if (fcu->flag & FCURVE_DISCRETE_VALUES) beztr.ipo = BEZT_IPO_CONST; |