I'm trying to link up my expressions to one central Controller layer so that that one expression is shared across all objects in my project which require it.
I have "// Controller" composition with "Expression_Source (tK-logo_anim)" text layer. Its source text expression is set to my desired expression:
sourceLayer = comp("Killers logo (test)").layer("tK-logo_anim_mask");
sampleSize = [1,1];
samplePoint = transform.position;
color = sourceLayer.sampleImage(samplePoint,sampleSize);
x=color[0]*100;
[x,x]
Now, another composition includes a shape layer with its Transform Expression: Scale set to:
eval(comp("// Controller").layer("Expression_Source (tK-logo_anim)").text.sourceText.toString())
But when I try to hit enter on this line of code I get error: expression result must be of dimension 2, not 1
What am I doing incorrectly? The expression works when inserted manually into the Scale property but not when I try to link to it...
Thanks