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:71
bpy.ops.console.banner()

Print a message when the terminal initializes

File:startup/bl_operators/console.py:116
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()

Copy selected text to clipboard

bpy.ops.console.copy_as_script()

Copy the console contents for use in a script

File:startup/bl_operators/console.py:93
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:47
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.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:148
bpy.ops.console.move(type='LINE_BEGIN')

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
bpy.ops.console.paste()

Paste text from clipboard

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_set()

Set the console selection

bpy.ops.console.unindent()

Delete 4 spaces from line beginning

Previous topic

Cloth Operators

Next topic

Constraint Operators