Skip to content

Commit

Permalink
Update image_utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: NullSenseStudio <[email protected]>
  • Loading branch information
carson-katri and NullSenseStudio committed Jun 3, 2024
1 parent 8779c3b commit 147230a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion image_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 147230a

Please sign in to comment.