Need a way to test how a property should be set.

When I set the enabled property of a layer, the format is "myLayer.enabled = false;

However, when I set a property as "acceptsShadows", the format is "myLayer.acceptsShadows.setValue (false);"

I was wondering why these properties cannot be defined in the same way and (B) would like to know if there is a way I can test whether a property should be set to one way or the other? Is there some sort of way to know what properties are defined how?

The context for this is that I have a general function that takes a property and a value then sets for a layer to give or a set of layers. So if I send this feature, the 'enabled' and 'false' property, it would set the layers property enabled to false, and if I send 'acceptsShadows' and 'false' set the acceptShadows property to false layers, but this becomes a problem if the properties must be defined in different ways, at least I have start to add if statements for the properties that must be set which way.

Thanks for any help!

The distinction is that the attributes of an object can be defined with the '=' operator. Properties are defined with setValue(), setValueAtTime and setValueAtKey(). Basically, if she will accept keyframes, you must use setValue(), etc..

I have not tested, but you can try something like this:

function setProp (theProp, Val) {}

If (theProp instanceof property & theProp.canVaryOverTime) {}

theProp.setValue (theVal);

} else {}

theProp = Val;

}

}

var myProp = myLayer.property ("Opacity");

var myVal = 50;

setProp (myProp, myVal);

Dan

Tags: After Effects

