|
Blender V4.3
|
#include "BLI_span.hh"Go to the source code of this file.
Definition at line 177 of file mball.cc.
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 394 of file mball.cc.
References BASE_FROM_DUPLI, BKE_view_layer_object_bases_get(), BKE_view_layer_synced_ensure(), BLI_string_split_name_number(), Object::id, LISTBASE_FOREACH, MAX_ID_NAME, ID::name, OB_MBALL, STREQ, and Object::type.
Referenced by BKE_mball_data_update(), blender::deg::DepsgraphRelationBuilder::build_object_data_geometry(), and blender::ed::object::object_convert_exec().
Definition at line 488 of file mball.cc.
References BKE_mball_minmax(), mid_v3_v3v3(), and min.
Referenced by blender::ed::object::object_origin_set_exec().
Definition at line 470 of file mball.cc.
References add_v3_v3(), MetaBall::elems, LISTBASE_FOREACH, mul_v3_fl(), and zero_v3().
Referenced by blender::ed::object::object_origin_set_exec().
Definition at line 625 of file mball.cc.
References BKE_lattice_deform_coords(), BKE_mball_basis_find(), BKE_mball_polygonize(), BKE_object_free_derived_caches(), BLI_assert, Object::data, depsgraph, MetaBall::mat, MEM_dupallocN, OB_LATTICE, OB_MBALL, Object::parent, PARSKEL, Object::partype, Object::runtime, MetaBall::totcol, and Object::type.
Referenced by BKE_object_handle_data_update(), and blender::ed::object::object_force_modifier_update_for_bind().
| bool BKE_mball_deselect_all | ( | MetaBall * | mb | ) |
Definition at line 578 of file mball.cc.
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().
| bool BKE_mball_deselect_all_multi_ex | ( | blender::Span< Base * > | bases | ) |
Referenced by ED_mball_deselect_all_multi(), and mball_select_all_exec().
Most simple meta-element adding function.
Definition at line 183 of file mball.cc.
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, MetaElem::quat, MetaElem::rad, MetaElem::s, MetaElem::type, and unit_qt().
Referenced by ED_mball_add_primitive().
| bool BKE_mball_is_any_selected | ( | const MetaBall * | mb | ) |
Definition at line 274 of file mball.cc.
References MetaBall::editelems, LISTBASE_FOREACH, and SELECT.
Referenced by BKE_mball_is_any_selected_multi(), delete_metaelems_exec(), and duplicate_metaelems_exec().
| bool BKE_mball_is_any_selected_multi | ( | blender::Span< Base * > | bases | ) |
Referenced by mball_select_all_exec().
| bool BKE_mball_is_any_unselected | ( | const MetaBall * | mb | ) |
Definition at line 296 of file mball.cc.
References MetaBall::editelems, LISTBASE_FOREACH, and SELECT.
Referenced by select_random_metaelems_exec().
| bool BKE_mball_is_basis | ( | const Object * | ob | ) |
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.
Definition at line 230 of file mball.cc.
References Object::id, len, and ID::name.
Referenced by BKE_mball_is_basis_for(), libblock_remap_data_postprocess_object_update(), blender::ed::object::object_convert_exec(), blender::draw::overlay::Bounds::object_sync(), and OVERLAY_bounds().
Return true if ob1 and ob2 are part of the same metaBall group, and ob1 is its basis.
Definition at line 269 of file mball.cc.
References BKE_mball_is_basis(), and BKE_mball_is_same_group().
Referenced by libblock_remap_data_postprocess_object_update().
Return true if ob1 and ob2 are part of the same metaBall group.
Definition at line 253 of file mball.cc.
References BLI_string_split_name_number(), Object::id, MAX_ID_NAME, ID::name, and STREQ.
Referenced by BKE_mball_is_basis_for().
Definition at line 459 of file mball.cc.
References BLI_listbase_is_empty(), MetaBall::elems, INIT_MINMAX, LISTBASE_FOREACH, min, and minmax_v3v3_v3().
Referenced by BKE_mball_center_bounds().
| bool BKE_mball_minmax_ex | ( | const MetaBall * | mb, |
| float | min[3], | ||
| float | max[3], | ||
| const float | obmat[4][4], | ||
| short | flag ) |
Definition at line 426 of file mball.cc.
References add_v3_fl(), copy_v3_v3(), MetaBall::elems, flag, INIT_MINMAX, LISTBASE_FOREACH, mat4_to_scale(), min, minmax_v3v3_v3(), and mul_v3_m4v3().
Referenced by 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 315 of file mball.cc.
References BLI_string_split_name_number(), Object::data, ListBase::first, Object::id, ID_IS_EDITABLE, MAX_ID_NAME, mball_data_properties_copy(), ID::name, ID::next, OB_MBALL, Main::objects, ID::prev, STREQ, and Object::type.
| bool BKE_mball_select_all | ( | MetaBall * | mb | ) |
Definition at line 555 of file mball.cc.
References MetaBall::editelems, LISTBASE_FOREACH, and SELECT.
Referenced by BKE_mball_select_all_multi_ex().
| bool BKE_mball_select_all_multi_ex | ( | blender::Span< Base * > | bases | ) |
Referenced by mball_select_all_exec().
Definition at line 533 of file mball.cc.
References MetaBall::editelems, LISTBASE_FOREACH, and SELECT.
Referenced by BKE_mball_select_count_multi().
| int BKE_mball_select_count_multi | ( | blender::Span< Base * > | bases | ) |
Referenced by mball_select_similar_exec().
| bool BKE_mball_select_swap | ( | MetaBall * | mb | ) |
Definition at line 602 of file mball.cc.
References MetaBall::editelems, LISTBASE_FOREACH, and SELECT.
Referenced by BKE_mball_select_swap_multi_ex().
| bool BKE_mball_select_swap_multi_ex | ( | blender::Span< Base * > | bases | ) |
Referenced by mball_select_all_exec().
Definition at line 500 of file mball.cc.
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 blender::ed::object::apply_objects_internal(), and blender::ed::object::metaball_coords_and_quats_apply_with_mat4().
Definition at line 526 of file mball.cc.
References add_v3_v3(), MetaBall::elems, and LISTBASE_FOREACH.
Referenced by blender::ed::object::object_origin_set_exec().