[Bf-blender-cvs] [a0c8ee057a5] master: Fix T90467: Initialize CurveMapping on demand
Richard Antalik
noreply at git.blender.org
Tue Aug 24 00:43:35 CEST 2021
Commit: a0c8ee057a59b8b514706a12257a6dc0f9bb3b69
Author: Richard Antalik
Date: Tue Aug 24 00:37:32 2021 +0200
Branches: master
https://developer.blender.org/rBa0c8ee057a59b8b514706a12257a6dc0f9bb3b69
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
===================================================================
M source/blender/makesrna/intern/rna_color.c
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list