[Bf-blender-cvs] [09874df] master: Structural cleanup and improvements for the compositor.

Lukas Tönne noreply at git.blender.org
Tue Apr 15 16:39:30 CEST 2014


Commit: 09874df135888b89f51d7becaa369ebb1d1623c6
Author: Lukas Tönne
Date:   Tue Apr 15 16:06:12 2014 +0200
https://developer.blender.org/rB09874df135888b89f51d7becaa369ebb1d1623c6

Structural cleanup and improvements for the compositor.

Many parts of the compositor are unnecessarily complicated. This patch
aims at reducing the complexity of writing nodes and making the code
more transparent.

== Separating Nodes and Operations ==

Currently these are both mixed in the same graph, even though they have
very different purposes and are used at distinct stages in the
compositing process. The patch introduces dedicated graph classes for
nodes and for operations.

This removes the need for a lot of special case checks (isOperation etc.)
and explicit type casts. It simplifies the code since it becomes clear
at every stage what type of node we are dealing with. The compiler can
use static typing to avoid common bugs from mixing up these types and
fewer runtime sanity checks are needed.

== Simplified Node Conversion ==

Converting nodes to operations was previously based on "relinking", i.e.
nodes would start with by mirroring links in the Blender DNA node trees,
then add operations and redirect these links to them. This was very hard
to follow in many cases and required a lot of attention to avoid invalid
states.

Now there is a helper class called the NodeConverter, which is passed to
nodes and implements a much simpler API for this process. Nodes can add
operations and explicit connections as before, but defining "external"
links to the inputs/outputs of the original node now uses mapping
instead of directly modifying link data. Input data (node graph) and
result (operations graph) are cleanly separated.

== Removed Redundant Data Structures ==

A few redundant data structures have been removed, notably the
SocketConnection. These are only needed temporarily during graph
construction. For executing the compositor operations it is perfectly
sufficient to store only the direct input link pointers. A common
pointer indirection is avoided this way (which might also give a little
performance improvement).

== Avoid virtual recursive functions ==

Recursive virtual functions are evil. They are very hard to follow
during debugging. At least in the parts this patch is concerned with
these functions have been replaced by a non-virtual recursive core
function (which might then call virtual non-recursive functions if
needed). See for example NodeOperationBuilder::group_operations.

===================================================================

