blendersynth.blender.compositor.visuals

class blendersynth.blender.compositor.visuals.DepthVis(node_tree, max_depth=1, col=(1, 1, 1))[source]
add_node(key)

Create a new node in the group by name

Return type:

Node

add_socket(socket_type, name, in_out)

Create a new socket, compatible with Blender <4

Parameters:
  • socket_type (str) – Type of socket

  • name (str) – Name of socket

  • in_out (str) – INPUT or OUTPUT

input(name)

Get input socket by name

Return type:

NodeSocket

property inputs: dict

Input sockets

Link two sockets in the group

Parameters:
  • from_socket (NodeSocket) – Socket to link from

  • to_socket (NodeSocket) – Socket to link to

Return type:

NodeLink

output(name)

Get output socket by name

Return type:

NodeSocket

property outputs: dict

Output sockets

save_image(loc, image_data)

Save an image to a location. Will also reload any node reference to the image.

Parameters:

loc (str) – Location to save image to