From d4b46f1ab8a43ef50015f254c33feefceec07b28 Mon Sep 17 00:00:00 2001 From: Ryan Inch Date: Sun, 31 Mar 2024 05:13:35 -0400 Subject: [PATCH] Support importing HDR images in Blender 4.0+ --- addons/io_hubs_addon/io/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/io_hubs_addon/io/utils.py b/addons/io_hubs_addon/io/utils.py index eb82a442..dbf7208c 100644 --- a/addons/io_hubs_addon/io/utils.py +++ b/addons/io_hubs_addon/io/utils.py @@ -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