Module Text
source code
The Blender.Text submodule.
Text Objects
This module provides access to Text objects in Blender.
Example:
import Blender
from Blender import Text
#
txt = Text.New("MyText") # create a new Text object
print Text.Get() # current list of Texts in Blender
txt.write("Appending some ") # appending text
txt.write("text to my\n") # '\n' inserts new-line markers
txt.write("text buffer.")
print txt.asLines() # retrieving the buffer as a list of lines
Text.unlink(txt) # removing a Text object
|
Text
This object gives access to Texts in Blender.
|
Blender Text
|
|
Blender Text or a list of Blender Texts
|
|
Blender Text
|
|
|
|
Create a new Text object.
- Parameters:
name (string) - The Text name.
follow_cursor (int) - The text follow flag: if 1, the text display always follows the
cursor.
- Returns: Blender Text
- The created Text Data object.
|
Get the Text object(s) from Blender.
- Parameters:
name (string) - The name of the Text object.
- Returns: Blender Text or a list of Blender Texts
- It depends on the 'name' parameter:
-
(name): The Text object with the given name;
-
(): A list with all Text objects in the current scene.
|
Load a file into a Blender Text object.
- Parameters:
filename (string) - The name of the file to load.
- Returns: Blender Text
- A Text object with the contents of the loaded file.
|
Unlink (remove) the given Text object from Blender.
- Parameters:
textobj (Blender Text) - The Text object to be deleted.
|