diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2021-04-08 16:51:08 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2021-04-08 16:52:33 +0300 |
commit | cf2baa585cc8788b29147d6e34fa8c46609e5bf9 (patch) | |
tree | e4386e1feea9e72e2994cfed3f67e201770ad91f /source/blender/blenkernel/intern/displist.c | |
parent | f0317911850f07c75aa2e10e371b69b135194ac6 (diff) |
Fix T81707: Spline IK Joints "Floating" above curve
The issue was that where_on_path uses a resampled curve to get the data
from the curve. This leads to disconnects between the curve the user
sees and the evaluated location data.
To fix this we simply use the actual curve data the user can see.
The older code needed a cleanup either way as there were hacks in other
parts of the code trying to work around some brokenness. This is now
fixed and we no longer need to clamp the evaluation range to 0-1 or make
helper functions to make it do what we actually want.
Reviewed By: Campbell, Sybren
Differential Revision: http://developer.blender.org/D10898
Diffstat (limited to 'source/blender/blenkernel/intern/displist.c')
-rw-r--r-- | source/blender/blenkernel/intern/displist.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 9022760fe34..2f6370fa5eb 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1491,10 +1491,10 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph, * was needed before and only not needed for orco calculation. */ if (!for_orco) { - if (ob->runtime.curve_cache->path) { - free_path(ob->runtime.curve_cache->path); + if (ob->runtime.curve_cache->anim_path_accum_length) { + MEM_freeN(ob->runtime.curve_cache->anim_path_accum_length); } - ob->runtime.curve_cache->path = NULL; + ob->runtime.curve_cache->anim_path_accum_length = NULL; } if (ob->type == OB_FONT) { @@ -1703,7 +1703,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph, if (!for_orco) { if ((cu->flag & CU_PATH) || DEG_get_eval_flags_for_id(depsgraph, &ob->id) & DAG_EVAL_NEED_CURVE_PATH) { - calc_curvepath(ob, &nubase); + BKE_anim_path_calc_data(ob); } BKE_nurbList_duplicate(&ob->runtime.curve_cache->deformed_nurbs, &nubase); |