From 9287abf81f3aa26ba5e40ba2ab374de933cc3224 Mon Sep 17 00:00:00 2001 From: nikitron Date: Fri, 6 Sep 2024 17:34:17 +0300 Subject: [PATCH] Update sv_3dview_tools.py --- utils/sv_3dview_tools.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/utils/sv_3dview_tools.py b/utils/sv_3dview_tools.py index 5fe9cd39df..52f691f18a 100644 --- a/utils/sv_3dview_tools.py +++ b/utils/sv_3dview_tools.py @@ -91,10 +91,8 @@ def sv_execute(self, context, node): for area in bpy.context.screen.areas: if area.type == 'VIEW_3D': - ctx = bpy.context.copy() - ctx['area'] = area - ctx['region'] = area.regions[-1] - bpy.ops.view3d.view_center_cursor(ctx) + with context.temp_override(area = area , region = area.regions[-1]): + bpy.ops.view3d.view_center_cursor() classes = [Sv3DviewAlign,]