From 147230a1b5699534773a74fdba8391e151aa2a52 Mon Sep 17 00:00:00 2001 From: Carson Katri Date: Sun, 2 Jun 2024 21:05:56 -0400 Subject: [PATCH] Update image_utils.py Co-authored-by: NullSenseStudio <47096043+NullSenseStudio@users.noreply.github.com> --- image_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/image_utils.py b/image_utils.py index 0493a4c2..5f48e117 100644 --- a/image_utils.py +++ b/image_utils.py @@ -689,7 +689,10 @@ def np_to_render_pass( array = to_dtype(array, dtype) if top_to_bottom: array = np.flipud(array) - render_pass.rect.foreach_set(array.reshape(-1)) + if BLENDER_VERSION >= (4, 1, 0): + render_pass.rect.foreach_set(array.reshape(-1)) + else: + render_pass.rect.foreach_set(array.reshape(-1, render_pass.channels)) def _mode(array, mode):