• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Using scripting to create expressions?

New Here ,
Sep 07, 2010 Sep 07, 2010

Copy link to clipboard

Copied

I'm trying to automate the creation of a bunch of rather involved expressions.  Is it possible to write a script that creates an expression?  For example, can I write a script which sets the position property of a layer to "wiggle(5,10)"? 

And conversely, can a script access the source code of an existing expression?  If I look at the value of a layer that has a wiggle function, I just get the wiggle value, not the actual code generating those random values.

TOPICS
Scripting

Views

743

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 07, 2010 Sep 07, 2010

To set an expression:

myLayer.property("Position").expression = "wiggle(5,10)";

To retrieve an expression

var myExpr = myLayer.property("Position").expression;

Dan

Votes

Translate

Translate
Community Expert ,
Sep 07, 2010 Sep 07, 2010

Copy link to clipboard

Copied

To set an expression:

myLayer.property("Position").expression = "wiggle(5,10)";

To retrieve an expression

var myExpr = myLayer.property("Position").expression;

Dan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 07, 2010 Sep 07, 2010

Copy link to clipboard

Copied

LATEST

Awesome!  Thanks Dan.  I love your site, by the way.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines