Skip to content

Commit

Permalink
Removed "none" option from R G B enum packing settings to prevent error
Browse files Browse the repository at this point in the history
  • Loading branch information
CGDJay committed Jun 22, 2024
1 parent 4720160 commit ee0d3b0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,17 +408,17 @@ def update_scale(self, context: Context):
default= 'AORM')

channel_R: EnumProperty(
items=MAP_TYPES,
items=MAP_TYPES[1:],
default="occlusion",
name='R'
)
channel_G: EnumProperty(
items=MAP_TYPES,
items=MAP_TYPES[1:],
default="roughness",
name='G'
)
channel_B: EnumProperty(
items=MAP_TYPES,
items=MAP_TYPES[1:],
default="metallic",
name='B'
)
Expand Down
12 changes: 7 additions & 5 deletions utils/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,16 +189,18 @@ def node_init() -> None:

# Create sockets
generate_shader_interface(tree, inputs)
tree.interface.new_socket(
name='Normal',
socket_type='NodeSocketVector',
in_out='INPUT'
)

# Create nodes
tree.interface.new_socket(name="Normal",description="some_color_input",in_out ="INPUT", socket_type="NodeSocketColor")


# Create nodes
group_input = tree.nodes.new('NodeGroupInput')
group_input.name = "Group Input"
group_input.location = (-1000,0)

bpy.data.node_groups["GD_Ambient Occlusion"].interface.items_tree[1].default_value = (0.5, 0.5, 1, 1)
bpy.data.node_groups["GD_Ambient Occlusion"].interface.items_tree[1].default_value = (0.5, 0.5, 1)


group_output = tree.nodes.new('NodeGroupOutput')
Expand Down

0 comments on commit ee0d3b0

Please sign in to comment.