Skip to content

Commit

Permalink
Fix resize.
Browse files Browse the repository at this point in the history
  • Loading branch information
takahiroharada committed Dec 17, 2024
1 parent e34fe84 commit e571518
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/rprblender/engine/render_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ def set_render_result(render_passes: bpy.types.RenderPasses):
images_data = np.concatenate(images)
if BLENDER_VERSION >= '4.0':
# foreach_set requires every pass to be 4 channels, so we resize to reach desirable size
# images_data.resize((len(render_passes) * self.width * self.height * 4,))
np.resize( images_data, (len(render_passes) * self.width * self.height * 4,))

# efficient way to copy all AOV images
Expand Down Expand Up @@ -212,7 +211,7 @@ def set_render_result(render_passes: bpy.types.RenderPasses):
images_data = np.concatenate(images)
if BLENDER_VERSION >= '4.0':
# foreach_set requires every pass to be 4 channels, so we resize to reach desirable size
images_data.resize((len(render_passes) * self.width * self.height * 4,))
np.resize( images_data, (len(render_passes) * self.width * self.height * 4,))

# efficient way to copy all AOV images
render_passes.foreach_set('rect', images_data)
Expand Down

0 comments on commit e571518

Please sign in to comment.