diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 18:43:51 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 18:43:51 +0400 |
commit | 8bd7c3fba2749fdf2b16c4f32abf1a35692bc5bb (patch) | |
tree | ec5506895139ed6a09921c60eaf61bd8eb7f2226 /source/blender/compositor/nodes | |
parent | 809fce9d00ecf8eea2c3d2ea52c3de2ec2ede1ee (diff) |
change curve evaluation functions never to modify curve data (ensures thread safety), now initializations has to be done outside evaluation.
Diffstat (limited to 'source/blender/compositor/nodes')
-rw-r--r-- | source/blender/compositor/nodes/COM_TimeNode.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); |