M	source/blender/compositor/CMakeLists.txt
M	source/blender/compositor/COM_compositor.h
M	source/blender/compositor/COM_defines.h
M	source/blender/compositor/intern/COM_CPUDevice.cpp
M	source/blender/compositor/intern/COM_ChannelInfo.h
M	source/blender/compositor/intern/COM_CompositorContext.h
M	source/blender/compositor/intern/COM_Converter.cpp
M	source/blender/compositor/intern/COM_Converter.h
M	source/blender/compositor/intern/COM_Debug.cpp
M	source/blender/compositor/intern/COM_Debug.h
M	source/blender/compositor/intern/COM_ExecutionGroup.cpp
M	source/blender/compositor/intern/COM_ExecutionGroup.h
M	source/blender/compositor/intern/COM_ExecutionSystem.cpp
M	source/blender/compositor/intern/COM_ExecutionSystem.h
D	source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
D	source/blender/compositor/intern/COM_ExecutionSystemHelper.h
D	source/blender/compositor/intern/COM_InputSocket.cpp
D	source/blender/compositor/intern/COM_InputSocket.h
M	source/blender/compositor/intern/COM_MemoryBuffer.cpp
M	source/blender/compositor/intern/COM_MemoryBuffer.h
M	source/blender/compositor/intern/COM_MemoryProxy.h
M	source/blender/compositor/intern/COM_Node.cpp
M	source/blender/compositor/intern/COM_Node.h
D	source/blender/compositor/intern/COM_NodeBase.cpp
D	source/blender/compositor/intern/COM_NodeBase.h
A	source/blender/compositor/intern/COM_NodeConverter.cpp
A	source/blender/compositor/intern/COM_NodeConverter.h
A	source/blender/compositor/intern/COM_NodeGraph.cpp
A	source/blender/compositor/intern/COM_NodeGraph.h
M	source/blender/compositor/intern/COM_NodeOperation.cpp
M	source/blender/compositor/intern/COM_NodeOperation.h
A	source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
A	source/blender/compositor/intern/COM_NodeOperationBuilder.h
M	source/blender/compositor/intern/COM_OpenCLDevice.cpp
M	source/blender/compositor/intern/COM_OpenCLDevice.h
D	source/blender/compositor/intern/COM_OutputSocket.cpp
D	source/blender/compositor/intern/COM_OutputSocket.h
D	source/blender/compositor/intern/COM_SingleThreadedNodeOperation.cpp
D	source/blender/compositor/intern/COM_SingleThreadedNodeOperation.h
A	source/blender/compositor/intern/COM_SingleThreadedOperation.cpp
A	source/blender/compositor/intern/COM_SingleThreadedOperation.h
D	source/blender/compositor/intern/COM_Socket.cpp
D	source/blender/compositor/intern/COM_Socket.h
D	source/blender/compositor/intern/COM_SocketConnection.cpp
D	source/blender/compositor/intern/COM_SocketConnection.h
M	source/blender/compositor/intern/COM_WorkScheduler.cpp
M	source/blender/compositor/nodes/COM_AlphaOverNode.cpp
M	source/blender/compositor/nodes/COM_AlphaOverNode.h
M	source/blender/compositor/nodes/COM_BilateralBlurNode.cpp
M	source/blender/compositor/nodes/COM_BilateralBlurNode.h
M	source/blender/compositor/nodes/COM_BlurNode.cpp
M	source/blender/compositor/nodes/COM_BlurNode.h
M	source/blender/compositor/nodes/COM_BokehBlurNode.cpp
M	source/blender/compositor/nodes/COM_BokehBlurNode.h
M	source/blender/compositor/nodes/COM_BokehImageNode.cpp
M	source/blender/compositor/nodes/COM_BokehImageNode.h
M	source/blender/compositor/nodes/COM_BoxMaskNode.cpp
M	source/blender/compositor/nodes/COM_BoxMaskNode.h
M	source/blender/compositor/nodes/COM_BrightnessNode.cpp
M	source/blender/compositor/nodes/COM_BrightnessNode.h
M	source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
M	source/blender/compositor/nodes/COM_ChannelMatteNode.h
M	source/blender/compositor/nodes/COM_ChromaMatteNode.cpp
M	source/blender/compositor/nodes/COM_ChromaMatteNode.h
M	source/blender/compositor/nodes/COM_ColorBalanceNode.cpp
M	source/blender/compositor/nodes/COM_ColorBalanceNode.h
M	source/blender/compositor/nodes/COM_ColorCorrectionNode.cpp
M	source/blender/compositor/nodes/COM_ColorCorrectionNode.h
M	source/blender/compositor/nodes/COM_ColorCurveNode.cpp
M	source/blender/compositor/nodes/COM_ColorCurveNode.h
M	source/blender/compositor/nodes/COM_ColorMatteNode.cpp
M	source/blender/compositor/nodes/COM_ColorMatteNode.h
M	source/blender/compositor/nodes/COM_ColorNode.cpp
M	source/blender/compositor/nodes/COM_ColorNode.h
M	source/blender/compositor/nodes/COM_ColorRampNode.cpp
M	source/blender/compositor/nodes/COM_ColorRampNode.h
M	source/blender/compositor/nodes/COM_ColorSpillNode.cpp
M	source/blender/compositor/nodes/COM_ColorSpillNode.h
M	source/blender/compositor/nodes/COM_ColorToBWNode.cpp
M	source/blender/compositor/nodes/COM_ColorToBWNode.h
A	source/blender/compositor/nodes/COM_CombineColorNode.cpp
A	source/blender/compositor/nodes/COM_CombineColorNode.h
D	source/blender/compositor/nodes/COM_CombineHSVANode.cpp
D	source/blender/compositor/nodes/COM_CombineHSVANode.h
D	source/blender/compositor/nodes/COM_CombineRGBANode.cpp
D	source/blender/compositor/nodes/COM_CombineRGBANode.h
D	source/blender/compositor/nodes/COM_CombineYCCANode.cpp
D	source/blender/compositor/nodes/COM_CombineYCCANode.h
D	source/blender/compositor/nodes/COM_CombineYUVANode.cpp
D	source/blender/compositor/nodes/COM_CombineYUVANode.h
M	source/blender/compositor/nodes/COM_CompositorNode.cpp
M	source/blender/compositor/nodes/COM_CompositorNode.h
M	source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
M	source/blender/compositor/nodes/COM_ConvertAlphaNode.h
M	source/blender/compositor/nodes/COM_CornerPinNode.cpp
M	source/blender/compositor/nodes/COM_CornerPinNode.h
M	source/blender/compositor/nodes/COM_CropNode.cpp
M	source/blender/compositor/nodes/COM_CropNode.h
M	source/blender/compositor/nodes/COM_DefocusNode.cpp
M	source/blender/compositor/nodes/COM_DefocusNode.h
M	source/blender/compositor/nodes/COM_DespeckleNode.cpp
M	source/blender/compositor/nodes/COM_DespeckleNode.h
M	source/blender/compositor/nodes/COM_DifferenceMatteNode.cpp
M	source/blender/compositor/nodes/COM_DifferenceMatteNode.h
M	source/blender/compositor/nodes/COM_DilateErodeNode.cpp
M	source/blender/compositor/nodes/COM_DilateErodeNode.h
M	source/blender/compositor/nodes/COM_DirectionalBlurNode.cpp
M	source/blender/compositor/nodes/COM_DirectionalBlurNode.h
M	source/blender/compositor/nodes/COM_DisplaceNode.cpp
M	source/blender/compositor/nodes/COM_DisplaceNode.h
M	source/blender/compositor/nodes/COM_DistanceMatteNode.cpp
M	source/blender/compositor/nodes/COM_DistanceMatteNode.h
M	source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.cpp
M	source/blender/compositor/nodes/COM_DoubleEdgeMaskNode.h
M	source/blender/compositor/nodes/COM_EllipseMaskNode.cpp
M	source/blender/compositor/nodes/COM_EllipseMaskNode.h
M	source/blender/compositor/nodes/COM_FilterNode.cpp
M	source/blender/compositor/nodes/COM_FilterNode.h
M	source/blender/compositor/nodes/COM_FlipNode.cpp
M	source/blender/compositor/nodes/COM_FlipNode.h
M	source/blender/compositor/nodes/COM_GammaNode.cpp
M	source/blender/compositor/nodes/COM_GammaNode.h
M	source/blender/compositor/nodes/COM_GlareNode.cpp
M	source/blender/compositor/nodes/COM_GlareNode.h
D	source/blender/compositor/nodes/COM_GroupNode.cpp
D	source/blender/compositor/nodes/COM_GroupNode.h
M	source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.cpp
M	source/blender/compositor/nodes/COM_HueSaturationValueCorrectNode.h
M	source/blender/compositor/nodes/COM_HueSaturationValueNode.cpp
M	source/blender/compositor/nodes/COM_HueSaturationValueNode.h
M	source/blender/compositor/nodes/COM_IDMaskNode.cpp
M	source/blender/compositor/nodes/COM_IDMaskNode.h
M	source/blender/compositor/nodes/COM_ImageNode.cpp
M	source/blender/compositor/nodes/COM_ImageNode.h
M	source/blender/compositor/nodes/COM_InpaintNode.cpp
M	source/blender/compositor/nodes/COM_InpaintNode.h
M	source/blender/compositor/nodes/COM_InvertNode.cpp
M	source/blender/compositor/nodes/COM_InvertNode.h
M	source/blender/compositor/nodes/COM_KeyingNode.cpp
M	source/blender/compositor/nodes/COM_KeyingNode.h
M	source/blender/compositor/nodes/COM_KeyingScreenNode.cpp
M	source/blender/compositor/nodes/COM_KeyingScreenNode.h
M	source/blender/compositor/nodes/COM_LensDistortionNode.cpp
M	source/blender/compositor/nodes/COM_LensDistortionNode.h
M	source/blender/compositor/nodes/COM_LuminanceMatteNode.cpp
M	source/blender/compositor/nodes/COM_LuminanceMatteNode.h
M	source/blender/compositor/nodes/COM_MapRangeNode.cpp
M	source/blender/compositor/nodes/COM_MapRangeNode.h
M	source/blender/compositor/nodes/COM_MapUVNode.cpp
M	source/blender/compositor/nodes/COM_MapUVNode.h
M	source/blender/compositor/nodes/COM_MapValueNode.cpp
M	source/blender/compositor/nodes/COM_MapValueNode.h
M	source/blender/compositor/nodes/COM_MaskNode.cpp
M	source/blender/compositor/nodes/COM_MaskNode.h
M	source/blender/compositor/nodes/COM_MathNode.cpp
M	source/blender/compositor/nodes/COM_MathNode.h
M	source/blender/compositor/nodes/COM_MixNode.cpp
M	source/blender/compositor/nodes/COM_MixNode.h
M	source/blender/compositor/nodes/COM_MovieClipNode.cpp
M	source/blender/compositor/nodes/COM_MovieClipNode.h
M	source/blender/compositor/nodes/COM_MovieDistortionNode.cpp
M	source/blender/compositor/nodes/COM_MovieDistortionNode.h
D	source/blender/compositor/nodes/COM_MuteNode.cpp
D	source/blender/compositor/nodes/COM_MuteNode.h
M	source/blender/compositor/nodes/COM_NormalNode.cpp
M	source/blender/compositor/nodes/COM_NormalNode.h
M	source/blender/compositor/nodes/COM_NormalizeNode.cpp
M	source/blender/compositor/nodes/COM_NormalizeNode.h
M	source/blender/compositor/nodes/COM_OutputFileNode.cpp
M	source/blender/compositor/nodes/COM_OutputFileNode.h
M	source/blender/compositor/nodes/COM_PixelateNode.cpp
M	source/blender/compositor/nodes/COM_PixelateNode.h
M	source/blender/compositor/nodes/COM_PlaneTrackDeformNode.cpp
M	source/blender/compositor/nodes/COM_PlaneTrackDeformNode.h
M	source/blender/compositor/nodes/COM_RenderLayersNode.cpp
M	source/blender/compositor/nodes/COM_RenderLayersNode.h
M	source/blender/compositor/nodes/COM_RotateNode.cpp
M	source/blender/compositor/nodes/COM_RotateNode.h
M	source/blender/compositor/nodes/COM_ScaleNode.cpp
M	source/blender/compositor/nodes/COM_ScaleNode.h
A	source/blender/compositor/nodes/COM_SeparateColorNode.cpp
A	source/blender/compositor/nodes/COM_SeparateColorNode.h
D	source/blender/compositor/nodes/COM_SeparateHSVANode.cpp
D	source/blender/compositor/nodes/COM_SeparateHSVANode.h
D	source/blender/compositor/nodes/COM_SeparateRGBANode.cpp
D	source/blender/compositor/nodes/COM_SeparateRGBANode.h
D	source/blender/compositor/nodes/COM_SeparateYCCANode.cpp
D	source/blender/compositor/nodes/COM_SeparateYCCANode.h
D	source/blender/compositor/nodes/COM_SeparateYUVANode.cpp
D	source/blender/compositor/nodes/COM_SeparateYUVANode.h
M	source/blender/compositor/nodes/COM_SetAlphaNode.cpp
M	source/blender/compositor/nodes/COM_SetAlphaNode.h
M	source/blender/compositor/nodes/COM_SocketProxyNode.cpp
M	source/blender/compositor/nodes/COM_SocketProxyNode.h
M	source/blender/compositor/nodes/COM_SplitViewerNode.cpp
M	source/blender/compositor/nodes/COM_SplitViewerNode.h
M	source/blender/compositor/nodes/COM_Stabilize2dNode.cpp
M	source/blender/compositor/nodes/COM_Stabilize2dNode.h
M	source/blender/compositor/nodes/COM_SwitchNode.cpp
M	source/blender/compositor/nodes/COM_SwitchNode.h
M	source/blender/compositor/nodes/COM_TextureNode.cpp
M	source/blender/compositor/nodes/COM_TextureNode.h
M	source/blender/compositor/nodes/COM_TimeNode.cpp
M	source/blender/compositor/nodes/COM_TimeNode.h
M	source/blender/compositor/nodes/COM_TonemapNode.cpp
M	source/blender/compositor/nodes/COM_TonemapNode.h
M	source/blender/compositor/nodes/COM_TrackPositionNode.cpp
M	source/blender/compositor/nodes/COM_TrackPositionNode.h
M	source/blender/compositor/nodes/COM_TransformNode.cpp
M	source/blender/compositor/nodes/COM_TransformNode.h
M	source/blender/compositor/nodes/COM_TranslateNode.cpp
M	source/blender/compositor/nodes/COM_TranslateNode.h
M	source/blender/compositor/nodes/COM_ValueNode.cpp
M	source/blender/compositor/nodes/COM_ValueNode.h
M	source/blender/compositor/nodes/COM_VectorBlurNode.cpp
M	source/blender/compositor/nodes/COM_VectorBlurNode.h
M	source/blender/compositor/nodes/COM_VectorCurveNode.cpp
M	source/blender/compositor/nodes/COM_VectorCurveNode.h
M	source/blender/compositor/nodes/COM_ViewLevelsNode.cpp
M	source/blender/compositor/nodes/COM_ViewLevelsNode.h
M	source/blender/compositor/nodes/COM_ViewerNode.cpp
M	source/blender/compositor/nodes/COM_ViewerNode.h
M	source/blender/compositor/nodes/COM_ZCombineNode.cpp
M	source/blender/compositor/nodes/COM_ZCombineNode.h
M	source/blender/compositor/operations/COM_BlurBaseOperation.cpp
M	source/blender/compositor/operations/COM_BlurBaseOperation.h
M	source/blender/compositor/operations/COM_CompositorOperation.cpp
M	source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
M	source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
M	source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
M	source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
M	source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
M	source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
M	source/blender/compositor/operations/COM_GlareBaseOperation.cpp
M	source/blender/compositor/operations/COM_GlareBaseOperation.h
M	source/blender/compositor/operations/COM_MathBaseOperation.cpp
M	source/blender/compositor/operations/COM_MixOperation.cpp
M	source/blender/compositor/operations/COM_OutputFileOperation.cpp
M	source/blender/compositor/operations/COM_OutputFileOperation.h
M	source/blender/compositor/operations/COM_PreviewOperation.cpp
M	source/blender/compositor/operations/COM_PreviewOperation.h
M	source/blender/compositor/operations/COM_ReadBufferOperation.h
M	source/blender/compositor/operations/COM_SetVectorOperation.h
M	source/blender/compositor/operations/COM_SocketProxyOperation.cpp
M	source/blender/compositor/operations/COM_SocketProxyOperation.h
M	source/blender/compositor/operations/COM_SplitOperation.cpp
M	source/blender/compositor/operations/COM_TextureOperation.cpp
M	source/blender/compositor/operations/COM_TextureOperation.h
M	source/blender/compositor/operations/COM_TonemapOperation.cpp
M	source/blender/compositor/operations/COM_ViewerOperation.cpp
M	source/blender/compositor/operations/COM_ViewerOperation.h
M	source/blender/compositor/operations/COM_WriteBufferOperation.h
M	source/blender/makesdna/DNA_node_types.h

