Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r--release/scripts/modules/bpy_types.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 6e4596a1109..edead35dafe 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -410,6 +410,19 @@ class MeshFace(StructRNA):
return ord_ind(verts[0], verts[1]), ord_ind(verts[1], verts[2]), ord_ind(verts[2], verts[3]), ord_ind(verts[3], verts[0])
+class Text(bpy_types.ID):
+ __slots__ = ()
+
+ def as_string(self):
+ """Return the text as a string."""
+ return "\n".join(line.line for line in self.lines)
+
+ def from_string(self, string):
+ """Replace text with this string."""
+ self.clear()
+ self.write(string)
+
+
import collections