From 8bd7c3fba2749fdf2b16c4f32abf1a35692bc5bb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 21 Aug 2012 14:43:51 +0000 Subject: change curve evaluation functions never to modify curve data (ensures thread safety), now initializations has to be done outside evaluation. --- source/blender/compositor/nodes/COM_TimeNode.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/compositor/nodes/COM_TimeNode.cpp') diff --git a/source/blender/compositor/nodes/COM_TimeNode.cpp b/source/blender/compositor/nodes/COM_TimeNode.cpp index 84ee4e77b06..82c8deafd9d 100644 --- a/source/blender/compositor/nodes/COM_TimeNode.cpp +++ b/source/blender/compositor/nodes/COM_TimeNode.cpp @@ -33,6 +33,8 @@ TimeNode::TimeNode(bNode *editorNode) : Node(editorNode) /* pass */ } +////curvemapping_initialize(&hcmd->curve_mapping); + void TimeNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context) { SetValueOperation *operation = new SetValueOperation(); @@ -53,6 +55,7 @@ void TimeNode::convertToOperations(ExecutionSystem *graph, CompositorContext *co fac = (context->getFramenumber() - node->custom1) / (float)(node->custom2 - node->custom1); } + curvemapping_initialize((CurveMapping *)node->storage); fac = curvemapping_evaluateF((CurveMapping *)node->storage, 0, fac); operation->setValue(CLAMPIS(fac, 0.0f, 1.0f)); graph->addOperation(operation); -- cgit v1.2.3