Use assets with type: "data" to dynamically change properties (like text, position, or color) in After Effects. This allows for data-driven video generation.
Key Fields:
type: Always "data".layerName / layerIndex: Identifies the target layer.property: The name of the property to change (e.g., "Position", "Source Text", or deep properties like "Effects.Skin_Color.Color").value: The value to set. Can be a primitive or an array (e.g., [500, 100] for Position).expression: An After Effects expression string to be evaluated every frame.composition: The composition where the layer resides (supports -> for nested paths).continueOnMissing: Boolean; if true, bypasses errors if the layer is not found.
Deep Properties:
To access nested properties, use a dot . separator (e.g., "Source Text.font"). If your property name contains a dot and causes parsing collisions, use an arrow -> instead.
Warning: Errors in your expression will prevent the project from rendering. Check the After Effects binary error messages for details.
{
"assets": [
{
"type": "data",
"layerName": "MyNicePicture.jpg",
"property": "Position",
"value": [500, 100]
},
{
"type": "data",
"layerName": "my text field",
"property": "Source Text",
"expression": "time > 100 ? 'Bye bye' : 'Hello world'"
},
{
"type": "data",
"layerName": "my text field",
"property": "Source Text.font",
"value": "Arial-BoldItalicMT"
},
{
"type": "data",
"layerName": "background",
"property": "Effects.Skin_Color.Color",
"value": [1, 0, 0]
},
{
"type": "data",
"layerIndex": 15,
"property": "Scale",
"expression": "[time * 0.1, time * 0.1]"
}
]
}