Is it possible to link text objects in such a manner, that changing the text content on one object will automatically also change the text of another text object.
To clarify, I do not want to link any other properties of those two objects (like fonts for example), only the source text.
this a script that uses the scene update handler to synchronize two text object content :
import bpy
obj1 = bpy.context.selected_objects[0].name
obj2 = bpy.context.selected_objects[1].name
def link_text_objects(scene):
obj = bpy.context.active_object
if obj.type == 'FONT':
if obj.name == obj1 :
scene.objects[obj2].data.body = obj.data.body
else :
scene.objects[obj1].data.body = obj.data.body
bpy.app.handlers.scene_update_pre.append(link_text_objects)
In case somebody is looking at this with Blender 2.8. @Chebhou's script still works if you replace scene_update_pre with depsgraph_update_pre. So it's this:
import bpy
obj1 = bpy.context.selected_objects[0].name
obj2 = bpy.context.selected_objects[1].name
def link_text_objects(scene):
obj = bpy.context.active_object
if obj.type == 'FONT':
if obj.name == obj1 :
scene.objects[obj2].data.body = obj.data.body
else :
scene.objects[obj1].data.body = obj.data.body
bpy.app.handlers.depsgraph_update_pre.append(link_text_objects)