Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Multiple changing values outside of one composition

  • Multiple changing values outside of one composition

    Posted by Lars Wit on July 29, 2015 at 6:51 am

    hi,

    i have a problem with the following constellation:

    i have a comp_A (with a path and path trim)

    comp_A is hosted in comp_B, where i have a slider on comp_A to change the value of path trim in comp_A, it works.
    BUT
    i have also comp_A hosted in comp_C, same like in comp_B with slider, but now the expression-link in comp_A path trim is directed to the slider in comp_B.

    i know i could duplicate comp_A in projectmananger, but if i would change something in comp_A, than i’ve to change all comp_A duplicates, too.

    parenting is something other as i expected before, so i’m searching for an expression that uses the sliders on the “parent”-comp (not the same as parenting layers with picwhip).

    is there a way to let it work?

    regards

    Lars Wit replied 11 years ago 3 Members · 8 Replies
  • 8 Replies
  • Mark Borgions

    July 29, 2015 at 7:41 am

    If you ask the same thing to do two different things, that’s not going to work. You need to have a duplicate of the nested comp. You could link all of the parameters of the copied comp to the original, so you only need to change them there.
    If you copy the element with “Copy with property links” and paste it in the second comp, all properties will be tied to the original. Than just relink the ones you like to control from your second master comp.
    Hope this helps

  • Lars Wit

    July 29, 2015 at 2:05 pm

    if i unterstand right, i could give paramters from the nested to the hosting comp? how?
    if it’s not right, it seemed to be a lot of work if i change something in the nested comp.

    i created a new (hosting) comp, and put the nested comp in it via drag&drop from project manager.

  • Mark Borgions

    July 29, 2015 at 3:46 pm

    How complex is your nested comp?
    Layer count.
    Could you isolate the changing element? Maybe pre-comp the rest in another nested comp?

  • Dan Ebberts

    July 29, 2015 at 4:01 pm

    You need to duplicate the nested comp if you want it to render differently for each parent comp. Sometimes you can eliminate having to update the expressions by using a clever naming scheme for the comps. Say you have “main_comp 1” and “main_comp 2” and “pre_comp 1”. When you duplicate pre_comp 1, AE will automatically name the duplicate “pre_comp 2”. If you set your expressions up like this:

    comp(“main comp ” + thisComp.name.split(” “)[1])…

    The expressions in pre_comp 2 will automatically point at main_comp 2. I don’t know if that helps you though.

    Dan

  • Lars Wit

    July 29, 2015 at 4:05 pm

    the layer count is not the main problem.
    i like the idea to change something in one comp and got the result in many hosted-comps as i wish. that’s the main idea.

    the secondary problem is more the layer order, so my changing element is behind other layers, so i need theoreticaly 3 nested comps to simulate that.

    is there a way to put the paramters out of the nested comp instead to put the values in.
    i think about a class or an object – maybe in c#/.net – there i could write properties and every variable outside could reach this value. in the case of the comps, i walk another way, the expression “collects” the values from a fixed link.

    may i write (and where to write it) thisComp.layer(index of nested comp or name).pathtrim.end = xx;?

  • Lars Wit

    July 29, 2015 at 4:07 pm

    thanks, it is a good idea, but it is a workaround too and not the solution i want mostly 😉

    i forgot, the nested comps are not on screen at same time.

  • Mark Borgions

    July 29, 2015 at 4:55 pm

    A few things that might help.
    – You can create an expression control on a null in your master comp. Easiest is to rearrange windows, so you have two timelines on top of each other. Then you can pick wip the thing you want to control to the expression control in your parent comp.
    – Now again, if your nested comp behaves differently in the different parent comps, you need different nested comps. If not, there’s no problem.
    – A solution might be to isolate the variable element, and pre comp the non-changing elements on their own.

    Maybe I still misunderstand your problem. In that case, sorry. Just trying to help…

  • Lars Wit

    July 29, 2015 at 5:49 pm

    you didn’t apologize for help!

    but it won’t work or i am to stupid.

    i think there is no way like written above to duplicate the source comp in project manager and use >20 duplicated ones.

    thanks everybode for helping.

    @dan: if i have to duplicate every nested comp, than i do not need an expression, than i can make my keyframing directly in the comp. why would i need expression for if this simple thing wont work.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy