0
$\begingroup$

I would greatly appreciate any tips and/or sample scripts on how (in Python / Blender 2.8) to convert a text object into a mesh object.

$\endgroup$
1
$\begingroup$

The laziest way to do it is to use the same operation that the Alt-c performs when done interactively : bpy.ops.object.convert(target="MESH") . Unfortunately, this shares the problem of every function in bpy.ops. You have to set up the interactive environment (what object is active/selected). It would look something like this:

import bpy

def mission1(obj):
    scn = bpy.context.scene
    for o2 in scn.objects:
        o2.select = ( o2 == obj )
    scn.objects.active = obj

    bpy.ops.object.convert(target="MESH")

mission1(bpy.data.objects['Text.001'])

If there is a way to accomplish this without using bpy.ops, I was too lazy to dig it up.

$\endgroup$

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.