0
$\begingroup$

I can add a Text strip with the following code:

 effName = "eff" + tCStr[-3:] effName = sequences.new_effect( name=tField, type="TEXT", channel=tChan, frame_start=fStart, frame_end=fEnd) 

I can also specify the location, size, color, and text content in my Python script, but I have not been able to change the font.

Can some kind soul please give me a clue how to do this?

I know the following don't work:

fnt = bpy.data.fonts.load(tFont) bpy.ops.font.open(tFont) bpy.context.scene.sequence_editor.sequences_all[tField].font = tFont 

Note: tFont has the full path to the font.

$\endgroup$
0

1 Answer 1

1
$\begingroup$

Ok, I figured this one out.

tFont = 'fonts/' + row3[7] + '.ttf' # read font from .csv data file fnt = bpy.data.fonts.load(tFont) # load font bpy.context.scene.sequence_editor.sequences_all[tField].font = fnt # change font bpy.context.scene.sequence_editor.sequences_all[tField].text = 'Text' # use font 
$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.