Package bpy :: Package ops :: Module text
[hide private]
[frames] | no frames]

Module text

Functions [hide private]
 
comment()
Convert selected text to comment.
 
convert_whitespace(type='SPACES')
Convert whitespaces by type.
 
copy()
Copy selected text to clipboard.
 
cursor_set(select=False)
Set cursor selection.
 
cut()
Cut selected text to clipboard.
 
delete(type='NEXT_CHARACTER')
Delete text by cursor position.
 
find()
Find specified text.
 
find_set_selected()
Find specified text and set as selected.
 
indent()
Indent selected text.
 
insert(text='')
Insert text at cursor position.
 
jump(line=1)
Jump cursor to line.
 
line_break()
Insert line break at cursor position.
 
line_number()
The current line number.
 
make_internal()
Make active text file internal.
 
mark_all()
Mark all specified text.
 
markers_clear()
Clear all markers.
 
move(type='LINE_BEGIN')
Move cursor to position type.
 
move_select(type='LINE_BEGIN')
Make selection from current cursor position to new cursor position type.
 
new()
Create a new text data block.
 
next_marker()
Move to next marker
 
open(path='', filename='', directory='', filter_blender=False, filter_image=False, filter_movie=False, filter_python=True, filter_font=False, filter_sound=False, filter_text=True, filter_folder=True, filemode=9)
Open a new text data block.
 
overwrite_toggle()
Toggle overwrite while typing.
 
paste(selection=False)
Paste text from clipboard.
 
previous_marker()
Move to previous marker.
 
properties()
Toggle text properties panel.
 
refresh_pyconstraints()
Refresh all pyconstraints.
 
reload()
Reload active text data block from its file.
 
replace()
Replace text with the specified text.
 
replace_set_selected()
Replace text with specified text and set as selected.
 
resolve_conflict(resolution='IGNORE')
When external text is out of sync, resolve the conflict.
 
run_script()
Run active script.
 
save()
Save active text data block.
 
save_as(path='', filename='', directory='', filter_blender=False, filter_image=False, filter_movie=False, filter_python=True, filter_font=False, filter_sound=False, filter_text=True, filter_folder=True, filemode=9)
Save active text file with options.
 
scroll(lines=1)
Scroll text screen.
 
scroll_bar(lines=1)
Scroll text screen.
 
select_all()
Select all text.
 
select_line()
Select text by line.
 
to_3d_object(split_lines=False)
Create 3d text object from active text data block.
 
uncomment()
Convert selected comment to text.
 
unindent()
Unindent selected text.
 
unlink()
Unlink active text data block.
Function Details [hide private]

convert_whitespace(type='SPACES')

 

Convert whitespaces by type.

Parameters:
  • type (enum) - Type of whitespace to convert to. in (SPACES, TABS)

cursor_set(select=False)

 

Set cursor selection.

Parameters:
  • select (boolean)

delete(type='NEXT_CHARACTER')

 

Delete text by cursor position.

Parameters:
  • type (enum) - Which part of the text to delete. in (NEXT_CHARACTER, PREVIOUS_CHARACTER, NEXT_WORD, PREVIOUS_WORD)

insert(text='')

 

Insert text at cursor position.

Parameters:
  • text (string)

jump(line=1)

 

Jump cursor to line.

Parameters:
  • line (int) - Line number to jump to. in (1, inf)

move(type='LINE_BEGIN')

 

Move cursor to position type.

Parameters:
  • type (enum) - Where to move cursor to. in (LINE_BEGIN, LINE_END, FILE_TOP, FILE_BOTTOM, PREVIOUS_CHARACTER, NEXT_CHARACTER, PREVIOUS_WORD, NEXT_WORD, PREVIOUS_LINE, NEXT_LINE, PREVIOUS_PAGE, NEXT_PAGE)

move_select(type='LINE_BEGIN')

 

Make selection from current cursor position to new cursor position type.

Parameters:
  • type (enum) - Where to move cursor to, to make a selection. in (LINE_BEGIN, LINE_END, FILE_TOP, FILE_BOTTOM, PREVIOUS_CHARACTER, NEXT_CHARACTER, PREVIOUS_WORD, NEXT_WORD, PREVIOUS_LINE, NEXT_LINE, PREVIOUS_PAGE, NEXT_PAGE)

open(path='', filename='', directory='', filter_blender=False, filter_image=False, filter_movie=False, filter_python=True, filter_font=False, filter_sound=False, filter_text=True, filter_folder=True, filemode=9)

 

Open a new text data block.

Parameters:
  • filemode (int) - The setting for the file browser mode to load a .blend file, a library or a special file. in (1, 9)
  • filter_text (boolean)
  • filter_sound (boolean)
  • filter_image (boolean)
  • filter_movie (boolean)
  • filter_blender (boolean)
  • filename (string)
  • filter_font (boolean)
  • filter_python (boolean)
  • directory (string)
  • path (string)
  • filter_folder (boolean)

paste(selection=False)

 

Paste text from clipboard.

Parameters:
  • selection (boolean)

resolve_conflict(resolution='IGNORE')

 

When external text is out of sync, resolve the conflict.

Parameters:
  • resolution (enum) - How to solve conflict due to different in internal and external text. in (IGNORE, RELOAD, SAVE, MAKE_INTERNAL)

save_as(path='', filename='', directory='', filter_blender=False, filter_image=False, filter_movie=False, filter_python=True, filter_font=False, filter_sound=False, filter_text=True, filter_folder=True, filemode=9)

 

Save active text file with options.

Parameters:
  • filemode (int) - The setting for the file browser mode to load a .blend file, a library or a special file. in (1, 9)
  • filter_text (boolean)
  • filter_sound (boolean)
  • filter_image (boolean)
  • filter_movie (boolean)
  • filter_blender (boolean)
  • filename (string)
  • filter_font (boolean)
  • filter_python (boolean)
  • directory (string)
  • path (string)
  • filter_folder (boolean)

scroll(lines=1)

 

Scroll text screen.

Parameters:
  • lines (int) - Number of lines to scroll. in (-inf, inf)

scroll_bar(lines=1)

 

Scroll text screen.

Parameters:
  • lines (int) - Number of lines to scroll. in (-inf, inf)

to_3d_object(split_lines=False)

 

Create 3d text object from active text data block.

Parameters:
  • split_lines (boolean)