51 const float (*vert_coords)[3],
52 const Mesh *me_settings)
89 const Mesh *me_settings)
107 case ME_WRAPPER_TYPE_MDATA:
108 case ME_WRAPPER_TYPE_SUBD: {
117 BLI_assert(me->edit_mesh != nullptr);
118 BLI_assert(me->runtime.edit_data != nullptr);
120 BMEditMesh *em = me->edit_mesh;
121 BM_mesh_bm_to_me_for_eval(em->bm, me, &me->runtime.cd_mask_extra);
131 BKE_mesh_ensure_default_orig_index_customdata_no_check(me);
133 EditMeshData *edit_data = me->runtime.edit_data;
134 if (edit_data->vertexCos) {
135 BKE_mesh_vert_coords_apply(me, edit_data->vertexCos);
136 me->runtime.is_original = false;
142 if (me->runtime.wrapper_type_finalize) {
143 BKE_mesh_wrapper_deferred_finalize_mdata(me, &me->runtime.cd_mask_extra);
172 float (*vert_coords)[3],
181 for (
int i = 0; i < vert_coords_len; i++) {
199 for (
int i = 0; i < vert_coords_len; i++) {
209 float (*vert_coords)[3],
211 const float mat[4][4])
219 for (
int i = 0; i < vert_coords_len; i++) {
237 for (
int i = 0; i < vert_coords_len; i++) {
329 if (subdiv ==
nullptr) {
344 float(*lnors)[3] =
static_cast<float(*)[3]
>(
355 if (subdiv != runtime_data->
subdiv) {
359 if (subdiv_mesh != me) {
typedef float(TangentPoint)[2]
void CustomData_clear_layer_flag(struct CustomData *data, int type, int flag)
void * CustomData_get_layer(const struct CustomData *data, int type)
void CustomData_set_layer_flag(struct CustomData *data, int type, int flag)
bool BKE_editmesh_cache_calc_minmax(struct BMEditMesh *em, struct EditMeshData *emd, float min[3], float max[3])
void * BKE_id_new_nomain(short type, const char *name)
void BKE_id_free(struct Main *bmain, void *idv)
void BKE_mesh_copy_parameters_for_eval(struct Mesh *me_dst, const struct Mesh *me_src)
void BKE_mesh_calc_normals_split(struct Mesh *mesh)
bool BKE_mesh_minmax(const struct Mesh *me, float r_min[3], float r_max[3])
void BKE_mesh_set_custom_normals(struct Mesh *mesh, float(*r_custom_loopnors)[3])
bool BKE_mesh_runtime_ensure_edit_data(struct Mesh *mesh)
General operations, lookup, etc. for blender objects.
void BKE_subdiv_free(Subdiv *subdiv)
struct Mesh * BKE_subdiv_to_mesh(struct Subdiv *subdiv, const SubdivToMeshSettings *settings, const struct Mesh *coarse_mesh)
struct Subdiv * BKE_subsurf_modifier_subdiv_descriptor_ensure(struct SubsurfRuntimeData *runtime_data, const struct Mesh *mesh, bool for_draw_code)
#define BLI_assert_unreachable()
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void BLI_mutex_lock(ThreadMutex *mutex)
void BLI_mutex_unlock(ThreadMutex *mutex)
pthread_mutex_t ThreadMutex
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
ATTR_WARN_UNUSED_RESULT BMesh * bm
ATTR_WARN_UNUSED_RESULT const BMVert * v
void *(* MEM_dupallocN)(const void *vmemh)
int BKE_mesh_wrapper_edge_len(const Mesh *me)
int BKE_mesh_wrapper_loop_len(const Mesh *me)
int BKE_mesh_wrapper_poly_len(const Mesh *me)
Mesh * BKE_mesh_wrapper_from_editmesh(BMEditMesh *em, const CustomData_MeshMasks *cd_mask_extra, const Mesh *me_settings)
bool BKE_mesh_wrapper_minmax(const Mesh *me, float min[3], float max[3])
static Mesh * mesh_wrapper_ensure_subdivision(Mesh *me)
Mesh * BKE_mesh_wrapper_from_editmesh_with_coords(BMEditMesh *em, const CustomData_MeshMasks *cd_mask_extra, const float(*vert_coords)[3], const Mesh *me_settings)
Mesh * BKE_mesh_wrapper_ensure_subdivision(Mesh *me)
void BKE_mesh_wrapper_ensure_mdata(Mesh *me)
void BKE_mesh_wrapper_vert_coords_copy_with_mat4(const Mesh *me, float(*vert_coords)[3], int vert_coords_len, const float mat[4][4])
int BKE_mesh_wrapper_vert_len(const Mesh *me)
void BKE_mesh_wrapper_vert_coords_copy(const Mesh *me, float(*vert_coords)[3], int vert_coords_len)
void isolate_task(const Function &function)
const float(* vertexCos)[3]
struct SubsurfRuntimeData * subsurf_runtime_data
struct EditMeshData * edit_data
CustomData_MeshMasks cd_mask_extra
struct BMEditMesh * edit_mesh