change curve evaluation functions never to modify curve data (ensures thread safety...
[blender-staging.git] / source / blender / compositor / nodes / COM_TimeNode.cpp
index 84ee4e77b0600c7d5d9c67bffa05e8e0a6515e11..82c8deafd9de03adf535a2ae037962f1b5539638 100644 (file)
@@ -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);