Fix T72289: FreeStyle python error

Introduced by {T67981}. We changed the python API for curve evaluation.
Freestyle still used the old call that failed. This patch updates
FreeStyle to use the new API. I checked other areas in freestyle but it
seemed to be the only `evaluate` for curves that is called directly.

Reviewed By: zeddb

Differential Revision: https://developer.blender.org/D6430
This commit is contained in:
Jeroen Bakker 2019-12-17 12:38:12 +01:00
parent 2a35383bb0
commit 8bab865539
Notes: blender-bot 2023-02-14 11:29:52 +01:00
Referenced by issue #72289, 2.82 Freestyle lines won't render with modifiers set to 'Curve' mapping
1 changed files with 1 additions and 1 deletions

View File

@ -188,7 +188,7 @@ class CurveMappingModifier(ScalarBlendModifier):
# deprecated: return evaluateCurveMappingF(self.curve, 0, t)
curve = self.curve
curve.initialize()
result = curve.curves[0].evaluate(t)
result = curve.evaluate(curve=curve.curves[0], position=t)
# float precision errors in t can give a very weird result for evaluate.
# therefore, bound the result by the curve's min and max values
return bound(curve.clip_min_y, result, curve.clip_max_y)