Blender
V3.3
|
Go to the source code of this file.
Enumerations | |
enum | { BKE_MBALL_BATCH_DIRTY_ALL = 0 } |
Variables | |
void(* | BKE_mball_batch_cache_dirty_tag_cb )(struct MetaBall *mb, int mode) |
void(* | BKE_mball_batch_cache_free_cb )(struct MetaBall *mb) |
anonymous enum |
Enumerator | |
---|---|
BKE_MBALL_BATCH_DIRTY_ALL |
Definition at line 117 of file BKE_mball.h.
Definition at line 200 of file mball.c.
References BKE_id_new(), and ID_MB.
Referenced by BKE_object_obdata_add_from_type().
This function finds the basis meta-ball.
Basis meta-ball doesn't include any number at the end of its name. All meta-balls with same base of name can be blended. meta-balls with different basic name can't be blended.
Definition at line 508 of file mball.c.
References BASE_FROM_DUPLI, BLI_split_name_num(), Object::id, LISTBASE_FOREACH, MAX_ID_NAME, ID::name, OB_MBALL, scene, STREQ, Object::type, and Scene::view_layers.
Referenced by BKE_displist_make_mball(), blender::deg::DepsgraphRelationBuilder::build_object_data_geometry(), and object_convert_exec().
Definition at line 743 of file mball.c.
References MetaBall::batch_cache, and BKE_mball_batch_cache_dirty_tag_cb.
Referenced by BKE_object_data_batch_cache_dirty_tag().
Definition at line 749 of file mball.c.
References MetaBall::batch_cache, and BKE_mball_batch_cache_free_cb.
Referenced by metaball_free_data().
Return or compute bounding-box for given meta-ball object.
Definition at line 298 of file mball.c.
References Object_Runtime::bb, BKE_mball_texspace_calc(), BLI_assert, BOUNDBOX_DIRTY, Object_Runtime::curve_cache, BoundBox::flag, NULL, OB_MBALL, Object::runtime, and Object::type.
Referenced by BKE_object_boundbox_get().
Referenced by object_origin_set_exec().
Referenced by object_origin_set_exec().
Definition at line 691 of file mball.c.
References MetaBall::editelems, LISTBASE_FOREACH, and SELECT.
Referenced by BKE_mball_deselect_all_multi_ex(), do_lasso_select_meta(), do_meta_box_select(), and mball_circle_select().
Definition at line 703 of file mball.c.
References BKE_mball_deselect_all(), Object::data, DEG_id_tag_update(), MetaBall::id, ID_RECALC_SELECT, and Base::object.
Referenced by ED_mball_deselect_all_multi(), and mball_select_all_exec().
Most simple meta-element adding function.
Definition at line 209 of file mball.c.
References BLI_addtail(), MetaBall::elems, MetaElem::expx, MetaElem::expy, MetaElem::expz, MetaElem::flag, MB_BALL, MB_CUBE, MB_ELIPSOID, MB_PLANE, MB_SCALE_RAD, MB_TUBE, MEM_callocN, MetaElem::quat, MetaElem::rad, MetaElem::s, type, MetaElem::type, and unit_qt().
Referenced by ED_mball_add_primitive().
Referenced by delete_metaelems_exec(), and duplicate_metaelems_exec().
Definition at line 404 of file mball.c.
References BKE_mball_is_any_selected(), Object::data, if(), and Base::object.
Referenced by mball_select_all_exec().
Referenced by select_random_metaelems_exec().
Test, if ob is a basis meta-ball.
It test last character of Object ID name. If last character is digit it return 0, else it return 1.
Referenced by DRW_mball_batch_cache_pos_vertbuf_get(), DRW_metaball_batch_cache_get_edge_detection(), DRW_metaball_batch_cache_get_surface_shaded(), DRW_metaball_batch_cache_get_triangles_with_normals(), DRW_metaball_batch_cache_get_wireframes_face(), libblock_remap_data_postprocess_object_update(), object_convert_exec(), and OVERLAY_bounds().
Return true
if ob1
and ob2
are part of the same metaBall group, and ob1
is its basis.
Referenced by libblock_remap_data_postprocess_object_update().
Return true
if ob1
and ob2
are part of the same metaBall group.
Definition at line 315 of file mball.c.
References Freestyle::a, Object_Runtime::bb, data, ListBase::first, MEM_mallocN, DispList::nr, Object::runtime, size(), BoundBox::vec, and DispList::verts.
bool BKE_mball_minmax_ex | ( | const struct MetaBall * | mb, |
float | min[3], | ||
float | max[3], | ||
const float | obmat[4][4], | ||
short | flag | ||
) |
Referenced by BKE_object_minmax(), and ED_view3d_minmax_verts().
Copy some properties from a meta-ball obdata to all other meta-ball obdata belonging to the same family (i.e. object sharing the same name basis).
When some properties (wire-size, threshold, update flags) of meta-ball are changed, then this properties are copied to all meta-balls in same "group" (meta-balls with same base name: MBall
, MBall.001
, MBall.002
, etc). The most important is to copy properties to the base meta-ball, because this meta-ball influences polygonization of meta-balls.
WARNING: This code does not cover all potential corner-cases. E.g. if:
| Object | ObData | | ---------- | ---------- | | Meta_A | Meta_A | | Meta_A.001 | Meta_A.001 | | Meta_B | Meta_A | | Meta_B.001 | Meta_B.001 |
Calling this function with metaball_src
being Meta_A.001
will update Meta_A
, but NOT Meta_B.001
. So in the 'Meta_B' family, the two metaballs will have unmatching settings now.
Solving this case would drastically increase the complexity of this code though, so don't think it would be worth it.
Definition at line 435 of file mball.c.
References BLI_split_name_num(), Object::data, ListBase::first, Object::id, ID_IS_LINKED, MAX_ID_NAME, mball_data_properties_copy(), ID::name, ID::next, NULL, OB_MBALL, Main::objects, ID::prev, STREQ, and Object::type.
Definition at line 668 of file mball.c.
References MetaBall::editelems, LISTBASE_FOREACH, and SELECT.
Referenced by BKE_mball_select_all_multi_ex().
Definition at line 680 of file mball.c.
References BKE_mball_select_all(), Object::data, and Base::object.
Referenced by mball_select_all_exec().
int BKE_mball_select_count | ( | const struct MetaBall * | mb | ) |
int BKE_mball_select_count_multi | ( | struct Base ** | bases, |
int | bases_len | ||
) |
Definition at line 657 of file mball.c.
References BKE_mball_select_count(), Object::data, and Base::object.
Referenced by mball_select_similar_exec().
Definition at line 715 of file mball.c.
References MetaBall::editelems, LISTBASE_FOREACH, and SELECT.
Referenced by BKE_mball_select_swap_multi_ex().
Definition at line 725 of file mball.c.
References BKE_mball_select_swap(), Object::data, and Base::object.
Referenced by mball_select_all_exec().
Compute bounding box of all meta-elements / meta-ball.
Bounding box is computed from polygonized surface. ob is basic meta-balls (with name Meta
for example). All other meta-ball objects (with names Meta.001
, Meta.002
, etc) are included in this bounding-box.
Definition at line 255 of file mball.c.
References Object_Runtime::bb, BKE_boundbox_init_from_minmax(), BOUNDBOX_DIRTY, Object_Runtime::curve_cache, data, CurveCache::disp, ListBase::first, BoundBox::flag, max, MEM_callocN, min, minmax_v3v3_v3(), DispList::next, DispList::nr, NULL, Object::runtime, and DispList::verts.
Referenced by BKE_displist_make_mball(), and BKE_mball_boundbox_get().
Definition at line 613 of file mball.c.
References MetaBall::elems, LISTBASE_FOREACH, mat4_to_quat(), mat4_to_scale(), MB_TYPE_SIZE_SQUARED, mul_m4_v3(), mul_qt_qtqt(), mul_v3_fl(), and sqrtf.
Referenced by apply_objects_internal(), and metaball_coords_and_quats_apply_with_mat4().
Definition at line 639 of file mball.c.
References add_v3_v3(), MetaBall::elems, LISTBASE_FOREACH, and offset.
Referenced by object_origin_set_exec().
|
extern |
Definition at line 740 of file mball.c.
Referenced by BKE_mball_batch_cache_dirty_tag(), and DRW_engines_register().
Definition at line 741 of file mball.c.
Referenced by BKE_mball_batch_cache_free(), and DRW_engines_register().