diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/curve.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index 341a2b555d8..aaf61e41894 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -442,6 +442,15 @@ ListBase *BKE_curve_editNurbs_get(Curve *cu) return NULL; } +const ListBase *BKE_curve_editNurbs_get_for_read(const Curve *cu) +{ + if (cu->editnurb) { + return &cu->editnurb->nurbs; + } + + return NULL; +} + short BKE_curve_type_get(const Curve *cu) { int type = cu->type; @@ -2691,7 +2700,7 @@ void BKE_curve_bevelList_make(Object *ob, const ListBase *nurbs, const bool for_ is_editmode = 1; } - LISTBASE_FOREACH (Nurb *, nu, nurbs) { + LISTBASE_FOREACH (const Nurb *, nu, nurbs) { if (nu->hide && is_editmode) { continue; } @@ -5078,6 +5087,15 @@ ListBase *BKE_curve_nurbs_get(Curve *cu) return &cu->nurb; } +const ListBase *BKE_curve_nurbs_get_for_read(const Curve *cu) +{ + if (cu->editnurb) { + return BKE_curve_editNurbs_get_for_read(cu); + } + + return &cu->nurb; +} + void BKE_curve_nurb_active_set(Curve *cu, const Nurb *nu) { if (nu == NULL) { |