跳转到内容

Local Time

输出当前时间。

请注意,Local Time 主要是一个播放功能,因此可能不会始终按预期渲染到文件。该值是”真实时钟值”,因此如果渲染 150 帧需要 1 秒,那么这 150 帧中的每一帧都将获得相同的秒值。在此示例中,如果 Composition 的 Frame Rate 是 25fps,则输出在播放中每 25 帧更新一次,而在渲染中每 150 帧才更新一次。

Frame Behaviour 可用于创建 ‘counter’。

Strength - 输出的倍数。将其设置为 50% 将导致时间以一半的速度推进。

Mode - 选择要输出的时间单位:

  • Milliseconds through Second -
  • Seconds through Minute -
  • Seconds through Hour -
  • Seconds through Day -
  • Seconds through Week -
  • Seconds through Month -
  • Seconds through Year -
  • Minutes through Hour -
  • Minutes through Day -
  • Minutes through Week -
  • Minutes through Month -
  • Minutes through Year -
  • Day of the Week -
  • Day of the Month -
  • Day of the Year -
  • Month of the Year -

Output Mode -

  • Unit - 以单位/值的形式输出时间。
  • Ratio - 以比率的形式输出时间。例如,如果现在是一年的一半,则以 0.5 输出 Day of the Year

Offset - 对输出进行加减操作。

  1. 创建一个 Text Shape
  2. 使用 Text 属性右侧的 + 添加一个 String Generator
  3. Generator 设置为 Value
  4. 添加一个 Local Time
  5. Mode 设置为 Day of the Month
  6. 连接 localTime.id→stringGenerator.number。

如果今天是 8 月 11 日,Text Shape 将输出 11