Console Operators#

bpy.ops.console.autocomplete()#

Evaluate the namespace up until the cursor and give a list of options or complete the name if there is only one

File:

startup/bl_operators/console.py:59

bpy.ops.console.banner()#

Print a message when the terminal initializes

File:

startup/bl_operators/console.py:102

bpy.ops.console.clear(scrollback=True, history=False)#

Clear text by type

Parameters:
  • scrollback (boolean, (optional)) – Scrollback, Clear the scrollback history

  • history (boolean, (optional)) – History, Clear the command history

bpy.ops.console.clear_line()#

Clear the line and store in history

bpy.ops.console.copy(delete=False)#

Copy selected text to clipboard

Parameters:

delete (boolean, (optional)) – Delete Selection, Whether to delete the selection after copying

bpy.ops.console.copy_as_script()#

Copy the console contents for use in a script

File:

startup/bl_operators/console.py:80

bpy.ops.console.delete(type='NEXT_CHARACTER')#

Delete text by cursor position

Parameters:

type (enum in ['NEXT_CHARACTER', 'PREVIOUS_CHARACTER', 'NEXT_WORD', 'PREVIOUS_WORD'], (optional)) – Type, Which part of the text to delete

bpy.ops.console.execute(interactive=False)#

Execute the current console line as a Python expression

Parameters:

interactive (boolean, (optional)) – interactive

File:

startup/bl_operators/console.py:36

bpy.ops.console.history_append(text='', current_character=0, remove_duplicates=False)#

Append history at cursor position

Parameters:
  • text (string, (optional, never None)) – Text, Text to insert at the cursor position

  • current_character (int in [0, inf], (optional)) – Cursor, The index of the cursor

  • remove_duplicates (boolean, (optional)) – Remove Duplicates, Remove duplicate items in the history

bpy.ops.console.history_cycle(reverse=False)#

Cycle through history

Parameters:

reverse (boolean, (optional)) – Reverse, Reverse cycle history

bpy.ops.console.indent()#

Add 4 spaces at line beginning

bpy.ops.console.indent_or_autocomplete()#

Indent selected text or autocomplete

bpy.ops.console.insert(text='')#

Insert text at cursor position

Parameters:

text (string, (optional, never None)) – Text, Text to insert at the cursor position

bpy.ops.console.language(language='')#

Set the current language for this console

Parameters:

language (string, (optional, never None)) – Language

File:

startup/bl_operators/console.py:134

bpy.ops.console.move(type='LINE_BEGIN', select=False)#

Move cursor position

Parameters:
  • type (enum in ['LINE_BEGIN', 'LINE_END', 'PREVIOUS_CHARACTER', 'NEXT_CHARACTER', 'PREVIOUS_WORD', 'NEXT_WORD'], (optional)) – Type, Where to move cursor to

  • select (boolean, (optional)) – Select, Whether to select while moving

bpy.ops.console.paste(selection=False)#

Paste text from clipboard

Parameters:

selection (boolean, (optional)) – Selection, Paste text selected elsewhere rather than copied (X11/Wayland only)

bpy.ops.console.scrollback_append(text='', type='OUTPUT')#

Append scrollback text by type

Parameters:
  • text (string, (optional, never None)) – Text, Text to insert at the cursor position

  • type (enum in ['OUTPUT', 'INPUT', 'INFO', 'ERROR'], (optional)) – Type, Console output type

bpy.ops.console.select_all()#

Select all the text

bpy.ops.console.select_set()#

Set the console selection

bpy.ops.console.select_word()#

Select word at cursor position

bpy.ops.console.unindent()#

Delete 4 spaces from line beginning