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):