Similar Questions

  • I need a way to test the computer Power Supply

    Im running a Dell XPS 2005

    Intel Pentium 4 3.4GHz

    I get a BSOD (Blue Screen of DEATH) every once in awhile.  Especially at the start.

    The code seems to be something with hard drives.

    Now being an old laundry and adding 2 additional discs for a total of 3 got us dispatchers to power everything.

    I also have a card Nvidia 9800GT 1024Mo RAM with 2 power six raced him also.

    I looked outside my case, but cannot see what is my power to power supply.

    I know that I was able to open it but I was wondering if there was any software a bit like CPU - Z that could read what is inside my computer?

    Maybe something that could match the everything that is inside and see how much is used?

    I will build a new i7 soon, but for now, that's what I have.

    I ran the PPBM4 test and think im going to take the LAST spot.

    Here are the results:

    Powered by ID DESIGN, personal or computer
    DELL, the computer manufacturer
    XPS, computer model
    329.6, time Total dry Benchmark
    54, AVI encoding dry time
    179,6, dry MPEG has elapsed
    96, seconds rendering time
    Intel, CPU manufacturer
    4 550, Pentium processor model
    3.4 GHz processor
    1, number of CPU chips
    1, total number of cores
    3 GB RAM
    4.2.1 APP Version PPBM4 DV
    XP 32, OSVersion
    SATA disk OS Interface
    1000 GB of capacity OS disk
    7200, disk OS speed
    SATA Interface drive project
    500, disk space for the Go project
    7200, project disc speed
    750, disc preview interface
    500, disk capacity Go Preview
    7200, preview disc speed
    SATA Interface output disc
    500, output GB disc capacity
    7200, speed disk
    NVIDIA GeForce 9800 GT graphics card
    This test shows really is the slowness of my computer, comment

    Enjoy: GLenn

    Glenn,

    Maybe your motherboard does not support this (being a bit older), but I'd be interested to see the results as follows:

    and

    because that will show the tensions on the different tracks.

    BTW, your disk temperature is quite high and the CPU and the GPU. These are of course former components and these run hotter than the current CPU/GPU, so, we can't really compare these modern components, but cooling can be a problem. When was the last time you cleaned the inside of your suitcase, removed all the dust accumulated on the CPU cooler and clean your system fans?

  • Is there a way to test for the first call of a function?

    Hello

    I created a function (using other functions I created) to generate a dynamic hierarchy tree menu based on parentID and itemID etc etc - I'm sure you are familiar with this concept. It works very well, and there is no problem.

    However, I do all this build in a string, and then dumped on the page. Again, this works very well. However, because the function is called recursively, my class, the class = 'tree' repeat itself in each occurrence of the opening UL tag.

    I want to only this class to be applied to the first UL, but because it is recursive, I don't know how to detect if the function is called for the first time or 5th time, etc.. I mean something like:

    < cfif myFunction is called the first time >
    Add the class
    < cfelse >
    do not add the class
    < / cfif >

    Please see my attached code. It is fully functional. Please don't worry that all the other functions do etc, they work very well, but I need a way or a variable to test against.

    Any ideas?

    Thank you very much
    Michael.

    Kapitaine wrote:
    > Hmmm, I bet that the solution is simple, but my mind is frazzled! Haha.
    >

    Yes, it's simple, you test the Boolean value and it will be true if it is
    set to true for a recursion.






    #somethingStupid(5,true) #.

  • A way to see how long an image export takes?

    A way to see how long an image export takes?  In lightroom is something that will show you how much time it took to export images? or even text files somewhere that shows the time of beginning and end of the export of images?

    Look at the time stamps of the files (not the time, the timestamp of change). If you export a bunch of files, say 100, you look at the first and last and split the difference of 99. You get the exact average time that he needed to export an image.

    However, this does not mean that the 100 images will take the same time. Only when the size and the edits are similar, time will be similar.

  • Manual large editions with sensitive html setting. Is there a way to determine how the entries appear in the table of contents?

    I publish major textbooks with sensitive html setting. Is there a way to determine how the entries appear in the table of contents? If I publish a small section of the manual then 2nd level entries appear as eruptions under the chapter name, but if I publish the manual in its entirety then level 2 headings are not at all. I would like them to appear as the eruptions in the table of contents, but I need to publish the manual as a whole in order to keep the cross references. Any help will be greatly appreciated!

    I think that this would make clearer - and it would skip and tables of contents of books under.

  • VMware 3.5 - need a guide to analyze how the files of technical support to improve the performance and check the correct settings

    I need to give a recommendation on how deal with VMware 3.5 with virtual center as its production in the environment, but I need and idea to know how and where to start... Fact vmware support team, can analyze these files for me, and it is posible to open a support ticket to make this process of analysis?

    I have a clariion cx3 emc2 storage

    Thank you

    Maynor

    Hello

    Thise drop what you are talking is a set of newspapers and ESXHost configuration files (e.g. unpacking, / var/log/vmkernel etc..) All files have been added to archive tgz. You can extract (sweet 7zip) Windows or Linux (gzip and tar command line tools) I have now if it a tools that will help you analyze these files.

    The only way I know to start the tuning system is fist check performace statistics by each ESXHost (CPU, RAM, i/o per each LUN) for example. for the last days of servén. check when you have peaks on graphs, then go in newspapers of that period of time and start analysing what is.

    BTW. You have problems with your servers?

    Artur

    PS, if this answer is useful for you click on some of the stars, please

  • Is there a way to tell how many objects (paths) I chose?

    Is there an easy way to tell how the paths I have selected in Illustrator CS4?

    I have a lot of small sections on the artboard, I want to assure you that I have enough for what I need and I don't want to hand count of hundreds of them to be sure... are at - it a reading somewhere in the interface user of Illustrator that will tell me how many things I chose?

    Go to window > Document Info, in the drop down menu on the side right ensure selection only and objects are checked. If the lines (and only the lines you want to count) are selected, the number of lines will appear next to paths in the palette.

  • Is there a way to know how much downloading an app has?

    Hello

    I am doing a research project focused on applications and I was hoping if there was a way to see how much total downloads an app has had in its history without paying any third party.

    Thanks for your help

    Konstantino

    # This information is available for Apple and the developer of the app.

  • 30.0 Firefox is so slow since updated. IE &amp; Chrome not having problems loading pages, showing the blank pages, need two or more tests to open Web pages.

    30.0 Firefox is so slow since updated. IE & Chrome not having problems loading pages, showing the blank pages, need two or more tests to open Web pages. It seems to have something to do with the Visual data on the pages. My MSN homepage gets old and dies every time I open the page after the re-opening and closing of firefox. It takes forever! What is a memory drain? Each open page in a new session of firefox suffer the same fate.

    Start Firefox in Safe Mode {web link}
    While you are in safe mode;
    Press < Alt > or < F10 > to display the toolbar.
    Followed;

    Windows; Tools > Options
    Linux; Edit > Preferences
    Mac; name of the application > Preferences

    Then Advanced > General.
    Find and stop using hardware acceleration.

    Dig safe web sites and see if there is still a problem. Then restart.

  • I 10.7.5 I need to uninstall quicktime and how?

    I 10.7.5 I need to uninstall quicktime and how?

    No, you haven't.

    (141627)

  • Hi I have just signed up for the Apple's music and I forgot to cancel my game from itunes (it is no longer needed) who crossed just automatically - how to cancel the game and can get a refund?

    Hi I have just signed up for the Apple's music and I forgot to cancel my game from itunes (it is no longer needed) who crossed just automatically - how to cancel the game and can get a refund?

    To stop renewing, login to your account (for example by tapping your id settings > iTunes & App Store on your iPad, or by clicking on your name / icon to the top right of the iTunes on iTunes on your computer screen), and go to the iTunes in the cloud Section - see to halfway down this page: subscribe to iTunes game - Apple Support

    In terms of refund, try to contact iTunes Support and see if this will change (purchases are considered final), either via http://reportaproblem.apple.com or http://www.apple.com/support/itunes/contact/

  • This program of windows xp is on a Macbook Pro with a PC emulator. The drive needs to be replaced. How can I save the data from the side PC?

    This program of Windows XP (my wife) is on a MacBook Pro with a PC emulator (Bootcamp).  The drive needs to be replaced.  How can I save data from the PC to an external hard drive?

    Hi Alan,

    Thanks for posting in the Microsoft Community.

    I understand you are trying to backup the data on external hard drive since you replace the hard drive.

    I will definitely help you with this.

    Please visit the links; This should help you in files and backup files.

    How to use the backup utility to back up files and folders in Windows XP Home Edition

    http://support.Microsoft.com/kb/320820

    http://support.Microsoft.com/kb/308422

  • I have microsoft fix Center, there a {codec crashes fix} I used it and it has disabled the files I need, can someone tell me how reinable these files to help!

    I have microsoft fix Center, there a {codec crashes fix} I used it and it has disabled the files I need, can someone tell me how reinable these files, help please!

    Hi Shawnmehringer,

    Thanks for posting in the Microsoft Community.

    It would be useful that you can answer these questions to help you further.

    1. have you installed Microsoft Fixit Center on your system?

    2 are. what codec fix you referring?

    3. which files are disabled and you try to activate again?

    If the problem is related to Microsoft Fixit center, you can ask your question on the Forums of Microsoft Fixit to get help.

    Microsoft Fix it Center Forums

    If you need help to resolve any issues related to Windows, please reply and we will be happy to help you.

  • I need to run wzc wizzard how can I do this?

    Wizzard

    I need to run wzc wizzard how can I do this?

    Hi Paul, try this...

    How to start the Automatic Setup Wizard in Windows XP, Vista and Windows 7

    Read Full steps detailed here: http://www.inf.aber.ac.uk/advisory/faq/965/

    Set up Windows Zero Configuration (WZC) XP

    Most wireless cards of Clients (computer/laptop) can be configured by a manufacturer Wireless Utility that comes with the card, or Windows Zero Configuration (WZC)

    It is important that the wireless should be handled only with a single application.

    You can use the original, or WZC utility. When a is used, the other must be Off (not loaded in memory and not maintained active Windows service).

    Disabling the Wireless Utility manufacturer must be explained in the document of wireless cards.

    The following describes how to check and turn the WZC. The same principle applies in case you should stop and choose the options Off / stop while you're in the menus (the same method can be used to configure other services too).

    1. click on Start and run
    2. type in the box run "services.msc" (without the quotes).
    3 scroll down and look for the Automatic Wireless Configuration service of

    Double-click the Service, screenshot of services

    4. make sure he started and startup type is set to Automatic.

    Screenshot of WZC

    If the Service does not start, or and is not set to Automatic.

    To start the Service, click the Start button.

    To set the service to automatic, click on the arrow down and change it to Automatic.

    No Configuration Service automatic Windows at all.

    Use Windows regedit, drill down.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WZCSVC

    Add a DWORD entry that is named 'Start' and the value '2 '.

    Note that if you are not familiar with regedit do not use it without competent support.

    How to troubleshoot wireless network connections in Windows XP

    Source: http://www.ezlan.NET/WZC.html

  • I downloaded a program called DrWrite, it says that I need to enable macros. How can I do this?

    Original title: I downloaded a program called DrWrite to help with the formatting of the APA anEnglish 102 paper I have to write.  It says that I need to enable macros.  How can I do this?

    I recently downloaded a program called DrWrite to help me with my English 102 paper that needs to be done in APA formatting. The program tells me that I need to enable macros. How can I do this?

    Hello
     
    A macro is a rule or model that specifies how a certain input sequence (often a sequence of characters) should be mapped to an output sequence (often a sequence of characters) according to a defined procedure.
     
    The error that says you need to activate the macros, the macros are specific to the software.
    You can contact the software manufacturer for assistance.

