How to get and access on all the layers property

Hello world.

Try to get and to access a property at the level of the layers all at the same time.

I wrote a code, but stuck on getting property and its application to another layer.

Here's the pice of code:

    var myComp = app.project.activeItem,
    propLength = myComp.selectedLayers[0].selectedProperties.length,
    effectName = [];

 for (i = 0; i < propLength; i++){

      var propName = myComp.selectedLayers[0].selectedProperties[i];    
      var effectPath =  '("'+propName.name+'")';
      effectName[i] = effectPath;

   }
// then adding "app.project.activeItem"+'.layer("'+ myLayer.name+'")'+".effect"+effectName.toString()"

This construction works only when the property is not grouped in "Content" or something else.

For example:

app.project.item(6).layer("4").effect("Unsharp Mask")("Amount")          // works fine

But if I would get "1 shot of" property of the shape layer 'Opacity', I had received:

app.project.activeItem.layer("Shape Layer 1").effect("Opacity")  // false, won`t work for other layers

Instead of:

app.project.item(6).layer("Shape Layer 1").("Contents")("Shape 1")("Contents")("Stroke 1")("Opacity")     // true

I've also heard of .propertyDepth, but it didn't help me much.

I would like to automate everything, so please Don't advice me to get the property with the rd_GimmePropPath script.

Thank you in advance!

I realize my first answer was light years away from your question. I'm sorry.

The following function returns the path of a property relative to its layer:

int getPath (prop, byWhat)

{

byWhat must be a string and a 'name', 'remove', 'propertyIndex.

Returns the path of the pillar (a property) compared to its layer, starting with '.property.

function sandwich (x) {return (typeof x == 'string')?} "(\"" +x  + "\")" : "("+x+")";}

If (typeof byWhat == "undefined") byWhat = "name";

var s = "";

{s = '.property' + sandwich (prop [byWhat]) + s; prop = prop.parentProperty ;}} While (prop.propertyDepth > 0);

return s;

}

You can test that it works for example like this:

function test (byWhat)

{

model var = layer, prop, app.project.item (1), propPath;

If (!) () model of instanceof CompItem)) {alert ("item (1) should be a composition.")} Select a property in this comp"); Return ;}

If (comp.selectedLayers.length<1)>

layer = comp.selectedLayers [0];

If (layer.selectedProperties.length<1)>

prop = layer.selectedProperties [0];

propPath = 'app.project.item(1).layer(\""+layer.name+"\")"+getPath(prop,byWhat);

Try

{

var p = eval (propPath);

If (Object.isValid (p)) alert ("selected Prop:" + prop.name + "\r\rproperty path:" + propPath + "rated road \r\rprop:" + p.name + "\r\rsame Accessories?:" + (p is prop) m:System.NET.SocketAddress.ToString ());

}

catch (e) {alert 'something was wrong there... »} ;

return;

}

test ("Name");

test ("remove");

test ("propertyIndex");

Tags: After Effects

