Skip to content
Snippets Groups Projects
  • Hans Goudey's avatar
    5606942c
    Curves: Skip CurveEval in legacy curve conversion · 5606942c
    Hans Goudey authored
    Currently when converting from the legacy curve type to the new type,
    which happens during evaluation of every legacy curve object, the
    `CurveEval` type is used as an intermediate step. This involves
    copying all data twice, and allocating a bunch of temporary arrays.
    It's also another use of `CurveEval` that has to be removed before
    we remove the type.
    
    The main user difference besides the subtlety described below
    will be improved performance.
    
    **Invalid Handles and Types**
    One important note is that there are two cases (that I know of)
    where handles and handle types can be invalid in the old curve
    type. The first is animation, where animated handle positions don't
    necessary respect the types. The second is control points with a
    single aligned handle that didn't necessarily align with the other.
    
    In master (partially on purpose) the code corrects the first situation
    (which caused T98965). But it doesn't correct the second situation.
    It's trivial to correct for the second case with this patch (because of the
    eager calculation decided on in D14464), but this patch makes the choice
    not to correct for //either//.
    
    Though not correcting the handle types puts curves in an invalid state,
    it also adds flexibility by allowing that option. Users must understand
    that any deformation may correct invalid handles.
    
    Fixes T98965
    
    Differential Revision: https://developer.blender.org/D15290
    5606942c
    History
    Curves: Skip CurveEval in legacy curve conversion
    Hans Goudey authored
    Currently when converting from the legacy curve type to the new type,
    which happens during evaluation of every legacy curve object, the
    `CurveEval` type is used as an intermediate step. This involves
    copying all data twice, and allocating a bunch of temporary arrays.
    It's also another use of `CurveEval` that has to be removed before
    we remove the type.
    
    The main user difference besides the subtlety described below
    will be improved performance.
    
    **Invalid Handles and Types**
    One important note is that there are two cases (that I know of)
    where handles and handle types can be invalid in the old curve
    type. The first is animation, where animated handle positions don't
    necessary respect the types. The second is control points with a
    single aligned handle that didn't necessarily align with the other.
    
    In master (partially on purpose) the code corrects the first situation
    (which caused T98965). But it doesn't correct the second situation.
    It's trivial to correct for the second case with this patch (because of the
    eager calculation decided on in D14464), but this patch makes the choice
    not to correct for //either//.
    
    Though not correcting the handle types puts curves in an invalid state,
    it also adds flexibility by allowing that option. Users must understand
    that any deformation may correct invalid handles.
    
    Fixes T98965
    
    Differential Revision: https://developer.blender.org/D15290