This object gives access to Texts in Blender.
string
|
getName()
Get the name of this Text object. |
|
|
|
setName(name)
Set the name of this Text object. |
|
|
string
|
getFilename()
Get the filename of the file loaded into this Text object. |
|
|
int
|
getNLines()
Get the number of lines in this Text buffer. |
|
|
|
clear()
Clear this Text object: its buffer becomes empty. |
|
|
|
reset()
Reset the read IO pointer to the start of the buffer. |
|
|
string
|
readline()
Reads a line of text from the buffer from the current IO pointer
position to the end of the line. |
|
|
|
set(attribute,
value)
Set this Text's attributes. |
|
|
|
write(data)
Append a string to this Text buffer. |
|
|
|
insert(data)
Inserts a string into this Text buffer at the cursor. |
|
|
list of strings
|
asLines(start=0,
end=-1)
Retrieve the contents of this Text buffer as a list of strings
between the start and end lines specified. |
|
|
(int, int)
|
getCursorPos()
Retrieve the position of the cursor in this Text buffer. |
|
|
|
setCursorPos(row,
col)
Set the position of the cursor in this Text buffer. |
|
|
(int, int)
|
getSelectPos()
Retrieve the position of the selection cursor in this Text buffer. |
|
|
|
setSelectPos(row,
col)
Set the position of the selection cursor in this Text buffer. |
|
|
|
suggest(list,
prefix='
' )
Suggest a list of names. |
|
|
|
showDocs(docs)
Displays a word-wrapped message box containing the specified
documentation when this Text object is visible. |
|
|
bool
|
fakeUser
When set to True, this datablock wont be removed, even if nothing is
using it.
|
|
filename
The filename of the file loaded into this Text.
|
string or None
|
lib
path to the blend file this datablock is stored in (readonly).
|
|
mode
The follow_mode flag: if 1 it is 'on'; if 0, 'off'.
|
string
|
name
unique name within each blend file.
|
|
nlines
The number of lines in this Text.
|
IDGroup
|
properties
Returns an IDGroup reference to this datablocks's ID
Properties.
|
bool
|
tag
A temporary tag that to flag data as being used within a loop.
|
int
|
users
The number of users this datablock has.
|