Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-04-29 01:34:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-29 01:35:04 +0400
commita91c4ac99fd4d766834a42ace4a670dfa824813b (patch)
treea14c2bd9e7d6b5d792b3db7e72f5bd0147ff1745 /source/blender/editors/animation/keyframing.c
parent5d51de3bea3ae500446587ebfc53c297afdbed82 (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.c15
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;