36 const float (*vert_coords)[3],
37 const int num_vert_coords)
46 &reshape_context, vert_coords, num_vert_coords)) {
65 int num_deformed_verts;
69 depsgraph, dst, mmd, deformed_verts, num_deformed_verts);
95 int num_deformed_verts;
105 deform_md, &modifier_ctx, multires_mesh, deformed_verts, multires_mesh->
totvert);
110 depsgraph,
object, &highest_mmd, deformed_verts, num_deformed_verts);
130 &reshape_context, subdiv_ccg, coarse_mesh, tot_level)) {
158 const int top_level = mmd->
totlvl + 1;
167 if (top_level <= mmd->totlvl) {
171 Mesh *coarse_mesh =
object->data;
172 if (coarse_mesh->
totloop == 0) {
195 if (!has_mdisps || top_level == 1 || mmd->
totlvl == 0) {
typedef float(TangentPoint)[2]
CustomData interface, see also DNA_customdata_types.h.
bool CustomData_has_layer(const struct CustomData *data, int type)
const CustomData_MeshMasks CD_MASK_BAREMESH
void * CustomData_add_layer(struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem)
void BKE_id_free(struct Main *bmain, void *idv)
float(* BKE_mesh_vert_coords_alloc(const struct Mesh *mesh, int *r_vert_len))[3]
struct Mesh * mesh_get_eval_final(struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
void BKE_modifier_deform_verts(ModifierData *md, const struct ModifierEvalContext *ctx, struct Mesh *me, float(*vertexCos)[3], int numVerts)
@ MOD_APPLY_IGNORE_SIMPLIFY
void multires_set_tot_level(struct Object *ob, struct MultiresModifierData *mmd, int lvl)
void multires_force_sculpt_rebuild(struct Object *object)
void multires_ensure_external_read(struct Mesh *mesh, int top_level)
eMultiresSubdivideModeType
@ MULTIRES_SUBDIVIDE_LINEAR
@ MULTIRES_SUBDIVIDE_SIMPLE
void multires_subdivide_create_tangent_displacement_linear_grids(struct Object *object, struct MultiresModifierData *mmd)
void multires_flush_sculpt_updates(struct Object *object)
struct Mesh * BKE_multires_create_mesh(struct Depsgraph *depsgraph, struct Object *object, struct MultiresModifierData *mmd)
struct Depsgraph Depsgraph
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
Read Guarded memory(de)allocation.
const Depsgraph * depsgraph
SyclQueue void void * src
void(* MEM_freeN)(void *vmemh)
void multiresModifier_subdivide_to_level(struct Object *object, struct MultiresModifierData *mmd, const int top_level, const eMultiresSubdivideModeType mode)
bool multiresModifier_reshapeFromCCG(const int tot_level, Mesh *coarse_mesh, struct SubdivCCG *subdiv_ccg)
void multiresModifier_base_apply(struct Depsgraph *depsgraph, Object *object, MultiresModifierData *mmd)
bool multiresModifier_reshapeFromDeformModifier(struct Depsgraph *depsgraph, struct Object *object, struct MultiresModifierData *mmd, struct ModifierData *deform_md)
void multiresModifier_subdivide(Object *object, MultiresModifierData *mmd, const eMultiresSubdivideModeType mode)
bool multiresModifier_reshapeFromObject(struct Depsgraph *depsgraph, struct MultiresModifierData *mmd, struct Object *dst, struct Object *src)
bool multiresModifier_reshapeFromVertcos(struct Depsgraph *depsgraph, struct Object *object, struct MultiresModifierData *mmd, const float(*vert_coords)[3], const int num_vert_coords)
void multires_reshape_assign_final_elements_from_orig_mdisps(const MultiresReshapeContext *reshape_context)
void multires_reshape_smooth_object_grids_with_details(const MultiresReshapeContext *reshape_context)
void multires_reshape_assign_final_coords_from_mdisps(const MultiresReshapeContext *reshape_context)
void multires_reshape_apply_base_refit_base_mesh(MultiresReshapeContext *reshape_context)
bool multires_reshape_assign_final_coords_from_vertcos(const MultiresReshapeContext *reshape_context, const float(*vert_coords)[3], int num_vert_coords)
void multires_reshape_context_free(MultiresReshapeContext *reshape_context)
void multires_reshape_store_original_grids(MultiresReshapeContext *reshape_context)
void multires_reshape_ensure_grids(struct Mesh *mesh, int level)
void multires_reshape_apply_base_refine_from_base(MultiresReshapeContext *reshape_context)
bool multires_reshape_context_create_from_modifier(MultiresReshapeContext *reshape_context, struct Object *object, struct MultiresModifierData *mmd, int top_level)
bool multires_reshape_context_create_from_ccg(MultiresReshapeContext *reshape_context, struct SubdivCCG *subdiv_ccg, struct Mesh *base_mesh, int top_level)
void multires_reshape_free_original_grids(MultiresReshapeContext *reshape_context)
bool multires_reshape_context_create_from_object(MultiresReshapeContext *reshape_context, struct Depsgraph *depsgraph, struct Object *object, struct MultiresModifierData *mmd)
void multires_reshape_apply_base_update_mesh_coords(MultiresReshapeContext *reshape_context)
void multires_reshape_smooth_object_grids(const MultiresReshapeContext *reshape_context, enum eMultiresSubdivideModeType mode)
void multires_reshape_object_grids_to_tangent_displacement(const MultiresReshapeContext *reshape_context)
void multires_reshape_apply_base_refine_from_deform(MultiresReshapeContext *reshape_context)
bool multires_reshape_assign_final_coords_from_ccg(const MultiresReshapeContext *reshape_context, struct SubdivCCG *subdiv_ccg)
struct Depsgraph * depsgraph
struct MultiresReshapeContext::@100 top