Reading string value of font object

Hello all,

I’m trying to read the string value of a font object into a python variable. But I can’t figure out how to do this. I’m sure this is really simple, so I apologize if it’s obvious. Can anybody help me? Let’s assume that the user has selected the text object. So from there, how would I go about getting the string value of the selected object.

Thanks - Andrew

Of course, as soon as I posted this, I figured it out. Haha. For posterity, here’s the solution:


“bpy.context.selected_objects[0]” gets the first selected object

“.data” retrieves the text curve object

“.body” retrieves the string value