Page 1 of 1

Linking values with scripts

Posted: September 16th, 2010, 9:05 pm
by maximumrfan
I decided to change all of my animation presets that I made intro script files (for convenience). One of them is a preset that allows me to change the settings for the "Lens Flare" effect very quickly. I'm running into a problem when trying to link up the value to a point control. I can't figure out how to make the "Flare Center" value link up to my point controller using scripts. I know this probably sounds like a noobish question, but I am seriously stumped.
Thanks,
Matthew :)

Re: Linking values with scripts

Posted: September 29th, 2010, 6:24 am
by Paul Tuersley
Do you mean linking the values using expressions? You can add expressions to properties with scripts using code like

Code: Select all

theProperty.expression = "the expression"
Maybe you could post the code you have so far if you can't figure it out.

Re: Linking values with scripts

Posted: October 12th, 2010, 8:07 pm
by RoRK
I'm trying to do something similar. I currently have four Expression Controls on multiple layers. I would like to change the values of these Expression Controls. I would like to do this to the individual Expression Controls and another script to set all four back to their 'default' values.

I've tried using FFXs but they create new Expression Controls instead of affecting the existing Expression Control(s). I've even tried writing an Expression embedded into the FFX but it's the same result. The only way to get around this is to explicitly select the Expression Control before apply the FFX BUT with a few hundred layers it gets kinda painful real quick. Ideally, I would like to just select the layers and apply the script to the selected layers.

So I'm thinking perhaps a JSX would do the trick.

Any assistance would be great!

- RoRK