diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-09-13 16:44:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-09-13 16:44:13 +0300 |
commit | 37d8d4787cfa3d04b09f935c5600f1a3ea7b74e7 (patch) | |
tree | b60dfc428ccd61b5b3af6a06cee6ddbe69d3973e /source/blender/blenkernel/intern/action.c | |
parent | 9abacf38fd4f3b0de4b6d9a4644b9cb1155482c9 (diff) | |
parent | 6f633dec5d105ad91dcb5774a6fd4fb06bf264a5 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 00b9e0a283b..6f7b3286e40 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -1135,9 +1135,13 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_ if (fcu->totvert) { float nmin, nmax; - /* get extents for this curve */ - /* TODO: allow enabling/disabling this? */ - calc_fcurve_range(fcu, &nmin, &nmax, false, true); + /* get extents for this curve + * - no "selected only", since this is often used in the backend + * - no "minimum length" (we will apply this later), otherwise + * single-keyframe curves will increase the overall length by + * a phantom frame (T50354) + */ + calc_fcurve_range(fcu, &nmin, &nmax, false, false); /* compare to the running tally */ min = min_ff(min, nmin); @@ -1190,7 +1194,9 @@ void calc_action_range(const bAction *act, float *start, float *end, short incl_ } if (foundvert || foundmod) { + /* ensure that action is at least 1 frame long (for NLA strips to have a valid length) */ if (min == max) max += 1.0f; + *start = min; *end = max; } |