diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-25 21:39:51 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-25 21:40:07 +0300 |
commit | f431be224fa58374386a32dba2542ee20d2a2d61 (patch) | |
tree | 7470402341cd9e9b8f5dbb50dc101249bf15c4bb /source/blender/blenkernel/intern/curve_eval.cc | |
parent | 845e2ed3a282913cd9d37207a313627275acc158 (diff) |
Curves: Cache the number of curves of each type
Remembering the number of curves of every type makes it fast to know
whether processing specific to a single curve type has to be done.
This information was accessed in quite a few places, so this should be
an overall reduction in overhead for the new curves type.
The cache is computed eagerly, in other words every time after changing
the curve types. In order to reduce verbosity I added helper functions
for some common ways to set the types.
Differential Revision: https://developer.blender.org/D14732
Diffstat (limited to 'source/blender/blenkernel/intern/curve_eval.cc')
-rw-r--r-- | source/blender/blenkernel/intern/curve_eval.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/curve_eval.cc b/source/blender/blenkernel/intern/curve_eval.cc index d1ec9499298..3d9dd3ecf31 100644 --- a/source/blender/blenkernel/intern/curve_eval.cc +++ b/source/blender/blenkernel/intern/curve_eval.cc @@ -523,6 +523,8 @@ Curves *curve_eval_to_curves(const CurveEval &curve_eval) } } + geometry.update_curve_types(); + normal_mode.save(); nurbs_weight.save(); nurbs_order.save(); |