From aabd8701e98595bae57d59344ed5d127b8b0f7db Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Tue, 1 Oct 2019 21:38:44 +0300 Subject: Implement a user preference for the default Auto Handle Smoothing mode. The default was changed with an initial implementation of the feature. With the feedback from animators, having a behavior which affects curves outside of a changing range is not convenient for professional animators working on high quality character animation. On the other hand, automatic smoothing is better for casual animation of object motion. This change adds an ability to change the default via User Preferences. Differential Revision: https://developer.blender.org/D5875 --- source/blender/collada/AnimationImporter.cpp | 2 +- source/blender/collada/BCAnimationCurve.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/collada') diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 79593f07383..47325c4dece 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -104,7 +104,7 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve) fcu->flag = (FCURVE_VISIBLE | FCURVE_AUTO_HANDLES | FCURVE_SELECTED); fcu->array_index = 0; - fcu->auto_smoothing = FCURVE_SMOOTH_CONT_ACCEL; + fcu->auto_smoothing = U.auto_smoothing_new; for (unsigned int j = 0; j < curve->getKeyCount(); j++) { BezTriple bez; diff --git a/source/blender/collada/BCAnimationCurve.cpp b/source/blender/collada/BCAnimationCurve.cpp index bf32ec9148c..f944a77196c 100644 --- a/source/blender/collada/BCAnimationCurve.cpp +++ b/source/blender/collada/BCAnimationCurve.cpp @@ -383,7 +383,7 @@ void BCAnimationCurve::adjust_range(const int frame_index) void BCAnimationCurve::add_value(const float val, const int frame_index) { FCurve *fcu = get_edit_fcurve(); - fcu->auto_smoothing = FCURVE_SMOOTH_CONT_ACCEL; + fcu->auto_smoothing = U.auto_smoothing_new; insert_vert_fcurve(fcu, frame_index, val, BEZT_KEYTYPE_KEYFRAME, INSERTKEY_NOFLAGS); if (fcu->totvert == 1) { -- cgit v1.2.3