ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

more expression begging

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
alknowshow
more expression begging
on Nov 30, 2006 at 12:05:14 am

right..


is it possible for an expression to use the name of the comp in which it resides as a variable, and then to use this variable to define which properties it references from another comp?



to give you the context:

i have made a comp - "comp A" - which has all kinds of layers with properties ultimately defined by 2 variables. "Comp A" is nested in "comp B".

the variables are:

1: the distance from the nested layer in comp B to the camera in comp B
2: the relative rotation between the two layers

the effect being that as the camera approaches the layer, its distance and rotation is refelcted visibly by elements in the layer.



i want lots and lots of instances of this layer. since it is all done with expressions, if all instances were identical, they would mirror the first layer since the expressions are all pointing to this to calculate their values.

i wish to avoid manually adjusting all the expressions to make their calculations according to the appropriate layer.

i was wondering if i could write a universal script that would use the number of the comp (ie "comp A02", "comp A03") it resides in to determine which layer from the main comp ("comp B") to access.

I hope this makes sense.

if anyone can help me out il be very grateful.
alex








Return to posts index

Dan Ebberts
Re: more expression begging
on Nov 30, 2006 at 4:49:15 am

As far as I know, there's no way for an expression to access the parent comp of the comp it resides in, except directly by name.

Dan


Return to posts index

alknowshow
Re: more expression begging
on Nov 30, 2006 at 12:15:56 pm

so is there no way to access the name of any given object and declair it as a string?


Return to posts index


Mylenium
Re: more expression begging
on Nov 30, 2006 at 12:45:03 pm

You can convert anything to a string, but it wouldn't do you that much good. You have to use explicit calls to reference items across multiple comps and unlike with JSX scripts, expressions do not have a parent.Comp() method for checking this on their own. So that means you would still have to take care to explicitely name each item and composition for the string filtering to make sense which is no different than adjusting the expressions themselves.

Mylenium

[Pour Myl


Return to posts index

alknowshow
Re: more expression begging
on Nov 30, 2006 at 12:46:10 pm

ok, cheers


Return to posts index

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