SpaceNodeEditor(Space)#

base classes — bpy_struct, Space

class bpy.types.SpaceNodeEditor(Space)#

Node editor space data

backdrop_channels#

Channels of the image to draw

  • COLOR_ALPHA Color & Alpha – Display image with RGB colors and alpha transparency.

  • COLOR Color – Display image with RGB colors.

  • ALPHA Alpha – Display alpha transparency channel.

  • RED Red.

  • GREEN Green.

  • BLUE Blue.

Type:

enum in [‘COLOR_ALPHA’, ‘COLOR’, ‘ALPHA’, ‘RED’, ‘GREEN’, ‘BLUE’], default ‘COLOR’

backdrop_offset#

Backdrop offset

Type:

float array of 2 items in [-inf, inf], default (0.0, 0.0)

backdrop_zoom#

Backdrop zoom factor

Type:

float in [0.01, inf], default 1.0

cursor_location#

Location for adding new nodes

Type:

mathutils.Vector of 2 items in [-inf, inf], default (0.0, 0.0)

edit_tree#

Node tree being displayed and edited

Type:

NodeTree, (readonly)

geometry_nodes_tool_tree#

Node group to edit as node tool

Type:

NodeTree

geometry_nodes_type#
  • MODIFIER Modifier – Edit node group from active object’s active modifier.

  • TOOL Tool – Edit any geometry node group for use as an operator.

Type:

enum in [‘MODIFIER’, ‘TOOL’], default ‘MODIFIER’

id#

Data-block whose nodes are being edited

Type:

ID, (readonly)

id_from#

Data-block from which the edited data-block is linked

Type:

ID, (readonly)

insert_offset_direction#

Direction to offset nodes on insertion

Type:

enum in [‘RIGHT’, ‘LEFT’], default ‘RIGHT’

node_tree#

Base node tree from context

Type:

NodeTree

overlay#

Settings for display of overlays in the Node Editor

Type:

SpaceNodeOverlay, (readonly, never None)

path#

Path from the data-block to the currently edited node tree

Type:

SpaceNodeEditorPath bpy_prop_collection of NodeTreePath, (readonly)

pin#

Use the pinned node tree

Type:

boolean, default False

shader_type#

Type of data to take shader from

  • OBJECT Object – Edit shader nodes from Object.

  • WORLD World – Edit shader nodes from World.

  • LINESTYLE Line Style – Edit shader nodes from Line Style.

Type:

enum in [‘OBJECT’, ‘WORLD’, ‘LINESTYLE’], default ‘OBJECT’

show_annotation#

Show annotations for this view

Type:

boolean, default False

show_backdrop#

Use active Viewer Node output as backdrop for compositing nodes

Type:

boolean, default False

show_region_toolbar#
Type:

boolean, default False

show_region_ui#
Type:

boolean, default False

supports_previews#

Whether the node editor’s type supports displaying node previews

Type:

boolean, default False, (readonly)

texture_type#

Type of data to take texture from

  • WORLD World – Edit texture nodes from World.

  • BRUSH Brush – Edit texture nodes from Brush.

  • LINESTYLE Line Style – Edit texture nodes from Line Style.

Type:

enum in [‘WORLD’, ‘BRUSH’, ‘LINESTYLE’], default ‘WORLD’

tree_type#

Node tree type to display and edit

Type:

enum in [‘DUMMY’], default ‘DUMMY’

use_auto_render#

Re-render and composite changed layers on 3D edits

Type:

boolean, default False

cursor_location_from_region(x, y)#

Set the cursor location using region coordinates

Parameters:
  • x (int in [-inf, inf]) – x, Region x coordinate

  • y (int in [-inf, inf]) – y, Region y coordinate

classmethod bl_rna_get_subclass(id, default=None)#
Parameters:

id (string) – The RNA type identifier.

Returns:

The RNA type or default when not found.

Return type:

bpy.types.Struct subclass

classmethod bl_rna_get_subclass_py(id, default=None)#
Parameters:

id (string) – The RNA type identifier.

Returns:

The class or default when not found.

Return type:

type

classmethod draw_handler_add(callback, args, region_type, draw_type)#

Add a new draw handler to this space type. It will be called every time the specified region in the space type will be drawn. Note: All arguments are positional only for now.

Parameters:
  • callback (function) – A function that will be called when the region is drawn. It gets the specified arguments as input.

  • args (tuple) – Arguments that will be passed to the callback.

  • region_type (str) – The region type the callback draws in; usually WINDOW. (bpy.types.Region.type)

  • draw_type (str) – Usually POST_PIXEL for 2D drawing and POST_VIEW for 3D drawing. In some cases PRE_VIEW can be used. BACKDROP can be used for backdrops in the node editor.

Returns:

Handler that can be removed later on.

Return type:

object

classmethod draw_handler_remove(handler, region_type)#

Remove a draw handler that was added previously.

Parameters:
  • handler (object) – The draw handler that should be removed.

  • region_type (str) – Region type the callback was added to.

Inherited Properties

Inherited Functions