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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/compositor/operations/COM_SetValueOperation.h')
-rw-r--r--source/blender/compositor/operations/COM_SetValueOperation.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_SetValueOperation.h b/source/blender/compositor/operations/COM_SetValueOperation.h
index acde5aa03b7..f18d44d9554 100644
--- a/source/blender/compositor/operations/COM_SetValueOperation.h
+++ b/source/blender/compositor/operations/COM_SetValueOperation.h
@@ -18,7 +18,7 @@
#pragma once
-#include "COM_NodeOperation.h"
+#include "COM_ConstantOperation.h"
namespace blender::compositor {
@@ -26,7 +26,7 @@ namespace blender::compositor {
* this program converts an input color to an output value.
* it assumes we are in sRGB color space.
*/
-class SetValueOperation : public NodeOperation {
+class SetValueOperation : public ConstantOperation {
private:
float m_value;
@@ -36,6 +36,11 @@ class SetValueOperation : public NodeOperation {
*/
SetValueOperation();
+ const float *get_constant_elem() override
+ {
+ return &m_value;
+ }
+
float getValue()
{
return this->m_value;
@@ -53,8 +58,7 @@ class SetValueOperation : public NodeOperation {
unsigned int preferredResolution[2]) override;
void update_memory_buffer(MemoryBuffer *output,
const rcti &area,
- Span<MemoryBuffer *> inputs,
- ExecutionSystem &exec_system) override;
+ Span<MemoryBuffer *> inputs) override;
};
} // namespace blender::compositor