Skip to main content
Participant
March 27, 2024
Answered

Source Text Reverting to previous value

  • March 27, 2024
  • 2 replies
  • 1410 views

I have a text layer with the source text being an expression for a data value from a csv

footage("Car facts.csv").dataValue([0,0])

 The text displays on screen for about 30 seconds but during that 30 seconds it flicks at random times between the text and some placeholder text I used in the layer whilst I was designing the layout. If I change the value to another part of the source spreadsheet it flicks between the new (correct) value and the oroiginal placeholder text but at different time periods. Seems to be random.

It does this in the preview, when I render from AE and when I render from AME.

Any suggestions what might be cuasing it?

This topic has been closed for replies.
Correct answer Airweb_AE

It seems to be a bug. You need to use a script to fix it.

Run the script below.

It should set the selected text layer value with the expression value and disable the expression.

You can also directly add the composition to the render queue.

 

CSV_FIX.jsx

var proj = app.project;
var thisComp = proj.activeItem;
var selectedLayers = thisComp.selectedLayers;
app.beginUndoGroup("undo");
for (var i = 0; i < selectedLayers.length; i++) {
  if (thisComp.selectedLayers[i] instanceof TextLayer) {
    var sourceText = thisComp.selectedLayers[i].text.sourceText;
    sourceText.setValue(sourceText.value);
    sourceText.expressionEnabled = false;
  }
}
app.endUndoGroup();

// AddtoRenderQueue
app.executeCommand(2161);

// OR using Media Encoder
// app.executeCommand(3800);

 

2 replies

Airweb_AECorrect answer
Legend
March 27, 2024

It seems to be a bug. You need to use a script to fix it.

Run the script below.

It should set the selected text layer value with the expression value and disable the expression.

You can also directly add the composition to the render queue.

 

CSV_FIX.jsx

var proj = app.project;
var thisComp = proj.activeItem;
var selectedLayers = thisComp.selectedLayers;
app.beginUndoGroup("undo");
for (var i = 0; i < selectedLayers.length; i++) {
  if (thisComp.selectedLayers[i] instanceof TextLayer) {
    var sourceText = thisComp.selectedLayers[i].text.sourceText;
    sourceText.setValue(sourceText.value);
    sourceText.expressionEnabled = false;
  }
}
app.endUndoGroup();

// AddtoRenderQueue
app.executeCommand(2161);

// OR using Media Encoder
// app.executeCommand(3800);

 

Participant
March 28, 2024

This worked a treat, thank you very much.

ShiveringCactus
Community Expert
Community Expert
March 27, 2024

I've not experienced that myself, but it sounds like a caching problem.  Have you tried clearning your cache.  At that point AE should use the CSV solely for building previews (instead of the placeholder).  I seem to remember there was a bug with AME and CSV files.  But I rarely use CSV files so I'm not sure if it was resolved.

 

This bug thread might have more information: https://community.adobe.com/t5/after-effects-bugs/render-problems-csv-files-and-after-effects/idc-p/13701162/1000

Participant
March 27, 2024

I've cleared the cache, closed AE and re-opened, and updated to the latest version but none of these fixed.

 

I had read a few posts about issues with AME and csvs but I'm getting the problem even in the preview in AE. When I do render it via AME the correct text is there for the majority of the video it's just random glitch like flickers to the previous text and then back again. I've attached a short demo of it from a rended done via AME.

ShiveringCactus
Community Expert
Community Expert
March 27, 2024

Just to test, what happens if you set the text value to the layer's name using expressions?  (in the expressions area, use the pickwhip to link to a layer - the name should appear in text)

 

I'm wondering if it's limited to the CSV or if it's the text layer.

 

Might also be worth replacing the text layer with a new one to compare (can't imagine this would make much difference).    You could try rendering out as an image sequence and see if the glitch continues (I'm wondering if some pre-compression thing is happening)