Skip to main content
mwojt-bshg
Participant
February 6, 2026

TextDocument.direction property does not persist after setValue() in After Effects 2025

  • February 6, 2026
  • 0 replies
  • 20 views

Product & Version

  • Product: Adobe After Effects
  • Version: 25.2.0
  • Operating System: Windows 11

 

Summary

The ParagraphRange.direction property can be set programmatically via ExtendScript, but the value does not persist after calling Property.setValue(). The justification property on the same ParagraphRange object works correctly, indicating this is specific to the direction property.

 

Steps to Reproduce

  1. Create a new composition in After Effects 2025
  2. Add a text layer with any content (e.g., "Hello World")
  3. Run the following ExtendScript code:
var comp = app.project.activeItem;
var layer = comp.layer(1); // First text layer

var prop = layer.property("Source Text");
var td = prop.value;

// Get paragraph range
var paragraphCount = td.text.split(/\r/).length;
var paraRange = td.paragraphRange(0, paragraphCount);

// Log current state
$.writeln("Direction BEFORE: " + paraRange.direction); // undefined

// Set direction to RTL
paraRange.direction = ParagraphDirection.DIRECTION_RIGHT_TO_LEFT;
$.writeln("Direction AFTER assignment: " + paraRange.direction); // 10213 (correct)

// Also set justification for comparison
paraRange.justification = ParagraphJustification.RIGHT_JUSTIFY;

// Commit changes
prop.setValue(td);

// Verify persistence
var tdVerify = prop.value;
var paraRangeVerify = tdVerify.paragraphRange(0, paragraphCount);
$.writeln("Direction AFTER setValue: " + paraRangeVerify.direction); // undefined (BUG!)
$.writeln("Justification AFTER setValue: " + paraRangeVerify.justification); // 2 (works correctly)

Expected Behavior

After calling prop.setValue(td), the direction property should persist with the value ParagraphDirection.DIRECTION_RIGHT_TO_LEFT (10213), just as the justification property does.

 

Actual Behavior

The direction property reverts to undefined after setValue() is called, even though:

  • The assignment (paraRange.direction = 10213) works without errors
  • The value is correctly set on the object before setValue()
  • Other paragraph properties (like justification) persist correctly
  • The property exists and is documented in the scripting reference