Linking multiple layers to a main layer

Hey there.

I have a script in which I have a loop for duplicating a layer a certain amount of time.
I was wondering how can I then bind the properties of the effect of all newly layers a copy to the original.

I thought the PropertyGroup about my effect on each laye access and then, for each property, to set an expression, link to the original layer.
Unfortunately, I couldn't find that whatever it is in the Witch of script references might I want to loop through all the properties of an effect.


If my description was not clear... here's what I want (more or less) the script to:
You have 1 layer with a 'fill' effect apllied on it.
I want my script to duplicate this layer a certain amount of time and then bind the fill color of all new layers to the fill color of the original.
Note that this is not my real script, just a simplified example of what I have to do.

I would be very grateful if someone can give me an idea of how I might accomplish this, or refer me to where, in the guide to script, I can find more information about it.

Thanks in advance

The script guide said nothing about it.

You must use the duplicate() layer and the effect, and then set a correct expression which will connect duplicates the original.

To define an expression, simply do myProperty.expression = myExpression. (string)

You must ensure that the initial layer and effect both have a unique name.

Code example (works for most of the effects, except the paint and a few others, who has a tree of property more complex):

var numDuplicates = 15;
var comp = app.project.item(1);
var mainLayer = comp.layer(1);
var index = mainLayer.index;
var mainEffect = mainLayer.effect("ADBE Fill");
var effectPath = "thisComp.layer(\""+mainLayer.name+"\").effect(\""+mainEffect.name+"\")";

// create a 1st duplicate, and link the effects properties:
var dup = mainLayer.duplicate();
var effect = dup.effect(mainEffect.propertyIndex);
var n, N=effect.numProperties;
for (n=1; n<=N; n++){
    if (effect.property(n).canSetExpression){
        effect.property(n).expression = effectPath+"("+n+");";
        };
    };

dup.moveAfter(comp.layer(++index));

