Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/mesh_wrapper.c
| Context not available. | |||||
| #include "BLI_ghash.h" | #include "BLI_ghash.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_threads.h" | |||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BKE_editmesh.h" | #include "BKE_editmesh.h" | ||||
| Context not available. | |||||
| void BKE_mesh_wrapper_ensure_mdata(Mesh *me) | void BKE_mesh_wrapper_ensure_mdata(Mesh *me) | ||||
| { | { | ||||
| ThreadMutex *mesh_eval_mutex = (ThreadMutex *)me->runtime.eval_mutex; | |||||
| BLI_mutex_lock(mesh_eval_mutex); | |||||
| if (me->runtime.wrapper_type == ME_WRAPPER_TYPE_MDATA) { | if (me->runtime.wrapper_type == ME_WRAPPER_TYPE_MDATA) { | ||||
| BLI_mutex_unlock(mesh_eval_mutex); | |||||
| return; | return; | ||||
| } | } | ||||
| const eMeshWrapperType geom_type_orig = me->runtime.wrapper_type; | const eMeshWrapperType geom_type_orig = me->runtime.wrapper_type; | ||||
| me->runtime.wrapper_type = ME_WRAPPER_TYPE_MDATA; | me->runtime.wrapper_type = ME_WRAPPER_TYPE_MDATA; | ||||
| Context not available. | |||||
| if (me->runtime.wrapper_type_finalize) { | if (me->runtime.wrapper_type_finalize) { | ||||
| BKE_mesh_wrapper_deferred_finalize(me, &me->runtime.cd_mask_extra); | BKE_mesh_wrapper_deferred_finalize(me, &me->runtime.cd_mask_extra); | ||||
| } | } | ||||
| BLI_mutex_unlock(mesh_eval_mutex); | |||||
| } | } | ||||
| bool BKE_mesh_wrapper_minmax(const Mesh *me, float min[3], float max[3]) | bool BKE_mesh_wrapper_minmax(const Mesh *me, float min[3], float max[3]) | ||||
| Context not available. | |||||