• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

"Buzz Words" text preset starts at non-first word if layer doesn't start at 00s

Enthusiast ,
Mar 14, 2017 Mar 14, 2017

Copy link to clipboard

Copied

I just ran into this bug playing around with the "Buzz Words" text preset, a preset which allows you to to cycle through list of words on a text layer rather than having to keyframe the words. The bug is in the logic of the expression included with the preset. I have developed a fix for this, which I'll describe below. I'll create a bug report as well and send it to Adobe.

Recreation steps:

  1. Create new composition
  2. Create text layer, which AE will position at 00s (0 seconds) into the composition
  3. Drag "Buzz Words" preset to layer. Scrub through the layer with the CTI and notice how the preset properly cycles through the words "One".."Ten"
  4. Drag the text layer from 00s to 5s. Scrub through the layer with the CTI and notice how the preset starts at word "Five" instead of "One"

The issue is with the expression the preset uses for "Source Text", which is as follows:

buzz_words = "One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten";

split_buzz_words_array = buzz_words.split('|');

buzz_frame_rate = effect("Buzz Frame Rate")(1);

buzz_frame = Math.floor(time * buzz_frame_rate);

buzz_index = buzz_frame % split_buzz_words_array.length;

split_buzz_words_array[buzz_index];

The problem is in the line that calculates the word index, which is "buzz_frame". The logic is using is the AE variable "time", which is the current time into the composition rather than the time into the layer itself, the later of which should be used to index the user-specified word list. Here is my proposed fix (new logic in bold):

layer_index = hasParent ? parent.index : index;

time_into_layer = time - thisComp.layer(layer_index).startTime;

time_into_layer = Math.max(0,  time_into_layer); // necessary if CTI is presently before start of layer, results in neg #

buzz_words = "One|Two|Three|Four|Five|Six|Seven|Eight|Nine|Ten";

split_buzz_words_array = buzz_words.split('|');

buzz_frame_rate = effect("Buzz Frame Rate")(1);

buzz_frame = Math.floor(time_into_layer * buzz_frame_rate);

buzz_index = buzz_frame % split_buzz_words_array.length;

split_buzz_words_array[buzz_index];

Views

843

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 15, 2017 Mar 15, 2017

Copy link to clipboard

Copied

LATEST

Thanks for sharing!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines