Skip to content

Commit 272357c

Browse files
committed
Fix API change with texture colorspace
1 parent 8e4c8be commit 272357c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

blender/LilySurfaceScrapper/CyclesMaterialData.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def createMaterial(self):
5959
continue
6060
texture_node = nodes.new(type="ShaderNodeTexImage")
6161
texture_node.image = getCyclesImage(img)
62-
texture_node.color_space = 'COLOR' if map_name == 'baseColor' else 'NONE'
62+
texture_node.image.colorspace_settings.name = 'sRGB' if map_name == 'baseColor' else 'Non-Color'
6363
if map_name == 'opacity':
6464
transparence_node = nodes.new(type="ShaderNodeBsdfTransparent")
6565
mix_node = nodes.new(type="ShaderNodeMixShader")

blender/LilySurfaceScrapper/CyclesWorldData.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def createWorld(self):
4646
if img is not None:
4747
texture_node = nodes.new(type="ShaderNodeTexEnvironment")
4848
texture_node.image = getCyclesImage(img)
49-
texture_node.color_space = 'COLOR'
49+
texture_node.image.colorspace_settings.name = 'sRGB'
5050
links.new(texture_node.outputs["Color"], background.inputs["Color"])
5151

5252
autoAlignNodes(world_output)

blender/LilySurfaceScrapper/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
bl_info = {
2525
"name": "Lily Surface Scrapper",
2626
"author": "Élie Michel <[email protected]>",
27-
"version": (1, 1, 2),
27+
"version": (1, 1, 3),
2828
"blender": (2, 80, 0),
2929
"location": "Properties > Material",
3030
"description": "Import material from a single URL",

0 commit comments

Comments
 (0)