diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-09-05 16:17:59 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-09-20 11:52:42 +0300 |
commit | 12788906113c4f2b304b368001bd2ef68c4dc6b8 (patch) | |
tree | 866371adf7cb11e65b3809ec2fb9358799d2656e /source/blender/blenkernel/BKE_key.h | |
parent | 1789c1e90df373293338dadd4f7140c9995c456f (diff) |
Put the Radius property of Curve points under shape key control.
Since shape keys are stored as raw floating point data, this
unfortunately requires changes to all code that works with it.
An additional complication is that bezier and nurbs control
points have different entry size, and can be mixed in the same
object (and hence shape key buffer).
Shape key entries are changed from:
bezier: float v1[3], v2[3], v3[3], tilt, pad, pad;
nurbs: float vec[3], tilt;
To:
bezier: float v1[3], v2[3], v3[3], tilt, radius, pad;
nurbs: float vec[3], tilt, radius, pad;
The official shape key element size is changed to 3 floats,
with 4 elements for bezier nodes, and 2 for nurbs. This also
means that the element count is not equal to the vertex count
anymore.
While searching for all curve Shape Key code, I also found that
BKE_curve_transform_ex and BKE_curve_translate were broken. This
can be seen by trying to change the Origin of a Curve with keys.
Reviewers: campbellbarton, sergey
Differential Revision: https://developer.blender.org/D3676
Diffstat (limited to 'source/blender/blenkernel/BKE_key.h')
-rw-r--r-- | source/blender/blenkernel/BKE_key.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h index bd787311ef4..73a6f5047b2 100644 --- a/source/blender/blenkernel/BKE_key.h +++ b/source/blender/blenkernel/BKE_key.h @@ -86,6 +86,7 @@ void BKE_keyblock_update_from_lattice(struct Lattice *lt, struct KeyBlock *kb void BKE_keyblock_convert_from_lattice(struct Lattice *lt, struct KeyBlock *kb); void BKE_keyblock_convert_to_lattice(struct KeyBlock *kb, struct Lattice *lt); +int BKE_keyblock_curve_element_count(struct ListBase *nurb); void BKE_keyblock_update_from_curve(struct Curve *cu, struct KeyBlock *kb, struct ListBase *nurb); void BKE_keyblock_convert_from_curve(struct Curve *cu, struct KeyBlock *kb, struct ListBase *nurb); void BKE_keyblock_convert_to_curve(struct KeyBlock *kb, struct Curve *cu, struct ListBase *nurb); |