Copy link to clipboard
Copied
When I extracting Duik controllers to the other composition. it creates an expressions on controllers into composition with all my rigged character, and thats some issues when After Effect can lose name of composition in expression when I rename my comp, thats sample:
//Duik.link
var link = comp("Comp 1").layer("B_HEAD").transform.position;
var timeLayer = comp("Comp 1").layer("Boss_1");
var timeOffset = timeLayer.startTime;
link.valueAtTime(time + timeOffset);
If I want to rename my comp, AE show an error thats he can`t find composition and expression is doesnt work
I want to write a Script that can help me change this part of my expression and place the correct composition name
Say you chage the name of "Comp 1" to "New Comp Name". Your script might be as simple as this:
app.project.autoFixExpressions("Comp 1", "New Comp Name");
Copy link to clipboard
Copied
Say you chage the name of "Comp 1" to "New Comp Name". Your script might be as simple as this:
app.project.autoFixExpressions("Comp 1", "New Comp Name");
Copy link to clipboard
Copied
It works! Thank you!
But can I using this method automatically found where Script should changing text? I found this line
app.project.activeItem.propertySpec.expression
Is this what I want? Cuz I cant understand how this line works 😞
Copy link to clipboard
Copied
I'm not sure what you're asking, but I don't think you'd use .propertySpec, which is just shorthand notation for the the actual path to a property, like .property("Position"), without specifying a layer.
Copy link to clipboard
Copied
Fine, I understand, thank your very much for helping!!!