Node Operators

Add a node to the active tree and link to an existing socket

Parameters:
  • type (string, (optional, never None)) – Node Type, Node type
  • use_transform (boolean, (optional)) – Use Transform, Start transform operator after inserting the node
  • settings (bpy_prop_collection of NodeSetting, (optional)) – Settings, Settings to be applied on the newly created node
  • link_socket_index (int in [-inf, inf], (optional)) – Link Socket Index, Index of the socket to link
File:

startup/bl_operators/node.py:151

bpy.ops.node.add_file(filepath="", filter_blender=False, filter_backup=False, filter_image=True, filter_movie=False, filter_python=False, filter_font=False, filter_sound=False, filter_text=False, filter_btx=False, filter_collada=False, filter_folder=True, filemode=9, display_type='FILE_DEFAULTDISPLAY', name="Image")

Add a file node to the current node editor

Parameters:
  • filepath (string, (optional, never None)) – File Path, Path to file
  • filter_blender (boolean, (optional)) – Filter .blend files
  • filter_backup (boolean, (optional)) – Filter .blend files
  • filter_image (boolean, (optional)) – Filter image files
  • filter_movie (boolean, (optional)) – Filter movie files
  • filter_python (boolean, (optional)) – Filter python files
  • filter_font (boolean, (optional)) – Filter font files
  • filter_sound (boolean, (optional)) – Filter sound files
  • filter_text (boolean, (optional)) – Filter text files
  • filter_btx (boolean, (optional)) – Filter btx files
  • filter_collada (boolean, (optional)) – Filter COLLADA files
  • filter_folder (boolean, (optional)) – Filter folders
  • filemode (int in [1, 9], (optional)) – File Browser Mode, The setting for the file browser mode to load a .blend file, a library or a special file
  • display_type (enum in [‘FILE_DEFAULTDISPLAY’, ‘FILE_SHORTDISPLAY’, ‘FILE_LONGDISPLAY’, ‘FILE_IMGDISPLAY’], (optional)) –

    Display Type

    • FILE_DEFAULTDISPLAY Default, Automatically determine display type for files.
    • FILE_SHORTDISPLAY Short List, Display files as short list.
    • FILE_LONGDISPLAY Long List, Display files as a detailed list.
    • FILE_IMGDISPLAY Thumbnails, Display files as thumbnails.
  • name (string, (optional, never None)) – Name, Datablock name to assign
bpy.ops.node.add_mask(name="Mask")

Add a mask node to the current node editor

Parameters:name (string, (optional, never None)) – Name, Datablock name to assign
bpy.ops.node.add_node(type="", use_transform=False, settings=None)

Add a node to the active tree

Parameters:
  • type (string, (optional, never None)) – Node Type, Node type
  • use_transform (boolean, (optional)) – Use Transform, Start transform operator after inserting the node
  • settings (bpy_prop_collection of NodeSetting, (optional)) – Settings, Settings to be applied on the newly created node
File:

startup/bl_operators/node.py:111

bpy.ops.node.add_reroute(path=None, cursor=6)

Add a reroute node

Parameters:
  • path (bpy_prop_collection of OperatorMousePath, (optional)) – path
  • cursor (int in [0, inf], (optional)) – Cursor

Add a node to the active tree

Parameters:
  • type (string, (optional, never None)) – Node Type, Node type
  • use_transform (boolean, (optional)) – Use Transform, Start transform operator after inserting the node
  • settings (bpy_prop_collection of NodeSetting, (optional)) – Settings, Settings to be applied on the newly created node
  • node_item (enum in [], (optional)) – Node Type, Node type
File:

startup/bl_operators/node.py:205

bpy.ops.node.attach()

Attach active node to a frame

bpy.ops.node.backimage_fit()

Fit the background image to the view

bpy.ops.node.backimage_move()

Move Node backdrop

bpy.ops.node.backimage_sample()

Use mouse to sample background image

bpy.ops.node.backimage_zoom(factor=1.2)

Zoom in/out the background image

Parameters:factor (float in [0, 10], (optional)) – Factor
bpy.ops.node.clear_viewer_border()

Clear the boundaries for viewer operations

bpy.ops.node.clipboard_copy()

Copies selected nodes to the clipboard

bpy.ops.node.clipboard_paste()

Pastes nodes from the clipboard to the active node tree

bpy.ops.node.collapse_hide_unused_toggle()

Toggle collapsed nodes and hide unused sockets

File:startup/bl_operators/node.py:246
bpy.ops.node.delete()

Delete selected nodes

bpy.ops.node.delete_reconnect()

Delete nodes; will reconnect nodes as if deletion was muted

bpy.ops.node.detach()

Detach selected nodes from parents

bpy.ops.node.detach_translate_attach(NODE_OT_detach=None, TRANSFORM_OT_translate=None, NODE_OT_attach=None)

Detach nodes, move and attach to frame

Parameters:
  • NODE_OT_detach (NODE_OT_detach, (optional)) – Detach Nodes, Detach selected nodes from parents
  • TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) – Translate, Translate (move) selected items
  • NODE_OT_attach (NODE_OT_attach, (optional)) – Attach Nodes, Attach active node to a frame
