[AddOn] Re:Phrase (A Font Copy/Body Text Animator) 2.57 r36433

Hi All,

One the problems with the new 2.5 redesign is that there is no way to animate string type custom properties that we might like to associate with our objects.

Re:Phrase is an attempt to add string based animation into the mix.
Pull the BLEND file down and press Play to see it in action.

After you run or install the file addon_re_phrase.py (contained inside the attached BLEND file), press SHIFT-A in a 3D view. Choose RE:Phrase Text Animator to add a managed font object to the scene. You can add multiple RePhrase objects to your scene. Select the RePhrase object and then activate the Object properties context for the object. Scroll to the bottom and you should see a RE:Phrase panel. Use this panel to add multiple phrases to the font object. Click the + or - buttons to manipulate the list. Select the phrase directly to edit it. Animate the Phrases_Index property to change the phrase over time.

Attachments



25_addon_re_phrase_1b.blend (98.3 KB)

Looks very nice … and I will have a look (later) to use your ‘ideas’ in the xyz-script :slight_smile: Thanks for sharing!

EDIT: your script in action http://petergragert.info/images/Blender/GIF/peterAni1.gif

I received a private message about animating text to make it appear at a specific point in time.

This can easily be done using RE:Phrase.

Create a RE:Phrase text object, using the AddOn.
By default, a RE:Phrase font object has only one phrase. But we need two for this task so go ahead and click the + button in the object properties panel at the bottom to add another phrase to the font.
Make the first phrase a SPACE character.
Make the second phrase any copy that you need to appear in your animation.
Move the timeline to the keyframe where you want the text to appear.
Set a keyframe for the Phrases_Index custom property (by default it should already be zero).
Move to the next frame and set the Phrases_Index to 1 and key frame it.

That’s it. Now you can make text appear and disappear without having to animate it off screen or hide it’s layer.

hmmm. is there a way to deal with kerning?

No 3D application deals with kerning well. Its like developers have never had to go through any kind of approval process with an art director?

Kerning in the 3D world is typically handled by converting your approved illustrator font or layout into a curve, then importing that for extrusion.

But you can, of course, use RE:Phase to simulate kerning. Just make multiple copies of your font with only the part of the phrase that needs adjusting, then parent them all to an empty so it will still move as a single phrase. When you break a single phrase into parts, you get the ability to use the CHARACTER spacing on only that part. Sometimes with kerning, all you need is to tweak one or two letters.

@snowglobe you mean e.g. : bpy.ops.font.change_spacing(delta=10) :wink: ?

yeah it would be neat to include some simple markup ideas in the string textbox for example:

T<d-2>ext Editor

where < and > might be some special escape codes, or another combination like those in python might be more appropriate.

But ideally I would want to set up a Kerning table per typeface that could be re-used any time I use a typeface. So if I define a kerning pair, any time that pair exists in the text the space in-between will be adjusted. This method keeps the “string” definitions nice and clean and at the same time gives us a decent bit of control over the appearance.

Kerning doesn’t seem to be available by python yet. But maybe it is, quickly I haven’t been able to find it.


for m in bpy.context.active_object.data.body: print(dir(m))

@snowglobe: Nice to know!

T<d-2>ext Editor
To uglify the text field with markup seems unintuitive but could work.

bpy.ops
and bpy.context do not play well with frameChange events. Good luck integrating them into any kind of frame change system. You can end up with errors when you try to render an animation (even if it works in the GUI) because Blender launches a limited Dummy thread for rendering and the context becomes invalid. So if you go down that route test the ability to render animations as you develop or make changes to the code. Or you may be surprised when it comes time for output.

RE:Phrase is meant to be quick and easy to use but feel free to modify the AddOn, that is why I posted it. Make us a better RE:Phase!

There is "Tracking’ and there is ‘Kerning’

Tracking can be accessed from the GUI and python (called spacing in blender, default = 1.000 ), this modifies the distance between consecutive letters.

Kerning can not be accessed (as far as i am aware, at the moment) from python and there is no way to adjust it using the GUI. The only way to adjust kerning per ‘letter pair’ is Alt+ left /right in edit-mode with the TextCursor between two characters. (described in the link by snowglobe.)

@Atom : regarding Markup

seems unintuitive but could work.

Personally I would favour a kerning pair table, written in the Text Editor or as a Modifier exclusively available to Text objects. Some method that would allow a set of rules to be reused in different projects easily.

Ideally typefaces already have their own kerning table, but a lot the free typefaces/fonts out there are criminally lacking in that respect. Naturally these limitations aren’t going to pose any problems to someone who is determined to make nice typography / kinetic type animations.

Great addon Atom! I wish kerning existed here too :frowning: I also wish there was a cool way to find new addons (a more easily searched repository) as it can be easy to miss the ones that might interest you. they tend to disappear of this thread quickly.

use the ‘trackers’ of blender or e.g. this? https://svn.blender.org/svnroot/bf-extensions/contrib/py/scripts/addons/

Cool addon

Atom, nice to see you on 2.5!
Cool Addon!

Cool script. This simplifies a number of text objects that I was going to fade in and out so now I can do it with a single text object and material.

I’m not sure why, but I received an error when I ran it, complaining about frameChangeRePhrase(this_frame), which I suppose means something went wrong when it tried to create the frame script. Perhaps something with the order I installed the addon vs running the script manually. Everything worked except the phrases weren’t being changed, so I appended the empty and frame script from your blend file and then it started working.

That error occurs when there is an unhandled exception in the frame change script itself. This effectively unlinks the per-frame driver call by the rotating EMPTY (event crank). When you re-imported the empty, it must have re-linked the driver to the script.

Glad it is working for you.