|
adobe feature request Stuck this in to adobe's feature request form:
Part of a conversation on news://adobeforums.com between Dan Ebberts and me :
at 20:45 on 18/12/2003 I (howiem@adobeforums.com) said: ---- If I have
"Comp A" consisting of (amongst other things) - layer 1 source is "Comp B" and layer name is "Reginald Finchley" - layer 23 source is "Comp B" and layer name is "Steven Nixdorf" - layer 27 source is "Comp B" and layer name is "Susan Foobar"
I want the various text animations within Comp B to reflect the 'parent' comp's layer name for that particular instance.
There must be a way of using the same Comp multiple times, each instance using its own identifier/ so you can make them do different things.
Otherwise you have to duplicate Comps, go in and change the text layers manually for each one, and you're then stuck with whatever animation you'd created at the time you make the dupes. This seems unprogrammatically sensible [if that's a real word]
If it's not possible to get a 'nest-parent' 's layer name, is there any other way I can use a comp multiple times but give each a different parameter?
I often need to do this for generating astons etc. I often need to be able to create the 'dupes' and get the data into them [i.e. type all the names in] before I've created the animation. This sort of thing is natural to anyone who's programmed Flash etc and while I realise AE can't give us the whole object-oriented thing, it doesn't even seem to allow for multiple instances of a comp with the facility for each comp to have an instance-specific parameter. I was hoping to use the layer name of the layer that the particular instance of the comp is sitting on... ----------------
Reply by Dan Ebberts at adobeforums: ---- There's apparently no way for an expression to retrieve infomation about the parent comp of the nested comp that the expression is in. If that's what you're trying to do, I think you're out of luck. --------------------------
David van Brink chipped in: ---- Ha. Haha. I know just what you're trying to do. I, too, would like multiple nested instances of comp, and then control them independently in various ways.
[snip using time remapping to select a region of a child comp - the only way you can make a nested comp do different things, controlled from outside]
---------------------------
and I replied ----
Thanks David -
I sussed how to use this trick when dealing with lots of stills - sequence them in your source layer and then use time-remapping to actually pick the image you want without having to go into the child composition. Doesn't really help as much with animations as you can only switch your source between stills or (as you point out) pre-defined chunks of time.
I don't know how best to ask Adobe for this - should I write a notional help-page i.e.
------------------------------------------ Adobe After Effects Online Help
Expressions > nestParent Expressions > parentLayerIndex
INTRODUCTION The nestParent object can be used in expressions to refer to the container Composition in which the current Composition sits. This allows for a powerful use of compositions as holders of re-usable animations as the contents of the nested composition can be changed from the parent without the need to make duplicates of your composition.
SYNTAX Usage: /thisComp.nestParent/ Returns: a composition object
Usage: /thisComp.nestParent.layer(parentLayerIndex) Returns: the layer in the nestParent composition on which the current composition is sitting nested
NOTES These objects provide a way for animators to re-use the same composition more than once, but with different parameters each time.
Examples: Create a composition called 'myAstonComp'. In it, create a text layer. Apply the following expression to the 'Source Text' parameter of the text:
thisComp.nestParent.layer(parentLayerIndex).name;
Create a new composition called 'lotsOfAstons'. Drag 'myAstonComp' into it several times, placing each copy in a different place on the screen. Name each layer differently (ensure a layer is selected in the timeline window, hit Return, type a name, hit Return again). Note how each copy of myAstonComp is now displaying different text, even though there is only one myAstonComp composition.
Now for the best bit: open myAstonComp, and animate the text. For example, keyframe the opacity to start at 0 and ramp up to 100% over a second or two. When you return to the lotsOfAstons comp, you should find that all those copies of myAstonComp are still displaying their own individual text strings, but that they are now all animated.
The big advantage of using this method for creating copies of similar animations is that myAstonComp is still editable - you can open it and change the whole animation within it, and when you close it and return to the 'lotsOfAstons' comp, you'll see that all the copies of myAstonComp are now using the new animation, but they are still using their own individual text strings.
$$ No need to make duplicates of complex animation compositions just because you need different text to appear $$ Projects with many repetetive elements don't need many compositions for each subtly different appearance $$ Child compositions can still be edited, timings changed, and the changes will affect that composition throughout a project $$ Your animations can be reusable, recycled, rejigged, with the minimum of fuss and a complete lack of unecessary duplication
N.B. Note that Nest_Parent is only valid when used within a nested composition. If you try using Nest_Parent in a composition that isn't nested inside another, an error will occur when AE tries to evaluate the expression. This can be ignored as the expression will evaluate correctly once the composition has been dragged/edited/nested into another composition. --------------------------------------------------------
Dan Ebberts then said: ---- The problem, as it was explained to me, is a caching issue. I'm surmising here because I'm not privy to the internal workings of AE, but I think the point is that any given frame of a particular precomp is rendered once and then it is available from the cache for use in any comps in which it might be nested. They couldn't very well allow an expression in the precomp to come up with a different value depending on which comp it was nested in.
So while it would be a handy feature, it's apparently not compatible with AE's architecture.
----------------------------------------------------------
but then I said: ---- Surely the architecture already has to cope with the Collapse Transformations button, which requires that a nested comp is rendered in its place rather than ahead of time? This must disable caching for a particular comp surely. If the comp has 3D set as well, this'll force it not to cache as 3D transforms can't be calculated until the parent renders. They wouldn't even need to change the UI (which I could understand they wouldn't want to do just for a single expression object's sake).
I have spent a couple of years using AE and I love the logic and elegance and sheer /power/ of it - but since day one have been sure this must be a feature hidden away somewhere in expressions or motion math etc.
It means you have to get it absolutely absolutely right first time, severely affecting workflow.
I regularly have to produce animated astons/name-straps for docos and it bugs me *every time* I do them that I have to have the first one done perfectly, before I can duplicate it n times and go in and change the names and job titles. Once I've made the dupes and changed the names I'm *stuck* with the design and animation. It's set in stone. If we get them edited in and then have an idea that it would be nicer if ... no, there's no point in thinking of changing them because *every single one* will need editing and adding to the render queue. How much better it would be if there was just the one comp, laid out repeatedly in a 'nest-parent' with different parameters each time. Make sure they're all set to Collapse Xforms and you're away...
[snipped - a bit where I got emotional] ---------------------------------------------
and then Dan Ebberts said: ---- You raise some good points. I'd start here: < http://www.adobe.com/support/feature.html >
---------------------------------------------
so here it is. Even if you have to give us a 'Disable all comp caching' option in Preferenes. Even if you have to warn us we might break it if we're not careful. Please make me a beta tester :)
h, starting to find AE can't help take the hurt out of big projects just as he lands a big project |
|