Page MenuHome

Fix T79054: Crash with Cloth Brush and anchored stroke
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Jul 19 2020, 9:10 PM.

Details

Summary

As the comment says, anchored stroke can't rely on the first stroke
iteration for creating the simulation data. Probably lost in a cleanup.

I also made that anchored stroke doesn't restore the mesh state in the
cloth brush, so it can create the simulation effect.

Diff Detail

Repository
rB Blender
Branch
T79054 (branched from master)
Build Status
Buildable 9103
Build 9103: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Jul 19 2020, 9:10 PM
Sergey Sharybin (sergey) requested changes to this revision.Jul 20 2020, 11:19 AM

As the comment says, anchored stroke can't rely on the first stroke iteration for creating the simulation data.

This is not what the comment says. It says: The simulation structure only needs to be created on the first symmetry pass., no mention of this not being unreliable or why is it unreliable.

I also made that anchored stroke doesn't restore the mesh state in the cloth brush, so it can create the simulation effect.

If there is some non-obvious relation between this change and the crash fix, write it down why it is so.

If there is no relation, do not combine them to a single patch/commit. Keep changes as atomic as possible.

This revision now requires changes to proceed.Jul 20 2020, 11:19 AM
  • Update comments and fix initial brush size

The crash can be avoided just by checking the ss->cache->clothsim, but only by creating the cloth sim the brush won't deform the mesh at all with anchored stroke. The fixes in sculpt.c are necessary to make deform the mesh like this, which I guess is what is expected for the fix.

This revision is now accepted and ready to land.Jul 28 2020, 9:10 AM