I'm beginner in Blender and I don't even know if it is possible: I have an animation which I need to render multiple times with only difference in name of person used. (Like Hello, Mark next renderHello, Dan and so on)... I tried to use (to change the text): bpy.data.objects["jmeno"].data.body = "Ahoj Dane" in console ,
- there was no error, but nothing happened in 3d viewport.
(btw. Jméno is in Czech name, ahoj is hello). Thank You

  • $\begingroup$ Please upload your .blend $\endgroup$ – WhatAMesh Aug 10 '18 at 19:51
  • 1
    $\begingroup$ The command looks Ok to me. Try selecting the text object (ie give it context) and type C.object.data.body = "New Body" into the python console ( C is a py console shortcut for bpy.context.) $\endgroup$ – batFINGER Aug 11 '18 at 9:07
import bpy

for obj in bpy.data.objects:
    obj.select = False

bpy.context.scene.objects.active = bpy.data.objects['Text']

bpy.ops.object.mode_set(mode='EDIT', toggle=False)


bpy.ops.font.text_insert(text="Scripted text")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.