From 98ad47332466b13f35de80639a54b3493786fddb Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 8 May 2016 00:28:21 +0200 Subject: Code refactor: nodify Cycles camera and fix some mistakes in XML node read. Differential Revision: https://developer.blender.org/D2016 --- intern/cycles/blender/blender_util.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'intern/cycles/blender/blender_util.h') diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h index e23d8bf4e2d..2510cebcdc0 100644 --- a/intern/cycles/blender/blender_util.h +++ b/intern/cycles/blender/blender_util.h @@ -98,11 +98,12 @@ static inline void curvemapping_minmax(/*const*/ BL::CurveMapping& cumap, } static inline void curvemapping_to_array(BL::CurveMapping& cumap, - float *data, + array& data, int size) { cumap.update(); BL::CurveMap curve = cumap.curves[0]; + data.resize(size); for(int i = 0; i < size; i++) { float t = (float)i/(float)(size-1); data[i] = curve.evaluate(t); -- cgit v1.2.3