From 5f8d3694958a8ff8ea08d5df60155dfa5796e1fa Mon Sep 17 00:00:00 2001 From: Habib Gahbiche Date: Tue, 6 Nov 2018 23:36:50 -0200 Subject: Multi-Objects: MBALL_OT_select_similar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compared to previous implementation, the following has been changed: * Threshold: is now an absolute value. This allows a comparison with e.g. radii that are much larger than selected radius. This is also consistent with `CURVE_OT_select_similar` * Radius in world space is the average of the radius scaled in x, y and z directions * Since MetaBalls are symmetrical, rotation is only considered from 0 to π/2. So for example rotations of 90° and -90° are considered equal. This is also consistent with the way `CURVE_OT_select_similar` works. Fix/changes from committer (Dalai Felinto): * Drawing not updating after changes. (see original patch for details). Reviewers: dfelinto Differential Revision: https://developer.blender.org/D3895 --- source/blender/blenkernel/BKE_mball.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenkernel/BKE_mball.h') diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h index ae86d978cb7..c09d3f3fba1 100644 --- a/source/blender/blenkernel/BKE_mball.h +++ b/source/blender/blenkernel/BKE_mball.h @@ -71,6 +71,8 @@ void BKE_mball_translate(struct MetaBall *mb, const float offset[3]); struct MetaElem *BKE_mball_element_add(struct MetaBall *mb, const int type); +int BKE_mball_select_count(struct MetaBall *mb); +int BKE_mball_select_count_multi(struct Object **objects, int objects_len); void BKE_mball_select_all(struct MetaBall *mb); void BKE_mball_select_all_multi(struct Object **objects, int objects_len); void BKE_mball_deselect_all(struct MetaBall *mb); -- cgit v1.2.3