Page MenuHome

Fix T93521: Single point NURBS crash in resample node
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Dec 1 2021, 4:43 AM.

Details

Summary

The resample node didn't handle the case of when a spline didn't have
any evaluated points. For poly and Bezier splines we should never hit
this case, but it is expected when the number of NURBS control points
is smaller than its order, so we have to handle the case here.

It's not that obvious what to do in this case, there are a few options:

  • Remove the bad splines from the result
  • Generate empty splines for those inputs
  • Skip resampling the bad splines, copy them to the result
  • Arbitrarily generate single point splines

I chose option three, just skipping the "bad" splines. Since the node
already has a selection input, this can be described by just extending
that. "Splines with no evaluated points are implicitly deselected."
The first option would probably be valid too though.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Dec 1 2021, 4:43 AM
Hans Goudey (HooglyBoogly) created this revision.

I think this is a bad crash to ship 3.0 with, so if possible I'd like to commit this to the 3.0 branch.

That fix may not be critical enough for 3.0 imo, but it can be added to T93479.

Removing the "invalid" splines seems ok. The other options I find reasonable as well, but I have no clear preference,

This revision is now accepted and ready to land.Dec 1 2021, 11:12 AM
Hans Goudey (HooglyBoogly) planned changes to this revision.Dec 1 2021, 7:26 PM

Actually, thinking about the selection input in 3.1, it's more intuitive if the invalid splines are just thought of as "not selected", so I think I'd prefer to go with option 3.

Switch to the "deselection" option

This revision is now accepted and ready to land.Dec 6 2021, 5:46 PM