ThisComp.layer(index - 1).position.valueAtTime(time - d) It might be tempting to use an expression like this: Now let's look at how we could have done this the wrong way. The last line retrieves the position value of the lead layer at the current time minus the layer's delay. In our example, the delay for Layer 1 will be zero (because that layer is the "leader"), the delay for Layer 2 will be 5 frames, for Layer 3 it will be 10 frames, etc. The second line calculates the time delay of each layer based on its position in the layer stack. The first line just sets the number of frames that you want each layer to be delayed from the previous layer. Let's take a look at what's going on here. ThisComp.layer(1).position.valueAtTime(time - d) So where you can, try converting the expressions into keyframes, or pre-rendering.D = delay*ameDuration*(index - 1) I've often found that something that is technically possible with a gazillion expressions is practically unworkable because every time you move the time slider you get the beachball for half an hour. Note that expressions, especially expressions that reference multiple comps can really slow AE down. Note that you can use regular javascript string methods to handle text manipulation in expressions, so things like regular expressions and string.split and number.toString all work. Obviously this will only work if your comps have unique names. Now in the subcomp itself the colour will be available to expressions if you use the value comp("M01").layer(thisComp.name).effect("Color Control")(1). On the subcomp layer in the main comp add a colour expression control effect ( Effects > Expression Controls > Color, then control it with an expression so that it's linked to the colour of the colour picker (use the pick whip). If I understand what your asking correctly there is a way of doing it. If you have a unique procedural naming based on your comp "depth" this might be possible with some advanced expression or maybe script but if you just named them "my cool comp" and "my other cool" comp you can't really make a script for that. You can do it with layers by specifying the index number but a comp doesn't really have a unique parent which makes this rather hard to have a generic selector for comps. Įdit: Regarding the clarification in the comments about using relative selectors for comps. If the property is more nested you just add another ("sub property") until you reach the property you need, just as you would click through the drop down menus.Īlso helpful: VideoCopilot recently released a great free script specializing in pre-comping 3D layers in exactly that way. comp("Comp Name").layer("Layer Name")("Property e.g. You can link properties in different compositions by using an expression like this one. (I cannot use a 'change color' effect in the main comp there are transparencies & blend modes that would get messed up.) but my project is over 50MB now, with hundreds of comps, and is unwieldly. I'm using True Comp Duplicator, which is a lifesave with its 'update expressions' option. I want to duplicate M01 to M02, change the color picker value, and have S01a S01b pick up the new color value, without having to duplicate them to S02a, S02b, etc in order to reference M02. The colors of shapes in S01a etc are based on a color picker in M01. I know there is no "thisComp.parent" option - since a comp can be nested in many different parents - but is there a way to "push" a property "down" into a subcomp? Or any clever workaround? Does this make sense?Į.g., main comp "M01" has subcomps "S01a", "S01b", etc. Is there ANY way to allow a nested comp to change based on the comp within which it is nested? I would love to avoid having to duplicate all the subcomps 30 times, so I don't have hundreds of copies. The subcomps are animated shapes, which take their color from a color picker in the main comp. I need to create about 30 versions of each main comp, with different colors. I have a dozen 'main' comps which have a bunch of nested comps.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |