function in a null layer

Moderators: Disciple, zlovatt

Post Reply
jovial
Posts: 11
Joined: April 7th, 2006, 4:22 am
Location: London
Contact:

Hi all,

First post, here goes:

Can I write an expression as a function object in a null layer and then call that function from any other layer. Dividing an image into tens/almost hundreds of fragments in illustrator so only want to have to change one script which will be reflected in all subsequent layers. Is this possible?

Thanks for any help
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

No, an expression can't call an external function. However, you have some options. You can change the expression in one layer and the use Edit>Copy Expression Only and then paste it into the other layers.

Or, you could write a script that modifies the expressions for all the layers at once based on a text file.

Dan
jovial
Posts: 11
Joined: April 7th, 2006, 4:22 am
Location: London
Contact:

Hi Dan,

Pleasure to have you help me out. Motionscript is where my love of expressions all started.

Wasn't aware of the 'copy expression only' which I can see being a very helpful feature indeed.

The text file option, does that mean I can write an expression in a text file then link to that from a layer?

Thanks again.
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

No, expressions can't read text files. You'd have to write a script that would read the text file and update your expressions.

Dan
jovial
Posts: 11
Joined: April 7th, 2006, 4:22 am
Location: London
Contact:

Cheers. I'll look into it.
Post Reply