0
$\begingroup$

I have 50 texts objects, each text object has 2-3 lines of text, is there a script that would allow me to enter a text in the script and it would change the textenter image description here

$\endgroup$

1 Answer 1

0
$\begingroup$

I didn't really get if you wanted to change all the texts to the same thing or if you had input phrases and wanted to populate your texts with but her's solutions to both :

import bpy

for obj in bpy.data.objects:
    if obj.type != "FONT":
        continue
    obj.data.body = "This is my first line\nThis is my second line\nAnd my third"
import bpy

paragraphs = [
    "This is the content of my first text",
    "This is the content of my second text",
    "This is the content of my third text",
    # etc.
    ]


for obj in bpy.data.objects:
    if obj.type != "FONT":
        continue
    obj.data.body = paragraphs.pop(0)
    if not paragraphs:  # We used all our texts
        break
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .