diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_ChangeHSVOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_ChangeHSVOperation.cc | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/compositor/operations/COM_ChangeHSVOperation.cc b/source/blender/compositor/operations/COM_ChangeHSVOperation.cc index 7e240a0b95a..b4effc087b1 100644 --- a/source/blender/compositor/operations/COM_ChangeHSVOperation.cc +++ b/source/blender/compositor/operations/COM_ChangeHSVOperation.cc @@ -22,54 +22,54 @@ namespace blender::compositor { ChangeHSVOperation::ChangeHSVOperation() { - this->addInputSocket(DataType::Color); - this->addInputSocket(DataType::Value); - this->addInputSocket(DataType::Value); - this->addInputSocket(DataType::Value); - this->addOutputSocket(DataType::Color); - inputOperation_ = nullptr; + this->add_input_socket(DataType::Color); + this->add_input_socket(DataType::Value); + this->add_input_socket(DataType::Value); + this->add_input_socket(DataType::Value); + this->add_output_socket(DataType::Color); + input_operation_ = nullptr; this->flags.can_be_constant = true; } -void ChangeHSVOperation::initExecution() +void ChangeHSVOperation::init_execution() { - inputOperation_ = getInputSocketReader(0); - hueOperation_ = getInputSocketReader(1); - saturationOperation_ = getInputSocketReader(2); - valueOperation_ = getInputSocketReader(3); + input_operation_ = get_input_socket_reader(0); + hue_operation_ = get_input_socket_reader(1); + saturation_operation_ = get_input_socket_reader(2); + value_operation_ = get_input_socket_reader(3); } -void ChangeHSVOperation::deinitExecution() +void ChangeHSVOperation::deinit_execution() { - inputOperation_ = nullptr; - hueOperation_ = nullptr; - saturationOperation_ = nullptr; - valueOperation_ = nullptr; + input_operation_ = nullptr; + hue_operation_ = nullptr; + saturation_operation_ = nullptr; + value_operation_ = nullptr; } -void ChangeHSVOperation::executePixelSampled(float output[4], - float x, - float y, - PixelSampler sampler) +void ChangeHSVOperation::execute_pixel_sampled(float output[4], + float x, + float y, + PixelSampler sampler) { - float inputColor1[4]; + float input_color1[4]; float hue[4], saturation[4], value[4]; - inputOperation_->readSampled(inputColor1, x, y, sampler); - hueOperation_->readSampled(hue, x, y, sampler); - saturationOperation_->readSampled(saturation, x, y, sampler); - valueOperation_->readSampled(value, x, y, sampler); + input_operation_->read_sampled(input_color1, x, y, sampler); + hue_operation_->read_sampled(hue, x, y, sampler); + saturation_operation_->read_sampled(saturation, x, y, sampler); + value_operation_->read_sampled(value, x, y, sampler); - output[0] = inputColor1[0] + (hue[0] - 0.5f); + output[0] = input_color1[0] + (hue[0] - 0.5f); if (output[0] > 1.0f) { output[0] -= 1.0f; } else if (output[0] < 0.0f) { output[0] += 1.0f; } - output[1] = inputColor1[1] * saturation[0]; - output[2] = inputColor1[2] * value[0]; - output[3] = inputColor1[3]; + output[1] = input_color1[1] * saturation[0]; + output[2] = input_color1[2] * value[0]; + output[3] = input_color1[3]; } void ChangeHSVOperation::update_memory_buffer_partial(MemoryBuffer *output, |