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.
This commit is contained in:
Vilém Duha 2020-07-01 21:26:03 +02:00
parent 943d41d443
commit 37c2aacdb2
3 changed files with 5 additions and 5 deletions

View File

@ -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')

View File

@ -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 = ''

View File

@ -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