def format_text(self):
global TW
out = []
if self.text:
lines = self.text.splitlines()
elif self.text_file:
text_file = bpy.data.texts.get(self.text_file)
if text_file:
lines = get_lines(text_file)
else:
return []
else:
return []
width = self.width
TW.width = int(width) // TEXT_WIDTH
for t in lines:
out.extend(TW.wrap(t))
out.append("")
return out
评论列表
文章目录