|
Blender V5.0
|
#include "MEM_guardedalloc.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BLI_array.hh"#include "BLI_math_constants.h"#include "BKE_attribute.hh"#include "BKE_context.hh"#include "BKE_customdata.hh"#include "BKE_editmesh.hh"#include "BKE_key.hh"#include "BKE_library.hh"#include "BKE_mesh.hh"#include "BKE_mesh_runtime.hh"#include "BKE_report.hh"#include "DEG_depsgraph.hh"#include "RNA_prototypes.hh"#include "WM_api.hh"#include "WM_types.hh"#include "BLT_translation.hh"#include "ED_mesh.hh"#include "ED_object.hh"#include "ED_paint.hh"#include "ED_screen.hh"#include "GEO_mesh_split_edges.hh"#include "mesh_intern.hh"Go to the source code of this file.
Typedefs | |
| using | float2 |
| using | float3 |
| using blender::float2 |
Definition at line 618 of file BLI_math_vector_types.hh.
| using blender::float3 |
Definition at line 619 of file BLI_math_vector_types.hh.
| int ED_mesh_color_add | ( | Mesh * | mesh, |
| const char * | name, | ||
| const bool | active_set, | ||
| const bool | do_init, | ||
| ReportList * | reports ) |
Definition at line 340 of file mesh_data.cc.
References BKE_attribute_new(), BKE_id_attributes_active_color_set(), BKE_id_attributes_color_find(), bm, BM_data_layer_copy(), BM_LOOP, CD_PROP_BYTE_COLOR, blender::bke::Corner, CustomData_get_elem_size(), CustomData_get_named_layer(), CustomDataLayer::data, data, DEG_id_tag_update(), AttributeOwner::from_id(), mesh_customdata_get_type(), CustomDataLayer::name, name, NC_GEOM, ND_DATA, and WM_main_add_notifier().
Referenced by output_toggle_exec().
| bool ED_mesh_color_ensure | ( | Mesh * | mesh, |
| const char * | name ) |
Definition at line 382 of file mesh_data.cc.
References BKE_attribute_calc_unique_name(), BKE_color_attribute_supported(), BKE_id_attributes_active_color_set(), BKE_id_attributes_default_color_set(), BKE_mesh_tessface_clear(), BLI_assert, blender::bke::ColorByte, blender::bke::Corner, DEG_id_tag_update(), AttributeOwner::from_id(), name, and unique_name().
Referenced by blender::ed::sculpt_paint::vwpaint::mode_enter_generic(), vertex_color_brightness_contrast_exec(), vertex_color_hsv_exec(), vertex_color_invert_exec(), vertex_color_levels_exec(), vertex_color_smooth(), vertex_paint_from_weight(), and vpaint_stroke_test_start().
Returns the pinned mesh, the mesh from the pinned object, or the mesh from the active object.
Definition at line 1088 of file mesh_data.cc.
References C, blender::ed::object::context_active_object(), CTX_data_pointer_get_type(), data, Object::data, PointerRNA::data, GS, and ID_ME.
Referenced by ED_operator_editable_mesh(), blender::ed::mesh::mesh_active_attribute_poll(), mesh_customdata_clear_exec__internal(), mesh_customdata_custom_splitnormals_add_exec(), mesh_customdata_custom_splitnormals_clear_exec(), blender::ed::mesh::set_attribute::mesh_set_attribute_exec(), blender::ed::mesh::set_attribute::mesh_set_attribute_invoke(), and blender::ed::mesh::set_attribute::mesh_set_attribute_ui().
| void ED_mesh_edges_add | ( | Mesh * | mesh, |
| ReportList * | reports, | ||
| int | count ) |
Definition at line 911 of file mesh_data.cc.
References BKE_report(), count, mesh_add_edges(), and RPT_ERROR.
| void ED_mesh_edges_remove | ( | Mesh * | mesh, |
| ReportList * | reports, | ||
| int | count ) |
Definition at line 1002 of file mesh_data.cc.
References BKE_report(), count, mesh_remove_edges(), and RPT_ERROR.
| void ED_mesh_faces_add | ( | Mesh * | mesh, |
| ReportList * | reports, | ||
| int | count ) |
Definition at line 929 of file mesh_data.cc.
References BKE_report(), count, mesh_add_faces(), and RPT_ERROR.
| void ED_mesh_faces_remove | ( | Mesh * | mesh, |
| ReportList * | reports, | ||
| int | count ) |
Definition at line 1030 of file mesh_data.cc.
References BKE_report(), count, mesh_remove_faces(), and RPT_ERROR.
| void ED_mesh_geometry_clear | ( | Mesh * | mesh | ) |
Definition at line 1044 of file mesh_data.cc.
References mesh_remove_edges(), mesh_remove_faces(), mesh_remove_loops(), and mesh_remove_verts().
Referenced by mesh_separate_loose().
Definition at line 1081 of file mesh_data.cc.
References BKE_keyblock_find_by_index(), BLI_assert, Mesh::key, and Mesh::runtime.
Referenced by blender::ed::object::shape_key_report_if_locked().
| void ED_mesh_loops_add | ( | Mesh * | mesh, |
| ReportList * | reports, | ||
| int | count ) |
Definition at line 920 of file mesh_data.cc.
References BKE_report(), count, mesh_add_loops(), and RPT_ERROR.
| void ED_mesh_loops_remove | ( | Mesh * | mesh, |
| ReportList * | reports, | ||
| int | count ) |
Definition at line 1016 of file mesh_data.cc.
References BKE_report(), count, mesh_remove_loops(), and RPT_ERROR.
| void ED_mesh_report_mirror | ( | ReportList & | reports, |
| int | totmirr, | ||
| int | totfail ) |
Definition at line 1076 of file mesh_data.cc.
References ED_mesh_report_mirror_ex(), and SCE_SELECT_VERTEX.
Referenced by blender::ed::object::shape_key_mirror_exec(), and blender::ed::object::vertex_group_mirror_exec().
| void ED_mesh_report_mirror_ex | ( | ReportList & | reports, |
| int | totmirr, | ||
| int | totfail, | ||
| char | selectmode ) |
Definition at line 1054 of file mesh_data.cc.
References BKE_reportf(), RPT_INFO, RPT_WARNING, SCE_SELECT_EDGE, and SCE_SELECT_VERTEX.
Referenced by ED_mesh_report_mirror(), ED_mesh_shapes_join_objects_exec(), and edbm_select_mirror_exec().
| void ED_mesh_split_faces | ( | Mesh * | mesh | ) |
Split all edges that would appear sharp based on face and edge sharpness tags and the auto smooth angle.
Definition at line 1108 of file mesh_data.cc.
References blender::bke::Edge, blender::bke::Face, blender::offset_indices::OffsetIndices< T >::index_range(), blender::bke::AttributeAccessor::lookup(), blender::bke::AttributeAccessor::lookup_or_default(), blender::VArrayCommon< T >::materialize(), and blender::threading::parallel_for().
Referenced by blender::ed::object::bake_mesh_new_from_object().
| int ED_mesh_uv_add | ( | Mesh * | mesh, |
| const char * | name, | ||
| const bool | active_set, | ||
| const bool | do_init, | ||
| ReportList * | reports ) |
Definition at line 218 of file mesh_data.cc.
References BKE_attribute_calc_unique_name(), BKE_reportf(), BM_data_layer_add_named(), BM_data_layer_copy(), BM_uv_map_attr_pin_ensure_for_all_layers(), CD_PROP_FLOAT2, CD_SET_DEFAULT, Mesh::corner_data, Mesh::corners_num, CustomData_add_layer_named(), CustomData_add_layer_named_with_data(), CustomData_get_active_layer(), CustomData_get_layer(), CustomData_has_layer(), CustomData_number_of_layers(), CustomData_set_layer_active(), DATA_, DEG_id_tag_update(), AttributeOwner::from_id(), Mesh::id, MAX_MTFACE, MEM_dupallocN(), name, NC_GEOM, ND_DATA, reset_uv_map(), RPT_WARNING, Mesh::runtime, unique_name(), and WM_main_add_notifier().
Referenced by ED_mesh_uv_ensure(), mesh_uv_texture_add_exec(), and uvedit_ensure_uvs().
| void ED_mesh_uv_ensure | ( | Mesh * | mesh, |
| const char * | name ) |
Definition at line 322 of file mesh_data.cc.
References CD_PROP_FLOAT2, CustomData_number_of_layers(), ED_mesh_uv_add(), and name.
Referenced by add_primitive_circle_exec(), add_primitive_cone_exec(), add_primitive_cube_exec(), add_primitive_cube_gizmo_exec(), add_primitive_cylinder_exec(), add_primitive_grid_exec(), add_primitive_icosphere_exec(), add_primitive_monkey_exec(), add_primitive_plane_exec(), add_primitive_uvsphere_exec(), and ED_uvedit_add_simple_uvs().
Definition at line 208 of file mesh_data.cc.
References BM_LOOP, C, CD_PROP_FLOAT2, CustomData_get_active_layer_name(), mesh_customdata_get_type(), name, NC_GEOM, ND_DATA, reset_uv_map(), and WM_event_add_notifier().
Referenced by reset_exec().
| blender::bke::AttributeWriter< bool > ED_mesh_uv_map_pin_layer_ensure | ( | Mesh * | mesh, |
| const int | uv_index ) |
Definition at line 314 of file mesh_data.cc.
References BKE_uv_map_pin_name_get(), CD_PROP_FLOAT2, CustomData_get_layer_name(), ensure_corner_boolean_attribute(), and MAX_CUSTOMDATA_LAYER_NAME.
| blender::VArray< bool > ED_mesh_uv_map_pin_layer_get | ( | const Mesh * | mesh, |
| const int | uv_index ) |
Definition at line 298 of file mesh_data.cc.
References BKE_uv_map_pin_name_get(), CD_PROP_FLOAT2, CustomData_get_layer_name(), get_corner_boolean_attribute(), and MAX_CUSTOMDATA_LAYER_NAME.
| void ED_mesh_verts_add | ( | Mesh * | mesh, |
| ReportList * | reports, | ||
| int | count ) |
Definition at line 902 of file mesh_data.cc.
References BKE_report(), count, mesh_add_verts(), and RPT_ERROR.
| void ED_mesh_verts_remove | ( | Mesh * | mesh, |
| ReportList * | reports, | ||
| int | count ) |
Definition at line 988 of file mesh_data.cc.
References BKE_report(), count, mesh_remove_verts(), and RPT_ERROR.
|
static |
Definition at line 306 of file mesh_data.cc.
References blender::bke::Corner, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write(), and name.
Referenced by ED_mesh_uv_map_pin_layer_ensure().
|
static |
Definition at line 292 of file mesh_data.cc.
References Geometry::attributes, blender::bke::Corner, blender::bke::AttributeAccessor::lookup_or_default(), and name.
Referenced by ED_mesh_uv_map_pin_layer_get().
|
static |
Definition at line 410 of file mesh_data.cc.
References C, blender::ed::object::context_object(), data, Object::data, ID_IS_EDITABLE, ID_IS_OVERRIDE_LIBRARY, OB_MESH, and Object::type.
Referenced by MESH_OT_uv_texture_add(), and uv_texture_remove_poll().
|
static |
Definition at line 786 of file mesh_data.cc.
References BKE_mesh_runtime_clear_cache(), CD_MASK_MESH, CD_PROP_INT32_2D, CD_SET_DEFAULT, CustomData_add_layer_named(), CustomData_copy_data(), CustomData_free(), CustomData_has_layer_named(), CustomData_init_layout_from(), blender::bke::Edge, blender::bke::SpanAttributeWriter< T >::finish(), len, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by ED_mesh_edges_add().
|
static |
Definition at line 859 of file mesh_data.cc.
References BKE_mesh_runtime_clear_cache(), CD_MASK_MESH, CD_SET_DEFAULT, CustomData_copy_data(), CustomData_free(), CustomData_init_layout_from(), blender::bke::Face, blender::bke::SpanAttributeWriter< T >::finish(), len, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::implicit_sharing::resize_trivial_array(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by ED_mesh_faces_add().
|
static |
Definition at line 822 of file mesh_data.cc.
References BKE_mesh_runtime_clear_cache(), CD_MASK_MESH, CD_PROP_INT32, CD_SET_DEFAULT, CustomData_add_layer_named(), CustomData_copy_data(), CustomData_free(), CustomData_has_layer_named(), CustomData_init_layout_from(), and len.
Referenced by ED_mesh_loops_add().
|
static |
Definition at line 755 of file mesh_data.cc.
References BKE_mesh_runtime_clear_cache(), CD_MASK_MESH, CD_PROP_FLOAT3, CD_SET_DEFAULT, CustomData_add_layer_named(), CustomData_copy_data(), CustomData_free(), CustomData_has_layer_named(), CustomData_init_layout_from(), blender::bke::SpanAttributeWriter< T >::finish(), len, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::bke::Point, and blender::bke::SpanAttributeWriter< T >::span.
Referenced by ED_mesh_verts_add().
|
static |
Definition at line 511 of file mesh_data.cc.
References BLI_assert, BM_data_layer_free(), C, CustomData_free_layers(), CustomData_has_layer(), CustomData_layertype_is_singleton(), data, DEG_id_tag_update(), ED_mesh_context(), ID_RECALC_GEOMETRY, mesh_customdata_get_type(), NC_GEOM, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by mesh_customdata_mask_clear_exec(), and mesh_customdata_skin_clear_exec().
|
static |
Definition at line 670 of file mesh_data.cc.
References BKE_mesh_has_custom_loop_normals(), bm, BM_data_layer_ensure_named(), C, CD_PROP_INT16_2D, blender::bke::Corner, DEG_id_tag_update(), ED_mesh_context(), NC_GEOM, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by MESH_OT_customdata_custom_splitnormals_add().
|
static |
Definition at line 712 of file mesh_data.cc.
References BKE_lnor_spacearr_clear(), bm, BM_data_layer_free_named(), C, CD_PROP_INT16_2D, CustomData_has_layer_named(), DEG_id_tag_update(), ED_mesh_context(), ID_RECALC_GEOMETRY, NC_GEOM, ND_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by MESH_OT_customdata_custom_splitnormals_clear().
|
static |
Definition at line 52 of file mesh_data.cc.
References BLI_assert, bm, BM_EDGE, BM_FACE, BM_LOOP, BM_VERT, Mesh::corner_data, Mesh::corners_num, data, Mesh::edge_data, Mesh::edges_num, Mesh::face_data, Mesh::faces_num, Mesh::runtime, Mesh::vert_data, and Mesh::verts_num.
Referenced by ED_mesh_color_add(), ED_mesh_uv_loop_reset(), mesh_customdata_clear_exec__internal(), mesh_customdata_mask_clear_poll(), mesh_customdata_skin_state(), mesh_uv_texture_remove_exec(), and uv_texture_remove_poll().
|
static |
Definition at line 562 of file mesh_data.cc.
References BKE_attribute_remove(), BM_LOOP, C, CD_GRID_PAINT_MASK, blender::ed::object::context_object(), AttributeOwner::from_id(), mesh_customdata_clear_exec__internal(), OPERATOR_CANCELLED, OPERATOR_FINISHED, and wmOperator::reports.
Referenced by MESH_OT_customdata_mask_clear().
|
static |
Definition at line 538 of file mesh_data.cc.
References BM_LOOP, BM_VERT, C, CD_GRID_PAINT_MASK, CD_PROP_FLOAT, blender::ed::object::context_object(), CustomData_has_layer(), CustomData_has_layer_named(), data, Object::data, ID_IS_EDITABLE, ID_IS_OVERRIDE_LIBRARY, mesh_customdata_get_type(), Object::mode, OB_MESH, OB_MODE_SCULPT, and Object::type.
Referenced by MESH_OT_customdata_mask_clear().
|
static |
Definition at line 616 of file mesh_data.cc.
References BKE_mesh_ensure_skin_customdata(), C, blender::ed::object::context_object(), Object::data, DEG_id_tag_update(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by MESH_OT_customdata_skin_add().
|
static |
Definition at line 611 of file mesh_data.cc.
References C, and mesh_customdata_skin_state().
Referenced by MESH_OT_customdata_skin_add().
|
static |
Definition at line 649 of file mesh_data.cc.
References BM_VERT, C, CD_MVERT_SKIN, and mesh_customdata_clear_exec__internal().
Referenced by MESH_OT_customdata_skin_clear().
|
static |
Definition at line 644 of file mesh_data.cc.
References C, and mesh_customdata_skin_state().
Referenced by MESH_OT_customdata_skin_clear().
|
static |
Clear Skin
Definition at line 597 of file mesh_data.cc.
References BM_VERT, C, CD_MVERT_SKIN, blender::ed::object::context_object(), CustomData_has_layer(), data, Object::data, ID_IS_EDITABLE, ID_IS_OVERRIDE_LIBRARY, mesh_customdata_get_type(), OB_MESH, and Object::type.
Referenced by mesh_customdata_skin_add_poll(), and mesh_customdata_skin_clear_poll().
| void MESH_OT_customdata_custom_splitnormals_add | ( | wmOperatorType * | ot | ) |
Definition at line 697 of file mesh_data.cc.
References ED_operator_editable_mesh(), mesh_customdata_custom_splitnormals_add_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_mesh().
| void MESH_OT_customdata_custom_splitnormals_clear | ( | wmOperatorType * | ot | ) |
Definition at line 740 of file mesh_data.cc.
References ED_operator_editable_mesh(), mesh_customdata_custom_splitnormals_clear_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_mesh().
| void MESH_OT_customdata_mask_clear | ( | wmOperatorType * | ot | ) |
Definition at line 576 of file mesh_data.cc.
References mesh_customdata_mask_clear_exec(), mesh_customdata_mask_clear_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_mesh().
| void MESH_OT_customdata_skin_add | ( | wmOperatorType * | ot | ) |
Definition at line 629 of file mesh_data.cc.
References mesh_customdata_skin_add_exec(), mesh_customdata_skin_add_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_mesh().
| void MESH_OT_customdata_skin_clear | ( | wmOperatorType * | ot | ) |
Definition at line 654 of file mesh_data.cc.
References mesh_customdata_skin_clear_exec(), mesh_customdata_skin_clear_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_mesh().
| void MESH_OT_uv_texture_add | ( | wmOperatorType * | ot | ) |
Definition at line 455 of file mesh_data.cc.
References layers_poll(), mesh_uv_texture_add_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, and ot.
Referenced by ED_operatortypes_mesh().
| void MESH_OT_uv_texture_remove | ( | wmOperatorType * | ot | ) |
Definition at line 494 of file mesh_data.cc.
References mesh_uv_texture_remove_exec(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and uv_texture_remove_poll().
Referenced by ED_operatortypes_mesh().
|
static |
Definition at line 955 of file mesh_data.cc.
References CustomData_ensure_layers_are_mutable(), CustomData_free_elem(), and len.
Referenced by ED_mesh_edges_remove(), and ED_mesh_geometry_clear().
|
static |
Definition at line 977 of file mesh_data.cc.
References CustomData_ensure_layers_are_mutable(), CustomData_free_elem(), and len.
Referenced by ED_mesh_faces_remove(), and ED_mesh_geometry_clear().
|
static |
Definition at line 966 of file mesh_data.cc.
References CustomData_ensure_layers_are_mutable(), CustomData_free_elem(), and len.
Referenced by ED_mesh_geometry_clear(), and ED_mesh_loops_remove().
|
static |
Definition at line 944 of file mesh_data.cc.
References CustomData_ensure_layers_are_mutable(), CustomData_free_elem(), and len.
Referenced by ED_mesh_geometry_clear(), and ED_mesh_verts_remove().
|
static |
Definition at line 112 of file mesh_data.cc.
References cosf, float, i, len, M_PI, and sinf.
Referenced by reset_uvs_bmesh(), and reset_uvs_mesh().
|
static |
Definition at line 437 of file mesh_data.cc.
References C, blender::ed::object::context_object(), CTX_data_scene(), Object::data, ED_mesh_uv_add(), ED_paint_proj_mesh_data_check(), Object::mode, NC_SCENE, ND_TOOLSETTINGS, OB_MODE_TEXTURE_PAINT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, and WM_event_add_notifier().
Referenced by MESH_OT_uv_texture_add().
|
static |
Definition at line 470 of file mesh_data.cc.
References BKE_attribute_remove(), BM_LOOP, C, CD_PROP_FLOAT2, blender::ed::object::context_object(), CTX_data_scene(), CustomData_get_active_layer_name(), Object::data, DEG_id_tag_update(), ED_paint_proj_mesh_data_check(), AttributeOwner::from_id(), ID_RECALC_GEOMETRY, mesh_customdata_get_type(), Object::mode, name, NC_GEOM, NC_SCENE, ND_DATA, ND_TOOLSETTINGS, OB_MODE_TEXTURE_PAINT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, WM_event_add_notifier(), and WM_main_add_notifier().
Referenced by MESH_OT_uv_texture_remove().
Definition at line 177 of file mesh_data.cc.
References BLI_assert, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACES_OF_MESH, BM_ITER_MESH, CD_PROP_FLOAT2, blender::bke::Corner, CustomData_get_offset_named(), DEG_id_tag_update(), blender::bke::SpanAttributeWriter< T >::domain, faces, blender::bke::SpanAttributeWriter< T >::finish(), i, Mesh::id, blender::bke::MutableAttributeAccessor::lookup_for_write_span(), name, reset_uvs_bmesh(), reset_uvs_mesh(), Mesh::runtime, and blender::bke::SpanAttributeWriter< T >::span.
Referenced by ED_mesh_uv_add(), and ED_mesh_uv_loop_reset().
|
static |
Definition at line 152 of file mesh_data.cc.
References BM_ELEM_CD_GET_VOID_P, BM_ITER_ELEM_INDEX, BM_LOOPS_OF_FACE, blender::Array< T, InlineBufferCapacity, Allocator >::data(), i, l, BMFace::len, and mesh_uv_reset_array().
Referenced by reset_uv_map().
|
static |
Definition at line 166 of file mesh_data.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::data(), i, mesh_uv_reset_array(), and blender::IndexRange::size().
Referenced by reset_uv_map().
|
static |
Definition at line 420 of file mesh_data.cc.
References active, BM_LOOP, C, CD_PROP_FLOAT2, blender::ed::object::context_object(), CustomData_get_active_layer(), Object::data, layers_poll(), and mesh_customdata_get_type().
Referenced by MESH_OT_uv_texture_remove().