Skip to content

Commit

Permalink
Fix recent node group interface change in Blender
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduroure committed Aug 30, 2023
1 parent 9f8e68d commit da7ab95
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ def get_gltf_node_name():

def create_settings_group(name):
gltf_node_group = bpy.data.node_groups.new(name, 'ShaderNodeTree')
gltf_node_group.inputs.new("NodeSocketFloat", "Occlusion")
thicknessFactor = gltf_node_group.inputs.new("NodeSocketFloat", "Thickness")
gltf_node_group.interface.new_socket("Occlusion", socket_type="NodeSocketFloat")
thicknessFactor = gltf_node_group.interface.new_socket("Thickness", socket_type="NodeSocketFloat", )
thicknessFactor.default_value = 0.0
gltf_node_group.nodes.new('NodeGroupOutput')
gltf_node_group_input = gltf_node_group.nodes.new('NodeGroupInput')
specular = gltf_node_group.inputs.new("NodeSocketFloat", "Specular")
specular = gltf_node_group.interface.new_socket("Specular", socket_type="NodeSocketFloat")
specular.default_value = 1.0
specularColor = gltf_node_group.inputs.new("NodeSocketColor", "Specular Color")
specularColor = gltf_node_group.interface.new_socket("Specular Color", socket_type="NodeSocketColor")
specularColor.default_value = [1.0,1.0,1.0,1.0]
gltf_node_group_input.location = -200, 0
return gltf_node_group

0 comments on commit da7ab95

Please sign in to comment.