diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-08-28 14:41:37 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-08-28 14:41:37 +0400 |
commit | 8fd747114388dbbb10733415eaa707f9801abf1a (patch) | |
tree | a8207827aceb7d52fcf5a97bcb7695feab15f5e3 /source/blender/compositor/nodes/COM_Stabilize2dNode.cpp | |
parent | c43583a23ae0e552779148236f973d20275f9bd0 (diff) |
cleanup pixel sampler code (pixel interpolations in compositor)
Diffstat (limited to 'source/blender/compositor/nodes/COM_Stabilize2dNode.cpp')
-rw-r--r-- | source/blender/compositor/nodes/COM_Stabilize2dNode.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp b/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp index 85b8695263f..b28ee3eade1 100644 --- a/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp +++ b/source/blender/compositor/nodes/COM_Stabilize2dNode.cpp @@ -26,6 +26,7 @@ #include "COM_RotateOperation.h" #include "COM_ScaleOperation.h" #include "COM_MovieClipAttributeOperation.h" +#include "COM_SetSamplerOperation.h" extern "C" { #include "DNA_movieclip_types.h" @@ -49,6 +50,7 @@ void Stabilize2dNode::convertToOperations(ExecutionSystem *graph, CompositorCont MovieClipAttributeOperation *angleAttribute = new MovieClipAttributeOperation(); MovieClipAttributeOperation *xAttribute = new MovieClipAttributeOperation(); MovieClipAttributeOperation *yAttribute = new MovieClipAttributeOperation(); + SetSamplerOperation *psoperation = new SetSamplerOperation(); scaleAttribute->setAttribute(MCA_SCALE); scaleAttribute->setFramenumber(context->getFramenumber()); @@ -77,8 +79,10 @@ void Stabilize2dNode::convertToOperations(ExecutionSystem *graph, CompositorCont addLink(graph, rotateOperation->getOutputSocket(), translateOperation->getInputSocket(0)); addLink(graph, xAttribute->getOutputSocket(), translateOperation->getInputSocket(1)); addLink(graph, yAttribute->getOutputSocket(), translateOperation->getInputSocket(2)); - - this->getOutputSocket()->relinkConnections(translateOperation->getOutputSocket()); + + psoperation->setSampler((PixelSampler)this->getbNode()->custom1); + addLink(graph, translateOperation->getOutputSocket(), psoperation->getInputSocket(0)); + this->getOutputSocket()->relinkConnections(psoperation->getOutputSocket()); graph->addOperation(scaleAttribute); graph->addOperation(angleAttribute); @@ -87,4 +91,5 @@ void Stabilize2dNode::convertToOperations(ExecutionSystem *graph, CompositorCont graph->addOperation(scaleOperation); graph->addOperation(translateOperation); graph->addOperation(rotateOperation); + graph->addOperation(psoperation); } |