===================================================================

diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index cbb1017..a194334 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -54,28 +54,22 @@ set(SRC
 	intern/COM_compositor.cpp
 	intern/COM_ExecutionSystem.cpp
 	intern/COM_ExecutionSystem.h
-	intern/COM_ExecutionSystemHelper.cpp
-	intern/COM_ExecutionSystemHelper.h
+	intern/COM_NodeConverter.cpp
+	intern/COM_NodeConverter.h
+	intern/COM_NodeOperationBuilder.cpp
+	intern/COM_NodeOperationBuilder.h
+	intern/COM_NodeGraph.cpp
+	intern/COM_NodeGraph.h
 	intern/COM_Converter.cpp
 	intern/COM_Converter.h
 	intern/COM_ExecutionGroup.cpp
 	intern/COM_ExecutionGroup.h
 	intern/COM_Node.cpp
 	intern/COM_Node.h
-	intern/COM_NodeBase.cpp
-	intern/COM_NodeBase.h
 	intern/COM_NodeOperation.cpp
 	intern/COM_NodeOperation.h
-	intern/COM_Socket.cpp
-	intern/COM_Socket.h
 	intern/COM_SocketReader.cpp
 	intern/COM_SocketReader.h
-	intern/COM_InputSocket.cpp
-	intern/COM_InputSocket.h
-	intern/COM_OutputSocket.cpp
-	intern/COM_OutputSocket.h
-	intern/COM_SocketConnection.cpp
-	intern/COM_SocketConnection.h
 	intern/COM_MemoryProxy.cpp
 	intern/COM_MemoryProxy.h
 	intern/COM_MemoryBuffer.cpp
@@ -98,8 +92,8 @@ set(SRC
 	intern/COM_CompositorContext.h
 	intern/COM_ChannelInfo.cpp
 	intern/COM_ChannelInfo.h
-	intern/COM_SingleThreadedNodeOperation.cpp
-	intern/COM_SingleThreadedNodeOperation.h
+	intern/COM_SingleThreadedOperation.cpp
+	intern/COM_SingleThreadedOperation.h
 	intern/COM_Debug.cpp
 	intern/COM_Debug.h
 
@@ -107,10 +101,6 @@ set(SRC
 	operations/COM_QualityStepHelper.cpp
 
 	# Internal nodes
-	nodes/COM_MuteNode.cpp
-	nodes/COM_MuteNode.h
-	nodes/COM_GroupNode.cpp
-	nodes/COM_GroupNode.h
 	nodes/COM_SocketProxyNode.cpp
 	nodes/COM_SocketProxyNode.h
 
@@ -245,22 +235,10 @@ set(SRC
 	# converter nodes
 	nodes/COM_IDMaskNode.cpp
 	nodes/COM_IDMaskNode.h
-	nodes/COM_SeparateRGBANode.cpp
-	nodes/COM_SeparateRGBANode.h
-	nodes/COM_CombineRGBANode.cpp
-	nodes/COM_CombineRGBANode.h
-	nodes/COM_SeparateHSVANode.cpp
-	nodes/COM_SeparateHSVANode.h
-	nodes/COM_CombineHSVANode.cpp
-	nodes/COM_CombineHSVANode.h
-	nodes/COM_SeparateYUVANode.cpp
-	nodes/COM_SeparateYUVANode.h
-	nodes/COM_CombineYUVANode.cpp
-	nodes/COM_CombineYUVANode.h
-	nodes/COM_SeparateYCCANode.cpp
-	nodes/COM_SeparateYCCANode.h
-	nodes/COM_CombineYCCANode.cpp
-	nodes/COM_CombineYCCANode.h
+	nodes/COM_SeparateColorNode.cpp
+	nodes/COM_SeparateColorNode.h
+	nodes/COM_CombineColorNode.cpp
+	nodes/COM_CombineColorNode.h
 
 	nodes/COM_NormalNode.cpp
 	nodes/COM_NormalNode.h
diff --git a/source/blender/compositor/COM_compositor.h b/source/blender/compositor/COM_compositor.h
index b79c26a..2cf2c69 100644
--- a/source/blender/compositor/COM_compositor.h
+++ b/source/blender/compositor/COM_compositor.h
@@ -213,8 +213,8 @@ extern "C" {
  * (is called from [@ref ExecutionGroup.scheduleChunkWhenPossible])
  * @see ExecutionGroup.scheduleChunk Schedule a chunk on the WorkScheduler
  * @see NodeOperation.determineDependingAreaOfInterest Influence the area of interest of a chunk.
- * @see WriteBufferOperation NodeOperation to write to a MemoryProxy/MemoryBuffer
- * @see ReadBufferOperation NodeOperation to read from a MemoryProxy/MemoryBuffer
+ * @see WriteBufferOperation Operation to write to a MemoryProxy/MemoryBuffer
+ * @see ReadBufferOperation Operation to read from a MemoryProxy/MemoryBuffer
  * @see MemoryProxy proxy for information about memory image (a image consist out of multiple chunks)
  * @see MemoryBuffer Allocated memory for a single chunk
  *
diff --git a/source/blender/compositor/COM_defines.h b/source/blender/compositor/COM_defines.h
index 6c07aad..d086f81 100644
--- a/source/blender/compositor/COM_defines.h
+++ b/source/blender/compositor/COM_defines.h
@@ -24,7 +24,7 @@
 #define __COM_DEFINES_H__
 
 /**
- * @brief possible data types for SocketConnection
+ * @brief possible data types for sockets
  * @ingroup Model
  */
 typedef enum DataType {
diff --git a/source/blender/compositor/intern/COM_CPUDevice.cpp b/source/blender/compositor/intern/COM_CPUDevice.cpp
index 7029aa0..c7c3f77 100644
--- a/source/blender/compositor/intern/COM_CPUDevice.cpp
+++ b/source/blender/compositor/intern/COM_CPUDevice.cpp
@@ -30,7 +30,7 @@ void CPUDevice::execute(WorkPackage *work)
 
 	executionGroup->determineChunkRect(&rect, chunkNumber);
 
-	executionGroup->getOutputNodeOperation()->executeRegion(&rect, chunkNumber);
+	executionGroup->getOutputOperation()->executeRegion(&rect, chunkNumber);
 
 	executionGroup->finalizeChunkExecution(chunkNumber, NULL);
 }
diff --git a/source/blender/compositor/intern/COM_ChannelInfo.h b/source/blender/compositor/intern/COM_ChannelInfo.h
index 4466444..ec78e7e 100644
--- a/source/blender/compositor/intern/COM_ChannelInfo.h
+++ b/source/blender/compositor/intern/COM_ChannelInfo.h
@@ -49,8 +49,8 @@ typedef enum ChannelType {
 /**
  * @brief ChannelInfo holds information about a channel.
  *
- * Channels are transported from node to node via a SocketConnection.
- * ChannelInfo holds specific setting of these channels in order that the to-node of the connection
+ * Channels are transported from node to node via a NodeLink.
+ * ChannelInfo holds specific setting of these channels in order that the to-node of the link
  * Can handle specific logic per channel setting.
  *
  * @note currently this is not used, but a future place to implement color spacing and other things.
@@ -59,7 +59,7 @@ typedef enum ChannelType {
 class ChannelInfo {
 private:
 	/**
-	 * @brief the channel number, in the connection. [0-3]
+	 * @brief the channel number, in the link. [0-3]
 	 */
 	int m_number;
 
@@ -87,12 +87,12 @@ public:
 	ChannelInfo();
 
 	/**
-	 * @brief set the index of this channel in the SocketConnection
+	 * @brief set the index of this channel in the NodeLink
 	 */
 	void setNumber(const int number) { this->m_number = number; }
 
 	/**
-	 * @brief get the index of this channel in the SocketConnection
+	 * @brief get the index of this channel in the NodeLink
 	 */
 	const int getNumber() const { return this->m_number; }
 
diff --git a/source/blender/compositor/intern/COM_CompositorContext.h b/source/blender/compositor/intern/COM_CompositorContext.h
index 223f900..a398ae9 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.h
+++ b/source/blender/compositor/intern/COM_CompositorContext.h
@@ -181,11 +181,11 @@ public:
 	 */
 	void setHasActiveOpenCLDevices(bool hasAvtiveOpenCLDevices) { this->m_hasActiveOpenCLDevices = hasAvtiveOpenCLDevices; }
 	
-	int getChunksize() { return this->getbNodeTree()->chunksize; }
+	int getChunksize() const { return this->getbNodeTree()->chunksize; }
 	
 	void setFastCalculation(bool fastCalculation) {this->m_fastCalculation = fastCalculation;}
-	bool isFastCalculation() {return this->m_fastCalculation;}
-	inline bool isGroupnodeBufferEnabled() {return this->getbNodeTree()->flag & NTREE_COM_GROUPNODE_BUFFER;}
+	bool isFastCalculation() const { return this->m_fastCalculation; }
+	bool isGroupnodeBufferEnabled() const { return this->getbNodeTree()->flag & NTREE_COM_GROUPNODE_BUFFER; }
 };
 
 
diff --git a/source/blender/compositor/intern/COM_Converter.cpp b/source/blender/compositor/intern/COM_Converter.cpp
index 7103b49..9251e16 100644
--- a/source/blender/compositor/intern/COM_Converter.cpp
+++ b/source/blender/compositor/intern/COM_Converter.cpp
@@ -22,7 +22,14 @@
 
 #include <string.h>
 
+extern "C" {
+#include "DNA_node_types.h"
+
 #include "BKE_node.h"
+}
+
+#include "COM_NodeOperationBuilder.h"
+#include "COM_NodeOperation.h"
 
 #include "COM_AlphaOverNode.h"
 #include "COM_BilateralBlurNode.h"
@@ -41,10 +48,7 @@
 #include "COM_ColorRampNode.h"
 #include "COM_ColorSpillNode.h"
 #include "COM_ColorToBWNode.h"
-#include "COM_CombineHSVANode.h"
-#include "COM_CombineRGBANode.h"
-#include "COM_CombineYCCANode.h"
-#include "COM_CombineYUVANode.h"
+#include "COM_CombineColorNode.h"
 #include "COM_CompositorNode.h"
 #include "COM_ConvertAlphaNode.h"
 #include "COM_ConvertOperation.h"
@@ -61,12 +65,10 @@
 #include "COM_DoubleEdgeMaskNode.h"
 #include "COM_EllipseMaskNode.h"
 #include "COM_ExecutionSystem.h"
-#include "COM_ExecutionSystemHelper.h"
 #include "COM_FilterNode.h"
 #include "COM_FlipNode.h"
 #include "COM_GammaNode.h"
 #include "COM_GlareNode.h"
-#include "COM_GroupNode.h"
 #include "COM_HueSaturationValueCorrectNode.h"
 #include "COM_HueSaturationValueNode.h"
 #include "COM_IDMaskNode.h"
@@ -85,7 +87,6 @@
 #include "COM_MixNode.h"
 #include "COM_MovieClipNode.h"
 #include "COM_MovieDistortionNode.h"
-#include "COM_MuteNode.h"
 #include "COM_NormalNode.h"
 #include "COM_NormalizeNode.h"
 #include "COM_OutputFileNode.h"
@@ -93,13 +94,9 @@
 #include "COM_RotateNode.h"
 #include "COM_ScaleNode.h"
 #include "COM_ScaleOperation.h"
-#include "COM_SeparateHSVANode.h"
-#include "COM_SeparateRGBANode.h"
-#include "COM_SeparateYCCANode.h"
-#include "COM_SeparateYUVANode.h"
+#include "COM_SeparateColorNode.h"
 #include "COM_SetAlphaNode.h"
 #include "COM_SetValueOperation.h"
-#include "COM_SocketConnection.h"
 #include "COM_SplitViewerNode.h"
 #include "COM_Stabilize2dNode.h"
 #include "COM_SwitchNode.h"
@@ -119,30 +116,24 @@
 #include "COM_PixelateNode.h"
 #include "COM_PlaneTrackDeformNode.h"
 
-Node *Converter::convert(bNode *b_node, bool fast)
+bool Converter::is_fast_node(bNode *b_node)
 {
-	Node *node = NULL;
+	return !(b_node->type == CMP_NODE_BLUR ||
+	         b_node->type == CMP_NODE_VECBLUR ||
+	         b_node->type == CMP_NODE_BILATERALBLUR ||
+	         b_node->type == CMP_NODE_DEFOCUS ||
+	         b_node->type == CMP_NODE_BOKEHBLUR ||
+	         b_node->type == CMP_NODE_GLARE ||
+	         b_node->type == CMP_NODE_DBLUR ||
+	         b_node->type == CMP_NODE_MOVIEDISTORTION ||
+	         b_node->type == CMP_NODE_LENSDIST ||
+	         b_node->type == CMP_NODE_DOUBLEEDGEMASK ||
+	         b_node->type == CMP_NODE_DILATEERODE);
+}
 
-	if (b_node->flag & NODE_MUTED) {
-		node = new MuteNode(b_node);
-		return node;
-	}
-	if (fast) {
-		if (b_node->type == CMP_NODE_BLUR ||
-		    b_node->type == CMP_NODE_VECBLUR ||
-		    b_node->type == CMP_NODE_BILATERALBLUR ||
-		    b_node->type == CMP_N

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list