bpy.ops.node.duplicate(keep_inputs=False)

Duplicate selected nodes

Parameters:keep_inputs (boolean, (optional)) – Keep Inputs, Keep the input links to duplicated nodes
bpy.ops.node.duplicate_move(NODE_OT_duplicate=None, NODE_OT_translate_attach=None)

Duplicate selected nodes and move them

Parameters:
  • NODE_OT_duplicate (NODE_OT_duplicate, (optional)) – Duplicate Nodes, Duplicate selected nodes
  • NODE_OT_translate_attach (NODE_OT_translate_attach, (optional)) – Move and Attach, Move nodes and attach to frame
bpy.ops.node.duplicate_move_keep_inputs(NODE_OT_duplicate=None, NODE_OT_translate_attach=None)

Duplicate selected nodes keeping input links and move them

Parameters:
  • NODE_OT_duplicate (NODE_OT_duplicate, (optional)) – Duplicate Nodes, Duplicate selected nodes
  • NODE_OT_translate_attach (NODE_OT_translate_attach, (optional)) – Move and Attach, Move nodes and attach to frame
bpy.ops.node.find_node(prev=False)

Search for named node and allow to select and activate it

Parameters:prev (boolean, (optional)) – Previous
bpy.ops.node.group_edit(exit=False)

Edit node group

Parameters:exit (boolean, (optional)) – Exit
bpy.ops.node.group_insert()

Insert selected nodes into a node group

bpy.ops.node.group_make()

Make group from selected nodes

bpy.ops.node.group_separate(type='COPY')

Separate selected nodes from the node group

Parameters:type (enum in [‘COPY’, ‘MOVE’], (optional)) –

Type

  • COPY Copy, Copy to parent node tree, keep group intact.
  • MOVE Move, Move to parent node tree, remove from group.
bpy.ops.node.group_ungroup()

Ungroup selected nodes

bpy.ops.node.hide_socket_toggle()

Toggle unused node socket display

bpy.ops.node.hide_toggle()

Toggle hiding of selected nodes

bpy.ops.node.join()

Attach selected nodes to a new common frame

Use the mouse to create a link between two nodes

Parameters:detach (boolean, (optional)) – Detach, Detach and redirect existing links

Makes a link between selected output in input sockets

Parameters:replace (boolean, (optional)) – Replace, Replace socket connections with the new links

Link to viewer node

Use the mouse to cut (remove) some links

Parameters:
  • path (bpy_prop_collection of OperatorMousePath, (optional)) – path
  • cursor (int in [0, inf], (optional)) – Cursor

Remove all links to selected nodes, and try to connect neighbor nodes together

Move a node to detach links

Parameters:
  • NODE_OT_links_detach (NODE_OT_links_detach, (optional)) – Detach Links, Remove all links to selected nodes, and try to connect neighbor nodes together
  • TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) – Translate, Translate (move) selected items

Move a node to detach links

Parameters:
  • NODE_OT_links_detach (NODE_OT_links_detach, (optional)) – Detach Links, Remove all links to selected nodes, and try to connect neighbor nodes together
  • NODE_OT_translate_attach (NODE_OT_translate_attach, (optional)) – Move and Attach, Move nodes and attach to frame
bpy.ops.node.mute_toggle()

Toggle muting of the nodes

bpy.ops.node.new_node_tree(type='', name="NodeTree")

Create a new node tree

Parameters:
  • type (enum in [], (optional)) – Tree Type
  • name (string, (optional, never None)) – Name
bpy.ops.node.node_color_preset_add(name="", remove_active=False)

Add or remove a Node Color Preset

Parameters:
  • name (string, (optional, never None)) – Name, Name of the preset, used to make the path name
  • remove_active (boolean, (optional)) – remove_active
File:

startup/bl_operators/presets.py:54

bpy.ops.node.node_copy_color()

Copy color to all selected nodes

bpy.ops.node.options_toggle()

Toggle option buttons display for selected nodes

bpy.ops.node.output_file_add_socket(file_path="Image")

Add a new input to a file output node

Parameters:file_path (string, (optional, never None)) – File Path, Sub-path of the output file
bpy.ops.node.output_file_move_active_socket(direction='DOWN')

Move the active input of a file output node up or down the list

Parameters:direction (enum in [‘UP’, ‘DOWN’], (optional)) – Direction
bpy.ops.node.output_file_remove_active_socket()

Remove active input from a file output node

bpy.ops.node.parent_clear()

Detach selected nodes

bpy.ops.node.parent_set()

Attach selected nodes

bpy.ops.node.preview_toggle()

Toggle preview display for selected nodes

bpy.ops.node.properties()

Toggles the properties panel display

bpy.ops.node.read_fullsamplelayers()

Read all render layers of current scene, in full sample

bpy.ops.node.read_renderlayers()

Read all render layers of all used scenes

bpy.ops.node.render_changed()

Render current scene, when input node’s layer has been changed

bpy.ops.node.resize()

Resize a node

