SpaceNodeEditor(Space)
base classes — bpy_struct, Space
- class bpy.types.SpaceNodeEditor(Space)
Node editor space data
- backdrop_channels
Channels of the image to draw (default
'COLOR')COLOR_ALPHAColor & Alpha – Display image with RGB colors and alpha transparency.COLORColor – Display image with RGB colors.ALPHAAlpha – Display alpha transparency channel.REDRed.GREENGreen.BLUEBlue.
- Type:
Literal[‘COLOR_ALPHA’, ‘COLOR’, ‘ALPHA’, ‘RED’, ‘GREEN’, ‘BLUE’]
- backdrop_offset
Backdrop offset (array of 2 items, in [-inf, inf], default (0.0, 0.0))
- Type:
- backdrop_zoom
Backdrop zoom factor (in [0.01, inf], default 1.0)
- Type:
float
- cursor_location
Location for adding new nodes (array of 2 items, in [-inf, inf], default (0.0, 0.0))
- Type:
- insert_offset_direction
Direction to offset nodes on insertion (default
'RIGHT')- Type:
Literal[‘RIGHT’, ‘LEFT’]
- node_tree_sub_type
- Type:
str
- overlay
Settings for display of overlays in the Node Editor (readonly, never None)
- Type:
- path
Path from the data-block to the currently edited node tree (default None, readonly)
- Type:
- pin
Use the pinned node tree (default False)
- Type:
bool
- shader_type
Type of data to take shader from (default
'OBJECT')OBJECTObject – Edit shader nodes from Object.WORLDWorld – Edit shader nodes from World.LINESTYLELine Style – Edit shader nodes from Line Style.
- Type:
Literal[‘OBJECT’, ‘WORLD’, ‘LINESTYLE’]
- show_annotation
Show annotations for this view (default False)
- Type:
bool
- show_backdrop
Use active Viewer Node output as backdrop for compositing nodes (default False)
- Type:
bool
- show_gizmo
Show gizmos of all types (default True)
- Type:
bool
- show_gizmo_active_node
Context sensitive gizmo for the active node (default True)
- Type:
bool
- show_region_asset_shelf
Display a region with assets that may currently be relevant (such as brushes in paint modes, or poses in Pose Mode) (default False)
- Type:
bool
- show_region_toolbar
(default False)
- Type:
bool
- show_region_ui
(default False)
- Type:
bool
- supports_previews
Whether the node editor’s type supports displaying node previews (default False, readonly)
- Type:
bool
- texture_type
Type of data to take texture from (default
'WORLD')WORLDWorld – Edit texture nodes from World.BRUSHBrush – Edit texture nodes from Brush.LINESTYLELine Style – Edit texture nodes from Line Style.
- Type:
Literal[‘WORLD’, ‘BRUSH’, ‘LINESTYLE’]
- tree_type
Node tree type to display and edit (default
'DEFAULT')GeometryNodeTreeGeometry Node Editor – Advanced geometry editing and tools creation using nodes.CompositorNodeTreeCompositor – Create effects and post-process renders, images, and the 3D Viewport.ShaderNodeTreeShader Editor – Edit materials, lights, and world shading using nodes.TextureNodeTreeTexture Node Editor – Edit textures using nodes.BGELogicTreeLogic Node Editor.BGEBrickTreeLogic Brick Node View.
- Type:
Literal[‘GeometryNodeTree’, ‘CompositorNodeTree’, ‘ShaderNodeTree’, ‘TextureNodeTree’, ‘BGELogicTree’, ‘BGEBrickTree’]
- cursor_location_from_region(x, y)
Set the cursor location using region coordinates
- Parameters:
x (int) – x, Region x coordinate (in [-inf, inf])
y (int) – y, Region y coordinate (in [-inf, inf])
- classmethod bl_rna_get_subclass(id, default=None, /)
- Parameters:
id (str) – The RNA type identifier.
default (
bpy.types.Struct| None) – The value to return when not found.
- Returns:
The RNA type or default when not found.
- Return type:
- classmethod bl_rna_get_subclass_py(id, default=None, /)
- Parameters:
id (str) – The RNA type identifier.
default (type | None) – The value to return when not found.
- 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 (Callable[..., Any]) – A function that will be called when the region is drawn. It gets the specified arguments as input, it’s return value is ignored.
args (tuple[Any, ...]) – 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_PIXELfor 2D drawing andPOST_VIEWfor 3D drawing. In some casesPRE_VIEWcan be used.BACKDROPcan 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.