Checks to preserve the active spline on duplication required an active vertex too.
Now having no active vertex doesn't prevent duplicate from keeping the spline active.
Differential D8729
Fix T80135: Duplicate doesn't preserve active spline Authored by Campbell Barton (campbellbarton) on Aug 27 2020, 2:54 AM.
Details
Checks to preserve the active spline on duplication required an active vertex too. Now having no active vertex doesn't prevent duplicate from keeping the spline active.
Diff Detail
Event TimelineComment Actions I'm not sure I understand the problem described in the report, but I can confirm that the duplicate spline does not become active. The original code complicates a lot and unnecessarily. Also the purpose of calc_duplicate_actvert is just to check if the index of the active vert is within a range calculated outside the function. And, in the other function separate_exec, this calculated value for cu->actnu is completely ignored and replaced. The code would be much simpler if the active vertex and active Nurb were referenced and BKE_curve_nurb_vert_active_set was called right after BLI_movelisttolist. But that would be more code cleanup than fixing, so for a quick fix I believe this patch is valid. |