diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-09-29 22:27:26 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-10-01 00:10:27 +0300 |
commit | 4569d9c0c3b046a412d54cc008d9d2a4be909ee1 (patch) | |
tree | 899b6413a893124be052671dbe5b7ba46cdb39e0 /source/blender/compositor/operations/COM_MovieDistortionOperation.cc | |
parent | 33dc584b371211428130596d99559a271c25bc66 (diff) |
Compositor: Fix Movie Distortion node rendering an empty image
Input area of interest calculation was incorrect because `m_margin`
was uninitialized.
Only "Full Frame" mode was affected.
Diffstat (limited to 'source/blender/compositor/operations/COM_MovieDistortionOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_MovieDistortionOperation.cc | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.cc b/source/blender/compositor/operations/COM_MovieDistortionOperation.cc index 72162ffb110..49f43d2c1a7 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.cc +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.cc @@ -35,9 +35,8 @@ MovieDistortionOperation::MovieDistortionOperation(bool distortion) this->m_apply = distortion; } -void MovieDistortionOperation::initExecution() +void MovieDistortionOperation::init_data() { - this->m_inputOperation = this->getInputSocketReader(0); if (this->m_movieClip) { MovieTracking *tracking = &this->m_movieClip->tracking; MovieClipUser clipUser = {0}; @@ -60,15 +59,25 @@ void MovieDistortionOperation::initExecution() m_margin[0] = delta[0] + 5; m_margin[1] = delta[1] + 5; - this->m_distortion = BKE_tracking_distortion_new( - tracking, calibration_width, calibration_height); this->m_calibration_width = calibration_width; this->m_calibration_height = calibration_height; this->m_pixel_aspect = tracking->camera.pixel_aspect; } else { m_margin[0] = m_margin[1] = 0; - this->m_distortion = nullptr; + } +} + +void MovieDistortionOperation::initExecution() +{ + m_inputOperation = this->getInputSocketReader(0); + if (m_movieClip) { + MovieTracking *tracking = &m_movieClip->tracking; + m_distortion = BKE_tracking_distortion_new( + tracking, m_calibration_width, m_calibration_height); + } + else { + m_distortion = nullptr; } } |