diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-09-28 20:32:49 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-09-28 23:00:16 +0300 |
commit | 76377f0176b9561a7fc8f46b4ed704c631ddd90d (patch) | |
tree | 96775442f403dfdb0dc4d91f835495c72c1ca9c1 /source/blender/compositor/operations/COM_PlaneTrackOperation.cc | |
parent | 2ecd963d87e4f5215d1d86e7f1c22ab7833697f3 (diff) |
Compositor: Replace resolution concept by canvas
This is a code refactor in preparation of supporting canvas
compositing. See {D12466}.
No functional changes, all canvases are at (0,0) position matching
tiled implementation.
Differential Revision: https://developer.blender.org/D12465
Diffstat (limited to 'source/blender/compositor/operations/COM_PlaneTrackOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_PlaneTrackOperation.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/compositor/operations/COM_PlaneTrackOperation.cc b/source/blender/compositor/operations/COM_PlaneTrackOperation.cc index bf24f843ca2..7226a133a52 100644 --- a/source/blender/compositor/operations/COM_PlaneTrackOperation.cc +++ b/source/blender/compositor/operations/COM_PlaneTrackOperation.cc @@ -83,19 +83,17 @@ void PlaneTrackCommon::readCornersFromTrack(float corners[4][2], float frame) } } -void PlaneTrackCommon::determineResolution(unsigned int resolution[2], - unsigned int /*preferredResolution*/[2]) +void PlaneTrackCommon::determine_canvas(const rcti &preferred_area, rcti &r_area) { - resolution[0] = 0; - resolution[1] = 0; - + r_area = COM_AREA_NONE; if (this->m_movieClip) { int width, height; MovieClipUser user = {0}; BKE_movieclip_user_set_frame(&user, this->m_framenumber); BKE_movieclip_get_size(this->m_movieClip, &user, &width, &height); - resolution[0] = width; - resolution[1] = height; + r_area = preferred_area; + r_area.xmax = r_area.xmin + width; + r_area.ymax = r_area.ymin + height; } } |