Dynamically parent two layers together with expressions

In AECS6, I have an Image Layer that is using the layer directly above as a Alpha Matte. I want both layers to scale at the same time, unless a certain condition is setup where I only want the matte to scale - leaving the image at original size. Normally I'd just make a new pair of layers and only scale that, but ALL my layers are dynamically linked to eachother for another more complex effect.
I wrote a simple expression to get the current scale of the matte layer (index-1), and then calculate what this particular layer's scale should be. But the scales don't match up just right because we are dealing with percentages... not absolute values. However, if I simply parent the two layers together, it of course works.
So, I either need to find a way to turn the parenting on/off with code, like if THIS, then ParentTo(index-1), or I need to write my scaling script correctly.
Fwiw- here's that script:
if (index != 15)) {
  // get the original and current scale value of the layer just above, and calculate an offset
          sOrig = thisComp.layer(index-1).transform.scale.valueAtTime(0)[0];
          sNow = thisComp.layer(index-1).transform.scale[0];
          sOffset = value[0] + (sNow - sOrig);
          [sOffset,sOffset]
} else {
// this is layer index 15, don't do anything with it
          value;
Appreciate the help!

Not sure what you are getting at, but the actual value ranges do not really matter in an expression. It's more likely you are eitehr having an anchor point issue or your keyframes are simply not linear. in the latter case of course a simple subtraction would not give the correct result because values would be exponential/logarithmic/whatever. You'd have to use much more complex code then to accumulate all values over time such as the great Dan Ebberts explains on his website:
http://www.motionscript.com/articles/speed-control.html
Anyway, I suppose you could always use effects rather than native transforms to scale your matte while still leaving it parented. Y' know, there is a Transform effect... That would be much simpler and also avoid the expression evaluation bogging down your system...
Mylenium

Similar Messages

  • Synching two sequences together with two laptops

    Does anyone know how I could hook up two different logic sequences with the same metronome speed to where both would be in sync with each other? I have two mac books and two MOTU 896HDs. Would you use a word clock cable?
    Mac Book   Mac OS X (10.4.8)  

    No, you don't use word clock for that. The way to do it is with MIDI Time Code (MTC). Simplest way is with a midi cable between both computers and setting one computer master and the other slave. Check your Logic manual about synchronization. If you don't have any midi interface, you can use an ethernet cable and configure the Network device in AudioMidiSetup as a midi interface. Also, you probably want to configure MMC to have one set of transport controlling both computers.

  • How to join two similar layers together?

    Hey all! Please help me out, It is a little thing to do, but I am really stocked at this. How to join two layers together?? For example two Text layers or anything. Pleas can you describe the way to do it and write (if it exist) the shortcut for it?
    Now I know, that layers in AAF can't be joined, there is just a "Pre-Compose". But this function is disabled the FX colone, and I have to have it there.
    In this tut http://www.videocopilot.net/tutorials/shatterize/ he joined two text layers. But with some shortcut so I don't know, how he did it.
    Can anyone help me plz?
    THX for reply

    Lufty09 wrote:
    Yes, but this is disabled the Fx button :/
    Now you need to look up precomposing in the help system. It's all explained there.
    Nesting and precomping are advanced functions and require careful planning or inspired improvisation within the limits of the software. You also need to look up how the rasterization button works in its two operation modes.
    bogiesan

  • Two layers with "dissolve"

    I'm on CS3 with OS10.4.11
    I have a photoshop document where I had two layers each with a shape of solid colour. In the top layer I had blend mode "Dissolve" and then reduced its opacity to get the speckled/distressed look.
    If I merge the two layers or flatten the document the end result is softer and blurry; it loses the sharpness which is visible in the original format.
    Is there any way I can flatten it and keep the sharpness?

    View at 100% (View>Actual Pixels) to see how the Dissolve Blend Mode will look when flattened.

  • Synchronizing motion for two layers

    Ok. I'm more than a little frustrated trying to get this to work. Any help would be most appreciated.
    I've got two clips. One is a still image serving as my background. the other is an illustration of a man standing stationary in the foreground. The layer of the man is on top of the background layer.
    My problem occurs when I zoom in on the standing man. It is extremely difficult to get the scale and key frames for both layers to sync up. That is it is proving difficult to make both the man and background appear to be inhabiting the same "space" rather than independent layers.
    Is there a way to lock the two layers together so that changes made to the motion tabs in the scale and center of one layer are the same for both? I'm sure there is but just can't seen to figure it out on my own.
    Thanks,
    Greg

    Hi -
    On the bottom left corner of the timeline, press Toggle Clip Keyframes or type Option-T.
    This will display the keyframes for a clip on the timeline. The blue line is the motion keyframes, the green is any keyframes you have applied to filters.
    With those keyframes now displaying on the timeline, the Playhead will snap to them if you have snapping turned on (type "n") and it should make it easy for you to place you keyframes to match keyframes you have placed on other clips.
    MtD

  • Duplicate a layer together with its effects

    Hi,
    When I am duplicating a layer by layerRef.duplicate(newDoc) it is copied without its assigned layer effects.
    How is it possible to duplicate layers together with its effects?
    Or ideally how could I manage to duplicate the layer together with all associated settings like transparency, effects, blendMode, etc.?
    Thanks, Philipp

    It cant be done . You have to write a z pogram to update the data in the new dbtable.

  • Noob: Is there a way to "group" two clips on two separate layers together?

    Hi, total FCE-newbie here, having barely got to grips with iMovie - so please bear with me...
    I'm trying to do something which I would have thought is pretty simple in FCE, but I'm flummoxed...
    I have two video clips, one above the other on two different layers, in sync with each other. I want to "group" these two clips together, so that any effects or edits I apply will affect both clips simultaneously.
    I found this video tutorial which does exactly what I want, but (a) it's for FC Pro, and (b) it's obviously for a much older version:
    http://www.rippletraining.com/movies/Free%20Downloads/040301185027.mov
    That's exactly what I want to do, but I don't seem to have those options available to me - at least not that I can find.
    I've looked up "nesting" in the FCE manual, but it talks about something totally un-related, going on about "sequences", and I only have ONE (long) sequence. I don't want to nest or group sequences, but rather I want to group two short clips / layers.
    The option-C shortcut mentioned in the video tutorial does nothing for me, and unfortunately the guy doesn't say which menu this keyboard shortcut would normally be found under...
    Or am I trying to do something that isn't actually possible in FC Express, and is only available in FC Pro?
    FCE HD 3.5

    Tom Wolsky wrote:
    http://www.rippletraining.com/freetutorials_oldies_butgoodies.html
    That is not a link to clip but to the page that has all the tutorial. Jeez.
    Oh come on... You're STILL not reading posts properly before you reply???
    I said that I linked directly to the clip in question TWICE. In my first/original post, AND in my second post. Go back and check my very first post. What do you see there? A link directly to the clip in question, perhaps? Yes, that's right.
    As for you quoting your own responses to try and prove your point... Well, you're only serving to point out that your posts were misleading and accurate. Let me show you:
    Tom Wolsky wrote:
    putting the two clips in a sequence and putting the sequence inside another one is nesting, and that's exactly what the *_FCP (Final Cut PRO)_* function does.
    (My emboldening)
    Now that's not accurate is it? Can you see why I found your original answer misleading? Because that is NOT what happens in the PRO version of Final Cut. The walkthrough shown in the clip (which I linked to directly) shows nothing about sequences within sequences - only nesting two clips together in one sequence.
    If you had not told me this inaccurate piece of information, then maybe the rest of what you said would have made more sense in context.

  • How to save expression together with animation preset?

    I am trying to understand expressions and animation presets.
    I have one single slider control, which controls the opacity of a layer, where the value is the slider value + slightly changed using an expression.
    I can save the slider control as an animation preset, but the expression gets lost.
    Yes, this is so basic that it can be, this is the way I like to learn. And as far as I know, expressions can be saved together with animation presets. I hope someone can tell me how!

    The reason that the expression is not removed when you delete the slider is that the expression is only reading the slider value, the slider doesn't know that the expression is there. There's no reverse link.
    You can build more professional effects but that involves editing the xml file that tells AE what effects are applied. This still would not generate a reverse link to an expression.
    Enabling or disabling an effect only changes the way things are rendered. If you have keyframes on a Lens Flair Brightness and you disable the effect the Lens Flair will not render but the keyframe values will still be available to an expression. Again, there's no reverse link. Since an expression slider does not make a change in the pixel values of a layer turning the FX switch on or off will have no effect on an expression reading the value.
    The "trick" in creating an Animation Preset that uses expressions and is removed with the "effect" is removed from the Effects Control Window is to only write expressions for properties that are available in the effects used. You could do this by applying the Transform Effect, or the Levels Individual Controls Effect, or the CC Composite Effect to the layer and writing the expression there instead of placing your expression in the Layer's opacity property. Take a look at this screenshot.

  • How do I talk to someone about my account and merging two subscriptions together...Can't seem to get to any way to conversing with a human from the website.

    How do I talk to someone about my account and merging two subscriptions together...Can't seem to get to any way to conversing with a human from the website.

    Worst Service In the World
    I just want to cancel my order and get a refund, the company MUST be corrupt because it is nearly Impossible to get what is rightfully mine. It's been 3 years.. how, sad, is that, I got other people to try too...
    they steal from people... by making it impossible to talk to anyone real.

  • Difference between two dates in seconds/milliseconds with Expressions

    Hi,
    I need to write a query using Expression(Builder) which calculates the difference between two columns (date/timestamps). As of other requirements I am not able to use JPQL, so I tried to create the query with the Expression framework. The difference between the two dates can be calculated with the
    ExpressionMath.substract(...)
    method. The result is a Date-like object storing the difference between both dates. But how can I cast this difference to a long or something like this with expressions?
    Thanks,
    Thomas

    Date functions are very database dependent, as each database has its own set of functions for processing dates.
    The functions are defined in the Expression class, you can try,
    truncateDate, roundDate, or datePart
    http://www.eclipse.org/eclipselink/api/1.1.2/org/eclipse/persistence/expressions/Expression.html#truncateDate(java.lang.String)
    http://www.eclipse.org/eclipselink/api/1.1.2/org/eclipse/persistence/expressions/Expression.html#roundDate(java.lang.Object)
    http://www.eclipse.org/eclipselink/api/1.1.2/org/eclipse/persistence/expressions/Expression.html#datePart(java.lang.String)
    James : http://www.eclipselink.org

  • Usign two batteries together? Larger battery with better capacity?

    I am considering to buy a MacBook, and operate it entirely on batteries. I'm electro-sensitive.
    Is it possible to use two batteries together?
    It it possible to have a larger battery which lasts more time?

    It is not possible to install two factory batteries at the same time.
    But, it is possible to use two batteries together (sort of).
    For the PowerBook and iBook, there are after-market battery options that provide you with extended battery run-time.
    Essentially, they are large and flat batteries that are approximately the same length and width as the iBook or PowerBook.
    They are very thin, and essentially look like a small plate.
    Basically, they plug into the iBook or PowerBook's power port, and provide it with power just as if it were plugged into the wall.
    So, the computer believes that it is getting power from the wall adapter. Then, when that battery drains, it moves onto using the standard battery.
    One such device is available here:
    http://www.lindelectronics.com/cgi-bin/store/shop.cgi//ppack/x/dbxgen_ppackmfgs/
    There are many different companies that I have seen selling these types of devices. So, you can look around.
    I don't expect that there are any available for the MacBook or MacBook Pro yet (since they use a different style connector). But, I imagine that such an option will appear in the future.
    Hope this helps.

  • Using CSS class together with CSS Rule

    Hi,
    I design my web site in Dreamweaver and then use Web
    Developer 2005 Express for the dynamic stuff. I amalgamate all the
    work I have done in Dreamweaver into 2005 Express. However with the
    new server side controls I do not know how to add a CSS class
    together with a CSS rule.
    In the normal client side control in Dreamweaver I have -
    <input name="txtPassword" type="password" class="Input"
    id="SpacerBottom" />
    In the server side controls the ID keyword is used now -
    <asp:TextBox ID="txtPassword" runat="server"
    Style="z-index: 107" CssClass="Input" ></asp:TextBox>
    I have tried to use the name="txtPassword", but it ignores
    this.
    I would really like to know how I can use a class and an id
    selector with the new server side controls and would really
    appreciate some help on this.
    Many thanks,
    Polly Anna

    the explicit " match-any" will do just that.So, a nested ACL can be configured for multiple criteria.
    The alternate is a "match-all" where all nested options in your acl MUST be met. Hope this helps.
    T

  • Disolving two sound together

    What is the best method to disolve two sound together on one sound timeline?
    Dan

    It depends on (a) whether the sounds are fairly nondescript, e.g; just people chattering, (b) how closely they must be kept "in sync" (synchronised, in step) with the video, (c) if the sounds came into iMovie separately from the video, etc.
    Here's an example: if you have two video clips, complete with sound, of people chattering, you can simply add a Cross Dissolve transition between those two video clips. The sound will dissolve, too.
    But when you add a Dissolve of, say, three seconds between two video clips, then the first three seconds of the 2nd video clip and the first three seconds of sound on that clip will disappear, or get used up, in the Dissolve. So if there's something important at the start of the 2nd clip you may need to use a very quick Dissolve, so that not too much of it gets "eaten away" when it's laid on top of the last second(s) of the 1st clip.
    A better way is to select the video clips which you may be going to dissolve between, and then use "Advanced" and "Extract audio" to 'Extract' the audio from those clips before doing any dissolving.
    ['Extracting' the audio just makes a copy of the audio and puts it in an audio track beneath the video, and 'Locks' the audio to its parent video clip. The original audio within the video clip still remains, but it's automatically muted down to zero volume level.]
    You can then adjust the separate audio as much as you want by selecting an audio clip, clicking on "View" and "Show Clip Volume Levels", and then you can click on any part of the straight-line volume level, within an audio clip, to "anchor" the level, then drag it down to whatever you want.
    (..It's all described in Apple's online iMovie audio-editing Help here, as part of all the other iMovie Tutorials here..)
    By sliding two audio clips closer together, or even overlapping them, you can create a smooooth transition from one audio clip to the next. But dragging an audio clip may drag it "out of sync" with its parent video clip. You may have to decide if it's OK or not to 'lose' some video if you pull it in closer towards a previous clip, so as to keep it in sync with the audio dissolve you've made.
    You might decide to 'insert' some extra bit of video (..a 'cutaway' shot..) and then shorten that so that the region of video which you do want to keep will stay in sync with your audio after you've made an audio dissolve.
    Here's a little 'thumbnail image' of how you can adjust the volume of two 'Extracted' audio clips by altering their audio levels:
    To see it more clearly, click here and then click on the 'Start Slideshow' button.
    (..The picture shows two video clips, Original Clip A and Original Clip B. Just before creating a transition between them, think how long you want the transition to be, say two seconds, and then cut the two clips at a bit more than two seconds from their ends, making Sub-clip A and Sub-clip B.
    Then Extract the audio from those two sub-clips. To make things easier, drag one of the audio clips onto the lower audio track.
    The audio clips are now isolated from the video clips. Apply your Dissolve, or whatever, to the two video Sub-clips.
    Adjust the levels of the two audio clips to get the perfect dissolve..)

  • RE: Native Forte Clients with Express Services

    I would be very interested in hearing from anyone using Express who may
    have attempted using Native Forte Clients with Express Services, especially
    what problems/issues (if any) you encountered and whether you found it to
    be a successful way to develop complex screens where the 'look and feel'
    can't be achieved with Express alone.I wrote a general-purpose windows framework which uses Express Services for its
    database access. Had I known what I was letting myself in for, I probably
    wouldn't have attempted it! I started it when Express V1 was fairly new, and
    Express Windows did not support the types and complexity of relationships
    required by the application we were developing. I soon discovered how
    difficult it is to implement a completely general framework which handles every
    possible permutation. Obviously I ended up making compromises, but what we
    have now meets our needs very well. We are about to upgrade to Express V2, so
    the real test will be whether the framework migrates smoothly to the new
    release.
    If I were starting a new project now with Express V2, I don't know if I would
    go down the same path. If you do, be aware of the following (based on my
    experience of Express V1):
    * Your design MUST obey the fundamental rules of Express Services. Your
    BusinessQueries must be fired off by the correct BusinessClient subclass,
    your BusinessClass attributes must be logged at the right time (depending
    on which concurrency scheme you are using), and you must start and end
    Express transactions (different to Forte transactions) appropriately.
    * Your design needs to take into account the difference in the way Express
    Services handles aggregate and non-aggregate associations.
    * If you manage parent-child class relationships from your windows, you must
    make sure you set and log foreign key attributes at the right time. If
    the relationship is not aggregation, you must also manage the order in
    which the records are saved to the database (if you use referential
    integrity constraints).
    * If you call Express Services directly from the windows, it is hard to
    reconcile the asynchronous nature of a windows interface with the
    database's requirement for things to happen in a certain order. (From
    memory, there was a very good discussion in this user group last year of
    what should constitute a unit of work in the windows paradigm.) If I
    were doing it again, I would move all the Express-related objects and
    method calls from the windows to a separate layer, which would manage
    putting together the data from multiple windows, assigning foreign keys
    and firing things off in the right order.
    Fiona Symon
    Babylon Software Pty Ltd

    Hello Kevin,
    Normally, it has been corrected from the last public release 2.
    Hope this helps.
    Daniel Nguyen
    Kevin Klein wrote:
    >
    We had a similar problem. We reported the problem to Forte technical
    support and they determined that it is a bug. I don't know if this has been
    fixed in the 3.0.F release.
    The Stopwatch seems to be accurate for long (several second) intervals, but
    it can't be trusted for measuring short intervals.
    Kevin Klein
    Millennium Partners, Inc.
    -----Original Message-----
    From: [email protected] <[email protected]>
    To: [email protected] <[email protected]>
    Date: Tuesday, December 30, 1997 1:40 PM
    Subject: The Forte Stopwatch
    All,
    At our site we are using Windows NT 4.0 clients and a Windows NT
    Server with Forte 3.0.E.0.
    Periodically, we use the Forte StopWatch class to measure durations for
    access to data. We've noticed
    a strange phenomenon, and we're not sure if it's simply circumstance or if
    there's a problem. All of the
    measured durations that we receive through the Split method appear to
    contain either a 0 or a 9 in the
    tenth-of-a-second position. For example, values of 1011 and 1912. Has
    anybody noticed this?
    Thank you,
    Keith
    Name: Kevin Klein.vcf
    Part 1.2 Type: text/x-vcard
    Encoding: 7bit

  • APEX 4.1 dynamic parent child LOV

    Is is possible to create a dynamic parent child LOV? I want to be able to use information populated by a user on a form to become a select list on a subsequent form where the second field (child) is dependent on what is selected on the first field (parent). The list needs to grow based on data entered on the initial form and maintain the relationship.

    You should post this in the APEX forum.
    Oracle Application Express (APEX)
    Please open a thread on the APEX forum, update this thread with the link to the new thread and the mark this thread ANSWERED.

Maybe you are looking for

  • Excise tab is not coming in MIGO

    Dear All ,                                  pl help that as user is trying to do G.R wrt inb. delv , let me brief out user had made a qty contract with an import vendor itis having two line items , now an Rel order ( material ) is created wrt this qt

  • TS3694 unable to restore iphone error code 3194 keeps coming up what do i do?

    unable to restore iphone 4 - error code 3194 keeps coming up what do i do ?

  • Order the keys of Map

    Hi, Running the following code gives the output Map map = new Hashtable(); map.put("RatificationGroup","1"); map.put("XRatificationGroupMember","2"); map.put("RatificationPerEnvironment","3"); map.put("Ratification","4"); map.put ("RatificationCommen

  • Reg lsmw for customer master data transfer

    Hello All, I want to know while transfering data by lsmw for customer master data . Scenario : There are more then one ship-to-party and bill to party so how to upload the data in this case????? Thanks, Sunny

  • Illustrator CS4 keeps quitting unexpectedly!!

    Hello geniuses!! We need your help!! We're graphic designers and our Illustrator CS4 keeps quitting unexpectedly when: > We try to go to print from Illustrator > Working on files over approx. 600MB (Also, it's taking about 5mins to open a 667MB Illus