diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-07-25 09:35:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-25 10:19:13 +0300 |
commit | 2308668bac049dbf0e7056f9849e67f52ddb3f9d (patch) | |
tree | 93d5920dfe56df784cf17998c10f083c21be8e93 /source/blender/blenkernel/BKE_key.h | |
parent | d7c4e9649320fdca19d1fa3474a393749d2d7fee (diff) |
Fix T72622: Transform object origin ignores shape keys
D8367 by @paul2t with edits.
Diffstat (limited to 'source/blender/blenkernel/BKE_key.h')
-rw-r--r-- | source/blender/blenkernel/BKE_key.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h index 6581891062c..b0eef02611b 100644 --- a/source/blender/blenkernel/BKE_key.h +++ b/source/blender/blenkernel/BKE_key.h @@ -51,6 +51,12 @@ void key_curve_normal_weights(float t, float data[4], int type); float *BKE_key_evaluate_object_ex(struct Object *ob, int *r_totelem, float *arr, size_t arr_size); float *BKE_key_evaluate_object(struct Object *ob, int *r_totelem); +int BKE_keyblock_element_count_from_shape(const struct Key *key, const int shape_index); +int BKE_keyblock_element_count(const struct Key *key); + +size_t BKE_keyblock_element_calc_size_from_shape(const struct Key *key, const int shape_index); +size_t BKE_keyblock_element_calc_size(const struct Key *key); + bool BKE_key_idtype_support(const short id_type); struct Key **BKE_key_from_id_p(struct ID *id); @@ -74,6 +80,10 @@ 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_curve_data_transform(const struct ListBase *nurb, + const float mat[4][4], + const void *src, + void *dst); 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); @@ -104,6 +114,28 @@ bool BKE_keyblock_move(struct Object *ob, int org_index, int new_index); bool BKE_keyblock_is_basis(struct Key *key, const int index); +/* -------------------------------------------------------------------- */ +/** \name Key-Block Data Access + * \{ */ + +void BKE_keyblock_data_get_from_shape(const struct Key *key, + float (*arr)[3], + const int shape_index); +void BKE_keyblock_data_get(const struct Key *key, float (*arr)[3]); + +void BKE_keyblock_data_set_with_mat4(struct Key *key, + const int shape_index, + const float (*vertices)[3], + const float mat[4][4]); +void BKE_keyblock_curve_data_set_with_mat4(struct Key *key, + const struct ListBase *nurb, + const int shape_index, + const void *data, + const float mat[4][4]); +void BKE_keyblock_data_set(struct Key *key, const int shape_index, const void *data); + +/** \} */ + #ifdef __cplusplus }; #endif |