Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-13 15:05:23 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-13 15:09:34 +0300
commit73df2edf635eee24a2c7a67068acd4d9410de9e5 (patch)
tree4721dec2d533e6a888c5f22f72c7ab11566e820c /materials_utils
parenta863bfffb158c96afd32a07fb6f83c781b5c0d5b (diff)
Shaders: update for color space moving from node to image datablock
Diffstat (limited to 'materials_utils')
-rw-r--r--materials_utils/material_converter.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/materials_utils/material_converter.py b/materials_utils/material_converter.py
index c2f36f50..3a208e80 100644
--- a/materials_utils/material_converter.py
+++ b/materials_utils/material_converter.py
@@ -342,7 +342,8 @@ def createNormalNodes(cmat, texCoordNode, mainShader, materialOutput):
# Place the texture node
renameNode(texNode, '{} Texture'.format(groupName), texCount, textureIdx)
- texNode.color_space = 'NONE'
+ if texNode.image.image:
+ texNode.image.colorspace_settings.is_data = True
links.new(normalMapping.outputs['Vector'], texNode.inputs['Vector'])
# Add multiply node
@@ -528,7 +529,8 @@ def createEmissionNodes(cmat, texCoordNode, mainShader, materialOutput):
# Place the texture node
renameNode(texNode, '{} Texture'.format(groupName), texCount, textureIdx)
- texNode.color_space = 'NONE'
+ if texNode.image.image:
+ texNode.image.colorspace_settings.is_data = True
links.new(emissionMapping.outputs['Vector'], texNode.inputs['Vector'])
# Add multiply node