Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/intern/COM_CPUDevice.cpp2
-rw-r--r--source/blender/compositor/intern/COM_CompositorContext.cpp8
-rw-r--r--source/blender/compositor/intern/COM_Converter.cpp10
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.cpp20
-rw-r--r--source/blender/compositor/intern/COM_MemoryBuffer.cpp4
-rw-r--r--source/blender/compositor/intern/COM_MemoryProxy.cpp6
-rw-r--r--source/blender/compositor/intern/COM_Node.cpp20
-rw-r--r--source/blender/compositor/intern/COM_NodeGraph.cpp6
-rw-r--r--source/blender/compositor/intern/COM_NodeOperation.cpp8
-rw-r--r--source/blender/compositor/intern/COM_NodeOperationBuilder.cpp22
-rw-r--r--source/blender/compositor/intern/COM_OpenCLDevice.cpp6
-rw-r--r--source/blender/compositor/intern/COM_SingleThreadedOperation.cpp6
-rw-r--r--source/blender/compositor/intern/COM_WorkScheduler.cpp38
-rw-r--r--source/blender/compositor/nodes/COM_BlurNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ChannelMatteNode.cpp6
-rw-r--r--source/blender/compositor/nodes/COM_CombineColorNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_DefocusNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_FilterNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_GlareNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ImageNode.cpp12
-rw-r--r--source/blender/compositor/nodes/COM_KeyingNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_MathNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_MovieClipNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_OutputFileNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_RenderLayersNode.cpp12
-rw-r--r--source/blender/compositor/nodes/COM_SeparateColorNode.cpp2
-rw-r--r--source/blender/compositor/nodes/COM_ZCombineNode.cpp2
-rw-r--r--source/blender/compositor/operations/COM_AntiAliasOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_BilateralBlurOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_BrightnessOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_CalculateMeanOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ChangeHSVOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ChromaMatteOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ColorCurveOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_ColorMatteOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ColorRampOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ColorSpillOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_CompositorOperation.cpp36
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ConvertOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp26
-rw-r--r--source/blender/compositor/operations/COM_CropOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_CurveBaseOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_DenoiseOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_DespeckleOperation.cpp26
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_DotproductOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_FlipOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GammaCorrectOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_GlareBaseOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.cpp54
-rw-r--r--source/blender/compositor/operations/COM_InpaintOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_InvertOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_KeyingDespillOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MapRangeOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_MapValueOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_MathBaseOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MixOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_MovieClipOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_NormalizeOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp42
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.cpp38
-rw-r--r--source/blender/compositor/operations/COM_PixelateOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_PlaneTrackOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_PreviewOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.cpp26
-rw-r--r--source/blender/compositor/operations/COM_RotateOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ScaleOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_SetAlphaOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_SetSamplerOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_SplitOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_SunBeamsOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_TrackPositionOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.cpp44
-rw-r--r--source/blender/compositor/operations/COM_VectorCurveOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_ViewerOperation.cpp34
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.cpp28
123 files changed, 708 insertions, 708 deletions
diff --git a/source/blender/compositor/intern/COM_CPUDevice.cpp b/source/blender/compositor/intern/COM_CPUDevice.cpp
index 26fe1ba0bc3..7ea12866148 100644
--- a/source/blender/compositor/intern/COM_CPUDevice.cpp
+++ b/source/blender/compositor/intern/COM_CPUDevice.cpp
@@ -32,5 +32,5 @@ void CPUDevice::execute(WorkPackage *work)
executionGroup->getOutputOperation()->executeRegion(&rect, chunkNumber);
- executionGroup->finalizeChunkExecution(chunkNumber, NULL);
+ executionGroup->finalizeChunkExecution(chunkNumber, nullptr);
}
diff --git a/source/blender/compositor/intern/COM_CompositorContext.cpp b/source/blender/compositor/intern/COM_CompositorContext.cpp
index 3d55fcba086..52e705ffb79 100644
--- a/source/blender/compositor/intern/COM_CompositorContext.cpp
+++ b/source/blender/compositor/intern/COM_CompositorContext.cpp
@@ -22,13 +22,13 @@
CompositorContext::CompositorContext()
{
- this->m_scene = NULL;
- this->m_rd = NULL;
+ this->m_scene = nullptr;
+ this->m_rd = nullptr;
this->m_quality = COM_QUALITY_HIGH;
this->m_hasActiveOpenCLDevices = false;
this->m_fastCalculation = false;
- this->m_viewSettings = NULL;
- this->m_displaySettings = NULL;
+ this->m_viewSettings = nullptr;
+ this->m_displaySettings = nullptr;
}
int CompositorContext::getFramenumber() const
diff --git a/source/blender/compositor/intern/COM_Converter.cpp b/source/blender/compositor/intern/COM_Converter.cpp
index 15a52d10071..f7250de8566 100644
--- a/source/blender/compositor/intern/COM_Converter.cpp
+++ b/source/blender/compositor/intern/COM_Converter.cpp
@@ -133,11 +133,11 @@ bool Converter::is_fast_node(bNode *b_node)
Node *Converter::convert(bNode *b_node)
{
- Node *node = NULL;
+ Node *node = nullptr;
/* ignore undefined nodes with missing or invalid node data */
if (!nodeIsRegistered(b_node)) {
- return NULL;
+ return nullptr;
}
switch (b_node->type) {
@@ -439,7 +439,7 @@ NodeOperation *Converter::convertDataType(NodeOperationOutput *from, NodeOperati
return new ConvertVectorToColorOperation();
}
- return NULL;
+ return nullptr;
}
void Converter::convertResolution(NodeOperationBuilder &builder,
@@ -498,8 +498,8 @@ void Converter::convertResolution(NodeOperationBuilder &builder,
}
if (doCenter) {
- NodeOperation *first = NULL;
- ScaleOperation *scaleOperation = NULL;
+ NodeOperation *first = nullptr;
+ ScaleOperation *scaleOperation = nullptr;
if (doScale) {
scaleOperation = new ScaleOperation();
scaleOperation->getInputSocket(1)->setResizeMode(COM_SC_NO_RESIZE);
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
index ad980177ae5..27cec28f5d5 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp
@@ -45,8 +45,8 @@ ExecutionGroup::ExecutionGroup()
{
this->m_isOutput = false;
this->m_complex = false;
- this->m_chunkExecutionStates = NULL;
- this->m_bTree = NULL;
+ this->m_chunkExecutionStates = nullptr;
+ this->m_bTree = nullptr;
this->m_height = 0;
this->m_width = 0;
this->m_cachedMaxReadBufferOffset = 0;
@@ -121,13 +121,13 @@ NodeOperation *ExecutionGroup::getOutputOperation() const
void ExecutionGroup::initExecution()
{
- if (this->m_chunkExecutionStates != NULL) {
+ if (this->m_chunkExecutionStates != nullptr) {
MEM_freeN(this->m_chunkExecutionStates);
}
unsigned int index;
determineNumberOfChunks();
- this->m_chunkExecutionStates = NULL;
+ this->m_chunkExecutionStates = nullptr;
if (this->m_numberOfChunks != 0) {
this->m_chunkExecutionStates = (ChunkExecutionState *)MEM_mallocN(
sizeof(ChunkExecutionState) * this->m_numberOfChunks, __func__);
@@ -152,15 +152,15 @@ void ExecutionGroup::initExecution()
void ExecutionGroup::deinitExecution()
{
- if (this->m_chunkExecutionStates != NULL) {
+ if (this->m_chunkExecutionStates != nullptr) {
MEM_freeN(this->m_chunkExecutionStates);
- this->m_chunkExecutionStates = NULL;
+ this->m_chunkExecutionStates = nullptr;
}
this->m_numberOfChunks = 0;
this->m_numberOfXChunks = 0;
this->m_numberOfYChunks = 0;
this->m_cachedReadOperations.clear();
- this->m_bTree = NULL;
+ this->m_bTree = nullptr;
}
void ExecutionGroup::determineResolution(unsigned int resolution[2])
{
@@ -415,7 +415,7 @@ void ExecutionGroup::finalizeChunkExecution(int chunkNumber, MemoryBuffer **memo
MemoryBuffer *buffer = memoryBuffers[index];
if (buffer) {
if (buffer->isTemporarily()) {
- memoryBuffers[index] = NULL;
+ memoryBuffers[index] = nullptr;
delete buffer;
}
}
@@ -478,7 +478,7 @@ MemoryBuffer *ExecutionGroup::allocateOutputBuffer(int /*chunkNumber*/, rcti *re
MemoryBuffer *buffer = new MemoryBuffer(writeOperation->getMemoryProxy(), rect);
return buffer;
}
- return NULL;
+ return nullptr;
}
bool ExecutionGroup::scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area)
@@ -562,7 +562,7 @@ bool ExecutionGroup::scheduleChunkWhenPossible(ExecutionSystem *graph, int xChun
determineDependingAreaOfInterest(&rect, readOperation, &area);
ExecutionGroup *group = memoryProxy->getExecutor();
- if (group != NULL) {
+ if (group != nullptr) {
if (!group->scheduleAreaWhenPossible(graph, &area)) {
canBeExecuted = false;
}
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index f58d7a768cc..a13db6bb09e 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -83,7 +83,7 @@ MemoryBuffer::MemoryBuffer(DataType dataType, rcti *rect)
this->m_width = BLI_rcti_size_x(&this->m_rect);
this->m_height = BLI_rcti_size_y(&this->m_rect);
this->m_height = this->m_rect.ymax - this->m_rect.ymin;
- this->m_memoryProxy = NULL;
+ this->m_memoryProxy = nullptr;
this->m_chunkNumber = -1;
this->m_num_channels = determine_num_channels(dataType);
this->m_buffer = (float *)MEM_mallocN_aligned(
@@ -145,7 +145,7 @@ MemoryBuffer::~MemoryBuffer()
{
if (this->m_buffer) {
MEM_freeN(this->m_buffer);
- this->m_buffer = NULL;
+ this->m_buffer = nullptr;
}
}
diff --git a/source/blender/compositor/intern/COM_MemoryProxy.cpp b/source/blender/compositor/intern/COM_MemoryProxy.cpp
index b73bac469d0..7d590cd0ef6 100644
--- a/source/blender/compositor/intern/COM_MemoryProxy.cpp
+++ b/source/blender/compositor/intern/COM_MemoryProxy.cpp
@@ -20,8 +20,8 @@
MemoryProxy::MemoryProxy(DataType datatype)
{
- this->m_writeBufferOperation = NULL;
- this->m_executor = NULL;
+ this->m_writeBufferOperation = nullptr;
+ this->m_executor = nullptr;
this->m_datatype = datatype;
}
@@ -40,6 +40,6 @@ void MemoryProxy::free()
{
if (this->m_buffer) {
delete this->m_buffer;
- this->m_buffer = NULL;
+ this->m_buffer = nullptr;
}
}
diff --git a/source/blender/compositor/intern/COM_Node.cpp b/source/blender/compositor/intern/COM_Node.cpp
index 30ebd7e0d4b..74aefaf0e6d 100644
--- a/source/blender/compositor/intern/COM_Node.cpp
+++ b/source/blender/compositor/intern/COM_Node.cpp
@@ -37,14 +37,14 @@
**************/
Node::Node(bNode *editorNode, bool create_sockets)
- : m_editorNodeTree(NULL),
+ : m_editorNodeTree(nullptr),
m_editorNode(editorNode),
m_inActiveGroup(false),
m_instanceKey(NODE_INSTANCE_KEY_NONE)
{
if (create_sockets) {
bNodeSocket *input = (bNodeSocket *)editorNode->inputs.first;
- while (input != NULL) {
+ while (input != nullptr) {
DataType dt = COM_DT_VALUE;
if (input->type == SOCK_RGBA) {
dt = COM_DT_COLOR;
@@ -57,7 +57,7 @@ Node::Node(bNode *editorNode, bool create_sockets)
input = input->next;
}
bNodeSocket *output = (bNodeSocket *)editorNode->outputs.first;
- while (output != NULL) {
+ while (output != nullptr) {
DataType dt = COM_DT_VALUE;
if (output->type == SOCK_RGBA) {
dt = COM_DT_COLOR;
@@ -86,7 +86,7 @@ Node::~Node()
void Node::addInputSocket(DataType datatype)
{
- this->addInputSocket(datatype, NULL);
+ this->addInputSocket(datatype, nullptr);
}
void Node::addInputSocket(DataType datatype, bNodeSocket *bSocket)
@@ -97,7 +97,7 @@ void Node::addInputSocket(DataType datatype, bNodeSocket *bSocket)
void Node::addOutputSocket(DataType datatype)
{
- this->addOutputSocket(datatype, NULL);
+ this->addOutputSocket(datatype, nullptr);
}
void Node::addOutputSocket(DataType datatype, bNodeSocket *bSocket)
{
@@ -121,27 +121,27 @@ bNodeSocket *Node::getEditorInputSocket(int editorNodeInputSocketIndex)
{
bNodeSocket *bSock = (bNodeSocket *)this->getbNode()->inputs.first;
int index = 0;
- while (bSock != NULL) {
+ while (bSock != nullptr) {
if (index == editorNodeInputSocketIndex) {
return bSock;
}
index++;
bSock = bSock->next;
}
- return NULL;
+ return nullptr;
}
bNodeSocket *Node::getEditorOutputSocket(int editorNodeOutputSocketIndex)
{
bNodeSocket *bSock = (bNodeSocket *)this->getbNode()->outputs.first;
int index = 0;
- while (bSock != NULL) {
+ while (bSock != nullptr) {
if (index == editorNodeOutputSocketIndex) {
return bSock;
}
index++;
bSock = bSock->next;
}
- return NULL;
+ return nullptr;
}
/*******************
@@ -149,7 +149,7 @@ bNodeSocket *Node::getEditorOutputSocket(int editorNodeOutputSocketIndex)
*******************/
NodeInput::NodeInput(Node *node, bNodeSocket *b_socket, DataType datatype)
- : m_node(node), m_editorSocket(b_socket), m_datatype(datatype), m_link(NULL)
+ : m_node(node), m_editorSocket(b_socket), m_datatype(datatype), m_link(nullptr)
{
}
diff --git a/source/blender/compositor/intern/COM_NodeGraph.cpp b/source/blender/compositor/intern/COM_NodeGraph.cpp
index fe680f61a90..b604b8ced88 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.cpp
+++ b/source/blender/compositor/intern/COM_NodeGraph.cpp
@@ -61,7 +61,7 @@ bNodeSocket *NodeGraph::find_b_node_input(bNode *b_node, const char *identifier)
return b_sock;
}
}
- return NULL;
+ return nullptr;
}
bNodeSocket *NodeGraph::find_b_node_output(bNode *b_node, const char *identifier)
@@ -71,7 +71,7 @@ bNodeSocket *NodeGraph::find_b_node_output(bNode *b_node, const char *identifier
return b_sock;
}
}
- return NULL;
+ return nullptr;
}
void NodeGraph::add_node(Node *node,
@@ -179,7 +179,7 @@ NodeOutput *NodeGraph::find_output(const NodeRange &node_range, bNodeSocket *b_s
}
}
}
- return NULL;
+ return nullptr;
}
void NodeGraph::add_bNodeLink(const NodeRange &node_range, bNodeLink *b_nodelink)
diff --git a/source/blender/compositor/intern/COM_NodeOperation.cpp b/source/blender/compositor/intern/COM_NodeOperation.cpp
index 4e3c5d2df6c..0842721a9e5 100644
--- a/source/blender/compositor/intern/COM_NodeOperation.cpp
+++ b/source/blender/compositor/intern/COM_NodeOperation.cpp
@@ -36,7 +36,7 @@ NodeOperation::NodeOperation()
this->m_height = 0;
this->m_isResolutionSet = false;
this->m_openCL = false;
- this->m_btree = NULL;
+ this->m_btree = nullptr;
}
NodeOperation::~NodeOperation()
@@ -146,7 +146,7 @@ NodeOperation *NodeOperation::getInputOperation(unsigned int inputSocketIndex)
return &input->getLink()->getOperation();
}
- return NULL;
+ return nullptr;
}
void NodeOperation::getConnectedInputSockets(Inputs *sockets)
@@ -199,7 +199,7 @@ bool NodeOperation::determineDependingAreaOfInterest(rcti *input,
NodeOperationInput::NodeOperationInput(NodeOperation *op,
DataType datatype,
InputResizeMode resizeMode)
- : m_operation(op), m_datatype(datatype), m_resizeMode(resizeMode), m_link(NULL)
+ : m_operation(op), m_datatype(datatype), m_resizeMode(resizeMode), m_link(nullptr)
{
}
@@ -209,7 +209,7 @@ SocketReader *NodeOperationInput::getReader()
return &m_link->getOperation();
}
- return NULL;
+ return nullptr;
}
void NodeOperationInput::determineResolution(unsigned int resolution[2],
diff --git a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
index 53a6d115e97..1237e728079 100644
--- a/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
+++ b/source/blender/compositor/intern/COM_NodeOperationBuilder.cpp
@@ -38,7 +38,7 @@
#include "COM_NodeOperationBuilder.h" /* own include */
NodeOperationBuilder::NodeOperationBuilder(const CompositorContext *context, bNodeTree *b_nodetree)
- : m_context(context), m_current_node(NULL), m_active_viewer(NULL)
+ : m_context(context), m_current_node(nullptr), m_active_viewer(nullptr)
{
m_graph.from_bNodeTree(*context, b_nodetree);
}
@@ -61,7 +61,7 @@ void NodeOperationBuilder::convertToOperations(ExecutionSystem *system)
node->convertToOperations(converter, *m_context);
}
- m_current_node = NULL;
+ m_current_node = nullptr;
/* The input map constructed by nodes maps operation inputs to node inputs.
* Inverting yields a map of node inputs to all connected operation inputs,
@@ -168,7 +168,7 @@ void NodeOperationBuilder::removeInputLink(NodeOperationInput *to)
Link &link = *it;
if (link.to() == to) {
/* unregister with the input */
- to->setLink(NULL);
+ to->setLink(nullptr);
m_links.erase(it);
return;
@@ -203,15 +203,15 @@ PreviewOperation *NodeOperationBuilder::make_preview_operation() const
BLI_assert(m_current_node);
if (!(m_current_node->getbNode()->flag & NODE_PREVIEW)) {
- return NULL;
+ return nullptr;
}
/* previews only in the active group */
if (!m_current_node->isInActiveGroup()) {
- return NULL;
+ return nullptr;
}
/* do not calculate previews of hidden nodes */
if (m_current_node->getbNode()->flag & NODE_HIDDEN) {
- return NULL;
+ return nullptr;
}
bNodeInstanceHash *previews = m_context->getPreviewHash();
@@ -223,7 +223,7 @@ PreviewOperation *NodeOperationBuilder::make_preview_operation() const
return operation;
}
- return NULL;
+ return nullptr;
}
void NodeOperationBuilder::addPreview(NodeOperationOutput *output)
@@ -476,7 +476,7 @@ WriteBufferOperation *NodeOperationBuilder::find_attached_write_buffer_operation
}
}
}
- return NULL;
+ return nullptr;
}
void NodeOperationBuilder::add_input_buffers(NodeOperation * /*operation*/,
@@ -526,13 +526,13 @@ void NodeOperationBuilder::add_output_buffers(NodeOperation *operation,
return;
}
- WriteBufferOperation *writeOperation = NULL;
+ WriteBufferOperation *writeOperation = nullptr;
for (OpInputs::const_iterator it = targets.begin(); it != targets.end(); ++it) {
NodeOperationInput *target = *it;
/* try to find existing write buffer operation */
if (target->getOperation().isWriteBufferOperation()) {
- BLI_assert(writeOperation == NULL); /* there should only be one write op connected */
+ BLI_assert(writeOperation == nullptr); /* there should only be one write op connected */
writeOperation = (WriteBufferOperation *)(&target->getOperation());
}
else {
@@ -728,7 +728,7 @@ void NodeOperationBuilder::group_operations()
ReadBufferOperation *read_op = (ReadBufferOperation *)op;
MemoryProxy *memproxy = read_op->getMemoryProxy();
- if (memproxy->getExecutor() == NULL) {
+ if (memproxy->getExecutor() == nullptr) {
ExecutionGroup *group = make_group(memproxy->getWriteBufferOperation());
memproxy->setExecutor(group);
}
diff --git a/source/blender/compositor/intern/COM_OpenCLDevice.cpp b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
index 2529637801d..35579bac925 100644
--- a/source/blender/compositor/intern/COM_OpenCLDevice.cpp
+++ b/source/blender/compositor/intern/COM_OpenCLDevice.cpp
@@ -41,7 +41,7 @@ OpenCLDevice::OpenCLDevice(cl_context context,
this->m_device = device;
this->m_context = context;
this->m_program = program;
- this->m_queue = NULL;
+ this->m_queue = nullptr;
this->m_vendorID = vendorId;
}
@@ -196,7 +196,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
(size_t)outputMemoryBuffer->getHeight(),
};
- error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
+ error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, nullptr, size, nullptr, 0, nullptr, nullptr);
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
@@ -243,7 +243,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel,
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
- error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
+ error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, nullptr, size, nullptr, 0, nullptr, nullptr);
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
diff --git a/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp b/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp
index 98239166860..5febf3802de 100644
--- a/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp
+++ b/source/blender/compositor/intern/COM_SingleThreadedOperation.cpp
@@ -20,7 +20,7 @@
SingleThreadedOperation::SingleThreadedOperation()
{
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
setComplex(true);
}
@@ -39,7 +39,7 @@ void SingleThreadedOperation::deinitExecution()
deinitMutex();
if (this->m_cachedInstance) {
delete this->m_cachedInstance;
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
}
}
void *SingleThreadedOperation::initializeTileData(rcti *rect)
@@ -49,7 +49,7 @@ void *SingleThreadedOperation::initializeTileData(rcti *rect)
}
lockMutex();
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
//
this->m_cachedInstance = createMemoryBuffer(rect);
}
diff --git a/source/blender/compositor/intern/COM_WorkScheduler.cpp b/source/blender/compositor/intern/COM_WorkScheduler.cpp
index 570e1eeba20..450b64eec5a 100644
--- a/source/blender/compositor/intern/COM_WorkScheduler.cpp
+++ b/source/blender/compositor/intern/COM_WorkScheduler.cpp
@@ -80,7 +80,7 @@ void *WorkScheduler::thread_execute_cpu(void *data)
delete work;
}
- return NULL;
+ return nullptr;
}
void *WorkScheduler::thread_execute_gpu(void *data)
@@ -93,7 +93,7 @@ void *WorkScheduler::thread_execute_gpu(void *data)
delete work;
}
- return NULL;
+ return nullptr;
}
#endif
@@ -166,13 +166,13 @@ void WorkScheduler::stop()
BLI_thread_queue_nowait(g_cpuqueue);
BLI_threadpool_end(&g_cputhreads);
BLI_thread_queue_free(g_cpuqueue);
- g_cpuqueue = NULL;
+ g_cpuqueue = nullptr;
# ifdef COM_OPENCL_ENABLED
if (g_openclActive) {
BLI_thread_queue_nowait(g_gpuqueue);
BLI_threadpool_end(&g_gputhreads);
BLI_thread_queue_free(g_gpuqueue);
- g_gpuqueue = NULL;
+ g_gpuqueue = nullptr;
}
# endif
#endif
@@ -234,8 +234,8 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
# ifdef COM_OPENCL_ENABLED
/* deinitialize OpenCL GPU's */
if (use_opencl && !g_openclInitialized) {
- g_context = NULL;
- g_program = NULL;
+ g_context = nullptr;
+ g_program = nullptr;
/* This will check for errors and skip if already initialized. */
if (clewInit() != CLEW_SUCCESS) {
@@ -245,7 +245,7 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
if (clCreateContextFromType) {
cl_uint numberOfPlatforms = 0;
cl_int error;
- error = clGetPlatformIDs(0, 0, &numberOfPlatforms);
+ error = clGetPlatformIDs(0, nullptr, &numberOfPlatforms);
if (error == -1001) {
} /* GPU not supported */
else if (error != CL_SUCCESS) {
@@ -256,40 +256,40 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
}
cl_platform_id *platforms = (cl_platform_id *)MEM_mallocN(
sizeof(cl_platform_id) * numberOfPlatforms, __func__);
- error = clGetPlatformIDs(numberOfPlatforms, platforms, 0);
+ error = clGetPlatformIDs(numberOfPlatforms, platforms, nullptr);
unsigned int indexPlatform;
for (indexPlatform = 0; indexPlatform < numberOfPlatforms; indexPlatform++) {
cl_platform_id platform = platforms[indexPlatform];
cl_uint numberOfDevices = 0;
- clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, 0, &numberOfDevices);
+ clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, nullptr, &numberOfDevices);
if (numberOfDevices <= 0) {
continue;
}
cl_device_id *cldevices = (cl_device_id *)MEM_mallocN(
sizeof(cl_device_id) * numberOfDevices, __func__);
- clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, numberOfDevices, cldevices, 0);
+ clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, numberOfDevices, cldevices, nullptr);
g_context = clCreateContext(
- NULL, numberOfDevices, cldevices, clContextError, NULL, &error);
+ nullptr, numberOfDevices, cldevices, clContextError, nullptr, &error);
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
- const char *cl_str[2] = {datatoc_COM_OpenCLKernels_cl, NULL};
- g_program = clCreateProgramWithSource(g_context, 1, cl_str, 0, &error);
- error = clBuildProgram(g_program, numberOfDevices, cldevices, 0, 0, 0);
+ const char *cl_str[2] = {datatoc_COM_OpenCLKernels_cl, nullptr};
+ g_program = clCreateProgramWithSource(g_context, 1, cl_str, nullptr, &error);
+ error = clBuildProgram(g_program, numberOfDevices, cldevices, nullptr, nullptr, nullptr);
if (error != CL_SUCCESS) {
cl_int error2;
size_t ret_val_size = 0;
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
error2 = clGetProgramBuildInfo(
- g_program, cldevices[0], CL_PROGRAM_BUILD_LOG, 0, NULL, &ret_val_size);
+ g_program, cldevices[0], CL_PROGRAM_BUILD_LOG, 0, nullptr, &ret_val_size);
if (error2 != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
char *build_log = (char *)MEM_mallocN(sizeof(char) * ret_val_size + 1, __func__);
error2 = clGetProgramBuildInfo(
- g_program, cldevices[0], CL_PROGRAM_BUILD_LOG, ret_val_size, build_log, NULL);
+ g_program, cldevices[0], CL_PROGRAM_BUILD_LOG, ret_val_size, build_log, nullptr);
if (error2 != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
@@ -303,7 +303,7 @@ void WorkScheduler::initialize(bool use_opencl, int num_cpu_threads)
cl_device_id device = cldevices[indexDevices];
cl_int vendorID = 0;
cl_int error2 = clGetDeviceInfo(
- device, CL_DEVICE_VENDOR_ID, sizeof(cl_int), &vendorID, NULL);
+ device, CL_DEVICE_VENDOR_ID, sizeof(cl_int), &vendorID, nullptr);
if (error2 != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error2, clewErrorString(error2));
}
@@ -351,11 +351,11 @@ void WorkScheduler::deinitialize()
}
if (g_program) {
clReleaseProgram(g_program);
- g_program = NULL;
+ g_program = nullptr;
}
if (g_context) {
clReleaseContext(g_context);
- g_context = NULL;
+ g_context = nullptr;
}
g_openclInitialized = false;
diff --git a/source/blender/compositor/nodes/COM_BlurNode.cpp b/source/blender/compositor/nodes/COM_BlurNode.cpp
index 808c1b22bdb..b82bede8443 100644
--- a/source/blender/compositor/nodes/COM_BlurNode.cpp
+++ b/source/blender/compositor/nodes/COM_BlurNode.cpp
@@ -46,7 +46,7 @@ void BlurNode::convertToOperations(NodeConverter &converter,
const bool extend_bounds = (editorNode->custom1 & CMP_NODEFLAG_BLUR_EXTEND_BOUNDS) != 0;
CompositorQuality quality = context.getQuality();
- NodeOperation *input_operation = NULL, *output_operation = NULL;
+ NodeOperation *input_operation = nullptr, *output_operation = nullptr;
if (data->filtertype == R_FILTER_FAST_GAUSS) {
FastGaussianBlurOperation *operationfgb = new FastGaussianBlurOperation();
diff --git a/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp b/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
index d320a6645e1..c927865489b 100644
--- a/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
+++ b/source/blender/compositor/nodes/COM_ChannelMatteNode.cpp
@@ -36,7 +36,7 @@ void ChannelMatteNode::convertToOperations(NodeConverter &converter,
NodeOutput *outputSocketImage = this->getOutputSocket(0);
NodeOutput *outputSocketMatte = this->getOutputSocket(1);
- NodeOperation *convert = NULL, *inv_convert = NULL;
+ NodeOperation *convert = nullptr, *inv_convert = nullptr;
/* colorspace */
switch (node->custom1) {
case CMP_NODE_CHANNEL_MATTE_CS_RGB:
@@ -67,7 +67,7 @@ void ChannelMatteNode::convertToOperations(NodeConverter &converter,
SetAlphaOperation *operationAlpha = new SetAlphaOperation();
converter.addOperation(operationAlpha);
- if (convert != NULL) {
+ if (convert != nullptr) {
converter.addOperation(convert);
converter.mapInputSocket(inputSocketImage, convert->getInputSocket(0));
@@ -82,7 +82,7 @@ void ChannelMatteNode::convertToOperations(NodeConverter &converter,
converter.mapOutputSocket(outputSocketMatte, operation->getOutputSocket(0));
converter.addLink(operation->getOutputSocket(), operationAlpha->getInputSocket(1));
- if (inv_convert != NULL) {
+ if (inv_convert != nullptr) {
converter.addOperation(inv_convert);
converter.addLink(operationAlpha->getOutputSocket(0), inv_convert->getInputSocket(0));
converter.mapOutputSocket(outputSocketImage, inv_convert->getOutputSocket());
diff --git a/source/blender/compositor/nodes/COM_CombineColorNode.cpp b/source/blender/compositor/nodes/COM_CombineColorNode.cpp
index 2f9b14db6af..12968f06a10 100644
--- a/source/blender/compositor/nodes/COM_CombineColorNode.cpp
+++ b/source/blender/compositor/nodes/COM_CombineColorNode.cpp
@@ -67,7 +67,7 @@ void CombineColorNode::convertToOperations(NodeConverter &converter,
NodeOperation *CombineRGBANode::getColorConverter(const CompositorContext & /*context*/) const
{
- return NULL; /* no conversion needed */
+ return nullptr; /* no conversion needed */
}
NodeOperation *CombineHSVANode::getColorConverter(const CompositorContext & /*context*/) const
diff --git a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
index da8985de5ac..2921b44c95b 100644
--- a/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
+++ b/source/blender/compositor/nodes/COM_ConvertAlphaNode.cpp
@@ -23,7 +23,7 @@
void ConvertAlphaNode::convertToOperations(NodeConverter &converter,
const CompositorContext & /*context*/) const
{
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
bNode *node = this->getbNode();
/* value hardcoded in rna_nodetree.c */
diff --git a/source/blender/compositor/nodes/COM_DefocusNode.cpp b/source/blender/compositor/nodes/COM_DefocusNode.cpp
index 0f09e5bfc91..393b1f2dabb 100644
--- a/source/blender/compositor/nodes/COM_DefocusNode.cpp
+++ b/source/blender/compositor/nodes/COM_DefocusNode.cpp
@@ -41,7 +41,7 @@ void DefocusNode::convertToOperations(NodeConverter &converter,
bNode *node = this->getbNode();
NodeDefocus *data = (NodeDefocus *)node->storage;
Scene *scene = node->id ? (Scene *)node->id : context.getScene();
- Object *camob = scene ? scene->camera : NULL;
+ Object *camob = scene ? scene->camera : nullptr;
NodeOperation *radiusOperation;
if (data->no_zbuf) {
diff --git a/source/blender/compositor/nodes/COM_FilterNode.cpp b/source/blender/compositor/nodes/COM_FilterNode.cpp
index 8b8ff55d544..1147c11794f 100644
--- a/source/blender/compositor/nodes/COM_FilterNode.cpp
+++ b/source/blender/compositor/nodes/COM_FilterNode.cpp
@@ -34,7 +34,7 @@ void FilterNode::convertToOperations(NodeConverter &converter,
NodeInput *inputSocket = this->getInputSocket(0);
NodeInput *inputImageSocket = this->getInputSocket(1);
NodeOutput *outputSocket = this->getOutputSocket(0);
- ConvolutionFilterOperation *operation = NULL;
+ ConvolutionFilterOperation *operation = nullptr;
switch (this->getbNode()->custom1) {
case CMP_FILT_SOFT:
diff --git a/source/blender/compositor/nodes/COM_GlareNode.cpp b/source/blender/compositor/nodes/COM_GlareNode.cpp
index 1ff058ce7d4..ef088e42205 100644
--- a/source/blender/compositor/nodes/COM_GlareNode.cpp
+++ b/source/blender/compositor/nodes/COM_GlareNode.cpp
@@ -38,7 +38,7 @@ void GlareNode::convertToOperations(NodeConverter &converter,
bNode *node = this->getbNode();
NodeGlare *glare = (NodeGlare *)node->storage;
- GlareBaseOperation *glareoperation = NULL;
+ GlareBaseOperation *glareoperation = nullptr;
switch (glare->type) {
default:
case 3:
diff --git a/source/blender/compositor/nodes/COM_ImageNode.cpp b/source/blender/compositor/nodes/COM_ImageNode.cpp
index 1662b81c265..596a448e6a0 100644
--- a/source/blender/compositor/nodes/COM_ImageNode.cpp
+++ b/source/blender/compositor/nodes/COM_ImageNode.cpp
@@ -44,7 +44,7 @@ NodeOperation *ImageNode::doMultilayerCheck(NodeConverter &converter,
DataType datatype) const
{
NodeOutput *outputSocket = this->getOutputSocket(outputsocketIndex);
- MultilayerBaseOperation *operation = NULL;
+ MultilayerBaseOperation *operation = nullptr;
switch (datatype) {
case COM_DT_VALUE:
operation = new MultilayerValueOperation(passindex, view);
@@ -84,7 +84,7 @@ void ImageNode::convertToOperations(NodeConverter &converter,
/* force a load, we assume iuser index will be set OK anyway */
if (image && image->type == IMA_TYPE_MULTILAYER) {
bool is_multilayer_ok = false;
- ImBuf *ibuf = BKE_image_acquire_ibuf(image, imageuser, NULL);
+ ImBuf *ibuf = BKE_image_acquire_ibuf(image, imageuser, nullptr);
if (image->rr) {
RenderLayer *rl = (RenderLayer *)BLI_findlink(&image->rr->layers, imageuser->layer);
if (rl) {
@@ -94,7 +94,7 @@ void ImageNode::convertToOperations(NodeConverter &converter,
is_multilayer_ok = true;
for (index = 0; index < numberOfOutputs; index++) {
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
socket = this->getOutputSocket(index);
bNodeSocket *bnodeSocket = socket->getbNodeSocket();
NodeImageLayer *storage = (NodeImageLayer *)bnodeSocket->storage;
@@ -196,13 +196,13 @@ void ImageNode::convertToOperations(NodeConverter &converter,
}
/* In case we can't load the layer. */
- if (operation == NULL) {
+ if (operation == nullptr) {
converter.setInvalidOutput(getOutputSocket(index));
}
}
}
}
- BKE_image_release_ibuf(image, ibuf, NULL);
+ BKE_image_release_ibuf(image, ibuf, nullptr);
/* without this, multilayer that fail to load will crash blender T32490. */
if (is_multilayer_ok == false) {
@@ -263,7 +263,7 @@ void ImageNode::convertToOperations(NodeConverter &converter,
/* happens when unlinking image datablock from multilayer node */
for (int i = 3; i < numberOfOutputs; i++) {
NodeOutput *output = this->getOutputSocket(i);
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
switch (output->getDataType()) {
case COM_DT_VALUE: {
SetValueOperation *valueoperation = new SetValueOperation();
diff --git a/source/blender/compositor/nodes/COM_KeyingNode.cpp b/source/blender/compositor/nodes/COM_KeyingNode.cpp
index 53cf64c5c3f..89ad4edce02 100644
--- a/source/blender/compositor/nodes/COM_KeyingNode.cpp
+++ b/source/blender/compositor/nodes/COM_KeyingNode.cpp
@@ -228,7 +228,7 @@ void KeyingNode::convertToOperations(NodeConverter &converter,
NodeOutput *outputImage = this->getOutputSocket(0);
NodeOutput *outputMatte = this->getOutputSocket(1);
NodeOutput *outputEdges = this->getOutputSocket(2);
- NodeOperationOutput *postprocessedMatte = NULL, *postprocessedImage = NULL, *edgesMatte = NULL;
+ NodeOperationOutput *postprocessedMatte = nullptr, *postprocessedImage = nullptr, *edgesMatte = nullptr;
/* keying operation */
KeyingOperation *keyingOperation = new KeyingOperation();
diff --git a/source/blender/compositor/nodes/COM_MathNode.cpp b/source/blender/compositor/nodes/COM_MathNode.cpp
index 227e26af2b2..0edf880400f 100644
--- a/source/blender/compositor/nodes/COM_MathNode.cpp
+++ b/source/blender/compositor/nodes/COM_MathNode.cpp
@@ -23,7 +23,7 @@
void MathNode::convertToOperations(NodeConverter &converter,
const CompositorContext & /*context*/) const
{
- MathBaseOperation *operation = NULL;
+ MathBaseOperation *operation = nullptr;
switch (this->getbNode()->custom1) {
case NODE_MATH_ADD:
diff --git a/source/blender/compositor/nodes/COM_MovieClipNode.cpp b/source/blender/compositor/nodes/COM_MovieClipNode.cpp
index 3366a8c20d6..7cc8f2ea19c 100644
--- a/source/blender/compositor/nodes/COM_MovieClipNode.cpp
+++ b/source/blender/compositor/nodes/COM_MovieClipNode.cpp
@@ -49,7 +49,7 @@ void MovieClipNode::convertToOperations(NodeConverter &converter,
MovieClipUser *movieClipUser = (MovieClipUser *)editorNode->storage;
bool cacheFrame = !context.isRendering();
- ImBuf *ibuf = NULL;
+ ImBuf *ibuf = nullptr;
if (movieClip) {
if (cacheFrame) {
ibuf = BKE_movieclip_get_ibuf(movieClip, movieClipUser);
diff --git a/source/blender/compositor/nodes/COM_OutputFileNode.cpp b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
index 1269e0b7f77..09528e09f1f 100644
--- a/source/blender/compositor/nodes/COM_OutputFileNode.cpp
+++ b/source/blender/compositor/nodes/COM_OutputFileNode.cpp
@@ -100,7 +100,7 @@ void OutputFileNode::convertToOperations(NodeConverter &converter,
/* combine file path for the input */
BLI_join_dirfile(path, FILE_MAX, storage->base_path, sockdata->path);
- NodeOperation *outputOperation = NULL;
+ NodeOperation *outputOperation = nullptr;
if (is_multiview && format->views_format == R_IMF_VIEWS_MULTIVIEW) {
outputOperation = new OutputOpenExrSingleLayerMultiViewOperation(
diff --git a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
index d66dd3fd434..6be86c04c4d 100644
--- a/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
+++ b/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
@@ -58,17 +58,17 @@ void RenderLayersNode::testRenderLink(NodeConverter &converter,
Scene *scene = (Scene *)this->getbNode()->id;
const short layerId = this->getbNode()->custom1;
RenderResult *rr = RE_AcquireResultRead(re);
- if (rr == NULL) {
+ if (rr == nullptr) {
missingRenderLink(converter);
return;
}
ViewLayer *view_layer = (ViewLayer *)BLI_findlink(&scene->view_layers, layerId);
- if (view_layer == NULL) {
+ if (view_layer == nullptr) {
missingRenderLink(converter);
return;
}
RenderLayer *rl = RE_GetRenderLayer(rr, view_layer->name);
- if (rl == NULL) {
+ if (rl == nullptr) {
missingRenderLink(converter);
return;
}
@@ -78,7 +78,7 @@ void RenderLayersNode::testRenderLink(NodeConverter &converter,
NodeImageLayer *storage = (NodeImageLayer *)output->getbNodeSocket()->storage;
RenderPass *rpass = (RenderPass *)BLI_findstring(
&rl->passes, storage->pass_name, offsetof(RenderPass, name));
- if (rpass == NULL) {
+ if (rpass == nullptr) {
missingSocketLink(converter, output);
continue;
}
@@ -164,9 +164,9 @@ void RenderLayersNode::convertToOperations(NodeConverter &converter,
const CompositorContext &context) const
{
Scene *scene = (Scene *)this->getbNode()->id;
- Render *re = (scene) ? RE_GetSceneRender(scene) : NULL;
+ Render *re = (scene) ? RE_GetSceneRender(scene) : nullptr;
- if (re != NULL) {
+ if (re != nullptr) {
testRenderLink(converter, context, re);
RE_ReleaseResult(re);
}
diff --git a/source/blender/compositor/nodes/COM_SeparateColorNode.cpp b/source/blender/compositor/nodes/COM_SeparateColorNode.cpp
index 712ba1e1f2d..203aa25c9e9 100644
--- a/source/blender/compositor/nodes/COM_SeparateColorNode.cpp
+++ b/source/blender/compositor/nodes/COM_SeparateColorNode.cpp
@@ -99,7 +99,7 @@ void SeparateColorNode::convertToOperations(NodeConverter &converter,
NodeOperation *SeparateRGBANode::getColorConverter(const CompositorContext & /*context*/) const
{
- return NULL; /* no conversion needed */
+ return nullptr; /* no conversion needed */
}
NodeOperation *SeparateHSVANode::getColorConverter(const CompositorContext & /*context*/) const
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.cpp b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
index df201289ca4..b61c018d029 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.cpp
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
@@ -32,7 +32,7 @@ void ZCombineNode::convertToOperations(NodeConverter &converter,
const CompositorContext &context) const
{
if ((context.getRenderData()->scemode & R_FULL_SAMPLE) || this->getbNode()->custom2) {
- ZCombineOperation *operation = NULL;
+ ZCombineOperation *operation = nullptr;
if (this->getbNode()->custom1) {
operation = new ZCombineAlphaOperation();
}
diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
index e1e58c9521a..b0d63d7b791 100644
--- a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
+++ b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
@@ -116,7 +116,7 @@ AntiAliasOperation::AntiAliasOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_valueReader = NULL;
+ this->m_valueReader = nullptr;
this->setComplex(true);
}
@@ -179,7 +179,7 @@ void AntiAliasOperation::executePixel(float output[4], int x, int y, void *data)
void AntiAliasOperation::deinitExecution()
{
- this->m_valueReader = NULL;
+ this->m_valueReader = nullptr;
}
bool AntiAliasOperation::determineDependingAreaOfInterest(rcti *input,
diff --git a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
index 93193aef360..35b0092fa5f 100644
--- a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
@@ -28,8 +28,8 @@ BilateralBlurOperation::BilateralBlurOperation()
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->m_inputColorProgram = NULL;
- this->m_inputDeterminatorProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputDeterminatorProgram = nullptr;
}
void BilateralBlurOperation::initExecution()
@@ -94,8 +94,8 @@ void BilateralBlurOperation::executePixel(float output[4], int x, int y, void *d
void BilateralBlurOperation::deinitExecution()
{
- this->m_inputColorProgram = NULL;
- this->m_inputDeterminatorProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputDeterminatorProgram = nullptr;
}
bool BilateralBlurOperation::determineDependingAreaOfInterest(rcti *input,
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
index 0d9a1a184d6..3fe154c397e 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
@@ -29,7 +29,7 @@ BlurBaseOperation::BlurBaseOperation(DataType data_type)
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(data_type);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
memset(&m_data, 0, sizeof(NodeBlurData));
this->m_size = 1.0f;
this->m_sizeavailable = false;
@@ -154,8 +154,8 @@ float *BlurBaseOperation::make_dist_fac_inverse(float rad, int size, int falloff
void BlurBaseOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
- this->m_inputSize = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputSize = nullptr;
}
void BlurBaseOperation::setData(const NodeBlurData *data)
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
index 987c5946e48..f7b7816e1a1 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -34,9 +34,9 @@ BokehBlurOperation::BokehBlurOperation()
this->m_size = 1.0f;
this->m_sizeavailable = false;
- this->m_inputProgram = NULL;
- this->m_inputBokehProgram = NULL;
- this->m_inputBoundingBoxReader = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputBokehProgram = nullptr;
+ this->m_inputBoundingBoxReader = nullptr;
this->m_extend_bounds = false;
}
@@ -47,7 +47,7 @@ void *BokehBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateSize();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -133,9 +133,9 @@ void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data)
void BokehBlurOperation::deinitExecution()
{
deinitMutex();
- this->m_inputProgram = NULL;
- this->m_inputBokehProgram = NULL;
- this->m_inputBoundingBoxReader = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputBokehProgram = nullptr;
+ this->m_inputBoundingBoxReader = nullptr;
}
bool BokehBlurOperation::determineDependingAreaOfInterest(rcti *input,
@@ -196,7 +196,7 @@ void BokehBlurOperation::executeOpenCL(OpenCLDevice *device,
list<cl_mem> *clMemToCleanUp,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
- cl_kernel kernel = device->COM_clCreateKernel("bokehBlurKernel", NULL);
+ cl_kernel kernel = device->COM_clCreateKernel("bokehBlurKernel", nullptr);
if (!this->m_sizeavailable) {
updateSize();
}
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.cpp b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
index be3f637e4bb..473a43c1776 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
@@ -113,7 +113,7 @@ void BokehImageOperation::deinitExecution()
if (this->m_deleteData) {
if (this->m_data) {
delete this->m_data;
- this->m_data = NULL;
+ this->m_data = nullptr;
}
}
}
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
index d7d779ed0bb..662b08bdee9 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
@@ -25,8 +25,8 @@ BoxMaskOperation::BoxMaskOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputMask = NULL;
- this->m_inputValue = NULL;
+ this->m_inputMask = nullptr;
+ this->m_inputValue = nullptr;
this->m_cosine = 0.0f;
this->m_sine = 0.0f;
}
@@ -105,6 +105,6 @@ void BoxMaskOperation::executePixelSampled(float output[4], float x, float y, Pi
void BoxMaskOperation::deinitExecution()
{
- this->m_inputMask = NULL;
- this->m_inputValue = NULL;
+ this->m_inputMask = nullptr;
+ this->m_inputValue = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_BrightnessOperation.cpp b/source/blender/compositor/operations/COM_BrightnessOperation.cpp
index c72d227138d..3ae1b4aaef4 100644
--- a/source/blender/compositor/operations/COM_BrightnessOperation.cpp
+++ b/source/blender/compositor/operations/COM_BrightnessOperation.cpp
@@ -24,7 +24,7 @@ BrightnessOperation::BrightnessOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
this->m_use_premultiply = false;
}
@@ -85,7 +85,7 @@ void BrightnessOperation::executePixelSampled(float output[4],
void BrightnessOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
- this->m_inputBrightnessProgram = NULL;
- this->m_inputContrastProgram = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputBrightnessProgram = nullptr;
+ this->m_inputContrastProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
index 115d415a8f8..9ccf9d7f1ef 100644
--- a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
@@ -26,7 +26,7 @@ CalculateMeanOperation::CalculateMeanOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_imageReader = NULL;
+ this->m_imageReader = nullptr;
this->m_iscalculated = false;
this->m_setting = 1;
this->setComplex(true);
@@ -45,7 +45,7 @@ void CalculateMeanOperation::executePixel(float output[4], int /*x*/, int /*y*/,
void CalculateMeanOperation::deinitExecution()
{
- this->m_imageReader = NULL;
+ this->m_imageReader = nullptr;
NodeOperation::deinitMutex();
}
@@ -77,7 +77,7 @@ void *CalculateMeanOperation::initializeTileData(rcti *rect)
this->m_iscalculated = true;
}
unlockMutex();
- return NULL;
+ return nullptr;
}
void CalculateMeanOperation::calculateMean(MemoryBuffer *tile)
diff --git a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
index 476626ffcb6..9ef77b9e5ea 100644
--- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
@@ -99,5 +99,5 @@ void *CalculateStandardDeviationOperation::initializeTileData(rcti *rect)
this->m_iscalculated = true;
}
unlockMutex();
- return NULL;
+ return nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
index b7ee3ad6de3..6bc9fa53c31 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
@@ -25,7 +25,7 @@ ChangeHSVOperation::ChangeHSVOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void ChangeHSVOperation::initExecution()
@@ -38,10 +38,10 @@ void ChangeHSVOperation::initExecution()
void ChangeHSVOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_hueOperation = NULL;
- this->m_saturationOperation = NULL;
- this->m_valueOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_hueOperation = nullptr;
+ this->m_saturationOperation = nullptr;
+ this->m_valueOperation = nullptr;
}
void ChangeHSVOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
index 8dcee8c6070..956a2cc86ee 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
@@ -24,7 +24,7 @@ ChannelMatteOperation::ChannelMatteOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- this->m_inputImageProgram = NULL;
+ this->m_inputImageProgram = nullptr;
}
void ChannelMatteOperation::initExecution()
@@ -77,7 +77,7 @@ void ChannelMatteOperation::initExecution()
void ChannelMatteOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
+ this->m_inputImageProgram = nullptr;
}
void ChannelMatteOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
index c55f434801d..389aeaf6fed 100644
--- a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
@@ -25,8 +25,8 @@ ChromaMatteOperation::ChromaMatteOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
void ChromaMatteOperation::initExecution()
@@ -37,8 +37,8 @@ void ChromaMatteOperation::initExecution()
void ChromaMatteOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
void ChromaMatteOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
index 91418c47665..f9eaaf6f7a0 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
@@ -36,8 +36,8 @@ ColorBalanceASCCDLOperation::ColorBalanceASCCDLOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputValueOperation = NULL;
- this->m_inputColorOperation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColorOperation = nullptr;
this->setResolutionInputSocketIndex(1);
}
@@ -76,6 +76,6 @@ void ColorBalanceASCCDLOperation::executePixelSampled(float output[4],
void ColorBalanceASCCDLOperation::deinitExecution()
{
- this->m_inputValueOperation = NULL;
- this->m_inputColorOperation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColorOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
index 849540db1fc..df44e87a86a 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
@@ -41,8 +41,8 @@ ColorBalanceLGGOperation::ColorBalanceLGGOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputValueOperation = NULL;
- this->m_inputColorOperation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColorOperation = nullptr;
this->setResolutionInputSocketIndex(1);
}
@@ -81,6 +81,6 @@ void ColorBalanceLGGOperation::executePixelSampled(float output[4],
void ColorBalanceLGGOperation::deinitExecution()
{
- this->m_inputValueOperation = NULL;
- this->m_inputColorOperation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColorOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
index d99444344bd..60343c28662 100644
--- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
@@ -26,8 +26,8 @@ ColorCorrectionOperation::ColorCorrectionOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputImage = NULL;
- this->m_inputMask = NULL;
+ this->m_inputImage = nullptr;
+ this->m_inputMask = nullptr;
this->m_redChannelEnabled = true;
this->m_greenChannelEnabled = true;
this->m_blueChannelEnabled = true;
@@ -157,6 +157,6 @@ void ColorCorrectionOperation::executePixelSampled(float output[4],
void ColorCorrectionOperation::deinitExecution()
{
- this->m_inputImage = NULL;
- this->m_inputMask = NULL;
+ this->m_inputImage = nullptr;
+ this->m_inputMask = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
index 8bdaa8ec28b..ed107a88953 100644
--- a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
@@ -30,10 +30,10 @@ ColorCurveOperation::ColorCurveOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputFacProgram = NULL;
- this->m_inputImageProgram = NULL;
- this->m_inputBlackProgram = NULL;
- this->m_inputWhiteProgram = NULL;
+ this->m_inputFacProgram = nullptr;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputBlackProgram = nullptr;
+ this->m_inputWhiteProgram = nullptr;
this->setResolutionInputSocketIndex(1);
}
@@ -90,10 +90,10 @@ void ColorCurveOperation::executePixelSampled(float output[4],
void ColorCurveOperation::deinitExecution()
{
CurveBaseOperation::deinitExecution();
- this->m_inputFacProgram = NULL;
- this->m_inputImageProgram = NULL;
- this->m_inputBlackProgram = NULL;
- this->m_inputWhiteProgram = NULL;
+ this->m_inputFacProgram = nullptr;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputBlackProgram = nullptr;
+ this->m_inputWhiteProgram = nullptr;
}
// Constant level curve mapping
@@ -104,8 +104,8 @@ ConstantLevelColorCurveOperation::ConstantLevelColorCurveOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputFacProgram = NULL;
- this->m_inputImageProgram = NULL;
+ this->m_inputFacProgram = nullptr;
+ this->m_inputImageProgram = nullptr;
this->setResolutionInputSocketIndex(1);
}
@@ -148,6 +148,6 @@ void ConstantLevelColorCurveOperation::executePixelSampled(float output[4],
void ConstantLevelColorCurveOperation::deinitExecution()
{
CurveBaseOperation::deinitExecution();
- this->m_inputFacProgram = NULL;
- this->m_inputImageProgram = NULL;
+ this->m_inputFacProgram = nullptr;
+ this->m_inputImageProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
index e3aa3aef5a4..b8749bec4b8 100644
--- a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
@@ -25,8 +25,8 @@ ColorMatteOperation::ColorMatteOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
void ColorMatteOperation::initExecution()
@@ -37,8 +37,8 @@ void ColorMatteOperation::initExecution()
void ColorMatteOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
void ColorMatteOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ColorRampOperation.cpp b/source/blender/compositor/operations/COM_ColorRampOperation.cpp
index e7f5ca1af5e..4d62a293b78 100644
--- a/source/blender/compositor/operations/COM_ColorRampOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorRampOperation.cpp
@@ -25,8 +25,8 @@ ColorRampOperation::ColorRampOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
- this->m_colorBand = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_colorBand = nullptr;
}
void ColorRampOperation::initExecution()
{
@@ -46,5 +46,5 @@ void ColorRampOperation::executePixelSampled(float output[4],
void ColorRampOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
index 4356eb4b745..050792d8dab 100644
--- a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
@@ -26,8 +26,8 @@ ColorSpillOperation::ColorSpillOperation()
addInputSocket(COM_DT_VALUE);
addOutputSocket(COM_DT_COLOR);
- this->m_inputImageReader = NULL;
- this->m_inputFacReader = NULL;
+ this->m_inputImageReader = nullptr;
+ this->m_inputFacReader = nullptr;
this->m_spillChannel = 1; // GREEN
this->m_spillMethod = 0;
}
@@ -77,8 +77,8 @@ void ColorSpillOperation::initExecution()
void ColorSpillOperation::deinitExecution()
{
- this->m_inputImageReader = NULL;
- this->m_inputFacReader = NULL;
+ this->m_inputImageReader = nullptr;
+ this->m_inputFacReader = nullptr;
}
void ColorSpillOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_CompositorOperation.cpp b/source/blender/compositor/operations/COM_CompositorOperation.cpp
index 63e7817606f..3ec54b1c04d 100644
--- a/source/blender/compositor/operations/COM_CompositorOperation.cpp
+++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp
@@ -38,19 +38,19 @@ CompositorOperation::CompositorOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
- this->setRenderData(NULL);
- this->m_outputBuffer = NULL;
- this->m_depthBuffer = NULL;
- this->m_imageInput = NULL;
- this->m_alphaInput = NULL;
- this->m_depthInput = NULL;
+ this->setRenderData(nullptr);
+ this->m_outputBuffer = nullptr;
+ this->m_depthBuffer = nullptr;
+ this->m_imageInput = nullptr;
+ this->m_alphaInput = nullptr;
+ this->m_depthInput = nullptr;
this->m_useAlphaInput = false;
this->m_active = false;
- this->m_scene = NULL;
+ this->m_scene = nullptr;
this->m_sceneName[0] = '\0';
- this->m_viewName = NULL;
+ this->m_viewName = nullptr;
}
void CompositorOperation::initExecution()
@@ -67,7 +67,7 @@ void CompositorOperation::initExecution()
this->m_outputBuffer = (float *)MEM_callocN(
sizeof(float[4]) * this->getWidth() * this->getHeight(), "CompositorOperation");
}
- if (this->m_depthInput != NULL) {
+ if (this->m_depthInput != nullptr) {
this->m_depthBuffer = (float *)MEM_callocN(
sizeof(float) * this->getWidth() * this->getHeight(), "CompositorOperation");
}
@@ -86,11 +86,11 @@ void CompositorOperation::deinitExecution()
if (rr) {
RenderView *rv = RE_RenderViewGetByName(rr, this->m_viewName);
- if (rv->rectf != NULL) {
+ if (rv->rectf != nullptr) {
MEM_freeN(rv->rectf);
}
rv->rectf = this->m_outputBuffer;
- if (rv->rectz != NULL) {
+ if (rv->rectz != nullptr) {
MEM_freeN(rv->rectz);
}
rv->rectz = this->m_depthBuffer;
@@ -107,13 +107,13 @@ void CompositorOperation::deinitExecution()
if (re) {
RE_ReleaseResult(re);
- re = NULL;
+ re = nullptr;
}
BLI_thread_lock(LOCK_DRAW_IMAGE);
BKE_image_signal(G.main,
BKE_image_ensure_viewer(G.main, IMA_TYPE_R_RESULT, "Render Result"),
- NULL,
+ nullptr,
IMA_SIGNAL_FREE);
BLI_thread_unlock(LOCK_DRAW_IMAGE);
}
@@ -126,11 +126,11 @@ void CompositorOperation::deinitExecution()
}
}
- this->m_outputBuffer = NULL;
- this->m_depthBuffer = NULL;
- this->m_imageInput = NULL;
- this->m_alphaInput = NULL;
- this->m_depthInput = NULL;
+ this->m_outputBuffer = nullptr;
+ this->m_depthBuffer = nullptr;
+ this->m_imageInput = nullptr;
+ this->m_alphaInput = nullptr;
+ this->m_depthInput = nullptr;
}
void CompositorOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/)
diff --git a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
index 39143aaf3b8..44468e04ae9 100644
--- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
@@ -24,7 +24,7 @@ ConvertColorProfileOperation::ConvertColorProfileOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->m_predivided = false;
}
@@ -46,5 +46,5 @@ void ConvertColorProfileOperation::executePixelSampled(float output[4],
void ConvertColorProfileOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
index 56c4fb44d4f..fe395ecae9e 100644
--- a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
@@ -25,11 +25,11 @@ ConvertDepthToRadiusOperation::ConvertDepthToRadiusOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->m_fStop = 128.0f;
- this->m_cameraObject = NULL;
+ this->m_cameraObject = nullptr;
this->m_maxRadius = 32.0f;
- this->m_blurPostOperation = NULL;
+ this->m_blurPostOperation = nullptr;
}
float ConvertDepthToRadiusOperation::determineFocalDistance()
@@ -46,7 +46,7 @@ float ConvertDepthToRadiusOperation::determineFocalDistance()
void ConvertDepthToRadiusOperation::initExecution()
{
float cam_sensor = DEFAULT_SENSOR_WIDTH;
- Camera *camera = NULL;
+ Camera *camera = nullptr;
if (this->m_cameraObject && this->m_cameraObject->type == OB_CAMERA) {
camera = (Camera *)this->m_cameraObject->data;
@@ -111,5 +111,5 @@ void ConvertDepthToRadiusOperation::executePixelSampled(float output[4],
void ConvertDepthToRadiusOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ConvertOperation.cpp b/source/blender/compositor/operations/COM_ConvertOperation.cpp
index dae4a9f1bab..cccfd407752 100644
--- a/source/blender/compositor/operations/COM_ConvertOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertOperation.cpp
@@ -22,7 +22,7 @@
ConvertBaseOperation::ConvertBaseOperation()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void ConvertBaseOperation::initExecution()
@@ -32,7 +32,7 @@ void ConvertBaseOperation::initExecution()
void ConvertBaseOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
/* ******** Value to Color ******** */
@@ -401,7 +401,7 @@ SeparateChannelOperation::SeparateChannelOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void SeparateChannelOperation::initExecution()
{
@@ -410,7 +410,7 @@ void SeparateChannelOperation::initExecution()
void SeparateChannelOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void SeparateChannelOperation::executePixelSampled(float output[4],
@@ -433,10 +433,10 @@ CombineChannelsOperation::CombineChannelsOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputChannel1Operation = NULL;
- this->m_inputChannel2Operation = NULL;
- this->m_inputChannel3Operation = NULL;
- this->m_inputChannel4Operation = NULL;
+ this->m_inputChannel1Operation = nullptr;
+ this->m_inputChannel2Operation = nullptr;
+ this->m_inputChannel3Operation = nullptr;
+ this->m_inputChannel4Operation = nullptr;
}
void CombineChannelsOperation::initExecution()
@@ -449,10 +449,10 @@ void CombineChannelsOperation::initExecution()
void CombineChannelsOperation::deinitExecution()
{
- this->m_inputChannel1Operation = NULL;
- this->m_inputChannel2Operation = NULL;
- this->m_inputChannel3Operation = NULL;
- this->m_inputChannel4Operation = NULL;
+ this->m_inputChannel1Operation = nullptr;
+ this->m_inputChannel2Operation = nullptr;
+ this->m_inputChannel3Operation = nullptr;
+ this->m_inputChannel4Operation = nullptr;
}
void CombineChannelsOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
index 1932098fd30..1c2570cd251 100644
--- a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
@@ -42,42 +42,42 @@ void ConvolutionEdgeFilterOperation::executePixel(float output[4], int x, int y,
CLAMP(y3, 0, getHeight() - 1);
float value[4];
- this->m_inputValueOperation->read(value, x2, y2, NULL);
+ this->m_inputValueOperation->read(value, x2, y2, nullptr);
float mval = 1.0f - value[0];
- this->m_inputOperation->read(in1, x1, y1, NULL);
+ this->m_inputOperation->read(in1, x1, y1, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[0]);
madd_v3_v3fl(res2, in1, this->m_filter[0]);
- this->m_inputOperation->read(in1, x2, y1, NULL);
+ this->m_inputOperation->read(in1, x2, y1, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[1]);
madd_v3_v3fl(res2, in1, this->m_filter[3]);
- this->m_inputOperation->read(in1, x3, y1, NULL);
+ this->m_inputOperation->read(in1, x3, y1, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[2]);
madd_v3_v3fl(res2, in1, this->m_filter[6]);
- this->m_inputOperation->read(in1, x1, y2, NULL);
+ this->m_inputOperation->read(in1, x1, y2, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[3]);
madd_v3_v3fl(res2, in1, this->m_filter[1]);
- this->m_inputOperation->read(in2, x2, y2, NULL);
+ this->m_inputOperation->read(in2, x2, y2, nullptr);
madd_v3_v3fl(res1, in2, this->m_filter[4]);
madd_v3_v3fl(res2, in2, this->m_filter[4]);
- this->m_inputOperation->read(in1, x3, y2, NULL);
+ this->m_inputOperation->read(in1, x3, y2, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[5]);
madd_v3_v3fl(res2, in1, this->m_filter[7]);
- this->m_inputOperation->read(in1, x1, y3, NULL);
+ this->m_inputOperation->read(in1, x1, y3, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[6]);
madd_v3_v3fl(res2, in1, this->m_filter[2]);
- this->m_inputOperation->read(in1, x2, y3, NULL);
+ this->m_inputOperation->read(in1, x2, y3, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[7]);
madd_v3_v3fl(res2, in1, this->m_filter[5]);
- this->m_inputOperation->read(in1, x3, y3, NULL);
+ this->m_inputOperation->read(in1, x3, y3, nullptr);
madd_v3_v3fl(res1, in1, this->m_filter[8]);
madd_v3_v3fl(res2, in1, this->m_filter[8]);
diff --git a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
index fabde28d7a2..7e35f6fb4f6 100644
--- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
@@ -28,7 +28,7 @@ ConvolutionFilterOperation::ConvolutionFilterOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->setComplex(true);
}
void ConvolutionFilterOperation::initExecution()
@@ -55,8 +55,8 @@ void ConvolutionFilterOperation::set3x3Filter(
void ConvolutionFilterOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_inputValueOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputValueOperation = nullptr;
}
void ConvolutionFilterOperation::executePixel(float output[4], int x, int y, void * /*data*/)
@@ -76,27 +76,27 @@ void ConvolutionFilterOperation::executePixel(float output[4], int x, int y, voi
CLAMP(y2, 0, getHeight() - 1);
CLAMP(y3, 0, getHeight() - 1);
float value[4];
- this->m_inputValueOperation->read(value, x2, y2, NULL);
+ this->m_inputValueOperation->read(value, x2, y2, nullptr);
const float mval = 1.0f - value[0];
zero_v4(output);
- this->m_inputOperation->read(in1, x1, y1, NULL);
+ this->m_inputOperation->read(in1, x1, y1, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[0]);
- this->m_inputOperation->read(in1, x2, y1, NULL);
+ this->m_inputOperation->read(in1, x2, y1, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[1]);
- this->m_inputOperation->read(in1, x3, y1, NULL);
+ this->m_inputOperation->read(in1, x3, y1, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[2]);
- this->m_inputOperation->read(in1, x1, y2, NULL);
+ this->m_inputOperation->read(in1, x1, y2, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[3]);
- this->m_inputOperation->read(in2, x2, y2, NULL);
+ this->m_inputOperation->read(in2, x2, y2, nullptr);
madd_v4_v4fl(output, in2, this->m_filter[4]);
- this->m_inputOperation->read(in1, x3, y2, NULL);
+ this->m_inputOperation->read(in1, x3, y2, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[5]);
- this->m_inputOperation->read(in1, x1, y3, NULL);
+ this->m_inputOperation->read(in1, x1, y3, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[6]);
- this->m_inputOperation->read(in1, x2, y3, NULL);
+ this->m_inputOperation->read(in1, x2, y3, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[7]);
- this->m_inputOperation->read(in1, x3, y3, NULL);
+ this->m_inputOperation->read(in1, x3, y3, nullptr);
madd_v4_v4fl(output, in1, this->m_filter[8]);
output[0] = output[0] * value[0] + in2[0] * mval;
diff --git a/source/blender/compositor/operations/COM_CropOperation.cpp b/source/blender/compositor/operations/COM_CropOperation.cpp
index 3dda1a94989..408f588871e 100644
--- a/source/blender/compositor/operations/COM_CropOperation.cpp
+++ b/source/blender/compositor/operations/COM_CropOperation.cpp
@@ -23,8 +23,8 @@ CropBaseOperation::CropBaseOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputOperation = NULL;
- this->m_settings = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_settings = nullptr;
}
void CropBaseOperation::updateArea()
@@ -75,7 +75,7 @@ void CropBaseOperation::initExecution()
void CropBaseOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
CropOperation::CropOperation() : CropBaseOperation()
diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
index 5cfea97475a..b58efcf0cca 100644
--- a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
@@ -22,14 +22,14 @@
CurveBaseOperation::CurveBaseOperation()
{
- this->m_curveMapping = NULL;
+ this->m_curveMapping = nullptr;
}
CurveBaseOperation::~CurveBaseOperation()
{
if (this->m_curveMapping) {
BKE_curvemapping_free(this->m_curveMapping);
- this->m_curveMapping = NULL;
+ this->m_curveMapping = nullptr;
}
}
@@ -41,7 +41,7 @@ void CurveBaseOperation::deinitExecution()
{
if (this->m_curveMapping) {
BKE_curvemapping_free(this->m_curveMapping);
- this->m_curveMapping = NULL;
+ this->m_curveMapping = nullptr;
}
}
diff --git a/source/blender/compositor/operations/COM_DenoiseOperation.cpp b/source/blender/compositor/operations/COM_DenoiseOperation.cpp
index 97e2dba5e18..bc33e5f75c4 100644
--- a/source/blender/compositor/operations/COM_DenoiseOperation.cpp
+++ b/source/blender/compositor/operations/COM_DenoiseOperation.cpp
@@ -32,7 +32,7 @@ DenoiseOperation::DenoiseOperation()
this->addInputSocket(COM_DT_VECTOR);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_settings = NULL;
+ this->m_settings = nullptr;
}
void DenoiseOperation::initExecution()
{
@@ -44,9 +44,9 @@ void DenoiseOperation::initExecution()
void DenoiseOperation::deinitExecution()
{
- this->m_inputProgramColor = NULL;
- this->m_inputProgramNormal = NULL;
- this->m_inputProgramAlbedo = NULL;
+ this->m_inputProgramColor = nullptr;
+ this->m_inputProgramNormal = nullptr;
+ this->m_inputProgramAlbedo = nullptr;
SingleThreadedOperation::deinitExecution();
}
diff --git a/source/blender/compositor/operations/COM_DespeckleOperation.cpp b/source/blender/compositor/operations/COM_DespeckleOperation.cpp
index 5d8481562ab..901445c6875 100644
--- a/source/blender/compositor/operations/COM_DespeckleOperation.cpp
+++ b/source/blender/compositor/operations/COM_DespeckleOperation.cpp
@@ -28,7 +28,7 @@ DespeckleOperation::DespeckleOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->setComplex(true);
}
void DespeckleOperation::initExecution()
@@ -39,8 +39,8 @@ void DespeckleOperation::initExecution()
void DespeckleOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_inputValueOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputValueOperation = nullptr;
}
BLI_INLINE int color_diff(const float a[3], const float b[3], const float threshold)
@@ -69,10 +69,10 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void * /*da
CLAMP(y2, 0, getHeight() - 1);
CLAMP(y3, 0, getHeight() - 1);
float value[4];
- this->m_inputValueOperation->read(value, x2, y2, NULL);
+ this->m_inputValueOperation->read(value, x2, y2, nullptr);
// const float mval = 1.0f - value[0];
- this->m_inputOperation->read(color_org, x2, y2, NULL);
+ this->m_inputOperation->read(color_org, x2, y2, nullptr);
#define TOT_DIV_ONE 1.0f
#define TOT_DIV_CNR (float)M_SQRT1_2
@@ -91,13 +91,13 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void * /*da
zero_v4(color_mid);
zero_v4(color_mid_ok);
- this->m_inputOperation->read(in1, x1, y1, NULL);
+ this->m_inputOperation->read(in1, x1, y1, nullptr);
COLOR_ADD(TOT_DIV_CNR)
- this->m_inputOperation->read(in1, x2, y1, NULL);
+ this->m_inputOperation->read(in1, x2, y1, nullptr);
COLOR_ADD(TOT_DIV_ONE)
- this->m_inputOperation->read(in1, x3, y1, NULL);
+ this->m_inputOperation->read(in1, x3, y1, nullptr);
COLOR_ADD(TOT_DIV_CNR)
- this->m_inputOperation->read(in1, x1, y2, NULL);
+ this->m_inputOperation->read(in1, x1, y2, nullptr);
COLOR_ADD(TOT_DIV_ONE)
#if 0
@@ -105,13 +105,13 @@ void DespeckleOperation::executePixel(float output[4], int x, int y, void * /*da
madd_v4_v4fl(color_mid, in2, this->m_filter[4]);
#endif
- this->m_inputOperation->read(in1, x3, y2, NULL);
+ this->m_inputOperation->read(in1, x3, y2, nullptr);
COLOR_ADD(TOT_DIV_ONE)
- this->m_inputOperation->read(in1, x1, y3, NULL);
+ this->m_inputOperation->read(in1, x1, y3, nullptr);
COLOR_ADD(TOT_DIV_CNR)
- this->m_inputOperation->read(in1, x2, y3, NULL);
+ this->m_inputOperation->read(in1, x2, y3, nullptr);
COLOR_ADD(TOT_DIV_ONE)
- this->m_inputOperation->read(in1, x3, y3, NULL);
+ this->m_inputOperation->read(in1, x3, y3, nullptr);
COLOR_ADD(TOT_DIV_CNR)
mul_v4_fl(color_mid, 1.0f / (4.0f + (4.0f * (float)M_SQRT1_2)));
diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
index 92a804ec3ec..cca99a42c0c 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
@@ -25,8 +25,8 @@ DifferenceMatteOperation::DifferenceMatteOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- this->m_inputImage1Program = NULL;
- this->m_inputImage2Program = NULL;
+ this->m_inputImage1Program = nullptr;
+ this->m_inputImage2Program = nullptr;
}
void DifferenceMatteOperation::initExecution()
@@ -36,8 +36,8 @@ void DifferenceMatteOperation::initExecution()
}
void DifferenceMatteOperation::deinitExecution()
{
- this->m_inputImage1Program = NULL;
- this->m_inputImage2Program = NULL;
+ this->m_inputImage1Program = nullptr;
+ this->m_inputImage2Program = nullptr;
}
void DifferenceMatteOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
index 0fbdb37081b..74f5fceacfb 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
@@ -28,7 +28,7 @@ DilateErodeThresholdOperation::DilateErodeThresholdOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
this->m_inset = 0.0f;
this->m__switch = 0.5f;
this->m_distance = 0.0f;
@@ -54,7 +54,7 @@ void DilateErodeThresholdOperation::initExecution()
void *DilateErodeThresholdOperation::initializeTileData(rcti * /*rect*/)
{
- void *buffer = this->m_inputProgram->initializeTileData(NULL);
+ void *buffer = this->m_inputProgram->initializeTileData(nullptr);
return buffer;
}
@@ -142,7 +142,7 @@ void DilateErodeThresholdOperation::executePixel(float output[4], int x, int y,
void DilateErodeThresholdOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
bool DilateErodeThresholdOperation::determineDependingAreaOfInterest(
@@ -164,7 +164,7 @@ DilateDistanceOperation::DilateDistanceOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
this->m_distance = 0.0f;
this->setOpenCL(true);
}
@@ -179,7 +179,7 @@ void DilateDistanceOperation::initExecution()
void *DilateDistanceOperation::initializeTileData(rcti * /*rect*/)
{
- void *buffer = this->m_inputProgram->initializeTileData(NULL);
+ void *buffer = this->m_inputProgram->initializeTileData(nullptr);
return buffer;
}
@@ -217,7 +217,7 @@ void DilateDistanceOperation::executePixel(float output[4], int x, int y, void *
void DilateDistanceOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
bool DilateDistanceOperation::determineDependingAreaOfInterest(rcti *input,
@@ -241,7 +241,7 @@ void DilateDistanceOperation::executeOpenCL(OpenCLDevice *device,
list<cl_mem> *clMemToCleanUp,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
- cl_kernel dilateKernel = device->COM_clCreateKernel("dilateKernel", NULL);
+ cl_kernel dilateKernel = device->COM_clCreateKernel("dilateKernel", nullptr);
cl_int distanceSquared = this->m_distance * this->m_distance;
cl_int scope = this->m_scope;
@@ -301,7 +301,7 @@ void ErodeDistanceOperation::executeOpenCL(OpenCLDevice *device,
list<cl_mem> *clMemToCleanUp,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
- cl_kernel erodeKernel = device->COM_clCreateKernel("erodeKernel", NULL);
+ cl_kernel erodeKernel = device->COM_clCreateKernel("erodeKernel", nullptr);
cl_int distanceSquared = this->m_distance * this->m_distance;
cl_int scope = this->m_scope;
@@ -322,7 +322,7 @@ DilateStepOperation::DilateStepOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void DilateStepOperation::initExecution()
{
@@ -351,7 +351,7 @@ static tile_info *create_cache(int xmin, int xmax, int ymin, int ymax)
void *DilateStepOperation::initializeTileData(rcti *rect)
{
- MemoryBuffer *tile = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL);
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_inputProgram->initializeTileData(nullptr);
int x, y, i;
int width = tile->getWidth();
int height = tile->getHeight();
@@ -448,7 +448,7 @@ void DilateStepOperation::executePixel(float output[4], int x, int y, void *data
void DilateStepOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void DilateStepOperation::deinitializeTileData(rcti * /*rect*/, void *data)
@@ -480,7 +480,7 @@ ErodeStepOperation::ErodeStepOperation() : DilateStepOperation()
void *ErodeStepOperation::initializeTileData(rcti *rect)
{
- MemoryBuffer *tile = (MemoryBuffer *)this->m_inputProgram->initializeTileData(NULL);
+ MemoryBuffer *tile = (MemoryBuffer *)this->m_inputProgram->initializeTileData(nullptr);
int x, y, i;
int width = tile->getWidth();
int height = tile->getHeight();
diff --git a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
index efe40cc8b58..c0b9c9b6f1d 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
@@ -30,7 +30,7 @@ DirectionalBlurOperation::DirectionalBlurOperation()
this->setComplex(true);
this->setOpenCL(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void DirectionalBlurOperation::initExecution()
@@ -103,7 +103,7 @@ void DirectionalBlurOperation::executeOpenCL(OpenCLDevice *device,
list<cl_mem> *clMemToCleanUp,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
- cl_kernel directionalBlurKernel = device->COM_clCreateKernel("directionalBlurKernel", NULL);
+ cl_kernel directionalBlurKernel = device->COM_clCreateKernel("directionalBlurKernel", nullptr);
cl_int iterations = pow(2.0f, this->m_data->iter);
cl_float2 ltxy = {{this->m_tx, this->m_ty}};
@@ -128,7 +128,7 @@ void DirectionalBlurOperation::executeOpenCL(OpenCLDevice *device,
void DirectionalBlurOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
bool DirectionalBlurOperation::determineDependingAreaOfInterest(rcti * /*input*/,
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
index 31b4d41320f..fcc8bc4670e 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
@@ -29,10 +29,10 @@ DisplaceOperation::DisplaceOperation()
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->m_inputColorProgram = NULL;
- this->m_inputVectorProgram = NULL;
- this->m_inputScaleXProgram = NULL;
- this->m_inputScaleYProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputVectorProgram = nullptr;
+ this->m_inputScaleXProgram = nullptr;
+ this->m_inputScaleYProgram = nullptr;
}
void DisplaceOperation::initExecution()
@@ -143,10 +143,10 @@ void DisplaceOperation::pixelTransform(const float xy[2], float r_uv[2], float r
void DisplaceOperation::deinitExecution()
{
- this->m_inputColorProgram = NULL;
- this->m_inputVectorProgram = NULL;
- this->m_inputScaleXProgram = NULL;
- this->m_inputScaleYProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputVectorProgram = nullptr;
+ this->m_inputScaleXProgram = nullptr;
+ this->m_inputScaleYProgram = nullptr;
}
bool DisplaceOperation::determineDependingAreaOfInterest(rcti *input,
@@ -155,7 +155,7 @@ bool DisplaceOperation::determineDependingAreaOfInterest(rcti *input,
{
rcti colorInput;
rcti vectorInput;
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
/* the vector buffer only needs a 2x2 buffer. The image needs whole buffer */
/* image */
diff --git a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
index 10d274b6fc5..bbc4d63305b 100644
--- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
@@ -28,10 +28,10 @@ DisplaceSimpleOperation::DisplaceSimpleOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputColorProgram = NULL;
- this->m_inputVectorProgram = NULL;
- this->m_inputScaleXProgram = NULL;
- this->m_inputScaleYProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputVectorProgram = nullptr;
+ this->m_inputScaleXProgram = nullptr;
+ this->m_inputScaleYProgram = nullptr;
}
void DisplaceSimpleOperation::initExecution()
@@ -86,10 +86,10 @@ void DisplaceSimpleOperation::executePixelSampled(float output[4],
void DisplaceSimpleOperation::deinitExecution()
{
- this->m_inputColorProgram = NULL;
- this->m_inputVectorProgram = NULL;
- this->m_inputScaleXProgram = NULL;
- this->m_inputScaleYProgram = NULL;
+ this->m_inputColorProgram = nullptr;
+ this->m_inputVectorProgram = nullptr;
+ this->m_inputScaleXProgram = nullptr;
+ this->m_inputScaleYProgram = nullptr;
}
bool DisplaceSimpleOperation::determineDependingAreaOfInterest(rcti *input,
@@ -97,7 +97,7 @@ bool DisplaceSimpleOperation::determineDependingAreaOfInterest(rcti *input,
rcti *output)
{
rcti colorInput;
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
/* the vector buffer only needs a 2x2 buffer. The image needs whole buffer */
/* image */
diff --git a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
index 23e133ad711..7d79dcc657d 100644
--- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
@@ -25,8 +25,8 @@ DistanceRGBMatteOperation::DistanceRGBMatteOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
void DistanceRGBMatteOperation::initExecution()
@@ -37,8 +37,8 @@ void DistanceRGBMatteOperation::initExecution()
void DistanceRGBMatteOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
- this->m_inputKeyProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputKeyProgram = nullptr;
}
float DistanceRGBMatteOperation::calculateDistance(float key[4], float image[4])
diff --git a/source/blender/compositor/operations/COM_DotproductOperation.cpp b/source/blender/compositor/operations/COM_DotproductOperation.cpp
index 263a7060a49..750e4308d11 100644
--- a/source/blender/compositor/operations/COM_DotproductOperation.cpp
+++ b/source/blender/compositor/operations/COM_DotproductOperation.cpp
@@ -24,8 +24,8 @@ DotproductOperation::DotproductOperation()
this->addInputSocket(COM_DT_VECTOR);
this->addOutputSocket(COM_DT_VALUE);
this->setResolutionInputSocketIndex(0);
- this->m_input1Operation = NULL;
- this->m_input2Operation = NULL;
+ this->m_input1Operation = nullptr;
+ this->m_input2Operation = nullptr;
}
void DotproductOperation::initExecution()
{
@@ -35,8 +35,8 @@ void DotproductOperation::initExecution()
void DotproductOperation::deinitExecution()
{
- this->m_input1Operation = NULL;
- this->m_input2Operation = NULL;
+ this->m_input1Operation = nullptr;
+ this->m_input2Operation = nullptr;
}
/** \todo: current implementation is the inverse of a dotproduct. not 'logically' correct
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
index de60e53d3d0..7ef0d7b7606 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
@@ -1311,8 +1311,8 @@ DoubleEdgeMaskOperation::DoubleEdgeMaskOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputInnerMask = NULL;
- this->m_inputOuterMask = NULL;
+ this->m_inputInnerMask = nullptr;
+ this->m_inputOuterMask = nullptr;
this->m_adjecentOnly = false;
this->m_keepInside = false;
this->setComplex(true);
@@ -1322,7 +1322,7 @@ bool DoubleEdgeMaskOperation::determineDependingAreaOfInterest(rcti * /*input*/,
ReadBufferOperation *readOperation,
rcti *output)
{
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
rcti newInput;
newInput.xmax = this->getWidth();
newInput.xmin = 0;
@@ -1339,7 +1339,7 @@ void DoubleEdgeMaskOperation::initExecution()
this->m_inputInnerMask = this->getInputSocketReader(0);
this->m_inputOuterMask = this->getInputSocketReader(1);
initMutex();
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
}
void *DoubleEdgeMaskOperation::initializeTileData(rcti *rect)
@@ -1349,7 +1349,7 @@ void *DoubleEdgeMaskOperation::initializeTileData(rcti *rect)
}
lockMutex();
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
MemoryBuffer *innerMask = (MemoryBuffer *)this->m_inputInnerMask->initializeTileData(rect);
MemoryBuffer *outerMask = (MemoryBuffer *)this->m_inputOuterMask->initializeTileData(rect);
float *data = (float *)MEM_mallocN(sizeof(float) * this->getWidth() * this->getHeight(),
@@ -1371,11 +1371,11 @@ void DoubleEdgeMaskOperation::executePixel(float output[4], int x, int y, void *
void DoubleEdgeMaskOperation::deinitExecution()
{
- this->m_inputInnerMask = NULL;
- this->m_inputOuterMask = NULL;
+ this->m_inputInnerMask = nullptr;
+ this->m_inputOuterMask = nullptr;
deinitMutex();
if (this->m_cachedInstance) {
MEM_freeN(this->m_cachedInstance);
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
}
}
diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
index 1dc1b0e2be6..38541f91fc8 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
@@ -25,8 +25,8 @@ EllipseMaskOperation::EllipseMaskOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputMask = NULL;
- this->m_inputValue = NULL;
+ this->m_inputMask = nullptr;
+ this->m_inputValue = nullptr;
this->m_cosine = 0.0f;
this->m_sine = 0.0f;
}
@@ -114,6 +114,6 @@ void EllipseMaskOperation::executePixelSampled(float output[4],
void EllipseMaskOperation::deinitExecution()
{
- this->m_inputMask = NULL;
- this->m_inputValue = NULL;
+ this->m_inputMask = nullptr;
+ this->m_inputValue = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
index 0387f495f0c..e87d40b4c86 100644
--- a/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp
@@ -24,7 +24,7 @@
FastGaussianBlurOperation::FastGaussianBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->m_iirgaus = NULL;
+ this->m_iirgaus = nullptr;
}
void FastGaussianBlurOperation::executePixel(float output[4], int x, int y, void *data)
@@ -70,7 +70,7 @@ void FastGaussianBlurOperation::deinitExecution()
{
if (this->m_iirgaus) {
delete this->m_iirgaus;
- this->m_iirgaus = NULL;
+ this->m_iirgaus = nullptr;
}
BlurBaseOperation::deinitMutex();
}
@@ -260,8 +260,8 @@ FastGaussianBlurValueOperation::FastGaussianBlurValueOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_iirgaus = NULL;
- this->m_inputprogram = NULL;
+ this->m_iirgaus = nullptr;
+ this->m_inputprogram = nullptr;
this->m_sigma = 1.0f;
this->m_overlay = 0;
setComplex(true);
@@ -300,7 +300,7 @@ void FastGaussianBlurValueOperation::deinitExecution()
{
if (this->m_iirgaus) {
delete this->m_iirgaus;
- this->m_iirgaus = NULL;
+ this->m_iirgaus = nullptr;
}
deinitMutex();
}
diff --git a/source/blender/compositor/operations/COM_FlipOperation.cpp b/source/blender/compositor/operations/COM_FlipOperation.cpp
index f248133d389..37eaf4868d3 100644
--- a/source/blender/compositor/operations/COM_FlipOperation.cpp
+++ b/source/blender/compositor/operations/COM_FlipOperation.cpp
@@ -23,7 +23,7 @@ FlipOperation::FlipOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->m_flipX = true;
this->m_flipY = false;
}
@@ -34,7 +34,7 @@ void FlipOperation::initExecution()
void FlipOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void FlipOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
diff --git a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
index a333ca18fc2..d67d67f8e57 100644
--- a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
@@ -23,7 +23,7 @@ GammaCorrectOperation::GammaCorrectOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void GammaCorrectOperation::initExecution()
{
@@ -58,14 +58,14 @@ void GammaCorrectOperation::executePixelSampled(float output[4],
void GammaCorrectOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
GammaUncorrectOperation::GammaUncorrectOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void GammaUncorrectOperation::initExecution()
{
@@ -100,5 +100,5 @@ void GammaUncorrectOperation::executePixelSampled(float output[4],
void GammaUncorrectOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_GammaOperation.cpp b/source/blender/compositor/operations/COM_GammaOperation.cpp
index af483e612f0..6baa52a290c 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaOperation.cpp
@@ -24,8 +24,8 @@ GammaOperation::GammaOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
- this->m_inputGammaProgram = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputGammaProgram = nullptr;
}
void GammaOperation::initExecution()
{
@@ -51,6 +51,6 @@ void GammaOperation::executePixelSampled(float output[4], float x, float y, Pixe
void GammaOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
- this->m_inputGammaProgram = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputGammaProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
index c028a2c0e4c..a7d8f030269 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaXBlurOperation.cpp
@@ -24,7 +24,7 @@
GaussianAlphaXBlurOperation::GaussianAlphaXBlurOperation() : BlurBaseOperation(COM_DT_VALUE)
{
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
this->m_filtersize = 0;
this->m_falloff = -1; /* intentionally invalid, so we can detect uninitialized values */
}
@@ -35,7 +35,7 @@ void *GaussianAlphaXBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateGauss();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -57,7 +57,7 @@ void GaussianAlphaXBlurOperation::initExecution()
void GaussianAlphaXBlurOperation::updateGauss()
{
- if (this->m_gausstab == NULL) {
+ if (this->m_gausstab == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizex, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -65,7 +65,7 @@ void GaussianAlphaXBlurOperation::updateGauss()
m_gausstab = BlurBaseOperation::make_gausstab(rad, m_filtersize);
}
- if (this->m_distbuf_inv == NULL) {
+ if (this->m_distbuf_inv == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizex, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -143,12 +143,12 @@ void GaussianAlphaXBlurOperation::deinitExecution()
if (this->m_gausstab) {
MEM_freeN(this->m_gausstab);
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
if (this->m_distbuf_inv) {
MEM_freeN(this->m_distbuf_inv);
- this->m_distbuf_inv = NULL;
+ this->m_distbuf_inv = nullptr;
}
deinitMutex();
@@ -172,7 +172,7 @@ bool GaussianAlphaXBlurOperation::determineDependingAreaOfInterest(
else
#endif
{
- if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != nullptr) {
newInput.xmax = input->xmax + this->m_filtersize + 1;
newInput.xmin = input->xmin - this->m_filtersize - 1;
newInput.ymax = input->ymax;
diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
index 35abe4cd47b..f1bc8751329 100644
--- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp
@@ -24,7 +24,7 @@
GaussianAlphaYBlurOperation::GaussianAlphaYBlurOperation() : BlurBaseOperation(COM_DT_VALUE)
{
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
this->m_filtersize = 0;
this->m_falloff = -1; /* intentionally invalid, so we can detect uninitialized values */
}
@@ -35,7 +35,7 @@ void *GaussianAlphaYBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateGauss();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -57,7 +57,7 @@ void GaussianAlphaYBlurOperation::initExecution()
void GaussianAlphaYBlurOperation::updateGauss()
{
- if (this->m_gausstab == NULL) {
+ if (this->m_gausstab == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizey, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -65,7 +65,7 @@ void GaussianAlphaYBlurOperation::updateGauss()
m_gausstab = BlurBaseOperation::make_gausstab(rad, m_filtersize);
}
- if (this->m_distbuf_inv == NULL) {
+ if (this->m_distbuf_inv == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizey, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -143,12 +143,12 @@ void GaussianAlphaYBlurOperation::deinitExecution()
if (this->m_gausstab) {
MEM_freeN(this->m_gausstab);
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
if (this->m_distbuf_inv) {
MEM_freeN(this->m_distbuf_inv);
- this->m_distbuf_inv = NULL;
+ this->m_distbuf_inv = nullptr;
}
deinitMutex();
@@ -172,7 +172,7 @@ bool GaussianAlphaYBlurOperation::determineDependingAreaOfInterest(
else
#endif
{
- if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != nullptr) {
newInput.xmax = input->xmax;
newInput.xmin = input->xmin;
newInput.ymax = input->ymax + this->m_filtersize + 1;
diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
index dd479da864c..d489c64953e 100644
--- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
@@ -24,7 +24,7 @@
GaussianBokehBlurOperation::GaussianBokehBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
void *GaussianBokehBlurOperation::initializeTileData(rcti * /*rect*/)
@@ -33,7 +33,7 @@ void *GaussianBokehBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateGauss();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -51,7 +51,7 @@ void GaussianBokehBlurOperation::initExecution()
void GaussianBokehBlurOperation::updateGauss()
{
- if (this->m_gausstab == NULL) {
+ if (this->m_gausstab == nullptr) {
float radxf;
float radyf;
int n;
@@ -156,7 +156,7 @@ void GaussianBokehBlurOperation::deinitExecution()
if (this->m_gausstab) {
MEM_freeN(this->m_gausstab);
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
deinitMutex();
@@ -177,7 +177,7 @@ bool GaussianBokehBlurOperation::determineDependingAreaOfInterest(
return true;
}
- if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != nullptr) {
newInput.xmin = 0;
newInput.ymin = 0;
newInput.xmax = this->getWidth();
@@ -197,12 +197,12 @@ bool GaussianBokehBlurOperation::determineDependingAreaOfInterest(
// reference image
GaussianBlurReferenceOperation::GaussianBlurReferenceOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->m_maintabs = NULL;
+ this->m_maintabs = nullptr;
}
void *GaussianBlurReferenceOperation::initializeTileData(rcti * /*rect*/)
{
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
return buffer;
}
diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
index 32ad0482791..e4401b2a91c 100644
--- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
@@ -25,9 +25,9 @@
GaussianXBlurOperation::GaussianXBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
#ifdef __SSE2__
- this->m_gausstab_sse = NULL;
+ this->m_gausstab_sse = nullptr;
#endif
this->m_filtersize = 0;
}
@@ -38,7 +38,7 @@ void *GaussianXBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateGauss();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -63,7 +63,7 @@ void GaussianXBlurOperation::initExecution()
void GaussianXBlurOperation::updateGauss()
{
- if (this->m_gausstab == NULL) {
+ if (this->m_gausstab == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizex, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -125,14 +125,14 @@ void GaussianXBlurOperation::executeOpenCL(OpenCLDevice *device,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
cl_kernel gaussianXBlurOperationKernel = device->COM_clCreateKernel(
- "gaussianXBlurOperationKernel", NULL);
+ "gaussianXBlurOperationKernel", nullptr);
cl_int filter_size = this->m_filtersize;
cl_mem gausstab = clCreateBuffer(device->getContext(),
CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR,
sizeof(float) * (this->m_filtersize * 2 + 1),
this->m_gausstab,
- NULL);
+ nullptr);
device->COM_clAttachMemoryBufferToKernelParameter(gaussianXBlurOperationKernel,
0,
@@ -159,12 +159,12 @@ void GaussianXBlurOperation::deinitExecution()
if (this->m_gausstab) {
MEM_freeN(this->m_gausstab);
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
#ifdef __SSE2__
if (this->m_gausstab_sse) {
MEM_freeN(this->m_gausstab_sse);
- this->m_gausstab_sse = NULL;
+ this->m_gausstab_sse = nullptr;
}
#endif
@@ -189,7 +189,7 @@ bool GaussianXBlurOperation::determineDependingAreaOfInterest(rcti *input,
}
}
{
- if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != nullptr) {
newInput.xmax = input->xmax + this->m_filtersize + 1;
newInput.xmin = input->xmin - this->m_filtersize - 1;
newInput.ymax = input->ymax;
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
index 3ffa797c0c1..230538ba5e6 100644
--- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
@@ -25,9 +25,9 @@
GaussianYBlurOperation::GaussianYBlurOperation() : BlurBaseOperation(COM_DT_COLOR)
{
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
#ifdef __SSE2__
- this->m_gausstab_sse = NULL;
+ this->m_gausstab_sse = nullptr;
#endif
this->m_filtersize = 0;
}
@@ -38,7 +38,7 @@ void *GaussianYBlurOperation::initializeTileData(rcti * /*rect*/)
if (!this->m_sizeavailable) {
updateGauss();
}
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
unlockMutex();
return buffer;
}
@@ -62,7 +62,7 @@ void GaussianYBlurOperation::initExecution()
void GaussianYBlurOperation::updateGauss()
{
- if (this->m_gausstab == NULL) {
+ if (this->m_gausstab == nullptr) {
updateSize();
float rad = max_ff(m_size * m_data.sizey, 0.0f);
m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS);
@@ -125,14 +125,14 @@ void GaussianYBlurOperation::executeOpenCL(OpenCLDevice *device,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
cl_kernel gaussianYBlurOperationKernel = device->COM_clCreateKernel(
- "gaussianYBlurOperationKernel", NULL);
+ "gaussianYBlurOperationKernel", nullptr);
cl_int filter_size = this->m_filtersize;
cl_mem gausstab = clCreateBuffer(device->getContext(),
CL_MEM_READ_ONLY | CL_MEM_USE_HOST_PTR,
sizeof(float) * (this->m_filtersize * 2 + 1),
this->m_gausstab,
- NULL);
+ nullptr);
device->COM_clAttachMemoryBufferToKernelParameter(gaussianYBlurOperationKernel,
0,
@@ -159,12 +159,12 @@ void GaussianYBlurOperation::deinitExecution()
if (this->m_gausstab) {
MEM_freeN(this->m_gausstab);
- this->m_gausstab = NULL;
+ this->m_gausstab = nullptr;
}
#ifdef __SSE2__
if (this->m_gausstab_sse) {
MEM_freeN(this->m_gausstab_sse);
- this->m_gausstab_sse = NULL;
+ this->m_gausstab_sse = nullptr;
}
#endif
@@ -189,7 +189,7 @@ bool GaussianYBlurOperation::determineDependingAreaOfInterest(rcti *input,
}
}
{
- if (this->m_sizeavailable && this->m_gausstab != NULL) {
+ if (this->m_sizeavailable && this->m_gausstab != nullptr) {
newInput.xmax = input->xmax;
newInput.xmin = input->xmin;
newInput.ymax = input->ymax + this->m_filtersize + 1;
diff --git a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
index 633b4821358..7b4d38fba3e 100644
--- a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
@@ -23,7 +23,7 @@ GlareBaseOperation::GlareBaseOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_settings = NULL;
+ this->m_settings = nullptr;
}
void GlareBaseOperation::initExecution()
{
@@ -33,7 +33,7 @@ void GlareBaseOperation::initExecution()
void GlareBaseOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
SingleThreadedOperation::deinitExecution();
}
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
index e61d4e8d8a7..1a1922f828c 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
@@ -25,7 +25,7 @@ GlareThresholdOperation::GlareThresholdOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_FIT);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void GlareThresholdOperation::determineResolution(unsigned int resolution[2],
@@ -65,5 +65,5 @@ void GlareThresholdOperation::executePixelSampled(float output[4],
void GlareThresholdOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
index 1d9c493d52b..df30e75cf27 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
@@ -27,7 +27,7 @@ HueSaturationValueCorrectOperation::HueSaturationValueCorrectOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void HueSaturationValueCorrectOperation::initExecution()
{
@@ -68,5 +68,5 @@ void HueSaturationValueCorrectOperation::executePixelSampled(float output[4],
void HueSaturationValueCorrectOperation::deinitExecution()
{
CurveBaseOperation::deinitExecution();
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp
index 73c560ca473..f8fe4eb883c 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_ImageOperation.cpp
@@ -33,18 +33,18 @@
BaseImageOperation::BaseImageOperation()
{
- this->m_image = NULL;
- this->m_buffer = NULL;
- this->m_imageFloatBuffer = NULL;
- this->m_imageByteBuffer = NULL;
- this->m_imageUser = NULL;
+ this->m_image = nullptr;
+ this->m_buffer = nullptr;
+ this->m_imageFloatBuffer = nullptr;
+ this->m_imageByteBuffer = nullptr;
+ this->m_imageUser = nullptr;
this->m_imagewidth = 0;
this->m_imageheight = 0;
this->m_framenumber = 0;
- this->m_depthBuffer = NULL;
+ this->m_depthBuffer = nullptr;
this->m_numberOfChannels = 0;
- this->m_rd = NULL;
- this->m_viewName = NULL;
+ this->m_rd = nullptr;
+ this->m_viewName = nullptr;
}
ImageOperation::ImageOperation() : BaseImageOperation()
{
@@ -64,8 +64,8 @@ ImBuf *BaseImageOperation::getImBuf()
ImBuf *ibuf;
ImageUser iuser = *this->m_imageUser;
- if (this->m_image == NULL) {
- return NULL;
+ if (this->m_image == nullptr) {
+ return nullptr;
}
/* local changes to the original ImageUser */
@@ -73,10 +73,10 @@ ImBuf *BaseImageOperation::getImBuf()
iuser.multi_index = BKE_scene_multiview_view_id_get(this->m_rd, this->m_viewName);
}
- ibuf = BKE_image_acquire_ibuf(this->m_image, &iuser, NULL);
- if (ibuf == NULL || (ibuf->rect == NULL && ibuf->rect_float == NULL)) {
- BKE_image_release_ibuf(this->m_image, ibuf, NULL);
- return NULL;
+ ibuf = BKE_image_acquire_ibuf(this->m_image, &iuser, nullptr);
+ if (ibuf == nullptr || (ibuf->rect == nullptr && ibuf->rect_float == nullptr)) {
+ BKE_image_release_ibuf(this->m_image, ibuf, nullptr);
+ return nullptr;
}
return ibuf;
}
@@ -97,9 +97,9 @@ void BaseImageOperation::initExecution()
void BaseImageOperation::deinitExecution()
{
- this->m_imageFloatBuffer = NULL;
- this->m_imageByteBuffer = NULL;
- BKE_image_release_ibuf(this->m_image, this->m_buffer, NULL);
+ this->m_imageFloatBuffer = nullptr;
+ this->m_imageByteBuffer = nullptr;
+ BKE_image_release_ibuf(this->m_image, this->m_buffer, nullptr);
}
void BaseImageOperation::determineResolution(unsigned int resolution[2],
@@ -115,7 +115,7 @@ void BaseImageOperation::determineResolution(unsigned int resolution[2],
resolution[1] = stackbuf->y;
}
- BKE_image_release_ibuf(this->m_image, stackbuf, NULL);
+ BKE_image_release_ibuf(this->m_image, stackbuf, nullptr);
}
static void sampleImageAtLocation(
@@ -124,13 +124,13 @@ static void sampleImageAtLocation(
if (ibuf->rect_float) {
switch (sampler) {
case COM_PS_NEAREST:
- nearest_interpolation_color(ibuf, NULL, color, x, y);
+ nearest_interpolation_color(ibuf, nullptr, color, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(ibuf, NULL, color, x, y);
+ bilinear_interpolation_color(ibuf, nullptr, color, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(ibuf, NULL, color, x, y);
+ bicubic_interpolation_color(ibuf, nullptr, color, x, y);
break;
}
}
@@ -138,13 +138,13 @@ static void sampleImageAtLocation(
unsigned char byte_color[4];
switch (sampler) {
case COM_PS_NEAREST:
- nearest_interpolation_color(ibuf, byte_color, NULL, x, y);
+ nearest_interpolation_color(ibuf, byte_color, nullptr, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(ibuf, byte_color, NULL, x, y);
+ bilinear_interpolation_color(ibuf, byte_color, nullptr, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(ibuf, byte_color, NULL, x, y);
+ bicubic_interpolation_color(ibuf, byte_color, nullptr, x, y);
break;
}
rgba_uchar_to_float(color, byte_color);
@@ -157,7 +157,7 @@ static void sampleImageAtLocation(
void ImageOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
{
int ix = x, iy = y;
- if (this->m_imageFloatBuffer == NULL && this->m_imageByteBuffer == NULL) {
+ if (this->m_imageFloatBuffer == nullptr && this->m_imageByteBuffer == nullptr) {
zero_v4(output);
}
else if (ix < 0 || iy < 0 || ix >= this->m_buffer->x || iy >= this->m_buffer->y) {
@@ -175,7 +175,7 @@ void ImageAlphaOperation::executePixelSampled(float output[4],
{
float tempcolor[4];
- if (this->m_imageFloatBuffer == NULL && this->m_imageByteBuffer == NULL) {
+ if (this->m_imageFloatBuffer == nullptr && this->m_imageByteBuffer == nullptr) {
output[0] = 0.0f;
}
else {
@@ -190,7 +190,7 @@ void ImageDepthOperation::executePixelSampled(float output[4],
float y,
PixelSampler /*sampler*/)
{
- if (this->m_depthBuffer == NULL) {
+ if (this->m_depthBuffer == nullptr) {
output[0] = 0.0f;
}
else {
diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cpp b/source/blender/compositor/operations/COM_InpaintOperation.cpp
index 335af3a8287..502b33d7e14 100644
--- a/source/blender/compositor/operations/COM_InpaintOperation.cpp
+++ b/source/blender/compositor/operations/COM_InpaintOperation.cpp
@@ -32,19 +32,19 @@ InpaintSimpleOperation::InpaintSimpleOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->m_inputImageProgram = NULL;
- this->m_pixelorder = NULL;
- this->m_manhattan_distance = NULL;
- this->m_cached_buffer = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_pixelorder = nullptr;
+ this->m_manhattan_distance = nullptr;
+ this->m_cached_buffer = nullptr;
this->m_cached_buffer_ready = false;
}
void InpaintSimpleOperation::initExecution()
{
this->m_inputImageProgram = this->getInputSocketReader(0);
- this->m_pixelorder = NULL;
- this->m_manhattan_distance = NULL;
- this->m_cached_buffer = NULL;
+ this->m_pixelorder = nullptr;
+ this->m_manhattan_distance = nullptr;
+ this->m_cached_buffer = nullptr;
this->m_cached_buffer_ready = false;
this->initMutex();
@@ -246,21 +246,21 @@ void InpaintSimpleOperation::executePixel(float output[4], int x, int y, void *
void InpaintSimpleOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
+ this->m_inputImageProgram = nullptr;
this->deinitMutex();
if (this->m_cached_buffer) {
MEM_freeN(this->m_cached_buffer);
- this->m_cached_buffer = NULL;
+ this->m_cached_buffer = nullptr;
}
if (this->m_pixelorder) {
MEM_freeN(this->m_pixelorder);
- this->m_pixelorder = NULL;
+ this->m_pixelorder = nullptr;
}
if (this->m_manhattan_distance) {
MEM_freeN(this->m_manhattan_distance);
- this->m_manhattan_distance = NULL;
+ this->m_manhattan_distance = nullptr;
}
this->m_cached_buffer_ready = false;
}
diff --git a/source/blender/compositor/operations/COM_InvertOperation.cpp b/source/blender/compositor/operations/COM_InvertOperation.cpp
index f0d677d3d2f..d9f436a3e28 100644
--- a/source/blender/compositor/operations/COM_InvertOperation.cpp
+++ b/source/blender/compositor/operations/COM_InvertOperation.cpp
@@ -23,8 +23,8 @@ InvertOperation::InvertOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputValueProgram = NULL;
- this->m_inputColorProgram = NULL;
+ this->m_inputValueProgram = nullptr;
+ this->m_inputColorProgram = nullptr;
this->m_color = true;
this->m_alpha = false;
setResolutionInputSocketIndex(1);
@@ -64,6 +64,6 @@ void InvertOperation::executePixelSampled(float output[4], float x, float y, Pix
void InvertOperation::deinitExecution()
{
- this->m_inputValueProgram = NULL;
- this->m_inputColorProgram = NULL;
+ this->m_inputValueProgram = nullptr;
+ this->m_inputColorProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
index 97eea6267b0..b9bb316462d 100644
--- a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
@@ -32,8 +32,8 @@ KeyingDespillOperation::KeyingDespillOperation()
this->m_despillFactor = 0.5f;
this->m_colorBalance = 0.5f;
- this->m_pixelReader = NULL;
- this->m_screenReader = NULL;
+ this->m_pixelReader = nullptr;
+ this->m_screenReader = nullptr;
}
void KeyingDespillOperation::initExecution()
@@ -44,8 +44,8 @@ void KeyingDespillOperation::initExecution()
void KeyingDespillOperation::deinitExecution()
{
- this->m_pixelReader = NULL;
- this->m_screenReader = NULL;
+ this->m_pixelReader = nullptr;
+ this->m_screenReader = nullptr;
}
void KeyingDespillOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.cpp b/source/blender/compositor/operations/COM_KeyingOperation.cpp
index dfc433dcfc6..9ef4217d300 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp
@@ -47,8 +47,8 @@ KeyingOperation::KeyingOperation()
this->m_screenBalance = 0.5f;
- this->m_pixelReader = NULL;
- this->m_screenReader = NULL;
+ this->m_pixelReader = nullptr;
+ this->m_screenReader = nullptr;
}
void KeyingOperation::initExecution()
@@ -59,8 +59,8 @@ void KeyingOperation::initExecution()
void KeyingOperation::deinitExecution()
{
- this->m_pixelReader = NULL;
- this->m_screenReader = NULL;
+ this->m_pixelReader = nullptr;
+ this->m_screenReader = nullptr;
}
void KeyingOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
diff --git a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
index 36093a931d0..463a6fe49c0 100644
--- a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
@@ -33,7 +33,7 @@
KeyingScreenOperation::KeyingScreenOperation()
{
this->addOutputSocket(COM_DT_COLOR);
- this->m_movieClip = NULL;
+ this->m_movieClip = nullptr;
this->m_framenumber = 0;
this->m_trackingObject[0] = 0;
setComplex(true);
@@ -42,7 +42,7 @@ KeyingScreenOperation::KeyingScreenOperation()
void KeyingScreenOperation::initExecution()
{
initMutex();
- this->m_cachedTriangulation = NULL;
+ this->m_cachedTriangulation = nullptr;
}
void KeyingScreenOperation::deinitExecution()
@@ -64,7 +64,7 @@ void KeyingScreenOperation::deinitExecution()
MEM_freeN(this->m_cachedTriangulation);
- this->m_cachedTriangulation = NULL;
+ this->m_cachedTriangulation = nullptr;
}
}
@@ -77,7 +77,7 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
VoronoiSite *sites, *site;
ImBuf *ibuf;
ListBase *tracksbase;
- ListBase edges = {NULL, NULL};
+ ListBase edges = {nullptr, nullptr};
int sites_total;
int i;
int width = this->getWidth();
@@ -88,7 +88,7 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
MovieTrackingObject *object = BKE_tracking_object_get_named(tracking, this->m_trackingObject);
if (!object) {
- return NULL;
+ return nullptr;
}
tracksbase = BKE_tracking_object_get_tracks(tracking, object);
@@ -117,14 +117,14 @@ KeyingScreenOperation::TriangulationData *KeyingScreenOperation::buildVoronoiTri
}
if (!sites_total) {
- return NULL;
+ return nullptr;
}
BKE_movieclip_user_set_frame(&user, clip_frame);
ibuf = BKE_movieclip_get_ibuf(this->m_movieClip, &user);
if (!ibuf) {
- return NULL;
+ return nullptr;
}
triangulation = (TriangulationData *)MEM_callocN(sizeof(TriangulationData),
@@ -232,13 +232,13 @@ void *KeyingScreenOperation::initializeTileData(rcti *rect)
int chunk_size = 20;
int i;
- if (this->m_movieClip == NULL) {
- return NULL;
+ if (this->m_movieClip == nullptr) {
+ return nullptr;
}
if (!this->m_cachedTriangulation) {
lockMutex();
- if (this->m_cachedTriangulation == NULL) {
+ if (this->m_cachedTriangulation == nullptr) {
this->m_cachedTriangulation = buildVoronoiTriangulation();
}
unlockMutex();
@@ -247,13 +247,13 @@ void *KeyingScreenOperation::initializeTileData(rcti *rect)
triangulation = this->m_cachedTriangulation;
if (!triangulation) {
- return NULL;
+ return nullptr;
}
tile_data = (TileData *)MEM_callocN(sizeof(TileData), "keying screen tile data");
for (i = 0; i < triangulation->triangles_total; i++) {
- if (BLI_rcti_isect(rect, &triangulation->triangles_AABB[i], NULL)) {
+ if (BLI_rcti_isect(rect, &triangulation->triangles_AABB[i], nullptr)) {
tile_data->triangles_total++;
if (tile_data->triangles_total > triangles_allocated) {
diff --git a/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp b/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp
index 8e501838d7b..47daef8d190 100644
--- a/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp
@@ -24,8 +24,8 @@ KeyingSetAlphaOperation::KeyingSetAlphaOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputColor = NULL;
- this->m_inputAlpha = NULL;
+ this->m_inputColor = nullptr;
+ this->m_inputAlpha = nullptr;
}
void KeyingSetAlphaOperation::initExecution()
@@ -50,6 +50,6 @@ void KeyingSetAlphaOperation::executePixelSampled(float output[4],
void KeyingSetAlphaOperation::deinitExecution()
{
- this->m_inputColor = NULL;
- this->m_inputAlpha = NULL;
+ this->m_inputColor = nullptr;
+ this->m_inputAlpha = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
index 50de043b641..f7cc6e2d4de 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
@@ -26,7 +26,7 @@ LuminanceMatteOperation::LuminanceMatteOperation()
addInputSocket(COM_DT_COLOR);
addOutputSocket(COM_DT_VALUE);
- this->m_inputImageProgram = NULL;
+ this->m_inputImageProgram = nullptr;
}
void LuminanceMatteOperation::initExecution()
@@ -36,7 +36,7 @@ void LuminanceMatteOperation::initExecution()
void LuminanceMatteOperation::deinitExecution()
{
- this->m_inputImageProgram = NULL;
+ this->m_inputImageProgram = nullptr;
}
void LuminanceMatteOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_MapRangeOperation.cpp b/source/blender/compositor/operations/COM_MapRangeOperation.cpp
index e4fe6065164..95b3c27ac2f 100644
--- a/source/blender/compositor/operations/COM_MapRangeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapRangeOperation.cpp
@@ -26,7 +26,7 @@ MapRangeOperation::MapRangeOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->m_useClamp = false;
}
@@ -95,9 +95,9 @@ void MapRangeOperation::executePixelSampled(float output[4],
void MapRangeOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_sourceMinOperation = NULL;
- this->m_sourceMaxOperation = NULL;
- this->m_destMinOperation = NULL;
- this->m_destMaxOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_sourceMinOperation = nullptr;
+ this->m_sourceMaxOperation = nullptr;
+ this->m_destMinOperation = nullptr;
+ this->m_destMaxOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp
index ed250bc28b6..32ab63ae028 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp
@@ -28,8 +28,8 @@ MapUVOperation::MapUVOperation()
this->setComplex(true);
setResolutionInputSocketIndex(1);
- this->m_inputUVProgram = NULL;
- this->m_inputColorProgram = NULL;
+ this->m_inputUVProgram = nullptr;
+ this->m_inputColorProgram = nullptr;
}
void MapUVOperation::initExecution()
@@ -149,8 +149,8 @@ void MapUVOperation::pixelTransform(const float xy[2],
void MapUVOperation::deinitExecution()
{
- this->m_inputUVProgram = NULL;
- this->m_inputColorProgram = NULL;
+ this->m_inputUVProgram = nullptr;
+ this->m_inputColorProgram = nullptr;
}
bool MapUVOperation::determineDependingAreaOfInterest(rcti *input,
@@ -159,7 +159,7 @@ bool MapUVOperation::determineDependingAreaOfInterest(rcti *input,
{
rcti colorInput;
rcti uvInput;
- NodeOperation *operation = NULL;
+ NodeOperation *operation = nullptr;
/* the uv buffer only needs a 3x3 buffer. The image needs whole buffer */
diff --git a/source/blender/compositor/operations/COM_MapValueOperation.cpp b/source/blender/compositor/operations/COM_MapValueOperation.cpp
index 908ad7f1317..7f2044b9139 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapValueOperation.cpp
@@ -22,7 +22,7 @@ MapValueOperation::MapValueOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void MapValueOperation::initExecution()
@@ -55,5 +55,5 @@ void MapValueOperation::executePixelSampled(float output[4],
void MapValueOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_MaskOperation.cpp b/source/blender/compositor/operations/COM_MaskOperation.cpp
index 7c21ee5d757..ab908590c55 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_MaskOperation.cpp
@@ -29,7 +29,7 @@
MaskOperation::MaskOperation()
{
this->addOutputSocket(COM_DT_VALUE);
- this->m_mask = NULL;
+ this->m_mask = nullptr;
this->m_maskWidth = 0;
this->m_maskHeight = 0;
this->m_maskWidthInv = 0.0f;
@@ -42,7 +42,7 @@ MaskOperation::MaskOperation()
void MaskOperation::initExecution()
{
- if (this->m_mask && this->m_rasterMaskHandles[0] == NULL) {
+ if (this->m_mask && this->m_rasterMaskHandles[0] == nullptr) {
if (this->m_rasterMaskHandleTot == 1) {
this->m_rasterMaskHandles[0] = BKE_maskrasterize_handle_new();
@@ -61,7 +61,7 @@ void MaskOperation::initExecution()
float frame_iter = frame;
Mask *mask_temp = (Mask *)BKE_id_copy_ex(
- NULL, &this->m_mask->id, NULL, LIB_ID_COPY_LOCALIZE | LIB_ID_COPY_NO_ANIMDATA);
+ nullptr, &this->m_mask->id, nullptr, LIB_ID_COPY_LOCALIZE | LIB_ID_COPY_NO_ANIMDATA);
/* trick so we can get unkeyed edits to display */
{
@@ -92,7 +92,7 @@ void MaskOperation::initExecution()
frame_iter += frame_step;
}
- BKE_id_free(NULL, &mask_temp->id);
+ BKE_id_free(nullptr, &mask_temp->id);
}
}
}
@@ -102,7 +102,7 @@ void MaskOperation::deinitExecution()
for (unsigned int i = 0; i < this->m_rasterMaskHandleTot; i++) {
if (this->m_rasterMaskHandles[i]) {
BKE_maskrasterize_handle_free(this->m_rasterMaskHandles[i]);
- this->m_rasterMaskHandles[i] = NULL;
+ this->m_rasterMaskHandles[i] = nullptr;
}
}
}
diff --git a/source/blender/compositor/operations/COM_MathBaseOperation.cpp b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
index c37874c7c9b..edd5bb6d139 100644
--- a/source/blender/compositor/operations/COM_MathBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
@@ -26,9 +26,9 @@ MathBaseOperation::MathBaseOperation()
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_inputValue1Operation = NULL;
- this->m_inputValue2Operation = NULL;
- this->m_inputValue3Operation = NULL;
+ this->m_inputValue1Operation = nullptr;
+ this->m_inputValue2Operation = nullptr;
+ this->m_inputValue3Operation = nullptr;
this->m_useClamp = false;
}
@@ -41,9 +41,9 @@ void MathBaseOperation::initExecution()
void MathBaseOperation::deinitExecution()
{
- this->m_inputValue1Operation = NULL;
- this->m_inputValue2Operation = NULL;
- this->m_inputValue3Operation = NULL;
+ this->m_inputValue1Operation = nullptr;
+ this->m_inputValue2Operation = nullptr;
+ this->m_inputValue3Operation = nullptr;
}
void MathBaseOperation::determineResolution(unsigned int resolution[2],
diff --git a/source/blender/compositor/operations/COM_MixOperation.cpp b/source/blender/compositor/operations/COM_MixOperation.cpp
index 376e27b1f30..948e69bf8eb 100644
--- a/source/blender/compositor/operations/COM_MixOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixOperation.cpp
@@ -28,9 +28,9 @@ MixBaseOperation::MixBaseOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputValueOperation = NULL;
- this->m_inputColor1Operation = NULL;
- this->m_inputColor2Operation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColor1Operation = nullptr;
+ this->m_inputColor2Operation = nullptr;
this->setUseValueAlphaMultiply(false);
this->setUseClamp(false);
}
@@ -90,9 +90,9 @@ void MixBaseOperation::determineResolution(unsigned int resolution[2],
void MixBaseOperation::deinitExecution()
{
- this->m_inputValueOperation = NULL;
- this->m_inputColor1Operation = NULL;
- this->m_inputColor2Operation = NULL;
+ this->m_inputValueOperation = nullptr;
+ this->m_inputColor1Operation = nullptr;
+ this->m_inputColor2Operation = nullptr;
}
/* ******** Mix Add Operation ******** */
diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
index f4e860316b3..725aacc7d34 100644
--- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
@@ -31,7 +31,7 @@ MovieClipAttributeOperation::MovieClipAttributeOperation()
void MovieClipAttributeOperation::initExecution()
{
- if (this->m_clip == NULL) {
+ if (this->m_clip == nullptr) {
return;
}
float loc[2], scale, angle;
diff --git a/source/blender/compositor/operations/COM_MovieClipOperation.cpp b/source/blender/compositor/operations/COM_MovieClipOperation.cpp
index 9d1779b3573..4f819bf27af 100644
--- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp
@@ -28,9 +28,9 @@
MovieClipBaseOperation::MovieClipBaseOperation()
{
- this->m_movieClip = NULL;
- this->m_movieClipBuffer = NULL;
- this->m_movieClipUser = NULL;
+ this->m_movieClip = nullptr;
+ this->m_movieClipBuffer = nullptr;
+ this->m_movieClipUser = nullptr;
this->m_movieClipwidth = 0;
this->m_movieClipheight = 0;
this->m_framenumber = 0;
@@ -52,7 +52,7 @@ void MovieClipBaseOperation::initExecution()
if (ibuf) {
this->m_movieClipBuffer = ibuf;
- if (ibuf->rect_float == NULL || ibuf->userflags & IB_RECT_INVALID) {
+ if (ibuf->rect_float == nullptr || ibuf->userflags & IB_RECT_INVALID) {
IMB_float_from_rect(ibuf);
ibuf->userflags &= ~IB_RECT_INVALID;
}
@@ -65,7 +65,7 @@ void MovieClipBaseOperation::deinitExecution()
if (this->m_movieClipBuffer) {
IMB_freeImBuf(this->m_movieClipBuffer);
- this->m_movieClipBuffer = NULL;
+ this->m_movieClipBuffer = nullptr;
}
}
@@ -92,23 +92,23 @@ void MovieClipBaseOperation::executePixelSampled(float output[4],
{
ImBuf *ibuf = this->m_movieClipBuffer;
- if (ibuf == NULL) {
+ if (ibuf == nullptr) {
zero_v4(output);
}
- else if (ibuf->rect == NULL && ibuf->rect_float == NULL) {
+ else if (ibuf->rect == nullptr && ibuf->rect_float == nullptr) {
/* Happens for multilayer exr, i.e. */
zero_v4(output);
}
else {
switch (sampler) {
case COM_PS_NEAREST:
- nearest_interpolation_color(ibuf, NULL, output, x, y);
+ nearest_interpolation_color(ibuf, nullptr, output, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(ibuf, NULL, output, x, y);
+ bilinear_interpolation_color(ibuf, nullptr, output, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(ibuf, NULL, output, x, y);
+ bicubic_interpolation_color(ibuf, nullptr, output, x, y);
break;
}
}
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
index 5accf9a2dc3..5031d590720 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
@@ -28,8 +28,8 @@ MovieDistortionOperation::MovieDistortionOperation(bool distortion)
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
- this->m_movieClip = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_movieClip = nullptr;
this->m_apply = distortion;
}
@@ -66,15 +66,15 @@ void MovieDistortionOperation::initExecution()
}
else {
m_margin[0] = m_margin[1] = 0;
- this->m_distortion = NULL;
+ this->m_distortion = nullptr;
}
}
void MovieDistortionOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_movieClip = NULL;
- if (this->m_distortion != NULL) {
+ this->m_inputOperation = nullptr;
+ this->m_movieClip = nullptr;
+ if (this->m_distortion != nullptr) {
BKE_tracking_distortion_free(this->m_distortion);
}
}
@@ -84,7 +84,7 @@ void MovieDistortionOperation::executePixelSampled(float output[4],
float y,
PixelSampler /*sampler*/)
{
- if (this->m_distortion != NULL) {
+ if (this->m_distortion != nullptr) {
/* float overscan = 0.0f; */
const float pixel_aspect = this->m_pixel_aspect;
const float w = (float)this->m_width /* / (1 + overscan) */;
diff --git a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
index 952225d5fb7..023538ee5b1 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
@@ -42,7 +42,7 @@ ImBuf *MultilayerBaseOperation::getImBuf()
}
this->m_imageUser->view = view;
- return NULL;
+ return nullptr;
}
void MultilayerColorOperation::executePixelSampled(float output[4],
@@ -50,20 +50,20 @@ void MultilayerColorOperation::executePixelSampled(float output[4],
float y,
PixelSampler sampler)
{
- if (this->m_imageFloatBuffer == NULL) {
+ if (this->m_imageFloatBuffer == nullptr) {
zero_v4(output);
}
else {
if (this->m_numberOfChannels == 4) {
switch (sampler) {
case COM_PS_NEAREST:
- nearest_interpolation_color(this->m_buffer, NULL, output, x, y);
+ nearest_interpolation_color(this->m_buffer, nullptr, output, x, y);
break;
case COM_PS_BILINEAR:
- bilinear_interpolation_color(this->m_buffer, NULL, output, x, y);
+ bilinear_interpolation_color(this->m_buffer, nullptr, output, x, y);
break;
case COM_PS_BICUBIC:
- bicubic_interpolation_color(this->m_buffer, NULL, output, x, y);
+ bicubic_interpolation_color(this->m_buffer, nullptr, output, x, y);
break;
}
}
@@ -87,7 +87,7 @@ void MultilayerValueOperation::executePixelSampled(float output[4],
float y,
PixelSampler /*sampler*/)
{
- if (this->m_imageFloatBuffer == NULL) {
+ if (this->m_imageFloatBuffer == nullptr) {
output[0] = 0.0f;
}
else {
@@ -109,7 +109,7 @@ void MultilayerVectorOperation::executePixelSampled(float output[4],
float y,
PixelSampler /*sampler*/)
{
- if (this->m_imageFloatBuffer == NULL) {
+ if (this->m_imageFloatBuffer == nullptr) {
output[0] = 0.0f;
}
else {
diff --git a/source/blender/compositor/operations/COM_NormalizeOperation.cpp b/source/blender/compositor/operations/COM_NormalizeOperation.cpp
index 1e7986c6009..a8448685332 100644
--- a/source/blender/compositor/operations/COM_NormalizeOperation.cpp
+++ b/source/blender/compositor/operations/COM_NormalizeOperation.cpp
@@ -22,8 +22,8 @@ NormalizeOperation::NormalizeOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
- this->m_imageReader = NULL;
- this->m_cachedInstance = NULL;
+ this->m_imageReader = nullptr;
+ this->m_cachedInstance = nullptr;
this->setComplex(true);
}
void NormalizeOperation::initExecution()
@@ -37,7 +37,7 @@ void NormalizeOperation::executePixel(float output[4], int x, int y, void *data)
/* using generic two floats struct to store x: min y: mult */
NodeTwoFloats *minmult = (NodeTwoFloats *)data;
- this->m_imageReader->read(output, x, y, NULL);
+ this->m_imageReader->read(output, x, y, nullptr);
output[0] = (output[0] - minmult->x) * minmult->y;
@@ -52,7 +52,7 @@ void NormalizeOperation::executePixel(float output[4], int x, int y, void *data)
void NormalizeOperation::deinitExecution()
{
- this->m_imageReader = NULL;
+ this->m_imageReader = nullptr;
delete this->m_cachedInstance;
NodeOperation::deinitMutex();
}
@@ -85,7 +85,7 @@ bool NormalizeOperation::determineDependingAreaOfInterest(rcti * /*input*/,
void *NormalizeOperation::initializeTileData(rcti *rect)
{
lockMutex();
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect);
/* using generic two floats struct to store x: min y: mult */
NodeTwoFloats *minmult = new NodeTwoFloats();
diff --git a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
index c0fe7237687..639da7c8ae6 100644
--- a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
@@ -76,14 +76,14 @@ void *OutputOpenExrSingleLayerMultiViewOperation::get_handle(const char *filenam
}
IMB_exr_add_view(exrhandle, srv->name);
- add_exr_channels(exrhandle, NULL, this->m_datatype, srv->name, width, false, NULL);
+ add_exr_channels(exrhandle, nullptr, this->m_datatype, srv->name, width, false, nullptr);
}
BLI_make_existing_file(filename);
/* prepare the file with all the channels */
- if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_format->exr_codec, NULL) ==
+ if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_format->exr_codec, nullptr) ==
0) {
printf("Error Writing Singlelayer Multiview Openexr\n");
IMB_exr_close(exrhandle);
@@ -93,7 +93,7 @@ void *OutputOpenExrSingleLayerMultiViewOperation::get_handle(const char *filenam
return exrhandle;
}
}
- return NULL;
+ return nullptr;
}
void OutputOpenExrSingleLayerMultiViewOperation::deinitExecution()
@@ -112,11 +112,11 @@ void OutputOpenExrSingleLayerMultiViewOperation::deinitExecution()
R_IMF_IMTYPE_OPENEXR,
(this->m_rd->scemode & R_EXTENSION) != 0,
true,
- NULL);
+ nullptr);
exrhandle = this->get_handle(filename);
add_exr_channels(exrhandle,
- NULL,
+ nullptr,
this->m_datatype,
this->m_viewName,
width,
@@ -124,15 +124,15 @@ void OutputOpenExrSingleLayerMultiViewOperation::deinitExecution()
this->m_outputBuffer);
/* memory can only be freed after we write all views to the file */
- this->m_outputBuffer = NULL;
- this->m_imageInput = NULL;
+ this->m_outputBuffer = nullptr;
+ this->m_imageInput = nullptr;
/* ready to close the file */
if (BKE_scene_multiview_is_render_view_last(this->m_rd, this->m_viewName)) {
IMB_exr_write_channels(exrhandle);
/* free buffer memory for all the views */
- free_exr_channels(exrhandle, this->m_rd, NULL, this->m_datatype);
+ free_exr_channels(exrhandle, this->m_rd, nullptr, this->m_datatype);
/* remove exr handle and data */
IMB_exr_close(exrhandle);
@@ -188,14 +188,14 @@ void *OutputOpenExrMultiLayerMultiViewOperation::get_handle(const char *filename
srv->name,
width,
this->m_exr_half_float,
- NULL);
+ nullptr);
}
}
BLI_make_existing_file(filename);
/* prepare the file with all the channels for the header */
- if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_exr_codec, NULL) == 0) {
+ if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_exr_codec, nullptr) == 0) {
printf("Error Writing Multilayer Multiview Openexr\n");
IMB_exr_close(exrhandle);
}
@@ -204,7 +204,7 @@ void *OutputOpenExrMultiLayerMultiViewOperation::get_handle(const char *filename
return exrhandle;
}
}
- return NULL;
+ return nullptr;
}
void OutputOpenExrMultiLayerMultiViewOperation::deinitExecution()
@@ -223,7 +223,7 @@ void OutputOpenExrMultiLayerMultiViewOperation::deinitExecution()
R_IMF_IMTYPE_MULTILAYER,
(this->m_rd->scemode & R_EXTENSION) != 0,
true,
- NULL);
+ nullptr);
exrhandle = this->get_handle(filename);
@@ -239,8 +239,8 @@ void OutputOpenExrMultiLayerMultiViewOperation::deinitExecution()
for (unsigned int i = 0; i < this->m_layers.size(); i++) {
/* memory can only be freed after we write all views to the file */
- this->m_layers[i].outputBuffer = NULL;
- this->m_layers[i].imageInput = NULL;
+ this->m_layers[i].outputBuffer = nullptr;
+ this->m_layers[i].imageInput = nullptr;
}
/* ready to close the file */
@@ -300,7 +300,7 @@ void *OutputStereoOperation::get_handle(const char *filename)
return exrhandle;
}
- return NULL;
+ return nullptr;
}
void OutputStereoOperation::deinitExecution()
@@ -316,7 +316,7 @@ void OutputStereoOperation::deinitExecution()
/* populate single EXR channel with view data */
IMB_exr_add_channel(exrhandle,
- NULL,
+ nullptr,
this->m_name,
this->m_viewName,
1,
@@ -324,19 +324,19 @@ void OutputStereoOperation::deinitExecution()
buf,
this->m_format->depth == R_IMF_CHAN_DEPTH_16);
- this->m_imageInput = NULL;
- this->m_outputBuffer = NULL;
+ this->m_imageInput = nullptr;
+ this->m_outputBuffer = nullptr;
/* create stereo ibuf */
if (BKE_scene_multiview_is_render_view_last(this->m_rd, this->m_viewName)) {
- ImBuf *ibuf[3] = {NULL};
+ ImBuf *ibuf[3] = {nullptr};
const char *names[2] = {STEREO_LEFT_NAME, STEREO_RIGHT_NAME};
char filename[FILE_MAX];
int i;
/* get rectf from EXR */
for (i = 0; i < 2; i++) {
- float *rectf = IMB_exr_channel_rect(exrhandle, NULL, this->m_name, names[i]);
+ float *rectf = IMB_exr_channel_rect(exrhandle, nullptr, this->m_name, names[i]);
ibuf[i] = IMB_allocImBuf(width, height, this->m_format->planes, 0);
ibuf[i]->channels = this->m_channels;
@@ -360,7 +360,7 @@ void OutputStereoOperation::deinitExecution()
this->m_format,
(this->m_rd->scemode & R_EXTENSION) != 0,
true,
- NULL);
+ nullptr);
BKE_imbuf_write(ibuf[2], filename, this->m_format);
diff --git a/source/blender/compositor/operations/COM_OutputFileOperation.cpp b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
index 374189a5c50..9548b137d07 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
@@ -48,25 +48,25 @@ void add_exr_channels(void *exrhandle,
switch (datatype) {
case COM_DT_VALUE:
IMB_exr_add_channel(
- exrhandle, layerName, "V", viewName, 1, width, buf ? buf : NULL, use_half_float);
+ exrhandle, layerName, "V", viewName, 1, width, buf ? buf : nullptr, use_half_float);
break;
case COM_DT_VECTOR:
IMB_exr_add_channel(
- exrhandle, layerName, "X", viewName, 3, 3 * width, buf ? buf : NULL, use_half_float);
+ exrhandle, layerName, "X", viewName, 3, 3 * width, buf ? buf : nullptr, use_half_float);
IMB_exr_add_channel(
- exrhandle, layerName, "Y", viewName, 3, 3 * width, buf ? buf + 1 : NULL, use_half_float);
+ exrhandle, layerName, "Y", viewName, 3, 3 * width, buf ? buf + 1 : nullptr, use_half_float);
IMB_exr_add_channel(
- exrhandle, layerName, "Z", viewName, 3, 3 * width, buf ? buf + 2 : NULL, use_half_float);
+ exrhandle, layerName, "Z", viewName, 3, 3 * width, buf ? buf + 2 : nullptr, use_half_float);
break;
case COM_DT_COLOR:
IMB_exr_add_channel(
- exrhandle, layerName, "R", viewName, 4, 4 * width, buf ? buf : NULL, use_half_float);
+ exrhandle, layerName, "R", viewName, 4, 4 * width, buf ? buf : nullptr, use_half_float);
IMB_exr_add_channel(
- exrhandle, layerName, "G", viewName, 4, 4 * width, buf ? buf + 1 : NULL, use_half_float);
+ exrhandle, layerName, "G", viewName, 4, 4 * width, buf ? buf + 1 : nullptr, use_half_float);
IMB_exr_add_channel(
- exrhandle, layerName, "B", viewName, 4, 4 * width, buf ? buf + 2 : NULL, use_half_float);
+ exrhandle, layerName, "B", viewName, 4, 4 * width, buf ? buf + 2 : nullptr, use_half_float);
IMB_exr_add_channel(
- exrhandle, layerName, "A", viewName, 4, 4 * width, buf ? buf + 3 : NULL, use_half_float);
+ exrhandle, layerName, "A", viewName, 4, 4 * width, buf ? buf + 3 : nullptr, use_half_float);
break;
default:
break;
@@ -82,7 +82,7 @@ void free_exr_channels(void *exrhandle,
/* check renderdata for amount of views */
for (srv = (SceneRenderView *)rd->views.first; srv; srv = srv->next) {
- float *rect = NULL;
+ float *rect = nullptr;
if (BKE_scene_multiview_is_render_view_active(rd, srv) == false) {
continue;
@@ -130,7 +130,7 @@ static float *init_buffer(unsigned int width, unsigned int height, DataType data
return (float *)MEM_callocN(width * height * size * sizeof(float), "OutputFile buffer");
}
- return NULL;
+ return nullptr;
}
static void write_buffer_rect(rcti *rect,
@@ -187,9 +187,9 @@ OutputSingleLayerOperation::OutputSingleLayerOperation(
this->addInputSocket(datatype);
- this->m_outputBuffer = NULL;
+ this->m_outputBuffer = nullptr;
this->m_datatype = datatype;
- this->m_imageInput = NULL;
+ this->m_imageInput = nullptr;
this->m_format = format;
BLI_strncpy(this->m_path, path, sizeof(this->m_path));
@@ -252,8 +252,8 @@ void OutputSingleLayerOperation::deinitExecution()
IMB_freeImBuf(ibuf);
}
- this->m_outputBuffer = NULL;
- this->m_imageInput = NULL;
+ this->m_outputBuffer = nullptr;
+ this->m_imageInput = nullptr;
}
/******************************* MultiLayer *******************************/
@@ -265,8 +265,8 @@ OutputOpenExrLayer::OutputOpenExrLayer(const char *name_, DataType datatype_, bo
this->use_layer = use_layer_;
/* these are created in initExecution */
- this->outputBuffer = 0;
- this->imageInput = 0;
+ this->outputBuffer = nullptr;
+ this->imageInput = nullptr;
}
OutputOpenExrMultiLayerOperation::OutputOpenExrMultiLayerOperation(const RenderData *rd,
@@ -356,7 +356,7 @@ void OutputOpenExrMultiLayerOperation::deinitExecution()
}
/* when the filename has no permissions, this can fail */
- if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_exr_codec, NULL)) {
+ if (IMB_exr_begin_write(exrhandle, filename, width, height, this->m_exr_codec, nullptr)) {
IMB_exr_write_channels(exrhandle);
}
else {
@@ -369,10 +369,10 @@ void OutputOpenExrMultiLayerOperation::deinitExecution()
for (unsigned int i = 0; i < this->m_layers.size(); i++) {
if (this->m_layers[i].outputBuffer) {
MEM_freeN(this->m_layers[i].outputBuffer);
- this->m_layers[i].outputBuffer = NULL;
+ this->m_layers[i].outputBuffer = nullptr;
}
- this->m_layers[i].imageInput = NULL;
+ this->m_layers[i].imageInput = nullptr;
}
}
}
diff --git a/source/blender/compositor/operations/COM_PixelateOperation.cpp b/source/blender/compositor/operations/COM_PixelateOperation.cpp
index 01cd7fcfd97..0d810c80ab4 100644
--- a/source/blender/compositor/operations/COM_PixelateOperation.cpp
+++ b/source/blender/compositor/operations/COM_PixelateOperation.cpp
@@ -23,7 +23,7 @@ PixelateOperation::PixelateOperation(DataType datatype)
this->addInputSocket(datatype);
this->addOutputSocket(datatype);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void PixelateOperation::initExecution()
@@ -33,7 +33,7 @@ void PixelateOperation::initExecution()
void PixelateOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void PixelateOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
index 0f6d5d0d4d7..c395f795a22 100644
--- a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
@@ -48,7 +48,7 @@ PlaneDistortWarpImageOperation::PlaneDistortWarpImageOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_pixelReader = NULL;
+ this->m_pixelReader = nullptr;
this->m_motion_blur_samples = 1;
this->m_motion_blur_shutter = 0.5f;
this->setComplex(true);
@@ -87,7 +87,7 @@ void PlaneDistortWarpImageOperation::initExecution()
void PlaneDistortWarpImageOperation::deinitExecution()
{
- this->m_pixelReader = NULL;
+ this->m_pixelReader = nullptr;
}
void PlaneDistortWarpImageOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp
index ed9a776d0a3..81a598e937b 100644
--- a/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneTrackOperation.cpp
@@ -33,7 +33,7 @@
PlaneTrackCommon::PlaneTrackCommon()
{
- this->m_movieClip = NULL;
+ this->m_movieClip = nullptr;
this->m_framenumber = 0;
this->m_trackingObjectName[0] = '\0';
this->m_planeTrackName[0] = '\0';
diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cpp b/source/blender/compositor/operations/COM_PreviewOperation.cpp
index 46ac466fd19..063421f6525 100644
--- a/source/blender/compositor/operations/COM_PreviewOperation.cpp
+++ b/source/blender/compositor/operations/COM_PreviewOperation.cpp
@@ -38,9 +38,9 @@ PreviewOperation::PreviewOperation(const ColorManagedViewSettings *viewSettings,
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
- this->m_preview = NULL;
- this->m_outputBuffer = NULL;
- this->m_input = NULL;
+ this->m_preview = nullptr;
+ this->m_outputBuffer = nullptr;
+ this->m_input = nullptr;
this->m_divider = 1.0f;
this->m_viewSettings = viewSettings;
this->m_displaySettings = displaySettings;
@@ -63,7 +63,7 @@ void PreviewOperation::initExecution()
this->m_outputBuffer = this->m_preview->rect;
}
- if (this->m_outputBuffer == NULL) {
+ if (this->m_outputBuffer == nullptr) {
this->m_outputBuffer = (unsigned char *)MEM_callocN(
sizeof(unsigned char) * 4 * getWidth() * getHeight(), "PreviewOperation");
if (this->m_preview->rect) {
@@ -77,8 +77,8 @@ void PreviewOperation::initExecution()
void PreviewOperation::deinitExecution()
{
- this->m_outputBuffer = NULL;
- this->m_input = NULL;
+ this->m_outputBuffer = nullptr;
+ this->m_input = nullptr;
}
void PreviewOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/)
diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
index 921b7ed474c..7d459b76cb9 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -26,7 +26,7 @@ ProjectorLensDistortionOperation::ProjectorLensDistortionOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
this->m_dispersionAvailable = false;
this->m_dispersion = 0.0f;
}
@@ -39,7 +39,7 @@ void ProjectorLensDistortionOperation::initExecution()
void *ProjectorLensDistortionOperation::initializeTileData(rcti * /*rect*/)
{
updateDispersion();
- void *buffer = this->m_inputProgram->initializeTileData(NULL);
+ void *buffer = this->m_inputProgram->initializeTileData(nullptr);
return buffer;
}
@@ -63,7 +63,7 @@ void ProjectorLensDistortionOperation::executePixel(float output[4], int x, int
void ProjectorLensDistortionOperation::deinitExecution()
{
this->deinitMutex();
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
bool ProjectorLensDistortionOperation::determineDependingAreaOfInterest(
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
index 9139ac200c8..2977e6685d2 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
@@ -25,7 +25,7 @@ ReadBufferOperation::ReadBufferOperation(DataType datatype)
this->addOutputSocket(datatype);
this->m_single_value = false;
this->m_offset = 0;
- this->m_buffer = NULL;
+ this->m_buffer = nullptr;
}
void *ReadBufferOperation::initializeTileData(rcti * /*rect*/)
@@ -36,7 +36,7 @@ void *ReadBufferOperation::initializeTileData(rcti * /*rect*/)
void ReadBufferOperation::determineResolution(unsigned int resolution[2],
unsigned int preferredResolution[2])
{
- if (this->m_memoryProxy != NULL) {
+ if (this->m_memoryProxy != nullptr) {
WriteBufferOperation *operation = this->m_memoryProxy->getWriteBufferOperation();
operation->determineResolution(resolution, preferredResolution);
operation->setResolution(resolution);
@@ -120,7 +120,7 @@ bool ReadBufferOperation::determineDependingAreaOfInterest(rcti *input,
void ReadBufferOperation::readResolutionFromWriteBuffer()
{
- if (this->m_memoryProxy != NULL) {
+ if (this->m_memoryProxy != nullptr) {
WriteBufferOperation *operation = this->m_memoryProxy->getWriteBufferOperation();
this->setWidth(operation->getWidth());
this->setHeight(operation->getHeight());
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
index b7b1da1bb89..40a68d4f9e2 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -31,10 +31,10 @@
RenderLayersProg::RenderLayersProg(const char *passName, DataType type, int elementsize)
: m_passName(passName)
{
- this->setScene(NULL);
- this->m_inputBuffer = NULL;
+ this->setScene(nullptr);
+ this->m_inputBuffer = nullptr;
this->m_elementsize = elementsize;
- this->m_rd = NULL;
+ this->m_rd = nullptr;
this->addOutputSocket(type);
}
@@ -42,8 +42,8 @@ RenderLayersProg::RenderLayersProg(const char *passName, DataType type, int elem
void RenderLayersProg::initExecution()
{
Scene *scene = this->getScene();
- Render *re = (scene) ? RE_GetSceneRender(scene) : NULL;
- RenderResult *rr = NULL;
+ Render *re = (scene) ? RE_GetSceneRender(scene) : nullptr;
+ RenderResult *rr = nullptr;
if (re) {
rr = RE_AcquireResultRead(re);
@@ -62,7 +62,7 @@ void RenderLayersProg::initExecution()
}
if (re) {
RE_ReleaseResult(re);
- re = NULL;
+ re = nullptr;
}
}
@@ -157,7 +157,7 @@ void RenderLayersProg::executePixelSampled(float output[4], float x, float y, Pi
}
#endif
- if (this->m_inputBuffer == NULL) {
+ if (this->m_inputBuffer == nullptr) {
int elemsize = this->m_elementsize;
if (elemsize == 1) {
output[0] = 0.0f;
@@ -177,15 +177,15 @@ void RenderLayersProg::executePixelSampled(float output[4], float x, float y, Pi
void RenderLayersProg::deinitExecution()
{
- this->m_inputBuffer = NULL;
+ this->m_inputBuffer = nullptr;
}
void RenderLayersProg::determineResolution(unsigned int resolution[2],
unsigned int /*preferredResolution*/[2])
{
Scene *sce = this->getScene();
- Render *re = (sce) ? RE_GetSceneRender(sce) : NULL;
- RenderResult *rr = NULL;
+ Render *re = (sce) ? RE_GetSceneRender(sce) : nullptr;
+ RenderResult *rr = nullptr;
resolution[0] = 0;
resolution[1] = 0;
@@ -217,7 +217,7 @@ void RenderLayersAOOperation::executePixelSampled(float output[4],
PixelSampler sampler)
{
float *inputBuffer = this->getInputBuffer();
- if (inputBuffer == NULL) {
+ if (inputBuffer == nullptr) {
zero_v3(output);
}
else {
@@ -234,7 +234,7 @@ void RenderLayersAlphaProg::executePixelSampled(float output[4],
{
float *inputBuffer = this->getInputBuffer();
- if (inputBuffer == NULL) {
+ if (inputBuffer == nullptr) {
output[0] = 0.0f;
}
else {
@@ -254,7 +254,7 @@ void RenderLayersDepthProg::executePixelSampled(float output[4],
int iy = y;
float *inputBuffer = this->getInputBuffer();
- if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() ||
+ if (inputBuffer == nullptr || ix < 0 || iy < 0 || ix >= (int)this->getWidth() ||
iy >= (int)this->getHeight()) {
output[0] = 10e10f;
}
diff --git a/source/blender/compositor/operations/COM_RotateOperation.cpp b/source/blender/compositor/operations/COM_RotateOperation.cpp
index e25d5af1aed..7a21e960c13 100644
--- a/source/blender/compositor/operations/COM_RotateOperation.cpp
+++ b/source/blender/compositor/operations/COM_RotateOperation.cpp
@@ -25,8 +25,8 @@ RotateOperation::RotateOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_imageSocket = NULL;
- this->m_degreeSocket = NULL;
+ this->m_imageSocket = nullptr;
+ this->m_degreeSocket = nullptr;
this->m_doDegree2RadConversion = false;
this->m_isDegreeSet = false;
}
@@ -40,8 +40,8 @@ void RotateOperation::initExecution()
void RotateOperation::deinitExecution()
{
- this->m_imageSocket = NULL;
- this->m_degreeSocket = NULL;
+ this->m_imageSocket = nullptr;
+ this->m_degreeSocket = nullptr;
}
inline void RotateOperation::ensureDegree()
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.cpp b/source/blender/compositor/operations/COM_ScaleOperation.cpp
index 37ce832209c..9ec4e474ccd 100644
--- a/source/blender/compositor/operations/COM_ScaleOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScaleOperation.cpp
@@ -42,9 +42,9 @@ ScaleOperation::ScaleOperation() : BaseScaleOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
}
void ScaleOperation::initExecution()
{
@@ -57,9 +57,9 @@ void ScaleOperation::initExecution()
void ScaleOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
}
void ScaleOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
@@ -117,9 +117,9 @@ ScaleAbsoluteOperation::ScaleAbsoluteOperation() : BaseScaleOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
}
void ScaleAbsoluteOperation::initExecution()
{
@@ -132,9 +132,9 @@ void ScaleAbsoluteOperation::initExecution()
void ScaleAbsoluteOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
}
void ScaleAbsoluteOperation::executePixelSampled(float output[4],
@@ -206,7 +206,7 @@ ScaleFixedSizeOperation::ScaleFixedSizeOperation() : BaseScaleOperation()
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
this->m_is_offset = false;
}
void ScaleFixedSizeOperation::initExecution()
@@ -263,7 +263,7 @@ void ScaleFixedSizeOperation::initExecution()
void ScaleFixedSizeOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
+ this->m_inputOperation = nullptr;
}
void ScaleFixedSizeOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
index 4b92be65b3e..158ffd4a8c0 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
@@ -31,7 +31,7 @@ ScreenLensDistortionOperation::ScreenLensDistortionOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setComplex(true);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
this->m_distortion = 0.0f;
this->m_dispersion = 0.0f;
this->m_distortion_const = false;
@@ -72,7 +72,7 @@ void ScreenLensDistortionOperation::initExecution()
void *ScreenLensDistortionOperation::initializeTileData(rcti * /*rect*/)
{
- void *buffer = this->m_inputProgram->initializeTileData(NULL);
+ void *buffer = this->m_inputProgram->initializeTileData(nullptr);
/* get distortion/dispersion values once, by reading inputs at (0,0)
* XXX this assumes invariable values (no image inputs),
@@ -202,7 +202,7 @@ void ScreenLensDistortionOperation::executePixel(float output[4], int x, int y,
void ScreenLensDistortionOperation::deinitExecution()
{
this->deinitMutex();
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
BLI_rng_free(this->m_rng);
}
diff --git a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
index cc4e4a562db..bf8fbacbfe1 100644
--- a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
@@ -24,8 +24,8 @@ SetAlphaOperation::SetAlphaOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_inputColor = NULL;
- this->m_inputAlpha = NULL;
+ this->m_inputColor = nullptr;
+ this->m_inputAlpha = nullptr;
}
void SetAlphaOperation::initExecution()
@@ -49,6 +49,6 @@ void SetAlphaOperation::executePixelSampled(float output[4],
void SetAlphaOperation::deinitExecution()
{
- this->m_inputColor = NULL;
- this->m_inputAlpha = NULL;
+ this->m_inputColor = nullptr;
+ this->m_inputAlpha = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
index 3c6a5104352..942d717d19c 100644
--- a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
@@ -30,7 +30,7 @@ void SetSamplerOperation::initExecution()
}
void SetSamplerOperation::deinitExecution()
{
- this->m_reader = NULL;
+ this->m_reader = nullptr;
}
void SetSamplerOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_SplitOperation.cpp b/source/blender/compositor/operations/COM_SplitOperation.cpp
index cace3b40b44..fb6214c7522 100644
--- a/source/blender/compositor/operations/COM_SplitOperation.cpp
+++ b/source/blender/compositor/operations/COM_SplitOperation.cpp
@@ -32,8 +32,8 @@ SplitOperation::SplitOperation()
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_image1Input = NULL;
- this->m_image2Input = NULL;
+ this->m_image1Input = nullptr;
+ this->m_image2Input = nullptr;
}
void SplitOperation::initExecution()
@@ -45,8 +45,8 @@ void SplitOperation::initExecution()
void SplitOperation::deinitExecution()
{
- this->m_image1Input = NULL;
- this->m_image2Input = NULL;
+ this->m_image1Input = nullptr;
+ this->m_image2Input = nullptr;
}
void SplitOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_SunBeamsOperation.cpp b/source/blender/compositor/operations/COM_SunBeamsOperation.cpp
index ef3c0700119..7cfa4de7a61 100644
--- a/source/blender/compositor/operations/COM_SunBeamsOperation.cpp
+++ b/source/blender/compositor/operations/COM_SunBeamsOperation.cpp
@@ -310,7 +310,7 @@ static void accumulate_line(MemoryBuffer *input,
void *SunBeamsOperation::initializeTileData(rcti * /*rect*/)
{
- void *buffer = getInputOperation(0)->initializeTileData(NULL);
+ void *buffer = getInputOperation(0)->initializeTileData(nullptr);
return buffer;
}
diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp
index 5a8c40d8c8c..582decc6a1b 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.cpp
+++ b/source/blender/compositor/operations/COM_TextureOperation.cpp
@@ -29,11 +29,11 @@ TextureBaseOperation::TextureBaseOperation()
{
this->addInputSocket(COM_DT_VECTOR); // offset
this->addInputSocket(COM_DT_VECTOR); // size
- this->m_texture = NULL;
- this->m_inputSize = NULL;
- this->m_inputOffset = NULL;
- this->m_rd = NULL;
- this->m_pool = NULL;
+ this->m_texture = nullptr;
+ this->m_inputSize = nullptr;
+ this->m_inputOffset = nullptr;
+ this->m_rd = nullptr;
+ this->m_pool = nullptr;
this->m_sceneColorManage = false;
setComplex(true);
}
@@ -51,19 +51,19 @@ void TextureBaseOperation::initExecution()
this->m_inputOffset = getInputSocketReader(0);
this->m_inputSize = getInputSocketReader(1);
this->m_pool = BKE_image_pool_new();
- if (this->m_texture != NULL && this->m_texture->nodetree != NULL && this->m_texture->use_nodes) {
+ if (this->m_texture != nullptr && this->m_texture->nodetree != nullptr && this->m_texture->use_nodes) {
ntreeTexBeginExecTree(this->m_texture->nodetree);
}
NodeOperation::initExecution();
}
void TextureBaseOperation::deinitExecution()
{
- this->m_inputSize = NULL;
- this->m_inputOffset = NULL;
+ this->m_inputSize = nullptr;
+ this->m_inputOffset = nullptr;
BKE_image_pool_free(this->m_pool);
- this->m_pool = NULL;
- if (this->m_texture != NULL && this->m_texture->use_nodes && this->m_texture->nodetree != NULL &&
- this->m_texture->nodetree->execdata != NULL) {
+ this->m_pool = nullptr;
+ if (this->m_texture != nullptr && this->m_texture->use_nodes && this->m_texture->nodetree != nullptr &&
+ this->m_texture->nodetree->execdata != nullptr) {
ntreeTexEndExecTree(this->m_texture->nodetree->execdata);
}
NodeOperation::deinitExecution();
@@ -99,7 +99,7 @@ void TextureBaseOperation::executePixelSampled(float output[4],
float y,
PixelSampler sampler)
{
- TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
+ TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, nullptr};
float textureSize[4];
float textureOffset[4];
float vec[3];
@@ -114,7 +114,7 @@ void TextureBaseOperation::executePixelSampled(float output[4],
* interpolation and (b) in such configuration multitex() simply floor's the value
* which often produces artifacts.
*/
- if (m_texture != NULL && (m_texture->imaflag & TEX_INTERPOL) == 0) {
+ if (m_texture != nullptr && (m_texture->imaflag & TEX_INTERPOL) == 0) {
u += 0.5f / cx;
v += 0.5f / cy;
}
@@ -128,7 +128,7 @@ void TextureBaseOperation::executePixelSampled(float output[4],
const int thread_id = WorkScheduler::current_thread_id();
retval = multitex_ext(
- this->m_texture, vec, NULL, NULL, 0, &texres, thread_id, m_pool, m_sceneColorManage, false);
+ this->m_texture, vec, nullptr, nullptr, 0, &texres, thread_id, m_pool, m_sceneColorManage, false);
if (texres.talpha) {
output[3] = texres.ta;
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cpp b/source/blender/compositor/operations/COM_TonemapOperation.cpp
index 2e330e287b2..cb0fc747dcb 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.cpp
+++ b/source/blender/compositor/operations/COM_TonemapOperation.cpp
@@ -26,9 +26,9 @@ TonemapOperation::TonemapOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_imageReader = NULL;
- this->m_data = NULL;
- this->m_cachedInstance = NULL;
+ this->m_imageReader = nullptr;
+ this->m_data = nullptr;
+ this->m_cachedInstance = nullptr;
this->setComplex(true);
}
void TonemapOperation::initExecution()
@@ -41,7 +41,7 @@ void TonemapOperation::executePixel(float output[4], int x, int y, void *data)
{
AvgLogLum *avg = (AvgLogLum *)data;
- this->m_imageReader->read(output, x, y, NULL);
+ this->m_imageReader->read(output, x, y, nullptr);
mul_v3_fl(output, avg->al);
float dr = output[0] + this->m_data->offset;
float dg = output[1] + this->m_data->offset;
@@ -65,7 +65,7 @@ void PhotoreceptorTonemapOperation::executePixel(float output[4], int x, int y,
const float m = (ntm->m > 0.0f) ? ntm->m : (0.3f + 0.7f * powf(avg->auto_key, 1.4f));
const float ic = 1.0f - ntm->c, ia = 1.0f - ntm->a;
- this->m_imageReader->read(output, x, y, NULL);
+ this->m_imageReader->read(output, x, y, nullptr);
const float L = IMB_colormanagement_get_luminance(output);
float I_l = output[0] + ic * (L - output[0]);
@@ -84,7 +84,7 @@ void PhotoreceptorTonemapOperation::executePixel(float output[4], int x, int y,
void TonemapOperation::deinitExecution()
{
- this->m_imageReader = NULL;
+ this->m_imageReader = nullptr;
delete this->m_cachedInstance;
NodeOperation::deinitMutex();
}
@@ -109,7 +109,7 @@ bool TonemapOperation::determineDependingAreaOfInterest(rcti * /*input*/,
void *TonemapOperation::initializeTileData(rcti *rect)
{
lockMutex();
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect);
AvgLogLum *data = new AvgLogLum();
diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
index eca87a7b5a3..ddabfb7cf6c 100644
--- a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
+++ b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
@@ -31,7 +31,7 @@
TrackPositionOperation::TrackPositionOperation()
{
this->addOutputSocket(COM_DT_VALUE);
- this->m_movieClip = NULL;
+ this->m_movieClip = nullptr;
this->m_framenumber = 0;
this->m_trackingObjectName[0] = 0;
this->m_trackName[0] = 0;
@@ -43,7 +43,7 @@ TrackPositionOperation::TrackPositionOperation()
void TrackPositionOperation::initExecution()
{
- MovieTracking *tracking = NULL;
+ MovieTracking *tracking = nullptr;
MovieClipUser user = {0};
MovieTrackingObject *object;
@@ -79,7 +79,7 @@ void TrackPositionOperation::initExecution()
this->m_relativeFrame);
marker = BKE_tracking_marker_get_exact(track, relative_clip_framenr);
- if (marker != NULL && (marker->flag & MARKER_DISABLED) == 0) {
+ if (marker != nullptr && (marker->flag & MARKER_DISABLED) == 0) {
copy_v2_v2(this->m_relativePos, marker->pos);
}
else {
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cpp b/source/blender/compositor/operations/COM_TranslateOperation.cpp
index e92d1034e25..286004cd49b 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.cpp
+++ b/source/blender/compositor/operations/COM_TranslateOperation.cpp
@@ -25,9 +25,9 @@ TranslateOperation::TranslateOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
this->setResolutionInputSocketIndex(0);
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
this->m_isDeltaSet = false;
this->m_factorX = 1.0f;
this->m_factorY = 1.0f;
@@ -41,9 +41,9 @@ void TranslateOperation::initExecution()
void TranslateOperation::deinitExecution()
{
- this->m_inputOperation = NULL;
- this->m_inputXOperation = NULL;
- this->m_inputYOperation = NULL;
+ this->m_inputOperation = nullptr;
+ this->m_inputXOperation = nullptr;
+ this->m_inputYOperation = nullptr;
}
void TranslateOperation::executePixelSampled(float output[4],
diff --git a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
index afc318a0c5b..414b5bd980a 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
@@ -35,9 +35,9 @@ VariableSizeBokehBlurOperation::VariableSizeBokehBlurOperation()
this->setComplex(true);
this->setOpenCL(true);
- this->m_inputProgram = NULL;
- this->m_inputBokehProgram = NULL;
- this->m_inputSizeProgram = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputBokehProgram = nullptr;
+ this->m_inputSizeProgram = nullptr;
this->m_maxBlur = 32.0f;
this->m_threshold = 1.0f;
this->m_do_size_scale = false;
@@ -188,7 +188,7 @@ void VariableSizeBokehBlurOperation::executeOpenCL(OpenCLDevice *device,
list<cl_mem> *clMemToCleanUp,
list<cl_kernel> * /*clKernelsToCleanUp*/)
{
- cl_kernel defocusKernel = device->COM_clCreateKernel("defocusKernel", NULL);
+ cl_kernel defocusKernel = device->COM_clCreateKernel("defocusKernel", nullptr);
cl_int step = this->getStep();
cl_int maxBlur;
@@ -221,9 +221,9 @@ void VariableSizeBokehBlurOperation::executeOpenCL(OpenCLDevice *device,
void VariableSizeBokehBlurOperation::deinitExecution()
{
- this->m_inputProgram = NULL;
- this->m_inputBokehProgram = NULL;
- this->m_inputSizeProgram = NULL;
+ this->m_inputProgram = nullptr;
+ this->m_inputBokehProgram = nullptr;
+ this->m_inputSizeProgram = nullptr;
#ifdef COM_DEFOCUS_SEARCH
this->m_inputSearchProgram = NULL;
#endif
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
index 0f3a3172f15..0776c97563e 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
@@ -49,11 +49,11 @@ VectorBlurOperation::VectorBlurOperation()
this->addInputSocket(COM_DT_VALUE); // ZBUF
this->addInputSocket(COM_DT_COLOR); // SPEED
this->addOutputSocket(COM_DT_COLOR);
- this->m_settings = NULL;
- this->m_cachedInstance = NULL;
- this->m_inputImageProgram = NULL;
- this->m_inputSpeedProgram = NULL;
- this->m_inputZProgram = NULL;
+ this->m_settings = nullptr;
+ this->m_cachedInstance = nullptr;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputSpeedProgram = nullptr;
+ this->m_inputZProgram = nullptr;
setComplex(true);
}
void VectorBlurOperation::initExecution()
@@ -62,7 +62,7 @@ void VectorBlurOperation::initExecution()
this->m_inputImageProgram = getInputSocketReader(0);
this->m_inputZProgram = getInputSocketReader(1);
this->m_inputSpeedProgram = getInputSocketReader(2);
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
QualityStepHelper::initExecution(COM_QH_INCREASE);
}
@@ -76,12 +76,12 @@ void VectorBlurOperation::executePixel(float output[4], int x, int y, void *data
void VectorBlurOperation::deinitExecution()
{
deinitMutex();
- this->m_inputImageProgram = NULL;
- this->m_inputSpeedProgram = NULL;
- this->m_inputZProgram = NULL;
+ this->m_inputImageProgram = nullptr;
+ this->m_inputSpeedProgram = nullptr;
+ this->m_inputZProgram = nullptr;
if (this->m_cachedInstance) {
MEM_freeN(this->m_cachedInstance);
- this->m_cachedInstance = NULL;
+ this->m_cachedInstance = nullptr;
}
}
void *VectorBlurOperation::initializeTileData(rcti *rect)
@@ -91,7 +91,7 @@ void *VectorBlurOperation::initializeTileData(rcti *rect)
}
lockMutex();
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
MemoryBuffer *tile = (MemoryBuffer *)this->m_inputImageProgram->initializeTileData(rect);
MemoryBuffer *speed = (MemoryBuffer *)this->m_inputSpeedProgram->initializeTileData(rect);
MemoryBuffer *z = (MemoryBuffer *)this->m_inputZProgram->initializeTileData(rect);
@@ -107,7 +107,7 @@ bool VectorBlurOperation::determineDependingAreaOfInterest(rcti * /*input*/,
ReadBufferOperation *readOperation,
rcti *output)
{
- if (this->m_cachedInstance == NULL) {
+ if (this->m_cachedInstance == nullptr) {
rcti newInput;
newInput.xmax = this->getWidth();
newInput.xmin = 0;
@@ -183,7 +183,7 @@ void zbuf_free_span(ZSpan *zspan)
if (zspan->span2) {
MEM_freeN(zspan->span2);
}
- zspan->span1 = zspan->span2 = NULL;
+ zspan->span1 = zspan->span2 = nullptr;
}
}
@@ -192,7 +192,7 @@ static void zbuf_init_span(ZSpan *zspan)
{
zspan->miny1 = zspan->miny2 = zspan->recty + 1;
zspan->maxy1 = zspan->maxy2 = -1;
- zspan->minp1 = zspan->maxp1 = zspan->minp2 = zspan->maxp2 = NULL;
+ zspan->minp1 = zspan->maxp1 = zspan->minp2 = zspan->maxp2 = nullptr;
}
static void zbuf_add_to_span(ZSpan *zspan, const float v1[2], const float v2[2])
@@ -243,7 +243,7 @@ static void zbuf_add_to_span(ZSpan *zspan, const float v1[2], const float v2[2])
}
/* empty span */
- if (zspan->maxp1 == NULL) {
+ if (zspan->maxp1 == nullptr) {
span = zspan->span1;
}
else { /* does it complete left span? */
@@ -257,10 +257,10 @@ static void zbuf_add_to_span(ZSpan *zspan, const float v1[2], const float v2[2])
if (span == zspan->span1) {
// printf("left span my0 %d my2 %d\n", my0, my2);
- if (zspan->minp1 == NULL || zspan->minp1[1] > minv[1]) {
+ if (zspan->minp1 == nullptr || zspan->minp1[1] > minv[1]) {
zspan->minp1 = minv;
}
- if (zspan->maxp1 == NULL || zspan->maxp1[1] < maxv[1]) {
+ if (zspan->maxp1 == nullptr || zspan->maxp1[1] < maxv[1]) {
zspan->maxp1 = maxv;
}
if (my0 < zspan->miny1) {
@@ -272,10 +272,10 @@ static void zbuf_add_to_span(ZSpan *zspan, const float v1[2], const float v2[2])
}
else {
// printf("right span my0 %d my2 %d\n", my0, my2);
- if (zspan->minp2 == NULL || zspan->minp2[1] > minv[1]) {
+ if (zspan->minp2 == nullptr || zspan->minp2[1] > minv[1]) {
zspan->minp2 = minv;
}
- if (zspan->maxp2 == NULL || zspan->maxp2[1] < maxv[1]) {
+ if (zspan->maxp2 == nullptr || zspan->maxp2[1] < maxv[1]) {
zspan->maxp2 = maxv;
}
if (my0 < zspan->miny2) {
@@ -321,7 +321,7 @@ static void zbuf_fill_in_rgba(
zbuf_add_to_span(zspan, v4, v1);
/* clipped */
- if (zspan->minp2 == NULL || zspan->maxp2 == NULL) {
+ if (zspan->minp2 == nullptr || zspan->maxp2 == nullptr) {
return;
}
@@ -554,7 +554,7 @@ void zbuf_accumulate_vecblur(NodeBlurData *nbd,
float v1[3], v2[3], v3[3], v4[3], fx, fy;
const float *dimg, *dz, *ro;
float *rectvz, *dvz, *dvec1, *dvec2, *dz1, *dz2, *rectz;
- float *minvecbufrect = NULL, *rectweight, *rw, *rectmax, *rm;
+ float *minvecbufrect = nullptr, *rectweight, *rw, *rectmax, *rm;
float maxspeedsq = (float)nbd->maxspeed * nbd->maxspeed;
int y, x, step, maxspeed = nbd->maxspeed, samples = nbd->samples;
int tsktsk = 0;
@@ -765,7 +765,7 @@ void zbuf_accumulate_vecblur(NodeBlurData *nbd,
/* clear drawing buffer */
for (x = xsize * ysize - 1; x >= 0; x--) {
- rectdraw[x].colpoin = NULL;
+ rectdraw[x].colpoin = nullptr;
}
dimg = imgrect;
diff --git a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
index a78a8c47ea3..a883237f870 100644
--- a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
@@ -25,7 +25,7 @@ VectorCurveOperation::VectorCurveOperation()
this->addInputSocket(COM_DT_VECTOR);
this->addOutputSocket(COM_DT_VECTOR);
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
void VectorCurveOperation::initExecution()
{
@@ -48,5 +48,5 @@ void VectorCurveOperation::executePixelSampled(float output[4],
void VectorCurveOperation::deinitExecution()
{
CurveBaseOperation::deinitExecution();
- this->m_inputProgram = NULL;
+ this->m_inputProgram = nullptr;
}
diff --git a/source/blender/compositor/operations/COM_ViewerOperation.cpp b/source/blender/compositor/operations/COM_ViewerOperation.cpp
index 254d6975bee..025dde8e866 100644
--- a/source/blender/compositor/operations/COM_ViewerOperation.cpp
+++ b/source/blender/compositor/operations/COM_ViewerOperation.cpp
@@ -34,25 +34,25 @@
ViewerOperation::ViewerOperation()
{
- this->setImage(NULL);
- this->setImageUser(NULL);
- this->m_outputBuffer = NULL;
- this->m_depthBuffer = NULL;
+ this->setImage(nullptr);
+ this->setImageUser(nullptr);
+ this->m_outputBuffer = nullptr;
+ this->m_depthBuffer = nullptr;
this->m_active = false;
this->m_doDepthBuffer = false;
- this->m_viewSettings = NULL;
- this->m_displaySettings = NULL;
+ this->m_viewSettings = nullptr;
+ this->m_displaySettings = nullptr;
this->m_useAlphaInput = false;
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
- this->m_imageInput = NULL;
- this->m_alphaInput = NULL;
- this->m_depthInput = NULL;
- this->m_rd = NULL;
- this->m_viewName = NULL;
+ this->m_imageInput = nullptr;
+ this->m_alphaInput = nullptr;
+ this->m_depthInput = nullptr;
+ this->m_rd = nullptr;
+ this->m_viewName = nullptr;
}
void ViewerOperation::initExecution()
@@ -61,7 +61,7 @@ void ViewerOperation::initExecution()
this->m_imageInput = getInputSocketReader(0);
this->m_alphaInput = getInputSocketReader(1);
this->m_depthInput = getInputSocketReader(2);
- this->m_doDepthBuffer = (this->m_depthInput != NULL);
+ this->m_doDepthBuffer = (this->m_depthInput != nullptr);
if (isActiveViewerOutput()) {
initImage();
@@ -70,10 +70,10 @@ void ViewerOperation::initExecution()
void ViewerOperation::deinitExecution()
{
- this->m_imageInput = NULL;
- this->m_alphaInput = NULL;
- this->m_depthInput = NULL;
- this->m_outputBuffer = NULL;
+ this->m_imageInput = nullptr;
+ this->m_alphaInput = nullptr;
+ this->m_depthInput = nullptr;
+ this->m_outputBuffer = nullptr;
}
void ViewerOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/)
@@ -180,7 +180,7 @@ void ViewerOperation::updateImage(rcti *rect)
{
IMB_partial_display_buffer_update(this->m_ibuf,
this->m_outputBuffer,
- NULL,
+ nullptr,
getWidth(),
0,
0,
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
index 883dd48ccfe..574978e5a5f 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
@@ -26,13 +26,13 @@ WriteBufferOperation::WriteBufferOperation(DataType datatype)
this->addInputSocket(datatype);
this->m_memoryProxy = new MemoryProxy(datatype);
this->m_memoryProxy->setWriteBufferOperation(this);
- this->m_memoryProxy->setExecutor(NULL);
+ this->m_memoryProxy->setExecutor(nullptr);
}
WriteBufferOperation::~WriteBufferOperation()
{
if (this->m_memoryProxy) {
delete this->m_memoryProxy;
- this->m_memoryProxy = NULL;
+ this->m_memoryProxy = nullptr;
}
}
@@ -52,7 +52,7 @@ void WriteBufferOperation::initExecution()
void WriteBufferOperation::deinitExecution()
{
- this->m_input = NULL;
+ this->m_input = nullptr;
this->m_memoryProxy->free();
}
@@ -82,7 +82,7 @@ void WriteBufferOperation::executeRegion(rcti *rect, unsigned int /*tileNumber*/
}
if (data) {
this->m_input->deinitializeTileData(rect, data);
- data = NULL;
+ data = nullptr;
}
}
else {
@@ -175,8 +175,8 @@ void WriteBufferOperation::executeOpenCLRegion(OpenCLDevice *device,
0,
outputFloatBuffer,
0,
- NULL,
- NULL);
+ nullptr,
+ nullptr);
if (error != CL_SUCCESS) {
printf("CLERROR[%d]: %s\n", error, clewErrorString(error));
}
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.cpp b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
index 935272e0dbe..22a37a4583e 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.cpp
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
@@ -27,10 +27,10 @@ ZCombineOperation::ZCombineOperation()
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_COLOR);
- this->m_image1Reader = NULL;
- this->m_depth1Reader = NULL;
- this->m_image2Reader = NULL;
- this->m_depth2Reader = NULL;
+ this->m_image1Reader = nullptr;
+ this->m_depth1Reader = nullptr;
+ this->m_image2Reader = nullptr;
+ this->m_depth2Reader = nullptr;
}
void ZCombineOperation::initExecution()
@@ -88,10 +88,10 @@ void ZCombineAlphaOperation::executePixelSampled(float output[4],
void ZCombineOperation::deinitExecution()
{
- this->m_image1Reader = NULL;
- this->m_depth1Reader = NULL;
- this->m_image2Reader = NULL;
- this->m_depth2Reader = NULL;
+ this->m_image1Reader = nullptr;
+ this->m_depth1Reader = nullptr;
+ this->m_image2Reader = nullptr;
+ this->m_depth2Reader = nullptr;
}
// MASK combine
@@ -102,9 +102,9 @@ ZCombineMaskOperation::ZCombineMaskOperation()
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
- this->m_maskReader = NULL;
- this->m_image1Reader = NULL;
- this->m_image2Reader = NULL;
+ this->m_maskReader = nullptr;
+ this->m_image1Reader = nullptr;
+ this->m_image2Reader = nullptr;
}
void ZCombineMaskOperation::initExecution()
@@ -154,7 +154,7 @@ void ZCombineMaskAlphaOperation::executePixelSampled(float output[4],
void ZCombineMaskOperation::deinitExecution()
{
- this->m_image1Reader = NULL;
- this->m_maskReader = NULL;
- this->m_image2Reader = NULL;
+ this->m_image1Reader = nullptr;
+ this->m_maskReader = nullptr;
+ this->m_image2Reader = nullptr;
}