inlife / nexrender

📹 Data-driven render automation for After Effects
https://www.nexrender.com
MIT License
1.58k stars 322 forks source link

How to target the Source Text #941

Closed viratsharma56 closed 4 months ago

viratsharma56 commented 7 months ago

I am trying to edit the text for aep video. I am using this JSON for the purpose: const myJobJson = { "template": { "src": "file:///Users/virat/Downloads/sample/After Effect/Switch To Text Box Titles-2.aep", "composition": "01 Scene", "outputModule": "H.264 - Match Render Settings - 15 Mbps", "outputExt": "mp4", "settingsTemplate": "Best Settings" }, "assets": [ { "type": "data", "layerName": "01_01 Text", "composition": "01 Scene", "property": "Source Text", "value": "hello" } ] }

The layer structure of AEP looks like:

image

Getting this error: Can't find a property sequence Source Text for key: Source Textwithin layer: 01_01 Text

Can someone help me with this?

JamesBotterill commented 7 months ago

remove this from the asset "composition": "01 Scene"

You just need to reference the layer name, also the layer within the pre-comp 10_01 Text

viratsharma56 commented 7 months ago

Hey James, thanks for helping out. But I have tried with this assets: "assets": [ { "type": "data", "layerName": "01_01 Text", "property": "Source Text", "value": "hello" } ]

But it shows the same error: Can't find a property sequence Source Text for key: Source Textwithin layer: 01_01 Text

I am not able to get this point: "the layer within the pre-comp 10_01 Text" in your comment

viratsharma56 commented 7 months ago

@JamesBotterill can you help here?

JamesBotterill commented 7 months ago

apologies, the text seems to be within a "01_01 Text" pre-comp and not "01 Scene" as stated in your json object, this means it was looking in the wrong place.

I see that your pre-comp being the same name as the text layer this could be the issue as when the script is matching to an object in the project it finds the pre-comp layer first and not the text layer within it. I would try to rename of of the layers maybe the pre-comp to "01_01 Text Comp" and try again.

viratsharma56 commented 7 months ago

Yupp, it works now. Thanks

stale[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.