|
Blender V4.3
|
Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::bke |
| void BKE_main_mesh_legacy_convert_auto_smooth | ( | Main & | bmain | ) |
Definition at line 2356 of file mesh_legacy_convert.cc.
References BLI_addtail(), BLI_insertlinkbefore(), CD_CUSTOMLOOPNORMAL, CustomData_has_layer(), ELEM, eModifierType_Bevel, eModifierType_Nodes, eModifierType_NormalEdit, eModifierType_Subsurf, eModifierType_WeightedNormal, eSubsurfModifierFlag_UseCustomNormals, WeightedNormalModifierData::flag, BevelModifierData::flags, SubsurfModifierData::flags, bNodeTree::id, id_us_min(), LISTBASE_FOREACH, ME_AUTOSMOOTH_LEGACY, Main::meshes, MOD_BEVEL_HARDEN_NORMALS, MOD_WEIGHTEDNORMAL_KEEP_SHARP, NodesModifierData::node_group, Main::nodetrees, OB_MESH, Main::objects, and ModifierData::type.
Referenced by do_versions_after_setup().
| void BKE_mesh_calc_edges_legacy | ( | Mesh * | mesh | ) |
Definition at line 218 of file mesh_legacy_convert.cc.
References BKE_mesh_strip_loose_faces(), BLI_assert, CustomData_add_layer_with_data(), CustomData_get_layer(), CustomData_get_layer_for_write(), mesh_calc_edges_mdata(), and verts.
Referenced by blo_do_versions_pre250().
| void BKE_mesh_calc_edges_tessface | ( | Mesh * | mesh | ) |
Calculate/create edges from tessface data
Definition at line 2517 of file mesh_legacy_convert.cc.
References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::as_span(), CD_CONSTRUCT, CD_MFACE, CD_ORIGINDEX, CD_PROP_INT32_2D, CD_SET_DEFAULT, blender::MutableSpan< T >::copy_from(), CustomData_add_layer(), CustomData_add_layer_named(), CustomData_free(), CustomData_get_layer_for_write(), CustomData_get_layer_named_for_write(), CustomData_reset(), ORIGINDEX_NONE, blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size(), MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by cutEdges(), and explodeMesh().
| void BKE_mesh_convert_mfaces_to_mpolys | ( | Mesh * | mesh | ) |
Definition at line 733 of file mesh_legacy_convert.cc.
References BKE_mesh_legacy_convert_loops_to_corners(), BKE_mesh_legacy_convert_polys_to_offsets(), CD_MFACE, convert_mfaces_to_mpolys(), CustomData_get_layer(), and mesh_ensure_tessellation_customdata().
Referenced by cutEdges(), and explodeMesh().
| void BKE_mesh_do_versions_cd_flag_init | ( | Mesh * | mesh | ) |
Definition at line 282 of file mesh_legacy_convert.cc.
References CustomData_get_layer(), UNLIKELY, and verts.
Referenced by blo_do_versions_260().
| void BKE_mesh_do_versions_convert_mfaces_to_mpolys | ( | Mesh * | mesh | ) |
The same as BKE_mesh_convert_mfaces_to_mpolys but oriented to be used in do_versions from readfile.cc the difference is how active/render/clone/stencil indices are handled here.
normally they're being set from pdata which totally makes sense for meshes which are already converted to BMesh structures, but when loading older files indices shall be updated in other way around, so newly added pdata and ldata would have this indices set based on pdata layer.
this is normally only needed when reading older files, in all other cases BKE_mesh_convert_mfaces_to_mpolys shall be always used.
Definition at line 793 of file mesh_legacy_convert.cc.
References BKE_mesh_legacy_convert_loops_to_corners(), BKE_mesh_legacy_convert_polys_to_offsets(), CD_MFACE, convert_mfaces_to_mpolys(), CustomData_bmesh_do_versions_update_active_layers(), CustomData_get_layer(), and mesh_ensure_tessellation_customdata().
Referenced by do_versions_after_linking_280().
| void BKE_mesh_legacy_attribute_flags_to_strings | ( | Mesh * | mesh | ) |
Definition at line 1953 of file mesh_legacy_convert.cc.
References BLI_strdup(), CD_PROP_BYTE_COLOR, CD_PROP_COLOR, CustomData_get_active_layer_index(), CustomData_get_render_layer_index(), and data.
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_bevel_weight_to_generic | ( | Mesh * | mesh | ) |
Move bevel weight to generic float attribute type.
Definition at line 1476 of file mesh_legacy_convert.cc.
References CD_PROP_FLOAT, and replace_custom_data_layer_with_named().
Referenced by blo_do_versions_400().
| void BKE_mesh_legacy_bevel_weight_to_layers | ( | Mesh * | mesh | ) |
Copy bevel weights from vertices and edges to separate layers.
Definition at line 1421 of file mesh_legacy_convert.cc.
References CD_CONSTRUCT, CustomData_add_layer(), CustomData_has_layer(), and verts.
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_convert_edges_to_generic | ( | Mesh * | mesh | ) |
Definition at line 1922 of file mesh_legacy_convert.cc.
References CD_CONSTRUCT, CD_PROP_INT32_2D, CustomData_add_layer_named(), CustomData_get_layer(), CustomData_has_layer_named(), and blender::Span< T >::index_range().
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_convert_flags_to_hide_layers | ( | Mesh * | mesh | ) |
Convert the old hide flags (#ME_HIDE) to the hidden element attribute for reading. Only add the attributes when there are any elements in each domain hidden.
Definition at line 1597 of file mesh_legacy_convert.cc.
References blender::bke::SpanAttributeWriter< T >::finish(), and verts.
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_convert_flags_to_selection_layers | ( | Mesh * | mesh | ) |
Convert the old selection flags (SELECT/#ME_FACE_SEL) to the selected element attribute for reading. Only add the attributes when there are any elements in each domain selected.
Definition at line 1825 of file mesh_legacy_convert.cc.
References blender::bke::SpanAttributeWriter< T >::finish(), and verts.
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_convert_loops_to_corners | ( | Mesh * | mesh | ) |
Definition at line 2023 of file mesh_legacy_convert.cc.
References CD_CONSTRUCT, CD_PROP_INT32, CustomData_add_layer_named(), CustomData_get_layer(), and CustomData_has_layer_named().
Referenced by BKE_mesh_convert_mfaces_to_mpolys(), BKE_mesh_do_versions_convert_mfaces_to_mpolys(), blo_do_versions_290(), and version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_convert_mpoly_to_material_indices | ( | Mesh * | mesh | ) |
Move material indices from the #MPoly to a generic attributes. Only add the attribute when the indices are not all zero.
Definition at line 1663 of file mesh_legacy_convert.cc.
References blender::Span< T >::begin(), CustomData_get_layer(), CustomData_has_layer(), blender::Span< T >::end(), blender::bke::SpanAttributeWriter< T >::finish(), and blender::Span< T >::index_range().
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_convert_polys_to_offsets | ( | Mesh * | mesh | ) |
Definition at line 2068 of file mesh_legacy_convert.cc.
References b, blender::Array< T, InlineBufferCapacity, Allocator >::begin(), BKE_mesh_face_offsets_ensure_alloc(), CD_CONSTRUCT, CD_MASK_MESH, CustomData_free(), CustomData_get_layer(), CustomData_init_layout_from(), CustomData_reset(), blender::Array< T, InlineBufferCapacity, Allocator >::end(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), blender::Span< T >::index_range(), CustomData_MeshMasks::pmask, poly_loops_orders_match(), and blender::Span< T >::size().
Referenced by BKE_mesh_convert_mfaces_to_mpolys(), BKE_mesh_do_versions_convert_mfaces_to_mpolys(), blo_do_versions_290(), cutEdges(), explodeMesh(), and version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_convert_uvs_to_generic | ( | Mesh * | mesh | ) |
Definition at line 1694 of file mesh_legacy_convert.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), b, CustomData_get_active_layer_name(), CustomData_get_layer_name(), CustomData_get_layer_named(), CustomData_get_render_layer_name(), CustomData_has_layer(), CustomData_number_of_layers(), blender::Array< T, InlineBufferCapacity, Allocator >::index_range(), init(), MEM_malloc_arrayN, and range.
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_convert_verts_to_positions | ( | Mesh * | mesh | ) |
Definition at line 1891 of file mesh_legacy_convert.cc.
References CD_CONSTRUCT, CD_PROP_FLOAT3, CustomData_add_layer_named(), CustomData_get_layer(), CustomData_has_layer_named(), and verts.
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_crease_to_generic | ( | Mesh * | mesh | ) |
Definition at line 1513 of file mesh_legacy_convert.cc.
References CD_PROP_FLOAT, and replace_custom_data_layer_with_named().
Referenced by version_mesh_crease_generic().
| void BKE_mesh_legacy_edge_crease_to_layers | ( | Mesh * | mesh | ) |
Copy edge creases from edges to a separate layer.
Definition at line 1494 of file mesh_legacy_convert.cc.
References CD_CONSTRUCT, CustomData_add_layer(), and CustomData_has_layer().
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_face_map_to_generic | ( | Main * | bmain | ) |
Definition at line 1396 of file mesh_legacy_convert.cc.
References BLI_freelistN(), LISTBASE_FOREACH, LISTBASE_FOREACH_INDEX, Main::meshes, move_face_map_data_to_attributes(), OB_MESH, and Main::objects.
Referenced by do_versions_after_linking_400().
| void BKE_mesh_legacy_face_set_to_generic | ( | Mesh * | mesh | ) |
Copy face sets to the generic data type from the legacy type.
Definition at line 1309 of file mesh_legacy_convert.cc.
References CD_PROP_INT32, CustomData_add_layer_named_with_data(), CustomData_free_layer(), CustomDataLayer::data, and blender::ImplicitSharingInfo::remove_user_and_delete_if_last().
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_sharp_edges_from_flags | ( | Mesh * | mesh | ) |
Definition at line 1531 of file mesh_legacy_convert.cc.
References blender::bke::SpanAttributeWriter< T >::finish().
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_sharp_faces_from_flags | ( | Mesh * | mesh | ) |
Definition at line 1274 of file mesh_legacy_convert.cc.
References blender::Span< T >::begin(), CustomData_get_layer(), blender::Span< T >::end(), blender::bke::SpanAttributeWriter< T >::finish(), and blender::Span< T >::index_range().
Referenced by version_mesh_legacy_to_struct_of_array_format().
| void BKE_mesh_legacy_uv_seam_from_flags | ( | Mesh * | mesh | ) |
Definition at line 1564 of file mesh_legacy_convert.cc.
References blender::bke::SpanAttributeWriter< T >::finish().
Referenced by version_mesh_legacy_to_struct_of_array_format().
| int BKE_mesh_mface_index_validate | ( | MFace * | mface, |
| CustomData * | mfdata, | ||
| int | mfindex, | ||
| int | nr ) |
Rotates the vertices of a face in case v[2] or v[3] (vertex index) is = 0. this is necessary to make the if MFace.v4 check for quads work.
Definition at line 932 of file mesh_legacy_convert.cc.
References CustomData_swap_corners(), MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by cutEdges(), explodeMesh(), and mesh_tessface_calc().
| BLI_INLINE int BKE_mesh_origindex_mface_mpoly | ( | const int * | index_mf_to_mpoly, |
| const int * | index_mp_to_orig, | ||
| const int | i ) |
Definition at line 128 of file BKE_mesh_legacy_convert.hh.
Referenced by psys_particle_dm_face_lookup().
| void BKE_mesh_tessface_calc | ( | Mesh * | mesh | ) |
Recreate MFace Tessellation.
Definition at line 1246 of file mesh_legacy_convert.cc.
References mesh_ensure_tessellation_customdata(), and mesh_tessface_calc().
Referenced by BKE_mesh_tessface_ensure(), and blender::ed::curves::convert_to_particle_system::try_convert_single_object().
| void BKE_mesh_tessface_ensure | ( | Mesh * | mesh | ) |
Definition at line 1261 of file mesh_legacy_convert.cc.
References BKE_mesh_tessface_calc().
Referenced by bc_get_mesh_copy(), deform_verts(), blender::io::alembic::ABCHairWriter::do_write(), modify_mesh(), blender::draw::particle_batch_cache_ensure_pos_and_seg(), blender::draw::particle_batch_cache_ensure_procedural_strand_data(), particle_intersect_mesh(), particle_system_update(), PE_mirror_x(), psys_cache_paths(), psys_thread_context_init_distribute(), and remap_hair_emitter().