diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-07-13 16:46:32 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-07-13 23:32:53 +0300 |
commit | 209aff0a3539a367b38fe71511eff9c8e0169f5a (patch) | |
tree | c01b1d75b059d2309d5721f324aa3cc3f500278d /source/blender/compositor/operations/COM_ScaleOperation.cc | |
parent | 3b6ee8cee7080af200e25e944fe30d310240e138 (diff) |
Compositor: Fix convert resolutions linking different socket datatypes
Link sockets are always connected to inserted translate or scale
operation `Color` sockets even when they have different data type.
This causes crashes on full frame mode when operations read inputs
with non expected datatypes.
Because data type conversions need to be executed before, convert
resolutions must ensure same datatypes are linked.
Diffstat (limited to 'source/blender/compositor/operations/COM_ScaleOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_ScaleOperation.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.cc b/source/blender/compositor/operations/COM_ScaleOperation.cc index 18276fcc072..f03b9fcf34d 100644 --- a/source/blender/compositor/operations/COM_ScaleOperation.cc +++ b/source/blender/compositor/operations/COM_ScaleOperation.cc @@ -37,12 +37,16 @@ BaseScaleOperation::BaseScaleOperation() m_variable_size = false; } -ScaleOperation::ScaleOperation() : BaseScaleOperation() +ScaleOperation::ScaleOperation() : ScaleOperation(DataType::Color) { - this->addInputSocket(DataType::Color); +} + +ScaleOperation::ScaleOperation(DataType data_type) : BaseScaleOperation() +{ + this->addInputSocket(data_type); this->addInputSocket(DataType::Value); this->addInputSocket(DataType::Value); - this->addOutputSocket(DataType::Color); + this->addOutputSocket(data_type); this->setResolutionInputSocketIndex(0); this->m_inputOperation = nullptr; this->m_inputXOperation = nullptr; |