diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-09-03 10:10:19 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-09-03 10:19:47 +0300 |
commit | 2ed4f9854893cc78de80f49291373810e0d1c3da (patch) | |
tree | c94cc36c5be14ccb3fca3bf50e9da8db7cc07a19 /source/blender/compositor/operations | |
parent | 6789d0211290bbfbb1b3f3fde09a703036e89497 (diff) |
Compositor: Support changing distortion models in movie distortion node
Previously only polynomial model worked correct. now changing it to divisions
will work nicely as well.
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_MovieDistortionOperation.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_MovieDistortionOperation.h b/source/blender/compositor/operations/COM_MovieDistortionOperation.h index 577712eda56..85f075ab65a 100644 --- a/source/blender/compositor/operations/COM_MovieDistortionOperation.h +++ b/source/blender/compositor/operations/COM_MovieDistortionOperation.h @@ -36,9 +36,9 @@ extern "C" { class DistortionCache { private: - float m_k1; - float m_k2; - float m_k3; + short m_distortion_model; + float m_k1, m_k2, m_k3; + float m_division_k1, m_division_k2; float m_principal_x; float m_principal_y; float m_pixel_aspect; @@ -59,9 +59,12 @@ public: bool inverted, const int margin[2]) { + this->m_distortion_model = movieclip->tracking.camera.distortion_model; this->m_k1 = movieclip->tracking.camera.k1; this->m_k2 = movieclip->tracking.camera.k2; this->m_k3 = movieclip->tracking.camera.k3; + this->m_division_k1 = movieclip->tracking.camera.division_k1; + this->m_division_k2 = movieclip->tracking.camera.division_k2; this->m_principal_x = movieclip->tracking.camera.principal[0]; this->m_principal_y = movieclip->tracking.camera.principal[1]; this->m_pixel_aspect = movieclip->tracking.camera.pixel_aspect; @@ -101,9 +104,12 @@ public: int calibration_width, int claibration_height, bool inverted) { - return this->m_k1 == movieclip->tracking.camera.k1 && + return this->m_distortion_model == movieclip->tracking.camera.distortion_model && + this->m_k1 == movieclip->tracking.camera.k1 && this->m_k2 == movieclip->tracking.camera.k2 && this->m_k3 == movieclip->tracking.camera.k3 && + this->m_division_k1 == movieclip->tracking.camera.division_k1 && + this->m_division_k2 == movieclip->tracking.camera.division_k2 && this->m_principal_x == movieclip->tracking.camera.principal[0] && this->m_principal_y == movieclip->tracking.camera.principal[1] && this->m_pixel_aspect == movieclip->tracking.camera.pixel_aspect && |