Font Operators¶
-
bpy.ops.font.case_set(case='LOWER')¶ Set font case
Parameters: case (enum in ['LOWER', 'UPPER'], (optional)) – Case, Lower or upper case
-
bpy.ops.font.case_toggle()¶ Toggle font case
-
bpy.ops.font.change_character(delta=1)¶ Change font character code
Parameters: delta (int in [-255, 255], (optional)) – Delta, Number to increase or decrease character code with
-
bpy.ops.font.change_spacing(delta=1)¶ Change font spacing
Parameters: delta (int in [-20, 20], (optional)) – Delta, Amount to decrease or increase character spacing with
-
bpy.ops.font.delete(type='PREVIOUS_CHARACTER')¶ Delete text by cursor position
Parameters: type (enum in ['NEXT_CHARACTER', 'PREVIOUS_CHARACTER', 'NEXT_WORD', 'PREVIOUS_WORD', 'SELECTION', 'NEXT_OR_SELECTION', 'PREVIOUS_OR_SELECTION'], (optional)) – Type, Which part of the text to delete
-
bpy.ops.font.line_break()¶ Insert line break at cursor position
-
bpy.ops.font.move(type='LINE_BEGIN')¶ Move cursor to position type
Parameters: type (enum in ['LINE_BEGIN', 'LINE_END', 'PREVIOUS_CHARACTER', 'NEXT_CHARACTER', 'PREVIOUS_WORD', 'NEXT_WORD', 'PREVIOUS_LINE', 'NEXT_LINE', 'PREVIOUS_PAGE', 'NEXT_PAGE'], (optional)) – Type, Where to move cursor to
-
bpy.ops.font.move_select(type='LINE_BEGIN')¶ Move the cursor while selecting
Parameters: type (enum in ['LINE_BEGIN', 'LINE_END', 'PREVIOUS_CHARACTER', 'NEXT_CHARACTER', 'PREVIOUS_WORD', 'NEXT_WORD', 'PREVIOUS_LINE', 'NEXT_LINE', 'PREVIOUS_PAGE', 'NEXT_PAGE'], (optional)) – Type, Where to move cursor to, to make a selection
-
bpy.ops.font.open(filepath="", filter_blender=False, filter_backup=False, filter_image=False, filter_movie=False, filter_python=False, filter_font=True, filter_sound=False, filter_text=False, filter_btx=False, filter_collada=False, filter_alembic=False, filter_folder=True, filter_blenlib=False, filemode=9, relative_path=True, display_type='DEFAULT', sort_method='FILE_SORT_ALPHA')¶ Load a new font from a file
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_alembic (boolean, (optional)) – Filter Alembic files
- filter_folder (boolean, (optional)) – Filter folders
- filter_blenlib (boolean, (optional)) – Filter Blender IDs
- 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
- relative_path (boolean, (optional)) – Relative Path, Select the file relative to the blend file
- display_type (enum in ['DEFAULT', 'LIST_SHORT', 'LIST_LONG', 'THUMBNAIL'], (optional)) –
Display Type
DEFAULTDefault, Automatically determine display type for files.LIST_SHORTShort List, Display files as short list.LIST_LONGLong List, Display files as a detailed list.THUMBNAILThumbnails, Display files as thumbnails.
- sort_method (enum in ['FILE_SORT_ALPHA', 'FILE_SORT_EXTENSION', 'FILE_SORT_TIME', 'FILE_SORT_SIZE'], (optional)) –
File sorting mode
FILE_SORT_ALPHASort alphabetically, Sort the file list alphabetically.FILE_SORT_EXTENSIONSort by extension, Sort the file list by extension/type.FILE_SORT_TIMESort by time, Sort files by modification time.FILE_SORT_SIZESort by size, Sort files by size.
-
bpy.ops.font.select_all()¶ Select all text
-
bpy.ops.font.style_set(style='BOLD', clear=False)¶ Set font style
Parameters: - style (enum in ['BOLD', 'ITALIC', 'UNDERLINE', 'SMALL_CAPS'], (optional)) – Style, Style to set selection to
- clear (boolean, (optional)) – Clear, Clear style rather than setting it
-
bpy.ops.font.style_toggle(style='BOLD')¶ Toggle font style
Parameters: style (enum in ['BOLD', 'ITALIC', 'UNDERLINE', 'SMALL_CAPS'], (optional)) – Style, Style to set selection to
-
bpy.ops.font.text_copy()¶ Copy selected text to clipboard
-
bpy.ops.font.text_cut()¶ Cut selected text to clipboard
-
bpy.ops.font.text_insert(text="", accent=False)¶ Insert text at cursor position
Parameters: - text (string, (optional, never None)) – Text, Text to insert at the cursor position
- accent (boolean, (optional)) – Accent mode, Next typed character will strike through previous, for special character input
-
bpy.ops.font.text_paste()¶ Paste text from clipboard
-
bpy.ops.font.text_paste_from_file(filepath="", filter_blender=False, filter_backup=False, filter_image=False, filter_movie=False, filter_python=False, filter_font=False, filter_sound=False, filter_text=True, filter_btx=False, filter_collada=False, filter_alembic=False, filter_folder=True, filter_blenlib=False, filemode=9, display_type='DEFAULT', sort_method='FILE_SORT_ALPHA')¶ Paste contents from file
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_alembic (boolean, (optional)) – Filter Alembic files
- filter_folder (boolean, (optional)) – Filter folders
- filter_blenlib (boolean, (optional)) – Filter Blender IDs
- 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 ['DEFAULT', 'LIST_SHORT', 'LIST_LONG', 'THUMBNAIL'], (optional)) –
Display Type
DEFAULTDefault, Automatically determine display type for files.LIST_SHORTShort List, Display files as short list.LIST_LONGLong List, Display files as a detailed list.THUMBNAILThumbnails, Display files as thumbnails.
- sort_method (enum in ['FILE_SORT_ALPHA', 'FILE_SORT_EXTENSION', 'FILE_SORT_TIME', 'FILE_SORT_SIZE'], (optional)) –
File sorting mode
FILE_SORT_ALPHASort alphabetically, Sort the file list alphabetically.FILE_SORT_EXTENSIONSort by extension, Sort the file list by extension/type.FILE_SORT_TIMESort by time, Sort files by modification time.FILE_SORT_SIZESort by size, Sort files by size.
-
bpy.ops.font.textbox_add()¶ Add a new text box
-
bpy.ops.font.textbox_remove(index=0)¶ Remove the textbox
Parameters: index (int in [0, inf], (optional)) – Index, The current text box
-
bpy.ops.font.unlink()¶ Unlink active font data-block