diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-02-10 18:59:57 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-02-10 18:59:57 +0300 |
commit | a7ae33202fa94a52235fbe595873d81e482d5f58 (patch) | |
tree | c075afc26803edd25de9021d3190d2d9613f741d /source/blender/blenkernel/BKE_armature.h | |
parent | a5cddaefd344a4ab8c1d5d1be39edf6e6dc456e0 (diff) | |
parent | ad77b52abcbd0daf0d1a3ad395983cb90beeb72a (diff) |
Merge branch 'master' into greasepencil-objectgreasepencil-object
Conflicts:
release/scripts/startup/bl_ui/space_userpref.py
source/blender/blenkernel/BKE_gpencil.h
source/blender/blenkernel/BKE_gpencil_update_cache.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/gpencil.c
source/blender/blenkernel/intern/gpencil_update_cache.c
source/blender/blenlib/BLI_listbase.h
source/blender/blenlib/intern/DLRB_tree.c
source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_gpencil.cc
source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_gpencil.h
source/blender/makesdna/DNA_gpencil_types.h
source/blender/makesrna/intern/rna_gpencil.c
Diffstat (limited to 'source/blender/blenkernel/BKE_armature.h')
-rw-r--r-- | source/blender/blenkernel/BKE_armature.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index 12d8135ba55..ede300b19dd 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -163,6 +163,30 @@ void BKE_armature_transform(struct bArmature *arm, const float mat[4][4], bool d /* Bounding box. */ struct BoundBox *BKE_armature_boundbox_get(struct Object *ob); +/** + * Calculate the axis-aligned bounds of `pchan` in world-space, + * taking into account custom transform when set. + * + * `r_min` and `r_max` are expanded to fit `pchan` so the caller must initialize them + * (typically using #INIT_MINMAX). + * + * \note The bounds are calculated based on the head & tail of the bone + * or the custom object's bounds (if the bone uses a custom object). + * Visual elements such as the envelopes radius & bendy-bone spline segments are *not* included, + * making this not so useful for viewport culling. + */ +void BKE_pchan_minmax(const struct Object *ob, + const struct bPoseChannel *pchan, + float r_min[3], + float r_max[3]); +/** + * Calculate the axis aligned bounds of the pose of `ob` in world-space. + + * `r_min` and `r_max` are expanded to fit `ob->pose` so the caller must initialize them + * (typically using #INIT_MINMAX). + * + * \note This uses #BKE_pchan_minmax, see its documentation for details on bounds calculation. + */ bool BKE_pose_minmax( struct Object *ob, float r_min[3], float r_max[3], bool use_hidden, bool use_select); |