Maybe you are looking for

  • Google Updater

    A messagebox asking my admin password keeps appearing. Approval of the user of Google update. It is very suspicious and I did not anything to get ahead. I tried with a false password and it does not go far. Do not know what it wants to update or if i

  • AirDrop does not work on my MacBook Pro. I want to transfer PDFs to my IPad.

    AirDrop does not work on my MacBook Pro. I want to transfer PDFs to my IPad.

  • Problem Touchpad on Satellite P750 - 02L

    Hi guys, so I have a P750 satellite, according to me, it's a year old just on sound now and since it last a few weeks the touchpad began to play up. Whenever I turn on the laptop for the first 5-10 minutes the Mouse touchpad refuses to do what his.Ha

  • Error-1073807297 PXI-4071

    Hello people, I recently updated my CalExec 3.4 3.4.1. Desktop XP OS. I can't calibrate the PXI-4071, I have not had any problems in the past. MAX has no problem seein' and it makes even the inside however calibration option, with CalExec I get as mu

  • Sims 3 install error SetupNew.setup.cpp (140)

    I tried to install the Sims 3 on my computer and when I click on the automatic disc playback DVD player an error screen appears containing this: > SetupNew.setup.cpp (140)PAPP:PVENDOR:PGUID:$15.0.0.498@ Windows Vista Service Pack 1 (6001)IE Version 7