Page MenuHome

Fix T99130: Spline factor gets messed up if one hair is too short
ClosedPublic

Authored by Dalai Felinto (dfelinto) on Jun 24 2022, 12:44 PM.

Details

Summary

In the cases where length is zero, we simply equally distribute the value based on the control point/curve index.


Test file:

Diff Detail

Repository
rB Blender

Event Timeline

Dalai Felinto (dfelinto) requested review of this revision.Jun 24 2022, 12:44 PM
Dalai Felinto (dfelinto) created this revision.

Support curves as well

Dalai Felinto (dfelinto) planned changes to this revision.Jun 24 2022, 2:44 PM

I will add comments to the code.

Add comments in the code.

Thanks for the comments. It would be nice to add a little note about this to the manual, since there's no other way to verify the behavior if you encounter it.

source/blender/nodes/geometry/nodes/node_geo_curve_spline_parameter.cc
133–136

I think this is a bit simpler (and makes it conceptually parallel)

This revision is now accepted and ready to land.Jun 24 2022, 3:32 PM
Dalai Felinto (dfelinto) marked an inline comment as done.Jun 24 2022, 3:36 PM

Thanks, I incorporated your changes and will update the manual now after committing this.