FORUMS: list search recent posts

Assignment to properties in After Effects

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Sanjay Kapoor
Assignment to properties in After Effects
on Jan 25, 2015 at 5:18:13 pm

Can you do something like this:

thisComp.layer("Print Statement").text.sourceText = time;

In After Effects?

My code isn't seeming to work with this, and I'm wondering how I can't change the code so that one of the values in my expression "prints" to a Text field called "Print Statement" so that I can debug it.

Any ideas?

thisComp.layer("Print Statement").text.sourceText = time;


Return to posts index

Dan Ebberts
Re: Assignment to properties in After Effects
on Jan 25, 2015 at 5:42:34 pm

An expression can't affect anything except the property that actually hosts that expression. It can't send values to other layers/properties--those properties would have to have their own expressions.

Dan



Return to posts index

Sanjay Kapoor
Re: Assignment to properties in After Effects
on Jan 26, 2015 at 1:57:02 am

I was looking for a way to "print" the value of a variable, and my idea was to set the text of a text object to be equal to that variable (in the expression).

Is there any way to check the value of a variable for the purposes of debugging like this?


Return to posts index


Dan Ebberts
Re: Assignment to properties in After Effects
on Jan 26, 2015 at 7:42:48 am

You can apply the entire expression to a text layer and at the end of the expression you can add the variable you want to see. You may have to edit the expression somewhat (if it references other properties of the host layer). It's far from ideal, but I do it often and find it very useful if I'm trying to track down a mysterious problem.

Sometimes I'll use a slider control the same way, because then it's less likely you'll have to edit the expression (although you do need to make sure the result is a 1D value).

Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]