Page MenuHome

Separating strokes creates negative times
ClosedPublic

Authored by Marc Chéhab (marcluzmedia) on Sun, Jan 15, 5:25 PM.

Details

Summary

Separating strokes using "selected points" didn't take into account that points->time can be 0 and thus created points with negative values in points->time, which should be an impossibility. This patch fixes this in BKE_gpencil_stroke_delete_tagged_points.

Also, it makes the build modifier's new drawspeed immune to (erroneous) negative time values, should they arise in other situations.

Diff Detail

Repository
rB Blender

Event Timeline

Marc Chéhab (marcluzmedia) requested review of this revision.Sun, Jan 15, 5:25 PM
Marc Chéhab (marcluzmedia) created this revision.

@Aleš Jelovčan (frogstomp) I don't know if you need to test it...really the fix is very simple.

source/blender/blenkernel/intern/gpencil_geom.cc
3220

instead of the if, you could use pt->time = max_ff(pt->time - delta, 0.0f); if the variables are int then use max_ii

Marc Chéhab (marcluzmedia) marked an inline comment as done.Mon, Jan 16, 11:44 AM
This revision is now accepted and ready to land.Mon, Jan 16, 12:01 PM