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_TranslateOperation.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_TranslateOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_TranslateOperation.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cc b/source/blender/compositor/operations/COM_TranslateOperation.cc index 49135f25320..d59196a19a0 100644 --- a/source/blender/compositor/operations/COM_TranslateOperation.cc +++ b/source/blender/compositor/operations/COM_TranslateOperation.cc @@ -20,12 +20,15 @@ namespace blender::compositor { -TranslateOperation::TranslateOperation() +TranslateOperation::TranslateOperation() : TranslateOperation(DataType::Color) { - this->addInputSocket(DataType::Color); +} +TranslateOperation::TranslateOperation(DataType data_type) +{ + 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; |