diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2020-07-21 13:11:56 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2020-07-21 13:13:03 +0300 |
commit | 0bfec04cd5541551fea45d0f021e2df0aca80d2f (patch) | |
tree | 2cec72dd09a992b1c03dcfe458646fa3992f3e48 /source/blender/blenkernel/BKE_gpencil_geom.h | |
parent | ece6d8b25ad2814933c0507e9d52bf2cafe42dc0 (diff) |
Fix T72621: Transform object origin support for grease-pencil
Added support for transforming only origins with greasepencil objects.
The new functions is based on BKE_gpencil_transform. That is why there is FIXME statements in there.
Reviewed By: Campbell, Antonio
Differential Revision: http://developer.blender.org/D8303
Diffstat (limited to 'source/blender/blenkernel/BKE_gpencil_geom.h')
-rw-r--r-- | source/blender/blenkernel/BKE_gpencil_geom.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_gpencil_geom.h b/source/blender/blenkernel/BKE_gpencil_geom.h index 6b0f9428f82..1b22931483c 100644 --- a/source/blender/blenkernel/BKE_gpencil_geom.h +++ b/source/blender/blenkernel/BKE_gpencil_geom.h @@ -78,6 +78,20 @@ void BKE_gpencil_stroke_uv_update(struct bGPDstroke *gps); void BKE_gpencil_transform(struct bGPdata *gpd, float mat[4][4]); +typedef struct GPencilPointCoordinates { + /* This is used when doing "move only origin" in object_data_transform.c. + * pressure is needs to be stored here as it is tied to object scale. */ + float co[3]; + float pressure; +} GPencilPointCoordinates; + +int BKE_gpencil_stroke_point_count(struct bGPdata *gpd); +void BKE_gpencil_point_coords_get(struct bGPdata *gpd, GPencilPointCoordinates *elem_data); +void BKE_gpencil_point_coords_apply(struct bGPdata *gpd, const GPencilPointCoordinates *elem_data); +void BKE_gpencil_point_coords_apply_with_mat4(struct bGPdata *gpd, + const GPencilPointCoordinates *elem_data, + const float mat[4][4]); + bool BKE_gpencil_stroke_sample(struct bGPDstroke *gps, const float dist, const bool select); bool BKE_gpencil_stroke_smooth(struct bGPDstroke *gps, int i, float inf); bool BKE_gpencil_stroke_smooth_strength(struct bGPDstroke *gps, int point_index, float influence); |