Similar Questions

  • How to get a collection of all the dictionaries and the keys to an annotation

    Is it possible to get a collection of all the dictionaries and dictionary key associated with a particular annotation without make queries that require specific keys (CosDictGet(), CosDictGetKey(), etc.)?

    IOW, I want to "GetAllDictionaries (PDAnnot)", then for each dictionary, 'GetAllDictionaryKeys (dictionary).

    If the answer is 'no', then please provide some details.

    Thank you

    Bill

    Sorry - CosObjEnum()

  • How to get a list of all the pipes in a ThinApp

    I have a simple program to list all files in a folder.  I use it to get a list of named pipes by the way
    \\.\pipe\*as the argument, but it does not work if I Pack the program as a fine application.  I get the error code 3 (ERROR_PATH_NOT_FOUND).  I tried to use CreateFile on
    \\.\pipe\but he also failed when running as a ThinApp. Are their ways to get a list of all the pipes in a ThinApp?  Here is the source code.

    #include <windows.h>
    #include <tchar.h>
    #include <stdio.h>
    
    #include "stdafx.h"
    
    int main(int argc, char* argv[])
    {
       WIN32_FIND_DATA FindFileData;
       HANDLE hFind;
    
       if( argc != 2 )
       {
              _tprintf(TEXT("Usage: %s [target_file]\n"), argv[0]);
              return -1;
       }
    
       _tprintf (TEXT("Target file is %s\n"), argv[1]);
    
       hFind = FindFirstFile(argv[1], &FindFileData);
       if (hFind == INVALID_HANDLE_VALUE) 
       {
              printf ("FindFirstFile failed (%d)\n", GetLastError());
              return -1;
       } 
       else 
       {
              _tprintf (TEXT("The first file found is %s\n"), 
                   FindFileData.cFileName);
    
              BOOL nextFile = FindNextFile(hFind, &FindFileData);
    
              while (nextFile)
              {
                   _tprintf (TEXT("The next file found is %s\n"), 
                             FindFileData.cFileName);
    
                   nextFile = FindNextFile(hFind, &FindFileData);
              }
    
              FindClose(hFind);
       }
    
       return 0;
    }
    

    OK, so what about the original example of FindFirstFile, if I try with 4.6 it does not work for me. I use 6 VC to create the application and then add it to the cmd project and then rebuild. I tried these combinations:

    App.exe \\.\pipe\* (this works)

    App.exe \\.\pipe\ (this does not work, in native mode as it does not work)

    App.exe //./pipe/* (this works)

    App.exe //./pipe/ (this does not work, in native mode as it does not work)

    can you tell me about the results you get when you try the above?

    Thank you.

  • How to get a list of all the tags of XMLElement

    (CS5, Win7 64 bit)

    I need a list of all unique XML tag names in a given document (just as the Panel tags in InDesign itself).

    I couldn't find a 'normal' way (builtin - in the property or method) to obtain the information. Instead, I found that I had to process recursively through the entire tree of XMLElement, starting with the root element. For a large document, it can take almost a quarter of an hour, and sometimes I have to do it for a book of InDesgin INDD files huge more than a decade.

    There MUST be a better way, right?

    It would be better if I was done through all the PageItems in the document and then recurse XMLElement each PageItem l‟arbre? I guess that would not make a difference to fade way.

    I'm open to suggestions...

    TIA,

    mlavie

    Try this,

    $.writeln (app.activeDocument.xmlTags.everyItem () .name);

  • How to get to GREP change all the words in capital letters to capitalize each word

    I'm working on a page 100 ePUB + and I need to change the titles of 20 chapter of capital letters only to capitalize every word in the title. Most of the chapter titles begin with a digit, but some are pure text. The chapter titles all use the same paragraph style.

    For example: 4 THE HERE AND NOW should be changed to 4. The here and now

    For example: EPILOGUE must be changed to epilogue

    I can't GREP to do this in the window search/replace suddenly? (I don't see anything in the change to: field that allows me to convert it to.)

    -Thanks for any help on this.

    Hi Peter,.

    Change_Case_With_Style.jsx, original screenplay written by Thomas Silkjær.

    Modified by Bruno Herfst in 2011 by adding new features: find a style, expression GREP and cancel.

    See: Novelty/Change_Case_With_Style.jsx at master · GitBruno/novelty · GitHub

  • How to get a list of all the OS installed in the vCenter?

    Hello

    I would like to know how the list will vCenter name, Cluster, the name of the installed operating system, virtual computer within a CSV file list all OS installed in our virtual machines, in other words.

    Thank you

    Take a look at the script of Lucd in http://communities.vmware.com/thread/395151

  • How to get a list of all the elements as a text file in Indesign

    I try to get the list of all of the images related only text using AppleScript? Please help me

    Just replace 'filePath' with 'name' (line 5).

    Peter

  • Yes, I really hate the new premier elements and you want to find a copy of the elements of the first 4 worm can antbody tell me how to get and old copy of the elements, first 4 worm?

    Hello well the question in the topic... Sorry newbie here! Thanks in advance for any assistance!

    Thank you!... Jack

    Oh! PS. I bought the eleven version by the way and have an authorized copy of first and second!

    These are the only downloads support,

    Downloads available:

    Download and installation help links Adobe

    Help download and installation to Prodesigntools links can be found on the most linked pages.  They are essential; especially steps 1, 2 and 3.  If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".

  • Is it possible to copy all the layers in the layers panel and paste them in a new document?

    The content of each layer will be different on each document so I don't want to copy. I have 12 documents to be used in a calendar and I want all the layers as well as their names and colors to be the same in each document. I already have all the pages designed and built, but personal information is to be added, and I want each of them to match all the others.

    Basically, all I want to do is to copy the contents of the layers panel and past in each of the other documents.

    I just create a page at the end of the document w / layers and on this page, add an item by layer. Also, if you have 15 layers, drag the small fifteen frames on the page and the layer icon to assign each image to another layer.

    Then in the Pages panel menu, choose move Pages. Choose this 'page of layers' to move to your receiving document (another of your calendar documents), Destination: end of the Document.

    The receiving document will get all the layers. Remove all items (15 views) on the extra page and the layers remain.

    Next time you make a schedule, you should check the add-on for InDesign Calendar Wizard. You will cry all the time you wasted it making manually ;-(

    Home Calendar Wizard

    Anne-Marie

    InDesignSecrets.com

  • I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    Hello

    Can the code below is useful for you, but I do not know how to sort.

    Change the tag based on your employment application.

  • I'm having a lot of problems with firefox and cannot figure out how to get help. It all started when I updated to 13. I get all kinds of advertising popups, I can't play a

    I'm having a lot of problems with firefox and cannot figure out how to get help. It all started when I updated to 13. I get all kinds of advertising popups, I can't play a game on FaceBook called Farm Town at all, and I get a popup of AVG on the cookies that I can't get rid of. These issues are causing me to use Chrome quite often, although I like Fox better. I've searched and searched how to get help and find nothing. How can I get personalized technical help? These problems will not occur in Chrome at all. Thank you.

    Do a check with some malware malware, analysis of programs on the Windows computer.

    You need to scan with all programs, because each program detects a different malicious program.

    Make sure that you update each program to get the latest version of their databases before scanning.

    Alternatively, you can write a check for an infection rootkit TDSSKiller.

    See also:

  • How to get and install the file txtsetup.oem for xp

    need to know how to get and install the txtsetup.oem file to install xp

    Hello

    The easiest way would be to visit the website of the manufacturer of the motherboard. This would normally have downloads for any RAID drivers required for the loading of Windows XP. The download can be an "executable" who writes a disk for you. It can be also something like a zip file with all files inside that must be extracted and copied to a floppy disk.

    If your PC is not a floppy drive, life becomes quite complicated.

    Please mark this as useful or response if applicable.

    Tricky

  • How to get a list of all files/folders on the Sansa Clip +.

    Hello

    I have a lot of MP3s on my Clip +, but realize that I put there duplicates in different folders. My plan was to use a command prompt to get a list of all the files on the device, and then use a utility that shows me duplicate names and the locations of the files. I could then simply delete the Clip +.

    The problem, it is that the Clip + is simply presented as a 'portable' in Windows Explorer (Windows 7 Home) - there is no way to assign a drive letter :-( Which seems a bit odd, as it is, after all, plugged into one of my USB ports... I used the dir command on all drives assigned in my computer as "devices with removable storage". One of them must be the port to which the Clip + is attached, but they all say "device is not ready". So the Clip + is not identified in this way.

    Is it possible at all to get a list of the files that are on the Clip +?

    Thank you!

    That's how the Clip + shows when connected in USB MTP mode.  If you connect mode MSC (defined in the control panel), Clip + comes as a disk.

    But: the problem you have is, Windows displays only the files that have been transferred in the Clip + under USB mode then logged in as.  I don't know if this applies to designated offices, but - you could try and see.

    Another solution would be to copy all of your files on your computer, under MTP mode; Delete the files on the Clip +. move the Clip + mode MSC; and then transfer the files to the Clip +.  Now, you should be able to see the files under Windows (always connected in MSC mode) and can run the utilities that you had planned.

    I hope this helps.

  • Using a Mac OSX updated 10.9.5, to update to the latest update of Lightroom, now get error - Lightroom met permission issues. Click on fix - cannot fix. You click on read more and I tried all the solutions. Always error. Uninstalled and reinstalled - alwa

    Using a Mac OSX updated 10.9.5, to update to the latest update of Lightroom, now get error - Lightroom met permission issues. Click on fix - cannot fix. You click on read more and I tried all the solutions. Always error. Uninstalled and reinstalled - always error.  Cannot set up a new admin on Gov't computer user. Help

    Please make sure that you gave permission for the folders listed in the article, follow these steps.

    1 - give read and write permissions for the Application Support folder and preferably on User Library and the secret library.

    2 - Add user and admin both permissions.

    When you open the Get Info option for specific folder.

    Make sure you click on '+' symbol, it will open the list of user accounts. Add currently logged in user account and Director of user account, if it is not added.

    Both must have read and write to prevent access these some questions in the future.

    Important:

    Once you added as currently logged on user account and administrator user accounts and provided access for reading and writing.

    Make sure you click on the gear icon and select apply to closed.

    Lock dialog box and close the Get Info .

    So that all the folders in the folder Adobe will get read and write access.

    Let us know if this helps

    ~ Assani

  • How to get and set the length and the width of the content of the layer?

    How to get and set the length and the width of the content of the layer

    All layers are packed not equal. a layer as adjustment have no limits. Layer to smart object can have two different sizes. The size of the object and the size of the object may be transformed. All smart object layers have an associated transform. To transform a smart object layers you need to work with the size of the object the generated pixels fot the layer. Text layer can be resized with a transform or by changing the font size. Pixelated layers are resize via a transformation.  The script method is resize.  When you resize the number of pixelsits made by interpolation. You can specify what method to use or set Photoshop interpolation preferably by default.

    There is also a bug in Photoshop scripts if you pause the story said make a selection and use resize. Photoshop will properly support up to a State before where you suspended history. This bug seems to be in all versions of Photoshop.

    If you look ate the script in my bug report, you should get a good idea of how to resize a layer.

    Photoshop: Bug Script resize the rear paper folded to a history State

Maybe you are looking for