mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix T53986: Crash saving during sculpt stroke
Also remove unused struct member.
This commit is contained in:
parent
81697c772c
commit
f5c0df3601
2 changed files with 5 additions and 2 deletions
|
|
@ -199,7 +199,6 @@ typedef struct SculptSession {
|
|||
/* Layer brush persistence between strokes */
|
||||
float (*layer_co)[3]; /* Copy of the mesh vertices' locations */
|
||||
|
||||
struct SculptStroke *stroke;
|
||||
struct StrokeCache *cache;
|
||||
} SculptSession;
|
||||
|
||||
|
|
|
|||
|
|
@ -168,7 +168,11 @@ bool ED_editors_flush_edits(const bContext *C, bool for_render)
|
|||
* exiting we might not have a context for edit object and multiple sculpt
|
||||
* objects can exist at the same time */
|
||||
for (ob = bmain->object.first; ob; ob = ob->id.next) {
|
||||
if (ob->mode & OB_MODE_SCULPT) {
|
||||
if ((ob->mode & OB_MODE_SCULPT) &&
|
||||
/* Don't allow flushing while in the middle of a stroke (frees data in use).
|
||||
* Auto-save prevents this from happening but scripts may cause a flush on saving: T53986. */
|
||||
((ob->sculpt && ob->sculpt->cache) == 0))
|
||||
{
|
||||
/* flush multires changes (for sculpt) */
|
||||
multires_force_update(ob);
|
||||
has_edited = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue