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/makesrna/intern/rna_constraint.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/makesrna/intern/rna_constraint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 843cb326be2..a3934b12a44 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -1923,7 +1923,8 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna) prop = RNA_def_property(srna, "offset_factor", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "offset_fac"); - RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); + RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01, 3); RNA_def_property_ui_text( prop, "Offset Factor", "Percentage value defining target position along length of curve"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); |