From 5606942c63bf81afa16a0f148287da9421d53a48 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Sat, 25 Jun 2022 11:11:12 -0500 Subject: Curves: Skip CurveEval in legacy curve conversion 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 --- source/blender/blenkernel/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenkernel/CMakeLists.txt') diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 8dc6f711fae..50be5b475d4 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -111,6 +111,7 @@ set(SRC intern/curve_decimate.c intern/curve_deform.c intern/curve_eval.cc + intern/curve_legacy_convert.cc intern/curve_nurbs.cc intern/curve_poly.cc intern/curve_to_mesh_convert.cc @@ -353,6 +354,7 @@ set(SRC BKE_cryptomatte.h BKE_cryptomatte.hh BKE_curve.h + BKE_curve_legacy_convert.hh BKE_curve_to_mesh.hh BKE_curveprofile.h BKE_curves.h -- cgit v1.2.3