Package bpy :: Module types :: Class Text
[hide private]
[frames] | no frames]

Class Text


The Text Object

Text datablock referencing an external or packed text file.

References

Instance Methods [hide private]
 
clear()
clear the text block.
 
write(text)
write text at the cursor location and advance to the end of the text block.
 
animation_data_clear()
Clear animation on this this ID. (Inherited from bpy.types.ID)
AnimData
animation_data_create()
Create animation data to this ID, note that not all ID types support this. (Inherited from bpy.types.ID)
ID
copy()
Create a copy of this datablock (not supported for all datablocks). (Inherited from bpy.types.ID)
Instance Variables [hide private]
int (readonly) in [0, inf] current_character
Index of current character in current line, and also start index of character in selection if one exists.
TextLine (readonly) current_line
Current line, and start line of selection if one exists.
boolean (readonly) dirty
Text file has been edited since last save.
boolean fake_user
Saves this datablock even if it has no users (Inherited from bpy.types.ID)
string filename
Filename of the text file.
Library (readonly) library
Library file the datablock is linked from. (Inherited from bpy.types.ID)
Collection of TextLine (readonly) lines
Lines of text.
Collection of TextMarker (readonly) markers
Text markers highlighting part of the text.
boolean (readonly) memory
Text file is in memory, without a corresponding file on disk.
boolean (readonly) modified
Text file on disk is different than the one in memory.
string name
Unique datablock ID name. (Inherited from bpy.types.ID)
int (readonly) in [0, inf] selection_end_character
Index of character after end of selection in the selection end line.
TextLine (readonly) selection_end_line
End line of selection.
boolean tag
Tools can use this to tag data, (initial state is undefined). (Inherited from bpy.types.ID)
boolean use_module
Register this text as a module on loading.
int (readonly) in [0, 32767] users
Number of times this datablock is referenced. (Inherited from bpy.types.ID)
Method Details [hide private]

write(text)

 

write text at the cursor location and advance to the end of the text block.

Parameters:
  • text (string)

Instance Variable Details [hide private]

filename

Filename of the text file. (maximum length of 0)
Type:
string