Page MenuHome

Fix T72830: Check if the mesh has mask data before extractig or slicing
ClosedPublic

Authored by Pablo Dobarro (pablodp606) on Thu, Jan 2, 8:56 PM.

Details

Summary

This was causing a crash when the mesh does not have the mask data
initialized. I also added the same check to mask extract as it works the
same way.

Diff Detail

Repository
rB Blender

Event Timeline

Jeroen Bakker (jbakker) requested changes to this revision.Fri, Jan 3, 12:00 PM

Wouldn't it be better to add this to the poll function? This way the user get direct feedback that this operation cannot be used. That is better than just cancel without reporting any reason why it was cancelled.
Other solution could be to add the CD_PAINT_MASK layer.

IMO adding the CD_PAINT_MASK is the most friendly option, don't you think so?

This revision now requires changes to proceed.Fri, Jan 3, 12:00 PM
  • Review Update

The problem with this approach is that we are creating an "empty" sculpt geometry undo step that does nothing which contains two copies of the mesh (for undo and redo) that are the same as the current mesh. With the previous solution we cancel the operator before creating the copies.

This revision is now accepted and ready to land.Tue, Jan 7, 3:25 PM