-
Text Command to Layer Size Expression
Hey guys,
I’m creating some parameters for a template to be automated, and I am a little stuck on this;
I have one text layer (the source text) where the commands Small, Medium or Large could be written.
This would in turn change the scale of another layer.
So far, we’ve come up with the following:
x={getsourcetext}
if (x == “Small”) [80,80]
else if (x == “Medium”) [90,90]
else if (x == “Large”) [100,100]else [100,100]
The above works, but I know that I can tidy this up a little and have the 80, 90 and 100 only written once and then somehow adding the parameters at the end of the expression, but I’m not sure what is missing as if I write it as follows it won’t work:
x={getsourcetext}
s=scale
if (x == “Small”) s=80
else if (x == “Medium”) s=90
else if (x == “Large”) s=100
else 100
[s,s]I’ve also tried the above but with [x,x] at the end instead.
Could someone guide me as to how to tidy this up a little and write it in a way where I wouldn’t need to write the 80,90 and 100 twice please?
Thanks!