-
Extracting part of value of source text
Hi,
I’m trying to write a short expression which can extract different part of source text and pass it on to another property
So say the text layer called “color” contains this value 0.23545;0.65758;0.34675
And in the same comp there’s a solid layer “solid” which color can be driven by expression. This expression should produce [w,x,y,z]. in my case z will always be 0, so I’ll need a result of [w,x,y,0]. And these w,x and w should take part of values from the source text “color”.
I believe this expression for “solid” layer should look like that
w=thisComp.layer(“color”).text.sourceText. and some rule for taking just the first bit of value before first semicolon;
x=thisComp.layer(“color”).text.sourceText. and some rule for taking the second bit of value after first semicolon and before the second one;
y=thisComp.layer(“color”).text.sourceText. and some rule for taking third bit of value after the second semicolon;
[w,x,y,0]At the end this expression should produce [0.23545,0.65758,0.34675,0]
Thanks a lot in advance for your help,
Kirill