diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-06-12 06:07:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-06-12 06:53:25 +0300 |
commit | 24d39620fb7299590220af8ea3cb4d61fdb0c9a2 (patch) | |
tree | 55841418c0652150df2e50ba5f34597f2aee7aef /source/blender/blenkernel/BKE_lattice.h | |
parent | c02baf8b50db1fa8053ec09f4e9588c430ca01d0 (diff) |
Cleanup: split deform functions that take target object-data
Prefer meaningful function names over redundant NULL arguments.
Also clarify variable names as it wasn't obvious the object-data
is part of the object target.
Diffstat (limited to 'source/blender/blenkernel/BKE_lattice.h')
-rw-r--r-- | source/blender/blenkernel/BKE_lattice.h | 72 |
1 files changed, 46 insertions, 26 deletions
diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h index 9679d105363..19cb4f5c4e1 100644 --- a/source/blender/blenkernel/BKE_lattice.h +++ b/source/blender/blenkernel/BKE_lattice.h @@ -59,40 +59,60 @@ void outside_lattice(struct Lattice *lt); * Used by modifiers (odd location for this API, for now keep these related functions together). * \{ */ -void BKE_curve_deform_coords(struct Object *cuOb, - struct Object *target, +void BKE_curve_deform_coords(struct Object *ob_curve, + struct Object *ob_target, float (*vert_coords)[3], - int numVerts, - struct MDeformVert *dvert, + const int vert_coords_len, + const struct MDeformVert *dvert, const int defgrp_index, - short flag, - short defaxis); -void BKE_curve_deform_co(struct Object *cuOb, - struct Object *target, - float orco[3], + const short flag, + const short defaxis); +void BKE_curve_deform_co(struct Object *ob_curve, + struct Object *ob_target, + const float orco[3], float vec[3], float mat[3][3], - int no_rot_axis); + const int no_rot_axis); -void BKE_lattice_deform_coords(struct Object *laOb, - struct Object *target, - struct Mesh *mesh, +void BKE_lattice_deform_coords(struct Object *ob_lattice, + struct Object *ob_target, float (*vert_coords)[3], - int numVerts, - short flag, - const char *vgroup, + const int vert_coords_len, + const short flag, + const char *defgrp_name, float influence); -void BKE_armature_deform_coords(struct Object *armOb, - struct Object *target, - const struct Mesh *mesh, - float (*vert_coords)[3], - float (*defMats)[3][3], - int numVerts, - int deformflag, - float (*prevCos)[3], - const char *defgrp_name, - struct bGPDstroke *gps); +void BKE_lattice_deform_coords_with_mesh(struct Object *ob_lattice, + struct Object *ob_target, + float (*vert_coords)[3], + const int vert_coords_len, + const short flag, + const char *defgrp_name, + const float influence, + const struct Mesh *me_target); + +/* Note that we could have a 'BKE_armature_deform_coords' that doesn't take object data + * currently there are no callers for this though. */ + +void BKE_armature_deform_coords_with_gpencil_stroke(struct Object *ob_arm, + struct Object *ob_target, + float (*vert_coords)[3], + float (*vert_deform_mats)[3][3], + int vert_coords_len, + int deformflag, + float (*vert_coords_prev)[3], + const char *defgrp_name, + struct bGPDstroke *gps_target); + +void BKE_armature_deform_coords_with_mesh(struct Object *ob_arm, + struct Object *ob_target, + float (*vert_coords)[3], + float (*vert_deform_mats)[3][3], + int vert_coords_len, + int deformflag, + float (*vert_coords_prev)[3], + const char *defgrp_name, + const struct Mesh *me_target); /** \} */ |