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

  • Please upload your .blend – WhatAMesh Aug 10 at 19:51
  • 1
    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.) – batFINGER Aug 11 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.delete(type='ALL')

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

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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