From b4737dd86fc2ecf2f4872b06ca40c4bd883a9421 Mon Sep 17 00:00:00 2001
From: Sebastian Koenig <sebastian_k>
Date: Tue, 2 Jul 2019 11:14:59 +0200
Subject: [PATCH] Node Wrangler: Fix error setting Viewer Focus

Differential Revision: https://developer.blender.org/D5164
---
 node_wrangler.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/node_wrangler.py b/node_wrangler.py
index c3fbc507d..fa4b3d229 100644
--- a/node_wrangler.py
+++ b/node_wrangler.py
@@ -3504,8 +3504,8 @@ class NWViewerFocus(bpy.types.Operator):
                 bd_x = render.resolution_x * percent * space.backdrop_zoom
                 bd_y = render.resolution_y * percent * space.backdrop_zoom
 
-                backdrop_center_x = (bd_x / 2) - space.backdrop_x
-                backdrop_center_y = (bd_y / 2) - space.backdrop_y
+                backdrop_center_x = (bd_x / 2) - space.backdrop_offset[0]
+                backdrop_center_y = (bd_y / 2) - space.backdrop_offset[1]
 
                 margin_x = region_center_x - backdrop_center_x
                 margin_y = region_center_y - backdrop_center_y
-- 
GitLab