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:
authorSergey Sharybin <sergey@blender.org>2020-11-12 11:26:20 +0300
committerSergey Sharybin <sergey@blender.org>2020-11-12 11:26:20 +0300
commitde6cee4fc1913982b0b2bd786bfd813c935bbe73 (patch)
treea726c0c63bbd1d6c47c90c32119ce14c8048cddc /source/blender/compositor/operations
parente4d432500a0e2f978fe019da43deb843da405032 (diff)
parent88bb29dea668df8cc46aa7f55895f229748bdbb4 (diff)
Merge branch 'master' into codesign_error_tracker
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_AntiAliasOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_BilateralBlurOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_BrightnessOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_CalculateMeanOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp3
-rw-r--r--source/blender/compositor/operations/COM_ChangeHSVOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_ChannelMatteOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ChromaMatteOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ColorCurveOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_ColorMatteOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ColorRampOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ColorSpillOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_CompositorOperation.cpp41
-rw-r--r--source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_ConvertOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_CropOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_CryptomatteOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_CurveBaseOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_DenoiseOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_DespeckleOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_DilateErodeOperation.cpp30
-rw-r--r--source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_DisplaceOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp20
-rw-r--r--source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_DotproductOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_FastGaussianBlurOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_FlipOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_GammaCorrectOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_GammaOperation.cpp10
-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.cpp6
-rw-r--r--source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_GlareThresholdOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_IDMaskOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.cpp60
-rw-r--r--source/blender/compositor/operations/COM_ImageOperation.h3
-rw-r--r--source/blender/compositor/operations/COM_InpaintOperation.cpp24
-rw-r--r--source/blender/compositor/operations/COM_InvertOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_KeyingBlurOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_KeyingClipOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_KeyingDespillOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_KeyingScreenOperation.cpp26
-rw-r--r--source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp55
-rw-r--r--source/blender/compositor/operations/COM_KeyingSetAlphaOperation.h39
-rw-r--r--source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MapRangeOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_MapUVOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_MapValueOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_MaskOperation.cpp17
-rw-r--r--source/blender/compositor/operations/COM_MathBaseOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_MixOperation.cpp52
-rw-r--r--source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_MovieClipOperation.cpp22
-rw-r--r--source/blender/compositor/operations/COM_MovieDistortionOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_MultilayerImageOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_NormalizeOperation.cpp12
-rw-r--r--source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp44
-rw-r--r--source/blender/compositor/operations/COM_OutputFileOperation.cpp78
-rw-r--r--source/blender/compositor/operations/COM_PixelateOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_PlaneTrackOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_PlaneTrackOperation.h4
-rw-r--r--source/blender/compositor/operations/COM_PreviewOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.cpp31
-rw-r--r--source/blender/compositor/operations/COM_RotateOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_ScaleOperation.cpp28
-rw-r--r--source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_SetAlphaOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_SetColorOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_SetSamplerOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_SetValueOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_SetVectorOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_SocketProxyOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_SplitOperation.cpp10
-rw-r--r--source/blender/compositor/operations/COM_SunBeamsOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.cpp41
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.h3
-rw-r--r--source/blender/compositor/operations/COM_TonemapOperation.cpp16
-rw-r--r--source/blender/compositor/operations/COM_TrackPositionOperation.cpp8
-rw-r--r--source/blender/compositor/operations/COM_TranslateOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp18
-rw-r--r--source/blender/compositor/operations/COM_VectorBlurOperation.cpp48
-rw-r--r--source/blender/compositor/operations/COM_VectorCurveOperation.cpp6
-rw-r--r--source/blender/compositor/operations/COM_ViewerOperation.cpp36
-rw-r--r--source/blender/compositor/operations/COM_WrapOperation.cpp4
-rw-r--r--source/blender/compositor/operations/COM_WriteBufferOperation.cpp14
-rw-r--r--source/blender/compositor/operations/COM_ZCombineOperation.cpp32
114 files changed, 887 insertions, 762 deletions
diff --git a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
index 1be5ef1f2df..668d07c7c3d 100644
--- a/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverKeyOperation.cpp
@@ -18,7 +18,7 @@
#include "COM_AlphaOverKeyOperation.h"
-AlphaOverKeyOperation::AlphaOverKeyOperation() : MixBaseOperation()
+AlphaOverKeyOperation::AlphaOverKeyOperation()
{
/* pass */
}
diff --git a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
index 513158dcff6..b8465ab7ccf 100644
--- a/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverMixedOperation.cpp
@@ -18,7 +18,7 @@
#include "COM_AlphaOverMixedOperation.h"
-AlphaOverMixedOperation::AlphaOverMixedOperation() : MixBaseOperation()
+AlphaOverMixedOperation::AlphaOverMixedOperation()
{
this->m_x = 0.0f;
}
diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
index 8e5bce7221f..4510c027d46 100644
--- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
+++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cpp
@@ -18,7 +18,7 @@
#include "COM_AlphaOverPremultiplyOperation.h"
-AlphaOverPremultiplyOperation::AlphaOverPremultiplyOperation() : MixBaseOperation()
+AlphaOverPremultiplyOperation::AlphaOverPremultiplyOperation()
{
/* pass */
}
diff --git a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
index 2c762323104..684485c40cb 100644
--- a/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
+++ b/source/blender/compositor/operations/COM_AntiAliasOperation.cpp
@@ -22,11 +22,11 @@
#include "MEM_guardedalloc.h"
-#include "RE_render_ext.h"
+#include "RE_texture.h"
/* An implementation of the Scale3X edge-extrapolation algorithm.
*
- * Code from GIMP plugin, based on code from Adam D. Moss (adam@gimp.org)
+ * Code from GIMP plugin, based on code from Adam D. Moss <adam@gimp.org>
* licensed by the MIT license.
*/
static int extrapolate9(float *E0,
@@ -112,11 +112,11 @@ static int extrapolate9(float *E0,
#undef PCPY
}
-AntiAliasOperation::AntiAliasOperation() : NodeOperation()
+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 8168867a522..35b0092fa5f 100644
--- a/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BilateralBlurOperation.cpp
@@ -21,15 +21,15 @@
#include "RE_pipeline.h"
-BilateralBlurOperation::BilateralBlurOperation() : NodeOperation()
+BilateralBlurOperation::BilateralBlurOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_COLOR);
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 ef0f259c592..3fe154c397e 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.cpp
@@ -22,14 +22,14 @@
#include "RE_pipeline.h"
-BlurBaseOperation::BlurBaseOperation(DataType data_type) : NodeOperation()
+BlurBaseOperation::BlurBaseOperation(DataType data_type)
{
/* data_type is almost always COM_DT_COLOR except for alpha-blur */
this->addInputSocket(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 c00ef2468c0..f7b7816e1a1 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -22,7 +22,7 @@
#include "RE_pipeline.h"
-BokehBlurOperation::BokehBlurOperation() : NodeOperation()
+BokehBlurOperation::BokehBlurOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
@@ -34,9 +34,9 @@ BokehBlurOperation::BokehBlurOperation() : NodeOperation()
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 3fd9a77d879..473a43c1776 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
@@ -19,7 +19,7 @@
#include "COM_BokehImageOperation.h"
#include "BLI_math.h"
-BokehImageOperation::BokehImageOperation() : NodeOperation()
+BokehImageOperation::BokehImageOperation()
{
this->addOutputSocket(COM_DT_COLOR);
this->m_deleteData = false;
@@ -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 c5f0108bf5a..662b08bdee9 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
@@ -20,13 +20,13 @@
#include "BLI_math.h"
#include "DNA_node_types.h"
-BoxMaskOperation::BoxMaskOperation() : NodeOperation()
+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 b6c22029899..3ae1b4aaef4 100644
--- a/source/blender/compositor/operations/COM_BrightnessOperation.cpp
+++ b/source/blender/compositor/operations/COM_BrightnessOperation.cpp
@@ -18,13 +18,13 @@
#include "COM_BrightnessOperation.h"
-BrightnessOperation::BrightnessOperation() : NodeOperation()
+BrightnessOperation::BrightnessOperation()
{
this->addInputSocket(COM_DT_COLOR);
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 ecd61e95f43..9ccf9d7f1ef 100644
--- a/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateMeanOperation.cpp
@@ -22,11 +22,11 @@
#include "IMB_colormanagement.h"
-CalculateMeanOperation::CalculateMeanOperation() : NodeOperation()
+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 059040d6f05..9ef77b9e5ea 100644
--- a/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
+++ b/source/blender/compositor/operations/COM_CalculateStandardDeviationOperation.cpp
@@ -23,7 +23,6 @@
#include "IMB_colormanagement.h"
CalculateStandardDeviationOperation::CalculateStandardDeviationOperation()
- : CalculateMeanOperation()
{
/* pass */
}
@@ -100,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 ddbc400777f..6bc9fa53c31 100644
--- a/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.cpp
@@ -18,14 +18,14 @@
#include "COM_ChangeHSVOperation.h"
-ChangeHSVOperation::ChangeHSVOperation() : NodeOperation()
+ChangeHSVOperation::ChangeHSVOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
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 cbd46ea71f8..956a2cc86ee 100644
--- a/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChannelMatteOperation.cpp
@@ -19,12 +19,12 @@
#include "COM_ChannelMatteOperation.h"
#include "BLI_math.h"
-ChannelMatteOperation::ChannelMatteOperation() : NodeOperation()
+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 62dc74d2092..389aeaf6fed 100644
--- a/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ChromaMatteOperation.cpp
@@ -19,14 +19,14 @@
#include "COM_ChromaMatteOperation.h"
#include "BLI_math.h"
-ChromaMatteOperation::ChromaMatteOperation() : NodeOperation()
+ChromaMatteOperation::ChromaMatteOperation()
{
addInputSocket(COM_DT_COLOR);
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 a515b9a6a67..f9eaaf6f7a0 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceASCCDLOperation.cpp
@@ -31,13 +31,13 @@ inline float colorbalance_cdl(float in, float offset, float power, float slope)
return powf(x, power);
}
-ColorBalanceASCCDLOperation::ColorBalanceASCCDLOperation() : NodeOperation()
+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 1578a805d1e..df44e87a86a 100644
--- a/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorBalanceLGGOperation.cpp
@@ -36,13 +36,13 @@ inline float colorbalance_lgg(float in, float lift_lgg, float gamma_inv, float g
return powf(srgb_to_linearrgb(x), gamma_inv);
}
-ColorBalanceLGGOperation::ColorBalanceLGGOperation() : NodeOperation()
+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 893c052831c..60343c28662 100644
--- a/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCorrectionOperation.cpp
@@ -21,13 +21,13 @@
#include "IMB_colormanagement.h"
-ColorCorrectionOperation::ColorCorrectionOperation() : NodeOperation()
+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 9d514c872f7..ed107a88953 100644
--- a/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorCurveOperation.cpp
@@ -22,7 +22,7 @@
#include "MEM_guardedalloc.h"
-ColorCurveOperation::ColorCurveOperation() : CurveBaseOperation()
+ColorCurveOperation::ColorCurveOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_COLOR);
@@ -30,10 +30,10 @@ ColorCurveOperation::ColorCurveOperation() : CurveBaseOperation()
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,22 +90,22 @@ 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
-ConstantLevelColorCurveOperation::ConstantLevelColorCurveOperation() : CurveBaseOperation()
+ConstantLevelColorCurveOperation::ConstantLevelColorCurveOperation()
{
this->addInputSocket(COM_DT_VALUE);
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 90b7f4a63b5..b8749bec4b8 100644
--- a/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorMatteOperation.cpp
@@ -19,14 +19,14 @@
#include "COM_ColorMatteOperation.h"
#include "BLI_math.h"
-ColorMatteOperation::ColorMatteOperation() : NodeOperation()
+ColorMatteOperation::ColorMatteOperation()
{
addInputSocket(COM_DT_COLOR);
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 95e0bd2d82b..4d62a293b78 100644
--- a/source/blender/compositor/operations/COM_ColorRampOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorRampOperation.cpp
@@ -20,13 +20,13 @@
#include "BKE_colorband.h"
-ColorRampOperation::ColorRampOperation() : NodeOperation()
+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 99ab6105934..050792d8dab 100644
--- a/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
+++ b/source/blender/compositor/operations/COM_ColorSpillOperation.cpp
@@ -20,14 +20,14 @@
#include "BLI_math.h"
#define AVG(a, b) ((a + b) / 2)
-ColorSpillOperation::ColorSpillOperation() : NodeOperation()
+ColorSpillOperation::ColorSpillOperation()
{
addInputSocket(COM_DT_COLOR);
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 8d55fe53aa7..6a16872cae2 100644
--- a/source/blender/compositor/operations/COM_CompositorOperation.cpp
+++ b/source/blender/compositor/operations/COM_CompositorOperation.cpp
@@ -25,32 +25,31 @@
#include "BLI_threads.h"
#include "RE_pipeline.h"
-#include "RE_render_ext.h"
-#include "RE_shader_ext.h"
+#include "RE_texture.h"
#include "render_types.h"
#include "PIL_time.h"
-CompositorOperation::CompositorOperation() : NodeOperation()
+CompositorOperation::CompositorOperation()
{
this->addInputSocket(COM_DT_COLOR);
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 +66,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 +85,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 +106,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 +125,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 6a4c5db856c..44468e04ae9 100644
--- a/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertColorProfileOperation.cpp
@@ -20,11 +20,11 @@
#include "IMB_imbuf.h"
-ConvertColorProfileOperation::ConvertColorProfileOperation() : NodeOperation()
+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 50f8eab5fbc..fe395ecae9e 100644
--- a/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvertDepthToRadiusOperation.cpp
@@ -21,15 +21,15 @@
#include "BLI_math.h"
#include "DNA_camera_types.h"
-ConvertDepthToRadiusOperation::ConvertDepthToRadiusOperation() : NodeOperation()
+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;
@@ -86,7 +86,7 @@ void ConvertDepthToRadiusOperation::executePixelSampled(float output[4],
if (z != 0.0f) {
float iZ = (1.0f / z);
- // bug #6656 part 2b, do not rescale
+ /* bug T6656 part 2b, do not re-scale. */
#if 0
bcrad = 0.5f * fabs(aperture * (dof_sp * (cam_invfdist - iZ) - 1.0f));
// scale crad back to original maximum and blend
@@ -94,8 +94,8 @@ void ConvertDepthToRadiusOperation::executePixelSampled(float output[4],
#endif
radius = 0.5f * fabsf(this->m_aperture *
(this->m_dof_sp * (this->m_inverseFocalDistance - iZ) - 1.0f));
- // 'bug' #6615, limit minimum radius to 1 pixel, not really a solution, but somewhat mitigates
- // the problem
+ /* 'bug' T6615, limit minimum radius to 1 pixel,
+ * not really a solution, but somewhat mitigates the problem. */
if (radius < 0.0f) {
radius = 0.0f;
}
@@ -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 0bd3f5b8796..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 ******** */
@@ -397,11 +397,11 @@ void ConvertStraightToPremulOperation::executePixelSampled(float output[4],
/* ******** Separate Channels ******** */
-SeparateChannelOperation::SeparateChannelOperation() : NodeOperation()
+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],
@@ -425,7 +425,7 @@ void SeparateChannelOperation::executePixelSampled(float output[4],
/* ******** Combine Channels ******** */
-CombineChannelsOperation::CombineChannelsOperation() : NodeOperation()
+CombineChannelsOperation::CombineChannelsOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
@@ -433,10 +433,10 @@ CombineChannelsOperation::CombineChannelsOperation() : NodeOperation()
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 1439c7abb45..1c2570cd251 100644
--- a/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionEdgeFilterOperation.cpp
@@ -19,7 +19,7 @@
#include "COM_ConvolutionEdgeFilterOperation.h"
#include "BLI_math.h"
-ConvolutionEdgeFilterOperation::ConvolutionEdgeFilterOperation() : ConvolutionFilterOperation()
+ConvolutionEdgeFilterOperation::ConvolutionEdgeFilterOperation()
{
/* pass */
}
@@ -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 3f47bfda618..7e35f6fb4f6 100644
--- a/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
+++ b/source/blender/compositor/operations/COM_ConvolutionFilterOperation.cpp
@@ -22,13 +22,13 @@
#include "MEM_guardedalloc.h"
-ConvolutionFilterOperation::ConvolutionFilterOperation() : NodeOperation()
+ConvolutionFilterOperation::ConvolutionFilterOperation()
{
this->addInputSocket(COM_DT_COLOR);
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 625490dd3ab..408f588871e 100644
--- a/source/blender/compositor/operations/COM_CropOperation.cpp
+++ b/source/blender/compositor/operations/COM_CropOperation.cpp
@@ -19,12 +19,12 @@
#include "COM_CropOperation.h"
#include "BLI_math.h"
-CropBaseOperation::CropBaseOperation() : NodeOperation()
+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_CryptomatteOperation.cpp b/source/blender/compositor/operations/COM_CryptomatteOperation.cpp
index 085db6a9dea..07466cdeccd 100644
--- a/source/blender/compositor/operations/COM_CryptomatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_CryptomatteOperation.cpp
@@ -18,7 +18,7 @@
#include "COM_CryptomatteOperation.h"
-CryptomatteOperation::CryptomatteOperation(size_t num_inputs) : NodeOperation()
+CryptomatteOperation::CryptomatteOperation(size_t num_inputs)
{
for (size_t i = 0; i < num_inputs; i++) {
this->addInputSocket(COM_DT_COLOR);
diff --git a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
index 855f728f7bf..b58efcf0cca 100644
--- a/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_CurveBaseOperation.cpp
@@ -20,16 +20,16 @@
#include "BKE_colortools.h"
-CurveBaseOperation::CurveBaseOperation() : NodeOperation()
+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,13 +41,13 @@ void CurveBaseOperation::deinitExecution()
{
if (this->m_curveMapping) {
BKE_curvemapping_free(this->m_curveMapping);
- this->m_curveMapping = NULL;
+ this->m_curveMapping = nullptr;
}
}
void CurveBaseOperation::setCurveMapping(CurveMapping *mapping)
{
- /* duplicate the curve to avoid glitches while drawing, see bug [#32374] */
+ /* duplicate the curve to avoid glitches while drawing, see bug T32374. */
if (this->m_curveMapping) {
BKE_curvemapping_free(this->m_curveMapping);
}
diff --git a/source/blender/compositor/operations/COM_DenoiseOperation.cpp b/source/blender/compositor/operations/COM_DenoiseOperation.cpp
index 4087056a79d..bc33e5f75c4 100644
--- a/source/blender/compositor/operations/COM_DenoiseOperation.cpp
+++ b/source/blender/compositor/operations/COM_DenoiseOperation.cpp
@@ -26,13 +26,13 @@ static pthread_mutex_t oidn_lock = BLI_MUTEX_INITIALIZER;
#endif
#include <iostream>
-DenoiseOperation::DenoiseOperation() : SingleThreadedOperation()
+DenoiseOperation::DenoiseOperation()
{
this->addInputSocket(COM_DT_COLOR);
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 9b8d72da26d..901445c6875 100644
--- a/source/blender/compositor/operations/COM_DespeckleOperation.cpp
+++ b/source/blender/compositor/operations/COM_DespeckleOperation.cpp
@@ -22,13 +22,13 @@
#include "BLI_utildefines.h"
-DespeckleOperation::DespeckleOperation() : NodeOperation()
+DespeckleOperation::DespeckleOperation()
{
this->addInputSocket(COM_DT_COLOR);
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 ea3526eb7e0..cca99a42c0c 100644
--- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp
@@ -19,14 +19,14 @@
#include "COM_DifferenceMatteOperation.h"
#include "BLI_math.h"
-DifferenceMatteOperation::DifferenceMatteOperation() : NodeOperation()
+DifferenceMatteOperation::DifferenceMatteOperation()
{
addInputSocket(COM_DT_COLOR);
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 52bc00e9b84..74f5fceacfb 100644
--- a/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
+++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cpp
@@ -23,12 +23,12 @@
#include "MEM_guardedalloc.h"
// DilateErode Distance Threshold
-DilateErodeThresholdOperation::DilateErodeThresholdOperation() : NodeOperation()
+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(
@@ -159,12 +159,12 @@ bool DilateErodeThresholdOperation::determineDependingAreaOfInterest(
}
// Dilate Distance
-DilateDistanceOperation::DilateDistanceOperation() : NodeOperation()
+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;
@@ -317,12 +317,12 @@ void ErodeDistanceOperation::executeOpenCL(OpenCLDevice *device,
}
// Dilate step
-DilateStepOperation::DilateStepOperation() : NodeOperation()
+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 31eb74fbc42..c0b9c9b6f1d 100644
--- a/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_DirectionalBlurOperation.cpp
@@ -23,14 +23,14 @@
#include "RE_pipeline.h"
-DirectionalBlurOperation::DirectionalBlurOperation() : NodeOperation()
+DirectionalBlurOperation::DirectionalBlurOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
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 73790447216..fcc8bc4670e 100644
--- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp
@@ -20,7 +20,7 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
-DisplaceOperation::DisplaceOperation() : NodeOperation()
+DisplaceOperation::DisplaceOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VECTOR);
@@ -29,10 +29,10 @@ DisplaceOperation::DisplaceOperation() : NodeOperation()
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 32eb5679d9d..bbc4d63305b 100644
--- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
+++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp
@@ -20,7 +20,7 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
-DisplaceSimpleOperation::DisplaceSimpleOperation() : NodeOperation()
+DisplaceSimpleOperation::DisplaceSimpleOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VECTOR);
@@ -28,10 +28,10 @@ DisplaceSimpleOperation::DisplaceSimpleOperation() : NodeOperation()
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 ff337455658..7d79dcc657d 100644
--- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cpp
@@ -19,14 +19,14 @@
#include "COM_DistanceRGBMatteOperation.h"
#include "BLI_math.h"
-DistanceRGBMatteOperation::DistanceRGBMatteOperation() : NodeOperation()
+DistanceRGBMatteOperation::DistanceRGBMatteOperation()
{
this->addInputSocket(COM_DT_COLOR);
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_DistanceYCCMatteOperation.cpp b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp
index 6ad1a7e440a..f333cc1ecd9 100644
--- a/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_DistanceYCCMatteOperation.cpp
@@ -19,7 +19,7 @@
#include "COM_DistanceYCCMatteOperation.h"
#include "BLI_math.h"
-DistanceYCCMatteOperation::DistanceYCCMatteOperation() : DistanceRGBMatteOperation()
+DistanceYCCMatteOperation::DistanceYCCMatteOperation()
{
/* pass */
}
diff --git a/source/blender/compositor/operations/COM_DotproductOperation.cpp b/source/blender/compositor/operations/COM_DotproductOperation.cpp
index da6ce510a25..750e4308d11 100644
--- a/source/blender/compositor/operations/COM_DotproductOperation.cpp
+++ b/source/blender/compositor/operations/COM_DotproductOperation.cpp
@@ -18,14 +18,14 @@
#include "COM_DotproductOperation.h"
-DotproductOperation::DotproductOperation() : NodeOperation()
+DotproductOperation::DotproductOperation()
{
this->addInputSocket(COM_DT_VECTOR);
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 675a402de6f..7ef0d7b7606 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.cpp
@@ -1029,7 +1029,7 @@ static void do_createEdgeLocationBuffer(unsigned int t,
/* set the accumulators to correct positions */ // set up some accumulator variables for loops
gradientAccum = gradientFillOffset; // each accumulator variable starts at its respective
innerAccum = *innerEdgeOffset; // section's offset so when we start filling, each
- outerAccum = *outerEdgeOffset; // section fills up it's allocated space in gbuf
+ outerAccum = *outerEdgeOffset; // section fills up its allocated space in gbuf
// uses dmin=row, rsl=col
for (x = 0, dmin = 0; x < t; x += rw, dmin++) {
for (rsl = 0; rsl < rw; rsl++) {
@@ -1088,7 +1088,7 @@ static void do_fillGradientBuffer(unsigned int rw,
*
* 1.) Loop through all gradient pixels.
* A.) For each gradient pixel:
- * a.) Loop though all outside edge pixels, looking for closest one
+ * a.) Loop through all outside edge pixels, looking for closest one
* to the gradient pixel we are in.
* b.) Loop through all inside edge pixels, looking for closest one
* to the gradient pixel we are in.
@@ -1306,13 +1306,13 @@ void DoubleEdgeMaskOperation::doDoubleEdgeMask(float *imask, float *omask, float
}
}
-DoubleEdgeMaskOperation::DoubleEdgeMaskOperation() : NodeOperation()
+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 0dc42b3457f..38541f91fc8 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
@@ -20,13 +20,13 @@
#include "BLI_math.h"
#include "DNA_node_types.h"
-EllipseMaskOperation::EllipseMaskOperation() : NodeOperation()
+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 0ccb959712f..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();
}
@@ -256,12 +256,12 @@ void FastGaussianBlurOperation::IIR_gauss(MemoryBuffer *src,
}
///
-FastGaussianBlurValueOperation::FastGaussianBlurValueOperation() : NodeOperation()
+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 57b686986b7..37eaf4868d3 100644
--- a/source/blender/compositor/operations/COM_FlipOperation.cpp
+++ b/source/blender/compositor/operations/COM_FlipOperation.cpp
@@ -18,12 +18,12 @@
#include "COM_FlipOperation.h"
-FlipOperation::FlipOperation() : NodeOperation()
+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 36272c05774..d67d67f8e57 100644
--- a/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaCorrectOperation.cpp
@@ -19,11 +19,11 @@
#include "COM_GammaCorrectOperation.h"
#include "BLI_math.h"
-GammaCorrectOperation::GammaCorrectOperation() : NodeOperation()
+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() : NodeOperation()
+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 ee6b42c349f..6baa52a290c 100644
--- a/source/blender/compositor/operations/COM_GammaOperation.cpp
+++ b/source/blender/compositor/operations/COM_GammaOperation.cpp
@@ -19,13 +19,13 @@
#include "COM_GammaOperation.h"
#include "BLI_math.h"
-GammaOperation::GammaOperation() : NodeOperation()
+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 278e65a7dfd..7b4d38fba3e 100644
--- a/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareBaseOperation.cpp
@@ -19,11 +19,11 @@
#include "COM_GlareBaseOperation.h"
#include "BLI_math.h"
-GlareBaseOperation::GlareBaseOperation() : SingleThreadedOperation()
+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_GlareFogGlowOperation.cpp b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
index 0087c720ac0..acc1dddacdd 100644
--- a/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareFogGlowOperation.cpp
@@ -25,7 +25,7 @@
typedef float fREAL;
-// returns next highest power of 2 of x, as well it's log2 in L2
+// returns next highest power of 2 of x, as well its log2 in L2
static unsigned int nextPow2(unsigned int x, unsigned int *L2)
{
unsigned int pw, x_notpow2 = x & (x - 1);
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
index d050d9b58a9..1a1922f828c 100644
--- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
+++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
@@ -21,11 +21,11 @@
#include "IMB_colormanagement.h"
-GlareThresholdOperation::GlareThresholdOperation() : NodeOperation()
+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 8292413f6f1..df30e75cf27 100644
--- a/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
+++ b/source/blender/compositor/operations/COM_HueSaturationValueCorrectOperation.cpp
@@ -22,12 +22,12 @@
#include "BKE_colortools.h"
-HueSaturationValueCorrectOperation::HueSaturationValueCorrectOperation() : CurveBaseOperation()
+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_IDMaskOperation.cpp b/source/blender/compositor/operations/COM_IDMaskOperation.cpp
index ef321157320..8113adb9bbc 100644
--- a/source/blender/compositor/operations/COM_IDMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_IDMaskOperation.cpp
@@ -18,7 +18,7 @@
#include "COM_IDMaskOperation.h"
-IDMaskOperation::IDMaskOperation() : NodeOperation()
+IDMaskOperation::IDMaskOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp
index 38d2fbf9ed4..ae5b7293a8c 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_ImageOperation.cpp
@@ -27,24 +27,24 @@
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
+
#include "RE_pipeline.h"
-#include "RE_render_ext.h"
-#include "RE_shader_ext.h"
+#include "RE_texture.h"
-BaseImageOperation::BaseImageOperation() : NodeOperation()
+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_ImageOperation.h b/source/blender/compositor/operations/COM_ImageOperation.h
index fcffdc7aae9..bff8dcc1cea 100644
--- a/source/blender/compositor/operations/COM_ImageOperation.h
+++ b/source/blender/compositor/operations/COM_ImageOperation.h
@@ -25,8 +25,7 @@
#include "MEM_guardedalloc.h"
#include "RE_pipeline.h"
-#include "RE_render_ext.h"
-#include "RE_shader_ext.h"
+#include "RE_texture.h"
/**
* \brief Base class for all image operations
diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cpp b/source/blender/compositor/operations/COM_InpaintOperation.cpp
index 0555ee24b9b..502b33d7e14 100644
--- a/source/blender/compositor/operations/COM_InpaintOperation.cpp
+++ b/source/blender/compositor/operations/COM_InpaintOperation.cpp
@@ -27,24 +27,24 @@
BLI_assert(x >= 0 && x < this->getWidth() && y >= 0 && y < this->getHeight())
// Inpaint (simple convolve using average of known pixels)
-InpaintSimpleOperation::InpaintSimpleOperation() : NodeOperation()
+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 bfd9d14a1ef..d9f436a3e28 100644
--- a/source/blender/compositor/operations/COM_InvertOperation.cpp
+++ b/source/blender/compositor/operations/COM_InvertOperation.cpp
@@ -18,13 +18,13 @@
#include "COM_InvertOperation.h"
-InvertOperation::InvertOperation() : NodeOperation()
+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_KeyingBlurOperation.cpp b/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
index 83dd90ef08b..72bf86facfb 100644
--- a/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingBlurOperation.cpp
@@ -23,7 +23,7 @@
#include "BLI_listbase.h"
#include "BLI_math.h"
-KeyingBlurOperation::KeyingBlurOperation() : NodeOperation()
+KeyingBlurOperation::KeyingBlurOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
diff --git a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
index eafd1e671f8..592f116c451 100644
--- a/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingClipOperation.cpp
@@ -23,7 +23,7 @@
#include "BLI_listbase.h"
#include "BLI_math.h"
-KeyingClipOperation::KeyingClipOperation() : NodeOperation()
+KeyingClipOperation::KeyingClipOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addOutputSocket(COM_DT_VALUE);
diff --git a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
index a1ba49a69b2..b9bb316462d 100644
--- a/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingDespillOperation.cpp
@@ -23,7 +23,7 @@
#include "BLI_listbase.h"
#include "BLI_math.h"
-KeyingDespillOperation::KeyingDespillOperation() : NodeOperation()
+KeyingDespillOperation::KeyingDespillOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_COLOR);
@@ -32,8 +32,8 @@ KeyingDespillOperation::KeyingDespillOperation() : NodeOperation()
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 50562143ce6..9ef4217d300 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp
@@ -39,7 +39,7 @@ static float get_pixel_saturation(const float pixelColor[4],
return (pixelColor[primary_channel] - val) * fabsf(1.0f - val);
}
-KeyingOperation::KeyingOperation() : NodeOperation()
+KeyingOperation::KeyingOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_COLOR);
@@ -47,8 +47,8 @@ KeyingOperation::KeyingOperation() : NodeOperation()
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 082091411fb..463a6fe49c0 100644
--- a/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingScreenOperation.cpp
@@ -30,10 +30,10 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-KeyingScreenOperation::KeyingScreenOperation() : NodeOperation()
+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() : NodeOperation()
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
new file mode 100644
index 00000000000..47daef8d190
--- /dev/null
+++ b/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.cpp
@@ -0,0 +1,55 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Copyright 2020, Blender Foundation.
+ */
+
+#include "COM_KeyingSetAlphaOperation.h"
+
+KeyingSetAlphaOperation::KeyingSetAlphaOperation()
+{
+ this->addInputSocket(COM_DT_COLOR);
+ this->addInputSocket(COM_DT_VALUE);
+ this->addOutputSocket(COM_DT_COLOR);
+
+ this->m_inputColor = nullptr;
+ this->m_inputAlpha = nullptr;
+}
+
+void KeyingSetAlphaOperation::initExecution()
+{
+ this->m_inputColor = getInputSocketReader(0);
+ this->m_inputAlpha = getInputSocketReader(1);
+}
+
+void KeyingSetAlphaOperation::executePixelSampled(float output[4],
+ float x,
+ float y,
+ PixelSampler sampler)
+{
+ float color_input[4];
+ float alpha_input[4];
+
+ this->m_inputColor->readSampled(color_input, x, y, sampler);
+ this->m_inputAlpha->readSampled(alpha_input, x, y, sampler);
+
+ mul_v4_v4fl(output, color_input, alpha_input[0]);
+}
+
+void KeyingSetAlphaOperation::deinitExecution()
+{
+ this->m_inputColor = nullptr;
+ this->m_inputAlpha = nullptr;
+}
diff --git a/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.h b/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.h
new file mode 100644
index 00000000000..b786240f215
--- /dev/null
+++ b/source/blender/compositor/operations/COM_KeyingSetAlphaOperation.h
@@ -0,0 +1,39 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Copyright 2020, Blender Foundation.
+ */
+
+#pragma once
+
+#include "COM_NodeOperation.h"
+
+/**
+ * Operation which is used by keying node to modify image's alpha channels.
+ * It keeps color properly pre-multiplied.
+ */
+class KeyingSetAlphaOperation : public NodeOperation {
+ private:
+ SocketReader *m_inputColor;
+ SocketReader *m_inputAlpha;
+
+ public:
+ KeyingSetAlphaOperation();
+
+ void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
+
+ void initExecution();
+ void deinitExecution();
+};
diff --git a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
index 936ac00a0e8..f7cc6e2d4de 100644
--- a/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
+++ b/source/blender/compositor/operations/COM_LuminanceMatteOperation.cpp
@@ -21,12 +21,12 @@
#include "IMB_colormanagement.h"
-LuminanceMatteOperation::LuminanceMatteOperation() : NodeOperation()
+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 ff5804a63a4..95b3c27ac2f 100644
--- a/source/blender/compositor/operations/COM_MapRangeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapRangeOperation.cpp
@@ -18,7 +18,7 @@
#include "COM_MapRangeOperation.h"
-MapRangeOperation::MapRangeOperation() : NodeOperation()
+MapRangeOperation::MapRangeOperation()
{
this->addInputSocket(COM_DT_VALUE);
this->addInputSocket(COM_DT_VALUE);
@@ -26,7 +26,7 @@ MapRangeOperation::MapRangeOperation() : NodeOperation()
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 9101b82202a..32ab63ae028 100644
--- a/source/blender/compositor/operations/COM_MapUVOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp
@@ -19,7 +19,7 @@
#include "COM_MapUVOperation.h"
#include "BLI_math.h"
-MapUVOperation::MapUVOperation() : NodeOperation()
+MapUVOperation::MapUVOperation()
{
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE);
this->addInputSocket(COM_DT_VECTOR);
@@ -28,8 +28,8 @@ MapUVOperation::MapUVOperation() : NodeOperation()
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 45104d11210..7f2044b9139 100644
--- a/source/blender/compositor/operations/COM_MapValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_MapValueOperation.cpp
@@ -18,11 +18,11 @@
#include "COM_MapValueOperation.h"
-MapValueOperation::MapValueOperation() : NodeOperation()
+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 bdc954ac081..ab908590c55 100644
--- a/source/blender/compositor/operations/COM_MaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_MaskOperation.cpp
@@ -23,12 +23,13 @@
#include "BLI_listbase.h"
#include "BLI_math.h"
+#include "BKE_lib_id.h"
#include "BKE_mask.h"
-MaskOperation::MaskOperation() : NodeOperation()
+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;
@@ -41,7 +42,7 @@ MaskOperation::MaskOperation() : NodeOperation()
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();
@@ -59,9 +60,8 @@ void MaskOperation::initExecution()
const float frame_step = (this->m_frame_shutter * 2.0f) / this->m_rasterMaskHandleTot;
float frame_iter = frame;
- Mask *mask_temp;
-
- mask_temp = BKE_mask_copy_nolib(this->m_mask);
+ Mask *mask_temp = (Mask *)BKE_id_copy_ex(
+ 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,8 +92,7 @@ void MaskOperation::initExecution()
frame_iter += frame_step;
}
- BKE_mask_free(mask_temp);
- MEM_freeN(mask_temp);
+ BKE_id_free(nullptr, &mask_temp->id);
}
}
}
@@ -103,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 1363b75433a..edd5bb6d139 100644
--- a/source/blender/compositor/operations/COM_MathBaseOperation.cpp
+++ b/source/blender/compositor/operations/COM_MathBaseOperation.cpp
@@ -20,15 +20,15 @@
#include "BLI_math.h"
-MathBaseOperation::MathBaseOperation() : NodeOperation()
+MathBaseOperation::MathBaseOperation()
{
this->addInputSocket(COM_DT_VALUE);
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 371da20044f..948e69bf8eb 100644
--- a/source/blender/compositor/operations/COM_MixOperation.cpp
+++ b/source/blender/compositor/operations/COM_MixOperation.cpp
@@ -22,15 +22,15 @@
/* ******** Mix Base Operation ******** */
-MixBaseOperation::MixBaseOperation() : NodeOperation()
+MixBaseOperation::MixBaseOperation()
{
this->addInputSocket(COM_DT_VALUE);
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,14 +90,14 @@ 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 ******** */
-MixAddOperation::MixAddOperation() : MixBaseOperation()
+MixAddOperation::MixAddOperation()
{
/* pass */
}
@@ -126,7 +126,7 @@ void MixAddOperation::executePixelSampled(float output[4], float x, float y, Pix
/* ******** Mix Blend Operation ******** */
-MixBlendOperation::MixBlendOperation() : MixBaseOperation()
+MixBlendOperation::MixBlendOperation()
{
/* pass */
}
@@ -160,7 +160,7 @@ void MixBlendOperation::executePixelSampled(float output[4],
/* ******** Mix Burn Operation ******** */
-MixColorBurnOperation::MixColorBurnOperation() : MixBaseOperation()
+MixColorBurnOperation::MixColorBurnOperation()
{
/* pass */
}
@@ -243,7 +243,7 @@ void MixColorBurnOperation::executePixelSampled(float output[4],
/* ******** Mix Color Operation ******** */
-MixColorOperation::MixColorOperation() : MixBaseOperation()
+MixColorOperation::MixColorOperation()
{
/* pass */
}
@@ -288,7 +288,7 @@ void MixColorOperation::executePixelSampled(float output[4],
/* ******** Mix Darken Operation ******** */
-MixDarkenOperation::MixDarkenOperation() : MixBaseOperation()
+MixDarkenOperation::MixDarkenOperation()
{
/* pass */
}
@@ -321,7 +321,7 @@ void MixDarkenOperation::executePixelSampled(float output[4],
/* ******** Mix Difference Operation ******** */
-MixDifferenceOperation::MixDifferenceOperation() : MixBaseOperation()
+MixDifferenceOperation::MixDifferenceOperation()
{
/* pass */
}
@@ -354,7 +354,7 @@ void MixDifferenceOperation::executePixelSampled(float output[4],
/* ******** Mix Difference Operation ******** */
-MixDivideOperation::MixDivideOperation() : MixBaseOperation()
+MixDivideOperation::MixDivideOperation()
{
/* pass */
}
@@ -404,7 +404,7 @@ void MixDivideOperation::executePixelSampled(float output[4],
/* ******** Mix Dodge Operation ******** */
-MixDodgeOperation::MixDodgeOperation() : MixBaseOperation()
+MixDodgeOperation::MixDodgeOperation()
{
/* pass */
}
@@ -492,7 +492,7 @@ void MixDodgeOperation::executePixelSampled(float output[4],
/* ******** Mix Glare Operation ******** */
-MixGlareOperation::MixGlareOperation() : MixBaseOperation()
+MixGlareOperation::MixGlareOperation()
{
/* pass */
}
@@ -533,7 +533,7 @@ void MixGlareOperation::executePixelSampled(float output[4],
/* ******** Mix Hue Operation ******** */
-MixHueOperation::MixHueOperation() : MixBaseOperation()
+MixHueOperation::MixHueOperation()
{
/* pass */
}
@@ -575,7 +575,7 @@ void MixHueOperation::executePixelSampled(float output[4], float x, float y, Pix
/* ******** Mix Lighten Operation ******** */
-MixLightenOperation::MixLightenOperation() : MixBaseOperation()
+MixLightenOperation::MixLightenOperation()
{
/* pass */
}
@@ -626,7 +626,7 @@ void MixLightenOperation::executePixelSampled(float output[4],
/* ******** Mix Linear Light Operation ******** */
-MixLinearLightOperation::MixLinearLightOperation() : MixBaseOperation()
+MixLinearLightOperation::MixLinearLightOperation()
{
/* pass */
}
@@ -674,7 +674,7 @@ void MixLinearLightOperation::executePixelSampled(float output[4],
/* ******** Mix Multiply Operation ******** */
-MixMultiplyOperation::MixMultiplyOperation() : MixBaseOperation()
+MixMultiplyOperation::MixMultiplyOperation()
{
/* pass */
}
@@ -707,7 +707,7 @@ void MixMultiplyOperation::executePixelSampled(float output[4],
/* ******** Mix Ovelray Operation ******** */
-MixOverlayOperation::MixOverlayOperation() : MixBaseOperation()
+MixOverlayOperation::MixOverlayOperation()
{
/* pass */
}
@@ -757,7 +757,7 @@ void MixOverlayOperation::executePixelSampled(float output[4],
/* ******** Mix Saturation Operation ******** */
-MixSaturationOperation::MixSaturationOperation() : MixBaseOperation()
+MixSaturationOperation::MixSaturationOperation()
{
/* pass */
}
@@ -799,7 +799,7 @@ void MixSaturationOperation::executePixelSampled(float output[4],
/* ******** Mix Screen Operation ******** */
-MixScreenOperation::MixScreenOperation() : MixBaseOperation()
+MixScreenOperation::MixScreenOperation()
{
/* pass */
}
@@ -833,7 +833,7 @@ void MixScreenOperation::executePixelSampled(float output[4],
/* ******** Mix Soft Light Operation ******** */
-MixSoftLightOperation::MixSoftLightOperation() : MixBaseOperation()
+MixSoftLightOperation::MixSoftLightOperation()
{
/* pass */
}
@@ -879,7 +879,7 @@ void MixSoftLightOperation::executePixelSampled(float output[4],
/* ******** Mix Subtract Operation ******** */
-MixSubtractOperation::MixSubtractOperation() : MixBaseOperation()
+MixSubtractOperation::MixSubtractOperation()
{
/* pass */
}
@@ -911,7 +911,7 @@ void MixSubtractOperation::executePixelSampled(float output[4],
/* ******** Mix Value Operation ******** */
-MixValueOperation::MixValueOperation() : MixBaseOperation()
+MixValueOperation::MixValueOperation()
{
/* pass */
}
diff --git a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
index 34773a1e4f8..725aacc7d34 100644
--- a/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipAttributeOperation.cpp
@@ -21,7 +21,7 @@
#include "BKE_movieclip.h"
#include "BKE_tracking.h"
-MovieClipAttributeOperation::MovieClipAttributeOperation() : NodeOperation()
+MovieClipAttributeOperation::MovieClipAttributeOperation()
{
this->addOutputSocket(COM_DT_VALUE);
this->m_framenumber = 0;
@@ -31,7 +31,7 @@ MovieClipAttributeOperation::MovieClipAttributeOperation() : NodeOperation()
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 17794ae879e..4f819bf27af 100644
--- a/source/blender/compositor/operations/COM_MovieClipOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieClipOperation.cpp
@@ -26,11 +26,11 @@
#include "IMB_imbuf.h"
-MovieClipBaseOperation::MovieClipBaseOperation() : NodeOperation()
+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 67491d51547..5031d590720 100644
--- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cpp
@@ -23,13 +23,13 @@
#include "BLI_linklist.h"
-MovieDistortionOperation::MovieDistortionOperation(bool distortion) : NodeOperation()
+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 8878b05ade7..023538ee5b1 100644
--- a/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_MultilayerImageOperation.cpp
@@ -21,7 +21,7 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-MultilayerBaseOperation::MultilayerBaseOperation(int passindex, int view) : BaseImageOperation()
+MultilayerBaseOperation::MultilayerBaseOperation(int passindex, int view)
{
this->m_passId = passindex;
this->m_view = view;
@@ -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 55faa480b83..a8448685332 100644
--- a/source/blender/compositor/operations/COM_NormalizeOperation.cpp
+++ b/source/blender/compositor/operations/COM_NormalizeOperation.cpp
@@ -18,12 +18,12 @@
#include "COM_NormalizeOperation.h"
-NormalizeOperation::NormalizeOperation() : NodeOperation()
+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..f7fabfb9572 100644
--- a/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
@@ -76,15 +76,15 @@ 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) ==
- 0) {
+ 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..c5623fdbd37 100644
--- a/source/blender/compositor/operations/COM_OutputFileOperation.cpp
+++ b/source/blender/compositor/operations/COM_OutputFileOperation.cpp
@@ -48,25 +48,55 @@ 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);
- IMB_exr_add_channel(
- exrhandle, layerName, "Y", viewName, 3, 3 * width, buf ? buf + 1 : NULL, use_half_float);
- IMB_exr_add_channel(
- exrhandle, layerName, "Z", viewName, 3, 3 * width, buf ? buf + 2 : 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 : nullptr,
+ use_half_float);
+ IMB_exr_add_channel(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);
- IMB_exr_add_channel(
- exrhandle, layerName, "G", viewName, 4, 4 * width, buf ? buf + 1 : NULL, use_half_float);
- IMB_exr_add_channel(
- exrhandle, layerName, "B", viewName, 4, 4 * width, buf ? buf + 2 : NULL, use_half_float);
- IMB_exr_add_channel(
- exrhandle, layerName, "A", viewName, 4, 4 * width, buf ? buf + 3 : 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 : nullptr,
+ use_half_float);
+ IMB_exr_add_channel(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 : nullptr,
+ use_half_float);
break;
default:
break;
@@ -82,7 +112,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 +160,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 +217,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 +282,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 +295,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 +386,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 +399,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 18e691d3c34..0d810c80ab4 100644
--- a/source/blender/compositor/operations/COM_PixelateOperation.cpp
+++ b/source/blender/compositor/operations/COM_PixelateOperation.cpp
@@ -18,12 +18,12 @@
#include "COM_PixelateOperation.h"
-PixelateOperation::PixelateOperation(DataType datatype) : NodeOperation()
+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_PlaneCornerPinOperation.cpp b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp
index eae576ceb56..d4f2ca7bbe8 100644
--- a/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneCornerPinOperation.cpp
@@ -87,8 +87,7 @@ static void readCornersFromSockets(rcti *rect, SocketReader *readers[4], float c
/* ******** PlaneCornerPinMaskOperation ******** */
-PlaneCornerPinMaskOperation::PlaneCornerPinMaskOperation()
- : PlaneDistortMaskOperation(), m_corners_ready(false)
+PlaneCornerPinMaskOperation::PlaneCornerPinMaskOperation() : m_corners_ready(false)
{
addInputSocket(COM_DT_VECTOR);
addInputSocket(COM_DT_VECTOR);
@@ -152,8 +151,7 @@ void PlaneCornerPinMaskOperation::determineResolution(unsigned int resolution[2]
/* ******** PlaneCornerPinWarpImageOperation ******** */
-PlaneCornerPinWarpImageOperation::PlaneCornerPinWarpImageOperation()
- : PlaneDistortWarpImageOperation(), m_corners_ready(false)
+PlaneCornerPinWarpImageOperation::PlaneCornerPinWarpImageOperation() : m_corners_ready(false)
{
addInputSocket(COM_DT_VECTOR);
addInputSocket(COM_DT_VECTOR);
diff --git a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
index e7574e80c2f..c395f795a22 100644
--- a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
+++ b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cpp
@@ -44,11 +44,11 @@ BLI_INLINE void warpCoord(float x, float y, float matrix[3][3], float uv[2], flo
deriv[1][1] = (matrix[1][1] - matrix[1][2] * uv[1]) / vec[2];
}
-PlaneDistortWarpImageOperation::PlaneDistortWarpImageOperation() : NodeOperation()
+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],
@@ -145,7 +145,7 @@ bool PlaneDistortWarpImageOperation::determineDependingAreaOfInterest(
/* ******** PlaneDistort Mask ******** */
-PlaneDistortMaskOperation::PlaneDistortMaskOperation() : NodeOperation()
+PlaneDistortMaskOperation::PlaneDistortMaskOperation()
{
addOutputSocket(COM_DT_VALUE);
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_PlaneTrackOperation.h b/source/blender/compositor/operations/COM_PlaneTrackOperation.h
index fc0a0873d5f..fc325c7db7d 100644
--- a/source/blender/compositor/operations/COM_PlaneTrackOperation.h
+++ b/source/blender/compositor/operations/COM_PlaneTrackOperation.h
@@ -64,7 +64,7 @@ class PlaneTrackCommon {
class PlaneTrackMaskOperation : public PlaneDistortMaskOperation, public PlaneTrackCommon {
public:
- PlaneTrackMaskOperation() : PlaneDistortMaskOperation(), PlaneTrackCommon()
+ PlaneTrackMaskOperation()
{
}
@@ -82,7 +82,7 @@ class PlaneTrackMaskOperation : public PlaneDistortMaskOperation, public PlaneTr
class PlaneTrackWarpImageOperation : public PlaneDistortWarpImageOperation,
public PlaneTrackCommon {
public:
- PlaneTrackWarpImageOperation() : PlaneDistortWarpImageOperation(), PlaneTrackCommon()
+ PlaneTrackWarpImageOperation() : PlaneTrackCommon()
{
}
diff --git a/source/blender/compositor/operations/COM_PreviewOperation.cpp b/source/blender/compositor/operations/COM_PreviewOperation.cpp
index 43d20271141..063421f6525 100644
--- a/source/blender/compositor/operations/COM_PreviewOperation.cpp
+++ b/source/blender/compositor/operations/COM_PreviewOperation.cpp
@@ -35,12 +35,12 @@
PreviewOperation::PreviewOperation(const ColorManagedViewSettings *viewSettings,
const ColorManagedDisplaySettings *displaySettings)
- : NodeOperation()
+
{
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 32933f1b966..7d459b76cb9 100644
--- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
@@ -20,13 +20,13 @@
#include "BLI_math.h"
#include "BLI_utildefines.h"
-ProjectorLensDistortionOperation::ProjectorLensDistortionOperation() : NodeOperation()
+ProjectorLensDistortionOperation::ProjectorLensDistortionOperation()
{
this->addInputSocket(COM_DT_COLOR);
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 70aaab560cd..2977e6685d2 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.cpp
@@ -20,12 +20,12 @@
#include "COM_WriteBufferOperation.h"
#include "COM_defines.h"
-ReadBufferOperation::ReadBufferOperation(DataType datatype) : NodeOperation()
+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,12 +36,12 @@ 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);
- /// \todo: may not occur!, but does with blur node
+ /** \todo: may not occur!, but does with blur node */
if (this->m_memoryProxy->getExecutor()) {
this->m_memoryProxy->getExecutor()->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 c8a68c70c4d..11f64aa4d6a 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -23,18 +23,17 @@
#include "DNA_scene_types.h"
#include "RE_pipeline.h"
-#include "RE_render_ext.h"
-#include "RE_shader_ext.h"
+#include "RE_texture.h"
/* ******** Render Layers Base Prog ******** */
RenderLayersProg::RenderLayersProg(const char *passName, DataType type, int elementsize)
- : NodeOperation(), m_passName(passName)
+ : 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 +41,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 +61,7 @@ void RenderLayersProg::initExecution()
}
if (re) {
RE_ReleaseResult(re);
- re = NULL;
+ re = nullptr;
}
}
@@ -157,7 +156,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 +176,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 +216,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 +233,7 @@ void RenderLayersAlphaProg::executePixelSampled(float output[4],
{
float *inputBuffer = this->getInputBuffer();
- if (inputBuffer == NULL) {
+ if (inputBuffer == nullptr) {
output[0] = 0.0f;
}
else {
@@ -254,7 +253,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 3ccf36cec2c..7a21e960c13 100644
--- a/source/blender/compositor/operations/COM_RotateOperation.cpp
+++ b/source/blender/compositor/operations/COM_RotateOperation.cpp
@@ -19,14 +19,14 @@
#include "COM_RotateOperation.h"
#include "BLI_math.h"
-RotateOperation::RotateOperation() : NodeOperation()
+RotateOperation::RotateOperation()
{
this->addInputSocket(COM_DT_COLOR);
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 b7731a34c91..158ffd4a8c0 100644
--- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
+++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp
@@ -24,14 +24,14 @@
#include "PIL_time.h"
-ScreenLensDistortionOperation::ScreenLensDistortionOperation() : NodeOperation()
+ScreenLensDistortionOperation::ScreenLensDistortionOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
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 68c165411b2..bf8fbacbfe1 100644
--- a/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetAlphaOperation.cpp
@@ -18,14 +18,14 @@
#include "COM_SetAlphaOperation.h"
-SetAlphaOperation::SetAlphaOperation() : NodeOperation()
+SetAlphaOperation::SetAlphaOperation()
{
this->addInputSocket(COM_DT_COLOR);
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_SetColorOperation.cpp b/source/blender/compositor/operations/COM_SetColorOperation.cpp
index 58bfcb44afd..ffbc20fde9c 100644
--- a/source/blender/compositor/operations/COM_SetColorOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetColorOperation.cpp
@@ -18,7 +18,7 @@
#include "COM_SetColorOperation.h"
-SetColorOperation::SetColorOperation() : NodeOperation()
+SetColorOperation::SetColorOperation()
{
this->addOutputSocket(COM_DT_COLOR);
}
diff --git a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
index f3b3ed217f9..942d717d19c 100644
--- a/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetSamplerOperation.cpp
@@ -18,7 +18,7 @@
#include "COM_SetSamplerOperation.h"
-SetSamplerOperation::SetSamplerOperation() : NodeOperation()
+SetSamplerOperation::SetSamplerOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
@@ -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_SetValueOperation.cpp b/source/blender/compositor/operations/COM_SetValueOperation.cpp
index e49b6941f49..d72a2dfe23d 100644
--- a/source/blender/compositor/operations/COM_SetValueOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetValueOperation.cpp
@@ -18,7 +18,7 @@
#include "COM_SetValueOperation.h"
-SetValueOperation::SetValueOperation() : NodeOperation()
+SetValueOperation::SetValueOperation()
{
this->addOutputSocket(COM_DT_VALUE);
}
diff --git a/source/blender/compositor/operations/COM_SetVectorOperation.cpp b/source/blender/compositor/operations/COM_SetVectorOperation.cpp
index d3a0329c9b9..a0341dbc4df 100644
--- a/source/blender/compositor/operations/COM_SetVectorOperation.cpp
+++ b/source/blender/compositor/operations/COM_SetVectorOperation.cpp
@@ -19,7 +19,7 @@
#include "COM_SetVectorOperation.h"
#include "COM_defines.h"
-SetVectorOperation::SetVectorOperation() : NodeOperation()
+SetVectorOperation::SetVectorOperation()
{
this->addOutputSocket(COM_DT_VECTOR);
}
diff --git a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
index 2d54d6ae45d..baeb2f44303 100644
--- a/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
+++ b/source/blender/compositor/operations/COM_SocketProxyOperation.cpp
@@ -19,7 +19,7 @@
#include "COM_SocketProxyOperation.h"
SocketProxyOperation::SocketProxyOperation(DataType type, bool use_conversion)
- : NodeOperation(), m_use_conversion(use_conversion)
+ : m_use_conversion(use_conversion)
{
this->addInputSocket(type);
this->addOutputSocket(type);
diff --git a/source/blender/compositor/operations/COM_SplitOperation.cpp b/source/blender/compositor/operations/COM_SplitOperation.cpp
index 3eddf033cf4..fb6214c7522 100644
--- a/source/blender/compositor/operations/COM_SplitOperation.cpp
+++ b/source/blender/compositor/operations/COM_SplitOperation.cpp
@@ -27,13 +27,13 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-SplitOperation::SplitOperation() : NodeOperation()
+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 4a7139537c1..7cfa4de7a61 100644
--- a/source/blender/compositor/operations/COM_SunBeamsOperation.cpp
+++ b/source/blender/compositor/operations/COM_SunBeamsOperation.cpp
@@ -19,7 +19,7 @@
#include "COM_SunBeamsOperation.h"
-SunBeamsOperation::SunBeamsOperation() : NodeOperation()
+SunBeamsOperation::SunBeamsOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addOutputSocket(COM_DT_COLOR);
@@ -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 07316280bbc..e66cd57cb3f 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.cpp
+++ b/source/blender/compositor/operations/COM_TextureOperation.cpp
@@ -25,15 +25,15 @@
#include "BLI_listbase.h"
#include "BLI_threads.h"
-TextureBaseOperation::TextureBaseOperation() : NodeOperation()
+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,20 @@ 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 +100,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 +115,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;
}
@@ -127,8 +128,16 @@ void TextureBaseOperation::executePixelSampled(float output[4],
vec[2] = textureSize[2] * textureOffset[2];
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);
+ retval = multitex_ext(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_TextureOperation.h b/source/blender/compositor/operations/COM_TextureOperation.h
index 7fa85922b0b..a40dafd14cf 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.h
+++ b/source/blender/compositor/operations/COM_TextureOperation.h
@@ -24,8 +24,7 @@
#include "MEM_guardedalloc.h"
#include "RE_pipeline.h"
-#include "RE_render_ext.h"
-#include "RE_shader_ext.h"
+#include "RE_texture.h"
/**
* Base class for all renderlayeroperations
diff --git a/source/blender/compositor/operations/COM_TonemapOperation.cpp b/source/blender/compositor/operations/COM_TonemapOperation.cpp
index 59354ff7581..cb0fc747dcb 100644
--- a/source/blender/compositor/operations/COM_TonemapOperation.cpp
+++ b/source/blender/compositor/operations/COM_TonemapOperation.cpp
@@ -22,13 +22,13 @@
#include "IMB_colormanagement.h"
-TonemapOperation::TonemapOperation() : NodeOperation()
+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 5c4f3b99f58..ddabfb7cf6c 100644
--- a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
+++ b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
@@ -28,10 +28,10 @@
#include "BKE_node.h"
#include "BKE_tracking.h"
-TrackPositionOperation::TrackPositionOperation() : NodeOperation()
+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() : NodeOperation()
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 b45e6a2b6a1..286004cd49b 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.cpp
+++ b/source/blender/compositor/operations/COM_TranslateOperation.cpp
@@ -18,16 +18,16 @@
#include "COM_TranslateOperation.h"
-TranslateOperation::TranslateOperation() : NodeOperation()
+TranslateOperation::TranslateOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
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 057dc553f7f..414b5bd980a 100644
--- a/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VariableSizeBokehBlurOperation.cpp
@@ -22,7 +22,7 @@
#include "RE_pipeline.h"
-VariableSizeBokehBlurOperation::VariableSizeBokehBlurOperation() : NodeOperation()
+VariableSizeBokehBlurOperation::VariableSizeBokehBlurOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_COLOR, COM_SC_NO_RESIZE); // do not resize the bokeh image.
@@ -35,9 +35,9 @@ VariableSizeBokehBlurOperation::VariableSizeBokehBlurOperation() : NodeOperation
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
@@ -276,7 +276,7 @@ bool VariableSizeBokehBlurOperation::determineDependingAreaOfInterest(
#ifdef COM_DEFOCUS_SEARCH
// InverseSearchRadiusOperation
-InverseSearchRadiusOperation::InverseSearchRadiusOperation() : NodeOperation()
+InverseSearchRadiusOperation::InverseSearchRadiusOperation()
{
this->addInputSocket(COM_DT_VALUE, COM_SC_NO_RESIZE); // radius
this->addOutputSocket(COM_DT_COLOR);
diff --git a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
index 1e392b1f991..0776c97563e 100644
--- a/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorBlurOperation.cpp
@@ -43,17 +43,17 @@ void zbuf_free_span(ZSpan *zspan);
void antialias_tagbuf(int xsize, int ysize, char *rectmove);
/* VectorBlurOperation */
-VectorBlurOperation::VectorBlurOperation() : NodeOperation()
+VectorBlurOperation::VectorBlurOperation()
{
this->addInputSocket(COM_DT_COLOR);
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;
@@ -747,7 +747,7 @@ void zbuf_accumulate_vecblur(NodeBlurData *nbd,
float blendfac, ipodata[4];
/* clear zbuf, if we draw future we fill in not moving pixels */
- if (0) {
+ if (false) {
for (x = xsize * ysize - 1; x >= 0; x--) {
rectz[x] = 10e16;
}
@@ -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 61312355a39..a883237f870 100644
--- a/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
+++ b/source/blender/compositor/operations/COM_VectorCurveOperation.cpp
@@ -20,12 +20,12 @@
#include "BKE_colortools.h"
-VectorCurveOperation::VectorCurveOperation() : CurveBaseOperation()
+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 e1d891559a7..025dde8e866 100644
--- a/source/blender/compositor/operations/COM_ViewerOperation.cpp
+++ b/source/blender/compositor/operations/COM_ViewerOperation.cpp
@@ -32,27 +32,27 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
-ViewerOperation::ViewerOperation() : NodeOperation()
+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_WrapOperation.cpp b/source/blender/compositor/operations/COM_WrapOperation.cpp
index 952f69c3787..7f7c1b7b639 100644
--- a/source/blender/compositor/operations/COM_WrapOperation.cpp
+++ b/source/blender/compositor/operations/COM_WrapOperation.cpp
@@ -89,7 +89,7 @@ bool WrapOperation::determineDependingAreaOfInterest(rcti *input,
newInput.ymin = input->ymin;
newInput.ymax = input->ymax;
- if (m_wrappingType == CMP_NODE_WRAP_X || m_wrappingType == CMP_NODE_WRAP_XY) {
+ if (ELEM(m_wrappingType, CMP_NODE_WRAP_X, CMP_NODE_WRAP_XY)) {
// wrap only on the x-axis if tile is wrapping
newInput.xmin = getWrappedOriginalXPos(input->xmin);
newInput.xmax = roundf(getWrappedOriginalXPos(input->xmax));
@@ -98,7 +98,7 @@ bool WrapOperation::determineDependingAreaOfInterest(rcti *input,
newInput.xmax = this->getWidth();
}
}
- if (m_wrappingType == CMP_NODE_WRAP_Y || m_wrappingType == CMP_NODE_WRAP_XY) {
+ if (ELEM(m_wrappingType, CMP_NODE_WRAP_Y, CMP_NODE_WRAP_XY)) {
// wrap only on the y-axis if tile is wrapping
newInput.ymin = getWrappedOriginalYPos(input->ymin);
newInput.ymax = roundf(getWrappedOriginalYPos(input->ymax));
diff --git a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
index 640e3e3d381..574978e5a5f 100644
--- a/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
+++ b/source/blender/compositor/operations/COM_WriteBufferOperation.cpp
@@ -21,18 +21,18 @@
#include "COM_defines.h"
#include <stdio.h>
-WriteBufferOperation::WriteBufferOperation(DataType datatype) : NodeOperation()
+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 767280e2cd2..22a37a4583e 100644
--- a/source/blender/compositor/operations/COM_ZCombineOperation.cpp
+++ b/source/blender/compositor/operations/COM_ZCombineOperation.cpp
@@ -19,7 +19,7 @@
#include "COM_ZCombineOperation.h"
#include "BLI_utildefines.h"
-ZCombineOperation::ZCombineOperation() : NodeOperation()
+ZCombineOperation::ZCombineOperation()
{
this->addInputSocket(COM_DT_COLOR);
this->addInputSocket(COM_DT_VALUE);
@@ -27,10 +27,10 @@ ZCombineOperation::ZCombineOperation() : NodeOperation()
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,23 +88,23 @@ 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
-ZCombineMaskOperation::ZCombineMaskOperation() : NodeOperation()
+ZCombineMaskOperation::ZCombineMaskOperation()
{
this->addInputSocket(COM_DT_VALUE); // mask
this->addInputSocket(COM_DT_COLOR);
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;
}