diff options
author | Hans Goudey <h.goudey@me.com> | 2021-06-28 22:15:58 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-06-28 22:15:58 +0300 |
commit | 790cb28766813c94733637e46a6527eaf9a04a6b (patch) | |
tree | 3c40c360a4442d3c43bb3d2fb5c7126fe57b1c22 /source/blender/blenkernel/BKE_curve.h | |
parent | dc0c81337da54f00bed30e7b144f837407740fcc (diff) |
Curve: Add functions to retrieve const access to spline list
While the const correctness of `ListBase` is quite limited, it's helpful
to have a way to retrieve the `Nurb` list from curve object data without
casting away const from the curve.
Diffstat (limited to 'source/blender/blenkernel/BKE_curve.h')
-rw-r--r-- | source/blender/blenkernel/BKE_curve.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index 76a0468df03..c7c5f59cab2 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -121,6 +121,7 @@ void BKE_curve_material_remap(struct Curve *cu, const unsigned int *remap, unsig void BKE_curve_smooth_flag_set(struct Curve *cu, const bool use_smooth); ListBase *BKE_curve_nurbs_get(struct Curve *cu); +const ListBase *BKE_curve_nurbs_get_for_read(const struct Curve *cu); int BKE_curve_nurb_vert_index_get(const struct Nurb *nu, const void *vert); void BKE_curve_nurb_active_set(struct Curve *cu, const struct Nurb *nu); @@ -153,6 +154,7 @@ void BKE_curve_editNurb_keyIndex_delCV(struct GHash *keyindex, const void *cv); void BKE_curve_editNurb_keyIndex_free(struct GHash **keyindex); void BKE_curve_editNurb_free(struct Curve *cu); struct ListBase *BKE_curve_editNurbs_get(struct Curve *cu); +const struct ListBase *BKE_curve_editNurbs_get_for_read(const struct Curve *cu); void BKE_curve_bevelList_free(struct ListBase *bev); void BKE_curve_bevelList_make(struct Object *ob, const struct ListBase *nurbs, bool for_render); |