Linking values with scripts

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
maximumrfan
Posts: 8
Joined: September 16th, 2010, 8:13 pm

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 :)
Paul Tuersley
Posts: 704
Joined: June 5th, 2004, 7:59 am
Location: London, UK

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.
RoRK
Posts: 5
Joined: January 7th, 2005, 7:33 pm
Location: Singapore
Contact:

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
Post Reply