Skip to content

Commit

Permalink
Support importing HDR images in Blender 4.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
Exairnous committed Mar 31, 2024
1 parent c76b9a6 commit d4b46f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion addons/io_hubs_addon/io/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,10 @@ def import_image(gltf, gltf_texture):
blender_image_name = pyimg.blender_image_name
blender_image = bpy.data.images[blender_image_name]
if pyimg.mime_type == "image/vnd.radiance":
blender_image.colorspace_settings.name = "Linear"
if bpy.app.version < (4, 0, 0):
blender_image.colorspace_settings.name = "Linear"
else:
blender_image.colorspace_settings.name = "Linear Rec.709"

return blender_image_name, source

Expand Down

0 comments on commit d4b46f1

Please sign in to comment.