diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-05-11 16:32:50 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-05-11 16:32:50 +0300 |
commit | 8c6391a9b30c328b58b06f6a4842b2b7e1c76487 (patch) | |
tree | c8e566a2702b277e41c92edd2ec7ef66c39c820b /source/blender/editors | |
parent | 76c64af00caa7308368dfe0221b617c2aae3cde4 (diff) | |
parent | 86a16e7381aed89a466244ced5c7ae697977cd4b (diff) |
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c index fbf3c608ada..905d0e0a4bf 100644 --- a/source/blender/editors/sculpt_paint/sculpt_undo.c +++ b/source/blender/editors/sculpt_paint/sculpt_undo.c @@ -1565,6 +1565,17 @@ static bool sculpt_undo_use_multires_mesh(bContext *C) static void sculpt_undo_push_all_grids(Object *object) { SculptSession *ss = object->sculpt; + + /* It is possible that undo push is done from an object state where there is no PBVH. This + * happens, for example, when an operation which tagged for geometry update was performed prior + * to the current operation without making any stroke inbetween. + * + * Skip pushing nodes based on the following logic: on redo SCULPT_UNDO_COORDS will ensure + * PBVH for the new base geometry, which will have same coordinates as if we create PBVH here. */ + if (ss->pbvh == NULL) { + return; + } + PBVHNode **nodes; int totnodes; |