From 00641bb237d32c341134e22201459aa74ea2e370 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Mon, 9 Sep 2013 18:39:51 +0000 Subject: Attempt fix for #36688. Curves may not be not initialized when called from python. C code explicilty says that curvemapping_initialize should be called prior to evaluating the curve, however the curve clip rectangle is not available when calling evaluation on the curvemap. This is not possible unless we force the evaluation on CurveMapping level, not on CurveMap level. For now just pass a rectangle with the x boundary values of the curvemap for evaluation to avoid the crash. --- source/blender/makesrna/intern/rna_color.c | 1 + 1 file changed, 1 insertion(+) (limited to '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 dcf6adf6fca..b9b3fe1ce79 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -623,6 +623,7 @@ static void rna_ColorManagement_update(Main *UNUSED(bmain), Scene *UNUSED(scene) /* this function only exists because #curvemap_evaluateF uses a 'const' qualifier */ static float rna_CurveMap_evaluateF(struct CurveMap *cuma, float value) { + curvemap_initialize(cuma); return curvemap_evaluateF(cuma, value); } -- cgit v1.2.3