bpy.ops.node.select(mouse_x=0, mouse_y=0, extend=False)

Select the node under the cursor

Parameters:
  • mouse_x (int in [-inf, inf], (optional)) – Mouse X
  • mouse_y (int in [-inf, inf], (optional)) – Mouse Y
  • extend (boolean, (optional)) – Extend
bpy.ops.node.select_all(action='TOGGLE')

(De)select all nodes

Parameters:action (enum in [‘TOGGLE’, ‘SELECT’, ‘DESELECT’, ‘INVERT’], (optional)) –

Action, Selection action to execute

  • TOGGLE Toggle, Toggle selection for all elements.
  • SELECT Select, Select all elements.
  • DESELECT Deselect, Deselect all elements.
  • INVERT Invert, Invert selection of all elements.
bpy.ops.node.select_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True, tweak=False)

Use box selection to select nodes

Parameters:
  • gesture_mode (int in [-inf, inf], (optional)) – Gesture Mode
  • xmin (int in [-inf, inf], (optional)) – X Min
  • xmax (int in [-inf, inf], (optional)) – X Max
  • ymin (int in [-inf, inf], (optional)) – Y Min
  • ymax (int in [-inf, inf], (optional)) – Y Max
  • extend (boolean, (optional)) – Extend, Extend selection instead of deselecting everything first
  • tweak (boolean, (optional)) – Tweak, Only activate when mouse is not over a node - useful for tweak gesture
bpy.ops.node.select_circle(x=0, y=0, radius=1, gesture_mode=0)

Use circle selection to select nodes

Parameters:
  • x (int in [-inf, inf], (optional)) – X
  • y (int in [-inf, inf], (optional)) – Y
  • radius (int in [1, inf], (optional)) – Radius
  • gesture_mode (int in [-inf, inf], (optional)) – Gesture Mode
bpy.ops.node.select_grouped(extend=False, type='TYPE')

Select nodes with similar properties

Parameters:
  • extend (boolean, (optional)) – Extend, Extend selection instead of deselecting everything first
  • type (enum in [‘TYPE’, ‘COLOR’, ‘PREFIX’, ‘SUFFIX’], (optional)) – Type
bpy.ops.node.select_lasso(path=None, deselect=False, extend=True)

Select nodes using lasso selection

Parameters:
  • path (bpy_prop_collection of OperatorMousePath, (optional)) – Path
  • deselect (boolean, (optional)) – Deselect, Deselect rather than select items
  • extend (boolean, (optional)) – Extend, Extend selection instead of deselecting everything first

Select node and link it to a viewer node

Parameters:
  • NODE_OT_select (NODE_OT_select, (optional)) – Select, Select the node under the cursor
  • NODE_OT_link_viewer (NODE_OT_link_viewer, (optional)) – Link to Viewer Node, Link to viewer node
bpy.ops.node.select_linked_from()

Select nodes linked from the selected ones

bpy.ops.node.select_linked_to()

Select nodes linked to the selected ones

bpy.ops.node.select_same_type_step(prev=False)

Activate and view same node type, step by step

Parameters:prev (boolean, (optional)) – Previous
bpy.ops.node.shader_script_update()

Update shader script node with new sockets and options from the script

bpy.ops.node.toolbar()

Toggles tool shelf display

bpy.ops.node.translate_attach(TRANSFORM_OT_translate=None, NODE_OT_attach=None)

Move nodes and attach to frame

Parameters:
  • TRANSFORM_OT_translate (TRANSFORM_OT_translate, (optional)) – Translate, Translate (move) selected items
  • NODE_OT_attach (NODE_OT_attach, (optional)) – Attach Nodes, Attach active node to a frame
bpy.ops.node.tree_path_parent()

Go to parent node tree

File:startup/bl_operators/node.py:276
bpy.ops.node.tree_socket_add(in_out='IN')

Add an input or output socket to the current node tree

Parameters:in_out (enum in [‘IN’, ‘OUT’], (optional)) – Socket Type
bpy.ops.node.tree_socket_move(direction='UP')

Move a socket up or down in the current node tree’s sockets stack

Parameters:direction (enum in [‘UP’, ‘DOWN’], (optional)) – Direction
bpy.ops.node.tree_socket_remove()

Remove an input or output socket to the current node tree

bpy.ops.node.view_all()

Resize view so you can see all nodes

bpy.ops.node.view_selected()

Resize view so you can see selected nodes

bpy.ops.node.viewer_border(gesture_mode=0, xmin=0, xmax=0, ymin=0, ymax=0, extend=True)

Set the boundaries for viewer operations

Parameters:
  • gesture_mode (int in [-inf, inf], (optional)) – Gesture Mode
  • xmin (int in [-inf, inf], (optional)) – X Min
  • xmax (int in [-inf, inf], (optional)) – X Max
  • ymin (int in [-inf, inf], (optional)) – Y Min
  • ymax (int in [-inf, inf], (optional)) – Y Max
  • extend (boolean, (optional)) – Extend, Extend selection instead of deselecting everything first

Previous topic

Nla Operators

Next topic

Object Operators