diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2022-03-07 19:27:06 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2022-03-10 13:34:51 +0300 |
commit | 7b62203fc794b5facda195bccea5981b54256044 (patch) | |
tree | da3e0e6339ef4bba00b6353e3e3a46ca723fd922 /source/blender | |
parent | 1f1dcf41d51a03150ee38f220c590f8715b11e88 (diff) |
IK: make Ik chain length non-animatable
Mark the chain length of regular and spline IK constraints
non-animatable. Changing the IK chain length requires a rebuild of
depsgraph relations. This makes it unsuitable for animation. It's better
to simply avoid having this property animatable than to allow animation
but produce unstable results.
Ref: T96203
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 114fe30acf7..63d8876ec8b 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -1209,6 +1209,9 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna) prop = RNA_def_property(srna, "chain_count", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "rootbone"); + /* Changing the IK chain length requires a rebuild of depsgraph relations. This makes it + * unsuitable for animation. */ + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0, 255); RNA_def_property_ui_text( prop, "Chain Length", "How many bones are included in the IK effect - 0 uses all bones"); @@ -3020,6 +3023,9 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna) prop = RNA_def_property(srna, "chain_count", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "chainlen"); + /* Changing the IK chain length requires a rebuild of depsgraph relations. This makes it + * unsuitable for animation. */ + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* TODO: this should really check the max length of the chain the constraint is attached to */ RNA_def_property_range(prop, 1, 255); RNA_def_property_ui_text(prop, "Chain Length", "How many bones are included in the chain"); |