Page MenuHome

Fix T95952: Uninitialized value is used in Bezier Segment primitive node.
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Feb 22 2022, 5:20 PM.

Details

Summary

set_handle_position uses the the position of both handles as input,
so both have to be initialized.

Diff Detail

Repository
rB Blender
Branch
uninitialized-segment-handles (branched from master)
Build Status
Buildable 20691
Build 20691: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) requested review of this revision.Feb 22 2022, 5:20 PM
Jacques Lucke (JacquesLucke) created this revision.

set_handle_position changes the other handle by keeping its length constant. Using (0,0,0) is better than an uninitialized value, but it's still arbitrary. I think the proper solution here would probably be to make the handle on the other side of each control point the same length as the inner handle.

Don't have a strong opinion, but either way feels arbitrary to me. Feel free to take over this patch if you have something specific in mind.

Hans Goudey (HooglyBoogly) accepted this revision.EditedFeb 23 2022, 4:25 PM

I guess the length of the dangling handle won't make any practical difference at the moment, and I'm not sure I want to spend time working on something different at the moment, since this stuff is in transition anyway. So you can go ahead and commit this. Thanks.

This revision is now accepted and ready to land.Feb 23 2022, 4:25 PM

Actually, I'll commit the change I was talking about, should be simple (this is causing problems with the curve component conversion).