diff options
author | Hans Goudey <h.goudey@me.com> | 2022-11-03 19:40:33 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-11-03 19:40:33 +0300 |
commit | f4e261bfed553c98f6e987dc84591ecc680e1ebb (patch) | |
tree | 4fd7816190c0b3af1c8a25e686d1a17e951fd3ab /source/blender/blenkernel/BKE_paint.h | |
parent | 0c79e9df4b88f6a063e7437943e6560b89fbd749 (diff) | |
parent | 41c692ee2f0f5a92d6162e65652e6f8d399df1a9 (diff) |
Merge branch 'master' into refactor-mesh-position-generic
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r-- | source/blender/blenkernel/BKE_paint.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 399b0928ee3..bec78f947f0 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -859,7 +859,19 @@ int *BKE_sculpt_face_sets_ensure(struct Mesh *mesh); * (see #SCULPT_visibility_sync_all_from_faces). */ bool *BKE_sculpt_hide_poly_ensure(struct Mesh *mesh); -int BKE_sculpt_mask_layers_ensure(struct Object *ob, struct MultiresModifierData *mmd); + +/** + * Ensures a mask layer exists. If depsgraph and bmain are non-null, + * a mask doesn't exist and the object has a multi-resolution modifier + * then the scene depsgraph will be evaluated to update the runtime + * subdivision data. + * + * \note always call *before* #BKE_sculpt_update_object_for_edit. + */ +int BKE_sculpt_mask_layers_ensure(struct Depsgraph *depsgraph, + struct Main *bmain, + struct Object *ob, + struct MultiresModifierData *mmd); void BKE_sculpt_toolsettings_data_ensure(struct Scene *scene); struct PBVH *BKE_sculpt_object_pbvh_ensure(struct Depsgraph *depsgraph, struct Object *ob); @@ -873,7 +885,7 @@ void BKE_sculpt_sync_face_visibility_to_grids(struct Mesh *mesh, struct SubdivCC * Test if PBVH can be used directly for drawing, which is faster than * drawing the mesh and all updates that come with it. */ -bool BKE_sculptsession_use_pbvh_draw(const struct Object *ob, const struct View3D *v3d); +bool BKE_sculptsession_use_pbvh_draw(const struct Object *ob, const struct RegionView3D *rv3d); enum { SCULPT_MASK_LAYER_CALC_VERT = (1 << 0), |