// duplicate more times (numDuplicates-1 times)
for (n=1; n

Xavier

Tags: After Effects

Similar Questions

  • Is there a way to center align multiple layers into a single layer?

    I mean, that's what you have layers I and I which are placed side by side, so they look like "II". You want to Center compared to some selected location so that they look like still 'II' and not 'I '.

    You see what I'm saying?

    Is there a way to center them so that they are always in the same configuration compared to the other instead of centering them so that they all get two layered in the centering? Perhaps by linking their or another way?

    Have you tried grouping them and then centering group?

  • Linking multiple effect layers of several compositions such as controlled form than a composition adjustment

    Hi, I'm working on a black and white colorization project video. I have 25 compositions that have 5 or more in adjustment layers with scale effect colors and each 1-5 layer masks on it.

    I want to link all adjustment layers with the same effect of each composition from a just publication. For example I have adjustment layer for hair or a suite which must bee of same color in all 25 precomps, and when I want to change the color of hair or a suite, to spend it comes a model and do not have true all 25.

    I tried copy property links layer technique but no luck it do not work but it applies to the whole layer and not simply masked aria.

    Any help please.

    You can attach controllers to layer in other compositions by naming the compositions. An expression controlling another layer in the same composition would be initially thisComp.layer ("layer 1"). If the layer that you want to control was in another publication the term would begin to comp("Comp_1").layer {"layer 1").} You can link the layers of a model of layers in another comp, by separating the timelines and then just using the Pickwhip to drag from one property to another. If you have configured a layer in your master comp with a bunch of controllers effects you can lock the effect controls panel, and then use the Pickwhip do to drag the property that you want to control to the controller. This would give you something like this: comp("Main Comp") .layer ("controller") .effect ("Slider Control") ("Slider")

    If you do a lot of them it's a really good idea to implement a good naming convention.

  • drag multiple layers from one document to another

    When I drag multiple layers from one document to another, now the keys ctrl-shift-alt (that is placed exactly in the same place) Photoshop changes the selected layers. He eithers add a leyer or just pass.

    He wants me to drag a segment of the leyer where there is 'information' or pixels.

    I drag in the document itself, not the layerpanel.

    In previous versions, it wasn't like that.

    Sometimes there is a very little information or pixels in a layer. This is way hard to aim straight for photoshop to do what I want it to do.

    I don't know if it's done on purpose or it is a very annoying bug.

    Photoshop 20151114.r.301x64

    win10 64-bit x 64-proc

    Intel i7 - 4770 s 3.1 GHz

    24 GB RAM

    SSD

    Well, it is quit interesting: while we are working on this problem, I advised a new update for photoshop: some problems occurred with the last update.

    I was working with 20151114.r.301

    And now I have the 20151209.r.327 version (which comes in fact in a few minutes ago)

    I tried the same thing as above and now my problem with the sliding of the layers went!

    So it was a bug. Nothing to do with the settings or anything.

  • Can someone tell me how to show/hide multiple layers at the same time?

    Hello

    Can someone show me how to make more than one layer visible or invisible, without having to click on each separate layer? -J' have more than 100 layers in a drawing, and it is very tedious to have to click on each individual layer to hide it or show it. I just started using Photoshop elements 13, on an iMac

    Thanks for any advice.

    You can Option , click on the eye next to the thumbnail icon of the layer to hide all selected layers, but.

    Option , click New to display all layers.

    Order click to change the visibility of the selected layer switch

    To hide multiple layers, select the layers, right-click on one of the eyes, and click hide this layer

    Repeat to repeat the visible layers.

    You can also click on one of the eyes and then drag down or to hide layers and invert to make the visible layers.

  • Hide multiple layers in 3D?

    I have a comp which is essentially a map projection with several slices of an old photo of a House stuck on images of the House that I filmed.  I used tracker camera 3D NULL values to place them in space.  Does make sense so far?   But now, I have a problem where I would hide all the layers at the same time pen out and do consider smooth on the edges.  For some reason, the mask sticks just the images I shot initially and layers in 3D.  Tracker mask is good except that you cannot change the path at all once it is followed because it uses data points to mask path as Tracker mask points.

    I tried precomping, but he has not made a difference.  Which means, I precomped all layers and then tried to mask/feather as a single unit.  Did not work.

    My goal is to have a mask to stick at home and have the kind of mask of morph in the clip.  The rest of the project to the other shots was easy.  Only, I had a photograph for each shot.  I have followed 3D clip, is a null value, which is attached to a point of Tracker, copied the position that NULL to the photo and then adjusted the picture up to what he did.  It works like a charm.  But, when I take a model of pre of several layers that something goes wrong.

    Is there anything I can try?   Check out the photos.  The photo of the top is one I'm trying to figure. It's a glidecam turned the cap towards the House.  The 3D tracker works very well on images for all the clips.  The bottom two are pans simple tripod.  When the camera moves essentially, the mask turns and changes shape in a sort of bio of passage.  I want to achieve for the top of the master page.

    Thank you!!

    Photo 1.jpg

    photo 2.jpgphoto 3.jpg

    photo 4.jpg

    Here's what you have to do. First of all, make sure that you do not have the Ray-traced rendering engine turned on. Second, your multiple layers composing them. Third transformation of the collapse. Fourth, add a new layer 3D by using a solid red or blue with the screen blend mode and position this layer so that it will cover the whole value demo. Gold and this is the reason for the screen blend mode, use the tool pen to draw your mask on the layer, and then set the layer as a track matte for the demo. animate the matte and you're done.

  • How to brush across multiple layers

    Good afternoon

    I have several layers that are all the same size I want to use a brush everywhere at the same time - and yet whenever I select several layers the brush and pen tool me don't give a sign of «» Anyone know an easy solution? I just want to sign my name through several images at once - I'm guessing a bit like a watermark. With the help of CS6 creative cloud on Windows.

    Hello! Solution of Howard, I would add that it is not possible, as you have noticed, to apply a brush stroke to multiple layers.

    You can use the keys ALT + [shortcut key to go to the next layer to the bottom of the stack.

    If you have too many documents, the creation of an action can be a way forward.

    (I guess you stacked layers in the same document, to be able to export to a gallery?)

  • Copy multiple layers

    Hello

    I'm a newbie using Illustrator CS4.  I have a work plan that is full of graphics on multiple layers.  All I want to do is make a copy of this work plan, but maintain all layers.  However, when I copy and paste all the layers on a white work surface, then all of the graphics are pasted into a single layer.  Help, please?

    Thank you!

    In the flyout (top-right) of the new document layer panel, make sure that layers of dough remembers is checked.

  • Change the multiple layers at the same time

    Hi all
    Is it possible to change the position of the multiple layers at the same time? that is to say: I've got a slideshow made with several layers (probably about 60) while back and now I need to re use it in a different size (smaller). When I just resize the document, my slide is no longer in the center of it and is bigger. I would like to: 1. change its position within the document. 2 reduce entire layer together. If 2 is not possible, fine, but to me, there may be a way to change its position. Thank you much for the help!

    If you look at the area where Flash displays your frames per second is a small button (it looks like 2 boxes blu - ish overlapping). It is the button "edit multiple layers. Once you press this, you will see a marker on your time line asking you to select the images to change. Stretch this segment to cover all the images you want to include in your editing - lock all layers you want to include in your installation. Then, you can press Ctrl + a to 'select all' - this will only select executives in "onion" and unlocked frames - from there, any changes will not affect what is selected. You have to play with how it works because it can be a little difficult to understand (when it comes to points of alignment and balance, etc.). I would like to make a copy of your flash document to test this point until understand you before you start your original edition.

  • straighten multiple layers at once with the ruler tool

    Is it possible to use the ruler tool and straighten multiple layers that require the same correction in both?

    One or both them and make all at once.

  • I use Illustrator CC and sent a file to a colleague who uses CS6 where all the layers become a great layer.  How can I send it and preserve the layers?

    I use Illustrator CC and sent a file to a colleague who uses CS6 where all the layers become a great layer.  How can I send it and preserve the layers?

    coledang,

    Save a copy, and in the following options choose CS6.

    In this way, it should open correctly in CS6, and the original document is unscathed.

    You may find that some (new CC) features will not survive the downsaving.

    Edit: Hi SRiegel.

  • When I open Photoshop CS6, the image does not appear in Photoshop. The image IS open, i.e. the name of the file is displayed on a tab and the image layers appear in the layer panel. What is going on?

    Photoshop and Bridge is open as usual. But when I open an image, the image does not show in the area of the image. The image filename is show in a tab and the spectacle of layers in the Panel layer. What is happening and how to fix this.

    I solved the problem. It was somehow connected to my using Microsoft

    photos of theme. I put Windows to use the basic theme and the problem

    went. Thanks for the suggestions.

    HA!

  • More information on "error: linked multiple directory.

    What does "error: linked multiple directory" indicate, and how can I fix this error? This error comes from OSB 10.4.0.2.0.

    I found this in some of the newspapers for backups of my servers. Some of the directories are NFS shares, however it is not only shared NFS directories. My concern is that when I try a test restore in one of the directories concerned, there is no option of restore. This seems to indicate that no data is being backed up, which is a problem. This also raises the question - if the whole directories are not be saved due to errors, why do the servers present themselves as having failed to save successfully? It's VERY FRUSTRANT having to browse through the newspapers of backups "successful" in order to find these errors. It will be worse when customers go to restore from their backups 'successful' to find the critical directories may have been ignored.

    I found two messages without answer of December 6, 2010-November 9, 2010, on this forum with the same question, so I'm not the only user encounter this error.

    Please provide more information on this error "multiple directory-related" and why partially failed backups appear as backups successfully with warnings.

    This means that the folder exists also another point of Assembly on the machine and the backup has been captured through that. Can you confirm the OS this is to and also after the release of "df-h" so that we can check.

    Thank you

    Rich

  • How to reverse a PSD file that combined layers into a single layer...

    Hello

    I'm not sure what happened, but I got a PSD file, I was working with multiple layers and then I saved a PDF file of the file and I think I may accidentally active files somehow because now my PSD file layers are combined in a background. How to cancel it (somehow liberate all the layers in the file again)? I need to send the PSD file with all its layers available for editing, and I have no idea how to solve this problem.

    Any help is greatly appreciated. Thank you very much!

    ashmic19

    Unless you have a copy backup of the PSD layered, you can't. Once flattened and saved, you can never restore flattened layers, they are gone. Sorry... better is to save several copies so in this case in the future you don't suffer that again.

  • Number of layers in the precomposed layer

    Hello dear scripters.

    I'm counting the layers in a precomposed layer.

    does anyone have a solution for my problem?

    Thnx a lot.

    : F

    This is my code:

    var curComp = app.project.activeItem; It's my comp acive
    var theSelection = curComp.selectedLayers; I selected a few comps

    var theSelection = compLayer [0]; compLayer is also a model

    and here is my problem
    This does not return the number of layers in my compLayer
    var number = parseInt (compLayer.numLayers);


    Alert (theNumber); Returns the undefined, but I need an integer

    The precomp is the source for the layer. Try this:

    var app.project.activeItem = myComp;

    myLayer = myComp.selectedLayers var [0];

    Alert (myLayer.source.numLayers);

    Dan

Maybe you are looking for

  • Re: How to turn the keyboard on a Satellite P505-S8980?

    Hi allI really need illuminate the keyboard on my laptop.I entered in the help section and utility and can't findno way to do it.Sitting in a semi lit the room and make countless typosstarting to get a little boring.Any help would be greatly apprecia

  • Windows XP crashed, now unable to connect to the net cause usb 760 not register

    Windows xp installed 2 GB high speed, downloaded 99% vzam, froze, rebooted, frozen, restored before installation, froze, now run anything? What should do? Unable to connect to the net cause usb760 will not register...

  • Readiris 14

    I have an officejet pro 8600 h - p and need to know if readiris 14 is something more than the ocr system provided with the all-in-one printer... If so, what he'll do that I can't do now? I tried to get IRIS and h - p... nothing helps I will be gratef

  • Action Center keeps telling me that Bullguard firewall or antivirus AI swiched off the power.

    Action Center keeps telling me that Bullguard firewall or antivirus AI swiched off the power. I check bullguard and everything is ok. What is going on?

  • Favorites and the menu bar

    I recently bought a laptop with Windows 8 is installed and the internet explore 10. Pretty funny, but I cannot locate the Favorites and the menu bar. I looked on the forum and they all say that it is located at the top right of the screen where there