[Bf-extensions-cvs] [498070f1] master: Add color ramps for roughness and metalness
Kalle-Samuli Riihikoski
noreply at git.blender.org
Wed Jan 23 15:24:58 CET 2019
Commit: 498070f1048a152709711799c83446a757912d10
Author: Kalle-Samuli Riihikoski
Date: Wed Jan 23 14:24:49 2019 +0200
Branches: master
https://developer.blender.org/rBA498070f1048a152709711799c83446a757912d10
Add color ramps for roughness and metalness
===================================================================
M io_coat3D/__init__.py
M io_coat3D/tex.py
===================================================================
diff --git a/io_coat3D/__init__.py b/io_coat3D/__init__.py
index 063e9736..fa7011ed 100644
--- a/io_coat3D/__init__.py
+++ b/io_coat3D/__init__.py
@@ -564,6 +564,7 @@ class SCENE_OT_import(bpy.types.Operator):
Blender_export += ('%sexport.txt'%(os.sep))
new_applink_address = 'False'
new_object = False
+ print('mitas: ', Blender_export)
if(os.path.isfile(Blender_export)):
obj_pathh = open(Blender_export)
new_object = True
diff --git a/io_coat3D/tex.py b/io_coat3D/tex.py
index aae5ba84..4c8ea57e 100644
--- a/io_coat3D/tex.py
+++ b/io_coat3D/tex.py
@@ -288,9 +288,13 @@ def createnodes(active_mat,texcoat, create_group_node): # Cretes new nodes and l
curvenode.name = '3DC_RGBCurve'
huenode = act_material.nodes.new('ShaderNodeHueSaturation')
huenode.name = '3DC_HueSaturation'
+ rampnode = act_material.nodes.new('ShaderNodeValToRGB')
+ rampnode.name = '3DC_ColorRamp'
- act_material.links.new(curvenode.outputs[0], huenode.inputs[4])
act_material.links.new(node.outputs[0], curvenode.inputs[1])
+ act_material.links.new(curvenode.outputs[0], rampnode.inputs[0])
+ act_material.links.new(rampnode.outputs[0], huenode.inputs[4])
+
if (coat3D.creategroup):
act_material.links.new(huenode.outputs[0], notegroup.inputs[1])
@@ -299,8 +303,9 @@ def createnodes(active_mat,texcoat, create_group_node): # Cretes new nodes and l
else:
act_material.links.new(huenode.outputs[0], main_mat.inputs[input_color])
- node.location = -994, 119
- curvenode.location = -668, 113
+ node.location = -1300, 119
+ curvenode.location = -1000, 113
+ rampnode.location = -670, 115
huenode.location = -345, 118
else:
@@ -330,9 +335,12 @@ def createnodes(active_mat,texcoat, create_group_node): # Cretes new nodes and l
curvenode.name = '3DC_RGBCurve'
huenode = act_material.nodes.new('ShaderNodeHueSaturation')
huenode.name = '3DC_HueSaturation'
+ rampnode = act_material.nodes.new('ShaderNodeValToRGB')
+ rampnode.name = '3DC_ColorRamp'
- act_material.links.new(curvenode.outputs[0], huenode.inputs[4])
act_material.links.new(node.outputs[0], curvenode.inputs[1])
+ act_material.links.new(curvenode.outputs[0], rampnode.inputs[0])
+ act_material.links.new(rampnode.outputs[0], huenode.inputs[4])
if (coat3D.creategroup):
act_material.links.new(huenode.outputs[0], notegroup.inputs[2])
@@ -341,8 +349,9 @@ def createnodes(active_mat,texcoat, create_group_node): # Cretes new nodes and l
else:
act_material.links.new(huenode.outputs[0], main_mat.inputs[input_color])
- node.location = -1000, -276
- curvenode.location = -670, -245
+ node.location = -1300, -276
+ curvenode.location = -1000, -245
+ rampnode.location = -670, -200
huenode.location = -340, -100
else:
@@ -364,7 +373,7 @@ def createnodes(active_mat,texcoat, create_group_node): # Cretes new nodes and l
normal_node = act_material.nodes.new('ShaderNodeNormalMap')
node.location = -600,-670
- normal_node.location = -300,-300
+ normal_node.location = -250,-350
node.name='3DC_normal'
node.label = 'Normal Map'
@@ -397,9 +406,12 @@ def createnodes(active_mat,texcoat, create_group_node): # Cretes new nodes and l
curvenode.name = '3DC_RGBCurve'
huenode = act_material.nodes.new('ShaderNodeHueSaturation')
huenode.name = '3DC_HueSaturation'
+ rampnode = act_material.nodes.new('ShaderNodeValToRGB')
+ rampnode.name = '3DC_ColorRamp'
- act_material.links.new(curvenode.outputs[0], huenode.inputs[4])
act_material.links.new(node.outputs[0], curvenode.inputs[1])
+ act_material.links.new(curvenode.outputs[0], rampnode.inputs[0])
+ act_material.links.new(rampnode.outputs[0], huenode.inputs[4])
'''
if (coat3D.creategroup):
More information about the Bf-extensions-cvs
mailing list