|
Blender V5.0
|
Go to the source code of this file.
Classes | |
| struct | BMDataLayerLookup |
Namespaces | |
| namespace | blender |
| namespace | blender::bke |
| void BM_data_interp_face_vert_edge | ( | BMesh * | bm, |
| const BMVert * | v_src_1, | ||
| const BMVert * | v_src_2, | ||
| BMVert * | v, | ||
| BMEdge * | e, | ||
| float | fac ) |
Data Face-Vert Edge Interpolate.
Walks around the faces of e and interpolates the loop data between two sources.
Definition at line 97 of file bmesh_interp.cc.
References bm, CustomData_bmesh_interp(), BMHeader::data, e, BMLoop::head, BMLoop::next, BMLoop::prev, BMLoop::radial_next, BMLoop::v, v, and w().
Referenced by BM_edge_split().
| void BM_data_interp_from_edges | ( | BMesh * | bm, |
| const BMEdge * | e_src_1, | ||
| const BMEdge * | e_src_2, | ||
| BMEdge * | e_dst, | ||
| float | fac ) |
Data, Interpolate From Edges.
Interpolates per-edge data from two sources to e_dst.
Definition at line 79 of file bmesh_interp.cc.
References bm, and bm_data_interp_from_elem().
Referenced by bm_edge_collapse(), and blender::bke::pbvh::merge_edge_data().
| void BM_data_interp_from_verts | ( | BMesh * | bm, |
| const BMVert * | v_src_1, | ||
| const BMVert * | v_src_2, | ||
| BMVert * | v_dst, | ||
| float | fac ) |
Data, Interpolate From Verts.
Interpolates per-vertex data from two sources to v_dst
Definition at line 72 of file bmesh_interp.cc.
References bm, and bm_data_interp_from_elem().
Referenced by bm_bridge_splice_loops(), bm_edge_collapse(), BM_edge_split(), BM_vert_collapse_faces(), bpy_bmvert_copy_from_vert_interp(), and blender::bke::pbvh::pbvh_bmesh_vert_create().
| void BM_data_layer_add | ( | BMesh * | bm, |
| CustomData * | data, | ||
| int | type ) |
Definition at line 840 of file bmesh_interp.cc.
References bm, CD_SET_DEFAULT, CustomData_add_layer(), data, CustomData::layers, MEM_dupallocN(), MEM_freeN(), and update_data_blocks().
Referenced by BKE_mesh_ensure_skin_customdata(), BM_custom_loop_normals_to_vector_layer(), bmo_bisect_edges_exec(), bmo_subdivide_edges_exec(), BPy_BMEdge_CreatePyObject(), BPy_BMesh_CreatePyObject(), BPy_BMFace_CreatePyObject(), bpy_bmlayercollection_new(), bpy_bmlayercollection_verify(), BPy_BMLoop_CreatePyObject(), BPy_BMVert_CreatePyObject(), build_skin(), skin_smooth_hulls(), TEST(), and blender::ed::object::vgroup_assign_verts().
| void BM_data_layer_add_named | ( | BMesh * | bm, |
| CustomData * | data, | ||
| int | type, | ||
| blender::StringRef | name ) |
Definition at line 857 of file bmesh_interp.cc.
References bm, CD_SET_DEFAULT, CustomData_add_layer_named(), data, CustomData::layers, MEM_dupallocN(), MEM_freeN(), name, and update_data_blocks().
Referenced by bevel_set_weighted_normal_face_strength(), BKE_attribute_new(), BM_data_layer_ensure_named(), BM_mesh_wireframe(), blender::ed::sculpt_paint::undo::bmesh_enable(), bpy_bmlayercollection_new(), blender::nodes::node_geo_mesh_primitive_ico_sphere_cc::create_ico_sphere_mesh(), blender::ed::transform::createTransEdge(), blender::ed::transform::createTransMeshVertCData(), ED_mesh_uv_add(), edbm_mod_weighted_strength_exec(), EDBM_verts_mirror_cache_begin_ex(), edgetag_ensure_cd_flag(), blender::ed::sculpt_paint::face_set::ensure_face_sets_bmesh(), and v3d_editvertex_buts().
| void BM_data_layer_copy | ( | BMesh * | bm, |
| CustomData * | data, | ||
| int | type, | ||
| int | src_n, | ||
| int | dst_n ) |
Definition at line 977 of file bmesh_interp.cc.
References BLI_assert, bm, BM_EDGES_OF_MESH, BM_FACES_OF_MESH, BM_ITER_ELEM, BM_ITER_MESH, BM_LOOPS_OF_FACE, BM_VERTS_OF_MESH, CustomData_bmesh_get_n(), CustomData_bmesh_set_n(), BMHeader::data, data, BMEdge::head, BMFace::head, BMVert::head, l, and ptr.
Referenced by bpy_bmlayeritem_copy_from(), ED_mesh_color_add(), and ED_mesh_uv_add().
| void BM_data_layer_ensure_named | ( | BMesh * | bm, |
| CustomData * | data, | ||
| int | type, | ||
| blender::StringRef | name ) |
Definition at line 874 of file bmesh_interp.cc.
References bm, BM_data_layer_add_named(), CustomData_get_named_layer_index(), data, and name.
Referenced by BM_lnorspacearr_store(), BM_loop_normal_editdata_array_init_with_htype(), BM_uv_map_attr_pin_ensure_for_all_layers(), BM_uv_map_attr_pin_ensure_named(), blender::bke::build_pbvh_for_dynamic_topology(), blender::ed::sculpt_paint::dyntopo::enable_ex(), and mesh_customdata_custom_splitnormals_add_exec().
| void BM_data_layer_free | ( | BMesh * | bm, |
| CustomData * | data, | ||
| int | type ) |
Definition at line 910 of file bmesh_interp.cc.
References BLI_assert, bm, CustomData_free_layer_active(), data, CustomData::layers, MEM_dupallocN(), MEM_freeN(), UNUSED_VARS_NDEBUG, and update_data_blocks().
Referenced by bpy_bmesh_dealloc(), mesh_customdata_clear_exec__internal(), blender::ed::object::modifier_skin_customdata_delete(), and multires_customdata_delete().
| void BM_data_layer_free_n | ( | BMesh * | bm, |
| CustomData * | data, | ||
| int | type, | ||
| int | n ) |
Definition at line 956 of file bmesh_interp.cc.
References BLI_assert, bm, CustomData_free_layer(), CustomData_get_layer_index_n(), data, CustomData::layers, MEM_dupallocN(), MEM_freeN(), UNUSED_VARS_NDEBUG, and update_data_blocks().
Referenced by bmo_bisect_edges_exec(), bmo_subdivide_edges_exec(), bpy_bmlayercollection_remove(), and skin_smooth_hulls().
| bool BM_data_layer_free_named | ( | BMesh * | bm, |
| CustomData * | data, | ||
| blender::StringRef | name ) |
Remove a named custom data layer, if it existed. Return true if the layer was removed.
Definition at line 930 of file bmesh_interp.cc.
References bm, CustomData_free_layer_named(), data, CustomData::layers, MEM_dupallocN(), MEM_freeN(), name, CustomData::pool, and update_data_blocks().
Referenced by BKE_attribute_remove(), bm_lnorspace_ensure_from_free_normals(), blender::ed::sculpt_paint::dyntopo::disable(), and mesh_customdata_custom_splitnormals_clear_exec().
| bool BM_data_layer_has_named | ( | const BMesh * | bm, |
| const CustomData * | data, | ||
| int | type, | ||
| blender::StringRef | name ) |
| BMDataLayerLookup BM_data_layer_lookup | ( | const BMesh & | bm, |
| const blender::StringRef | name ) |
Search for a named custom data layer on all attribute domains and return the domain and type. This is roughly analogous to Mesh::attributes().lookup(...), but keep in mind that certain attributes stored on Mesh are not stored as attributes on BMesh.
Definition at line 1039 of file bmesh_interp.cc.
References bm, blender::bke::Corner, blender::bke::custom_data_type_to_attr_type(), blender::bke::Edge, blender::bke::Face, name, and blender::bke::Point.
Referenced by blender::draw::extract_attribute(), blender::draw::extract_attribute_subdiv(), and blender::draw::pbvh::update_generic_attribute_bmesh().
| float BM_elem_float_data_get | ( | CustomData * | cd, |
| void * | element, | ||
| int | type ) |
Definition at line 1023 of file bmesh_interp.cc.
References CustomData_bmesh_get(), data, and element.
Referenced by TEST().
| void BM_elem_float_data_set | ( | CustomData * | cd, |
| void * | element, | ||
| int | type, | ||
| float | val ) |
Definition at line 1030 of file bmesh_interp.cc.
References CustomData_bmesh_get(), data, and element.
Referenced by TEST().
Definition at line 167 of file bmesh_interp.cc.
References axis_dominant_v3_to_m3(), BLI_array_alloca, BLI_assert, bm, BM_FACE_FIRST_LOOP, BM_face_interp_from_face_ex(), BM_face_is_normal_valid(), BMVert::co, BMHeader::data, float, BMLoop::head, BMVert::head, i, BMFace::len, mul_v2_m3v3(), BMLoop::next, BMFace::no, and BMLoop::v.
Referenced by bpy_bmface_copy_from_face_interp().
| void BM_face_interp_from_face_ex | ( | BMesh * | bm, |
| BMFace * | f_dst, | ||
| const BMFace * | f_src, | ||
| bool | do_vertex, | ||
| const void ** | blocks, | ||
| const void ** | blocks_v, | ||
| float(*) | cos_2d[2], | ||
| float | axis_mat[3][3] ) |
Data Interpolate From Face.
Projects target onto source, and pulls interpolated custom-data from source.
Definition at line 140 of file bmesh_interp.cc.
References BLI_array_alloca, bm, BM_FACE_FIRST_LOOP, BMVert::co, CustomData_bmesh_interp(), BMHeader::data, BMLoop::head, BMVert::head, interp_weights_poly_v2(), BMFace::len, mul_v2_m3v3(), BMLoop::next, BMLoop::v, and w().
Referenced by BM_face_interp_from_face(), bmo_face_inset_individual(), and bmo_inset_region_exec().
Definition at line 561 of file bmesh_interp.cc.
References bm, BM_face_calc_center_median(), BM_face_interp_multires_ex(), CD_MDISPS, and CustomData_get_offset().
| void BM_face_interp_multires_ex | ( | BMesh * | bm, |
| BMFace * | f_dst, | ||
| const BMFace * | f_src, | ||
| const float | f_dst_center[3], | ||
| const float | f_src_center[3], | ||
| int | cd_loop_mdisp_offset ) |
Definition at line 546 of file bmesh_interp.cc.
References bm, BM_FACE_FIRST_LOOP, BM_loop_interp_multires_ex(), and BMLoop::next.
Referenced by BM_edge_split(), BM_face_interp_multires(), BM_face_split(), BM_face_triangulate(), bmo_poke_exec(), and blender::ed::transform::mesh_customdatacorrect_apply_vert().
Smooths boundaries between multi-res grids, including some borders in adjacent faces.
mdisps is a grid of displacements, ordered thus:
v4/next
|
| v1/cent-----mid2 ---> x
| | |
| | |
v2/prev---mid1-----v3/cur
|
V
y
mdisps is a grid of displacements, ordered thus:
v4/next
|
| v1/cent-----mid2 ---> x
| | |
| | |
v2/prev---mid1-----v3/cur
|
V
y
Definition at line 576 of file bmesh_interp.cc.
References add_v3_v3v3(), bm, BM_ELEM_CD_GET_VOID_P, BM_ITER_ELEM, BM_LOOPS_OF_FACE, CD_MDISPS, copy_v3_v3(), CustomData_get_offset(), MDisps::disps, l, mid_v3_v3v3(), mul_v3_fl(), sqrt, MDisps::totdisp, and y.
Referenced by BM_edge_split(), and BM_face_split().
| void BM_loop_interp_from_face | ( | BMesh * | bm, |
| BMLoop * | l_dst, | ||
| const BMFace * | f_src, | ||
| bool | do_vertex, | ||
| bool | do_multires ) |
Projects a single loop, target, onto f_src for custom-data interpolation. multi-resolution is handled.
| do_vertex | When true the target's vert data will also get interpolated. |
Definition at line 685 of file bmesh_interp.cc.
References axis_dominant_v3_to_m3(), BLI_array_alloca, bm, BM_FACE_FIRST_LOOP, BM_loop_interp_multires(), BMVert::co, CustomData_bmesh_interp(), BMHeader::data, float, BMLoop::head, BMVert::head, i, interp_weights_poly_v2(), is_zero_v3(), BMFace::len, mul_v2_m3v3(), BMLoop::next, BMFace::no, BMLoop::v, and w().
Referenced by bev_create_ngon(), BM_face_split_n(), bmo_poke_exec(), bpy_bmloop_copy_from_face_interp(), blender::ed::transform::mesh_customdatacorrect_apply_vert(), and blender::ed::transform::mesh_customdatacorrect_face_substitute_set().
Project the multi-resolution grid in target onto f_src's set of multi-resolution grids.
Definition at line 531 of file bmesh_interp.cc.
References bm, BM_face_calc_center_median(), BM_loop_interp_multires_ex(), CD_MDISPS, CustomData_get_offset(), and BMLoop::f.
Referenced by BM_loop_interp_from_face().
| void BM_loop_interp_multires_ex | ( | BMesh * | bm, |
| BMLoop * | l_dst, | ||
| const BMFace * | f_src, | ||
| const float | f_dst_center[3], | ||
| const float | f_src_center[3], | ||
| int | cd_loop_mdisp_offset ) |
Definition at line 472 of file bmesh_interp.cc.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), BM_ELEM_CD_GET_VOID_P, BM_FACE_FIRST_LOOP, compute_mdisp_quad(), data, MDisps::disps, BMLoop::f, float, BMFace::len, MDisps::level, loop_interp_multires_cb(), mdisp_axis_from_quad(), MEM_callocN(), sqrt, MDisps::totdisp, UNLIKELY, TaskParallelSettings::use_threading, and v2.
Referenced by BM_face_interp_multires_ex(), BM_faces_join(), and BM_loop_interp_multires().
| void BM_uv_map_attr_pin_ensure_for_all_layers | ( | BMesh * | bm | ) |
Ensure the dependent boolean layers exist for all face corner CD_PROP_FLOAT2 layers.
Definition at line 881 of file bmesh_interp.cc.
References BKE_uv_map_pin_name_get(), bm, BM_data_layer_ensure_named(), CD_PROP_BOOL, CD_PROP_FLOAT2, CustomData_get_layer_name(), CustomData_number_of_layers(), l, MAX_CUSTOMDATA_LAYER_NAME, and name.
Referenced by bpy_bmlayercollection_new(), bpy_bmlayercollection_verify(), blender::nodes::node_geo_mesh_primitive_ico_sphere_cc::create_ico_sphere_mesh(), and ED_mesh_uv_add().
| void BM_uv_map_attr_pin_ensure_named | ( | BMesh * | bm, |
| blender::StringRef | uv_map_name ) |
Definition at line 896 of file bmesh_interp.cc.
References BKE_uv_map_pin_name_get(), bm, BM_data_layer_ensure_named(), CD_PROP_BOOL, MAX_CUSTOMDATA_LAYER_NAME, and name.
Referenced by uv_pin_exec().
| bool BM_uv_map_attr_pin_exists | ( | const BMesh * | bm, |
| blender::StringRef | uv_map_name ) |
Definition at line 903 of file bmesh_interp.cc.
References BKE_uv_map_pin_name_get(), bm, CD_PROP_BOOL, CustomData_get_named_layer_index(), MAX_CUSTOMDATA_LAYER_NAME, and name.
Referenced by uv_pin_exec(), and uv_select_pinned_exec().
Definition at line 740 of file bmesh_interp.cc.
References axis_dominant_v3_to_m3(), BLI_array_alloca, BLI_assert, bm, BM_FACE_FIRST_LOOP, BM_face_is_normal_valid(), BMVert::co, CustomData_bmesh_interp(), BMHeader::data, float, BMVert::head, i, interp_weights_poly_v2(), BMFace::len, mul_v2_m3v3(), BMLoop::next, BMFace::no, BMLoop::v, and w().
Referenced by bpy_bmvert_copy_from_face_interp().
| LinkNode * BM_vert_loop_groups_data_layer_create | ( | BMesh * | bm, |
| BMVert * | v, | ||
| int | layer_n, | ||
| const float * | loop_weights, | ||
| MemArena * | arena ) |
Definition at line 1176 of file bmesh_interp.cc.
References LoopWalkCtx::arena, BLI_assert, BLI_linklist_prepend_arena(), BLI_memarena_alloc(), bm, BM_ELEM_CD_GET_VOID_P, BM_elem_flag_enable, BM_elem_flag_test, BM_elem_index_set, BM_ELEM_INTERNAL_TAG, BM_ITER_ELEM, BM_LOOP, bm_loop_walk_data(), BM_LOOPS_OF_VERT, LoopWalkCtx::cd_layer_offset, copy_vn_fl(), LoopWalkCtx::data_array, LoopWalkCtx::data_index_array, LoopWalkCtx::data_len, LoopWalkCtx::data_ref, l, LIKELY, LoopWalkCtx::loop_weights, mul_vn_fl(), LoopWalkCtx::type, v, LoopWalkCtx::weight_accum, and LoopWalkCtx::weight_array.
Referenced by blender::ed::transform::mesh_customdatacorrect_init_vert().
Take existing custom data and merge each fan's data.
Definition at line 1291 of file bmesh_interp.cc.
References bm, bm_vert_loop_groups_data_layer_merge__single(), CustomData_sizeof(), LinkNode::link, LinkNode::next, and size().
Referenced by blender::ed::transform::mesh_customdatacorrect_apply_vert().
| void BM_vert_loop_groups_data_layer_merge_weights | ( | BMesh * | bm, |
| LinkNode * | groups, | ||
| int | layer_n, | ||
| const float * | loop_weights ) |
A version of BM_vert_loop_groups_data_layer_merge that takes an array of loop-weights (aligned with BM_LOOPS_OF_VERT iterator).
Definition at line 1302 of file bmesh_interp.cc.
References bm, bm_vert_loop_groups_data_layer_merge_weights__single(), CustomData_sizeof(), LinkNode::link, LinkNode::next, and size().
Referenced by blender::ed::transform::mesh_customdatacorrect_apply_vert().