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:
authorManuel Castilla <manzanillawork@gmail.com>2021-10-14 00:01:15 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-10-14 00:41:14 +0300
commit1c42d4930a24d639b3aa561b9a8b4bbce05977e0 (patch)
tree68c2aae3fd5ae98b78708bea28c0b55d3f4fb5f0 /source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cc
parenta2ee3c3a9f01f5cb2f05f1e84a1b6c1931d9d4a4 (diff)
Cleanup: convert camelCase naming to snake_case in Compositor
To convert old code to the current convention and use a single code style.
Diffstat (limited to 'source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cc50
1 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cc b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cc
index e076bf4ae7d..95593d7d49f 100644
--- a/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cc
+++ b/source/blender/compositor/operations/COM_DistanceRGBMatteOperation.cc
@@ -22,39 +22,39 @@ namespace blender::compositor {
DistanceRGBMatteOperation::DistanceRGBMatteOperation()
{
- this->addInputSocket(DataType::Color);
- this->addInputSocket(DataType::Color);
- this->addOutputSocket(DataType::Value);
+ this->add_input_socket(DataType::Color);
+ this->add_input_socket(DataType::Color);
+ this->add_output_socket(DataType::Value);
- inputImageProgram_ = nullptr;
- inputKeyProgram_ = nullptr;
+ input_image_program_ = nullptr;
+ input_key_program_ = nullptr;
flags.can_be_constant = true;
}
-void DistanceRGBMatteOperation::initExecution()
+void DistanceRGBMatteOperation::init_execution()
{
- inputImageProgram_ = this->getInputSocketReader(0);
- inputKeyProgram_ = this->getInputSocketReader(1);
+ input_image_program_ = this->get_input_socket_reader(0);
+ input_key_program_ = this->get_input_socket_reader(1);
}
-void DistanceRGBMatteOperation::deinitExecution()
+void DistanceRGBMatteOperation::deinit_execution()
{
- inputImageProgram_ = nullptr;
- inputKeyProgram_ = nullptr;
+ input_image_program_ = nullptr;
+ input_key_program_ = nullptr;
}
-float DistanceRGBMatteOperation::calculateDistance(const float key[4], const float image[4])
+float DistanceRGBMatteOperation::calculate_distance(const float key[4], const float image[4])
{
return len_v3v3(key, image);
}
-void DistanceRGBMatteOperation::executePixelSampled(float output[4],
- float x,
- float y,
- PixelSampler sampler)
+void DistanceRGBMatteOperation::execute_pixel_sampled(float output[4],
+ float x,
+ float y,
+ PixelSampler sampler)
{
- float inKey[4];
- float inImage[4];
+ float in_key[4];
+ float in_image[4];
const float tolerance = settings_->t1;
const float falloff = settings_->t2;
@@ -62,10 +62,10 @@ void DistanceRGBMatteOperation::executePixelSampled(float output[4],
float distance;
float alpha;
- inputKeyProgram_->readSampled(inKey, x, y, sampler);
- inputImageProgram_->readSampled(inImage, x, y, sampler);
+ input_key_program_->read_sampled(in_key, x, y, sampler);
+ input_image_program_->read_sampled(in_image, x, y, sampler);
- distance = this->calculateDistance(inKey, inImage);
+ distance = this->calculate_distance(in_key, in_image);
/* Store matte(alpha) value in [0] to go with
* COM_SetAlphaMultiplyOperation and the Value output.
@@ -80,16 +80,16 @@ void DistanceRGBMatteOperation::executePixelSampled(float output[4],
distance = distance - tolerance;
alpha = distance / falloff;
/* Only change if more transparent than before. */
- if (alpha < inImage[3]) {
+ if (alpha < in_image[3]) {
output[0] = alpha;
}
else { /* leave as before */
- output[0] = inImage[3];
+ output[0] = in_image[3];
}
}
else {
/* leave as before */
- output[0] = inImage[3];
+ output[0] = in_image[3];
}
}
@@ -101,7 +101,7 @@ void DistanceRGBMatteOperation::update_memory_buffer_partial(MemoryBuffer *outpu
const float *in_image = it.in(0);
const float *in_key = it.in(1);
- float distance = this->calculateDistance(in_key, in_image);
+ float distance = this->calculate_distance(in_key, in_image);
const float tolerance = settings_->t1;
const float falloff = settings_->t2;