diff options
author | Habib Gahbiche <zazizizou> | 2022-03-17 01:27:52 +0300 |
---|---|---|
committer | Habib Gahbiche <habibgahbiche@gmail.com> | 2022-03-17 01:28:36 +0300 |
commit | 33409f9f1cd42e899f2706fe7878e5e89b50d617 (patch) | |
tree | 1b33eac06e04867add023aa5e88c8cf577e5dc01 /source/blender/editors/space_node/space_node.cc | |
parent | 22de21bef1a31718d45e89aedc574055a5983b7d (diff) |
Compositor: Support backdrop offset for the Viewer node
This is only part of the experimental "Full Frame" mode (disabled
by default). See T88150.
Currently the viewer node uses buffer paddings to display image offset
in the backdrop as a temporal solution implemented for {D12466}.
This solution is inefficient memory and performance-wise. Another
issue is that the paddings are part the image when saved.
This patch instead sets the offset in the Viewer node image
as variables and makes the backdrop take it into account
when drawing the image or any related gizmo.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D12750
Diffstat (limited to 'source/blender/editors/space_node/space_node.cc')
-rw-r--r-- | source/blender/editors/space_node/space_node.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/space_node.cc b/source/blender/editors/space_node/space_node.cc index 82b850653be..af93c4d823c 100644 --- a/source/blender/editors/space_node/space_node.cc +++ b/source/blender/editors/space_node/space_node.cc @@ -352,9 +352,14 @@ static void node_area_listener(const wmSpaceTypeListenerParams *params) case ND_FRAME: ED_area_tag_refresh(area); break; - case ND_COMPO_RESULT: + case ND_COMPO_RESULT: { ED_area_tag_redraw(area); + /* Backdrop image offset is calculated during compositing so gizmos need to be updated + * afterwards. */ + const ARegion *region = BKE_area_find_region_type(area, RGN_TYPE_WINDOW); + WM_gizmomap_tag_refresh(region->gizmo_map); break; + } case ND_TRANSFORM_DONE: if (ED_node_is_compositor(snode)) { if (snode->flag & SNODE_AUTO_RENDER) { |