From 2e6159a4948cd0f4e0b636734bfe506796bd87f2 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Fri, 1 Nov 2019 12:09:55 +0100 Subject: Curve: CurveMapping Extend Option Extend options are currently stored per curve. This was not clearly communicated to the user and they expected this to be a setting per CurveMapping. This change will move the option from `Curve` to `CurveMapping`. In order to support this the API had to be changed. BPY: CurveMap.evaluate is also moved to CurveMapping.evaluate what breaks Python API. Cycles has been updated but other add-ons have not. After release of 2.81 we can merge this to master and adapt the add-ons. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D6169 --- source/blender/freestyle/intern/python/BPy_Freestyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/freestyle') diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp index 367ad556d02..a6512a64776 100644 --- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp +++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp @@ -266,8 +266,8 @@ static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject * cumap = (CurveMapping *)py_srna->ptr.data; BKE_curvemapping_initialize(cumap); /* disable extrapolation if enabled */ - if ((cumap->cm[cur].flag & CUMA_EXTEND_EXTRAPOLATE)) { - cumap->cm[cur].flag &= ~(CUMA_EXTEND_EXTRAPOLATE); + if ((cumap->flag & CUMA_EXTEND_EXTRAPOLATE)) { + cumap->flag &= ~(CUMA_EXTEND_EXTRAPOLATE); BKE_curvemapping_changed(cumap, 0); } return PyFloat_FromDouble(BKE_curvemapping_evaluateF(cumap, cur, value)); -- cgit v1.2.3