diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-08-24 01:37:32 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-08-24 01:37:32 +0300 |
commit | a0c8ee057a59b8b514706a12257a6dc0f9bb3b69 (patch) | |
tree | b97d202a83724cb402a7ab50cdf532abbdf9a4ca | |
parent | 875c2ea5b5ee8425c3bc969dbaba3fab3ecbaab4 (diff) |
Fix T90467: Initialize CurveMapping on demand
`CurveMapping.evaluate` function expectes `CurveMapping` to be
initialized, while this wasn't documented.
I don't see any reason for not initializing `CurveMapping` on demand.
Initialization was added in rBf16047c2df1e8be56bf76524f9eb1fa5ecde2176
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D12145
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index 9faf2ae7cb7..5f198a8ed4c 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -701,11 +701,7 @@ static float rna_CurveMapping_evaluateF(struct CurveMapping *cumap, } if (!cuma->table) { - BKE_report( - reports, - RPT_ERROR, - "CurveMap table not initialized, call initialize() on CurveMapping owner of the CurveMap"); - return 0.0f; + BKE_curvemapping_init(cumap); } return BKE_curvemap_evaluateF(cumap, cuma, value); } |