[Bf-extensions-cvs] [37c2aacd] master: BlenderKit: switch thumbnails to sRGB
Vilém Duha
noreply at git.blender.org
Sun Jul 12 19:17:08 CEST 2020
Commit: 37c2aacdb240fc6fd279d9f3b53cd37b88d90bfa
Author: Vilém Duha
Date: Wed Jul 1 21:26:03 2020 +0200
Branches: master
https://developer.blender.org/rBA37c2aacdb240fc6fd279d9f3b53cd37b88d90bfa
BlenderKit: switch thumbnails to sRGB
previously, Blender was double color correcting the images,
so these were set to linear by the addon. This was obviously fixed,
so BlenderKit thumbnails looked lighter.
===================================================================
M blenderkit/search.py
M blenderkit/ui.py
M blenderkit/utils.py
===================================================================
diff --git a/blenderkit/search.py b/blenderkit/search.py
index 474630e6..d77784d9 100644
--- a/blenderkit/search.py
+++ b/blenderkit/search.py
@@ -411,7 +411,7 @@ def load_previews():
img.unpack(method='USE_ORIGINAL')
img.filepath = tpath
img.reload()
- img.colorspace_settings.name = 'Linear'
+ img.colorspace_settings.name = 'sRGB'
i += 1
# print('previews loaded')
diff --git a/blenderkit/ui.py b/blenderkit/ui.py
index 0a6b96a8..f13b4778 100644
--- a/blenderkit/ui.py
+++ b/blenderkit/ui.py
@@ -876,7 +876,7 @@ def draw_callback_2d_search(self, context):
else:
iname = utils.previmg_name(ui_props.active_index)
img = bpy.data.images.get(iname)
- img.colorspace_settings.name = 'Linear'
+ img.colorspace_settings.name = 'sRGB'
gimg = None
atip = ''
diff --git a/blenderkit/utils.py b/blenderkit/utils.py
index 289ec817..5544ba3e 100644
--- a/blenderkit/utils.py
+++ b/blenderkit/utils.py
@@ -289,12 +289,12 @@ def get_hidden_image(tpath, bdata_name, force_reload=False):
img.filepath = tpath
img.reload()
- img.colorspace_settings.name = 'Linear'
+ img.colorspace_settings.name = 'sRGB'
elif force_reload:
if img.packed_file is not None:
img.unpack(method='USE_ORIGINAL')
img.reload()
- img.colorspace_settings.name = 'Linear'
+ img.colorspace_settings.name = 'sRGB'
return img
@@ -304,7 +304,7 @@ def get_thumbnail(name):
img = bpy.data.images.get(name)
if img == None:
img = bpy.data.images.load(p)
- img.colorspace_settings.name = 'Linear'
+ img.colorspace_settings.name = 'sRGB'
img.name = name
img.name = name
More information about the Bf-extensions-cvs
mailing list