The expression using scaling

I'm not a master of expressions, but I think I want to do something simple, but I can't understand how do. I want to have a single layer taken one-tenth the size of an animation layer put on the scale, then add in the original layer size, while the second layer is scaling up to a tenth of the speed of the initial layer.

So I whipped across the second layer to the first and get this:

thisComp.layer("multiplanemountains.jpg_2").transform.scale

Now, I want to have this layer scaling to 1/10 scale of the control layer, so I added the expression to divide by 10:

thisComp.layer ("multiplanemountains.jpg 2").transform.scale/10

I still need to restore the original size, then that is just 1/10 greater than the control layer, so I thought I should be able to add 100, so I'm doing this:

thisComp.layer ("multiplanemountains.jpg 2").transform.scale/10+100

But it adds only the 100 to scale horizontally, not vertically. I tried bracketing what it off, but after said effects is a bad expression and it does not accept:

thisComp.layer ("multiplanemountains.jpg 2"). (transform.scale/10) + 100

I tried the bracketing on the 100 and he giving x and y values like this:

thisComp.layer ("multiplanemountains.jpg 2").transform.scale/10+(100,100)

He is still as the horizontal value.

I know I should tell him to add the 100 times x and y, but I can not understand how do. Can someone help me?

Thanks in advance!

You have not found the array function. Maybe this will help. All properties with multiple values are arrays. A table is written inside square brackets. For example, if you write this as an expression of scale [50, 75] then the layer will evolve to 75% and 50% in X in Y. If you type .scale [0] in an expression, then that will return the X value of the scale. . Scale [1] is the value of it, and if you have a 3D layer then .scale [2] returns the z scale (it makes a difference in the position of the layer when the scale of a 3D layer)

Let's look at your expression and set up some variables. Consider that multipleanemountains.jpg 2 is the main layer. Personally, I would rename this layer Master. Let's start by improving your syntax and simplify calculations by setting the property that you want to use as a variable.

m = thisComp.layer("multiplanemountains.jpg_2").transform.scale;

Now you can do your calculations on the variable "m" and it's much simpler. This is where I get into trouble with your application and your math. We will take your original theory. Divide by 10, then add 100. The correct way to do it would be to write the expression as follows:

m/10 + [100, 100];

Here is the result. If the main layer is 100% then the layer of the slave will be 110%, but if the original layer is 200% then the slave layer will be 120%. I don't think that's what you want. What I think you want is to multiply the main 1.1 layer so that the slave is 10% greater than the master. You who would write like this:

m * 1.1

Now, when the master is 100% the slave will be 110% and when the master is 200% the slave will be 220%

Tags: After Effects

Similar Questions

  • How to apply the expression using script?

    I use a script and an expression to automate all the layer selected to attend the control layer. So, I've do it now in two steps, first make a layer of control using this script:

    {

    model var = app.project.activeItem;

    var slctd_layer = comp.selectedLayers;

    var new_adjustment = comp.layers.addSolid ([1,1,1], "Control", comp.width, comp.height, comp.pixelAspect, comp.duration);

    new_adjustment.adjustmentLayer = true;

    var addSlider1 = app.project.activeItem.selectedLayers [0]. Effects.addProperty ("ADBE Slider Control");

    addSlider1.name = "time";

    addSlider1.property (1) .setValueAtTime (0, 0.06);

    var addSlider2 = app.project.activeItem.selectedLayers [0]. Effects.addProperty ("ADBE Slider Control");

    addSlider2.name = "opacity";

    addSlider2.property (1) .setValueAtTime (2, 0);

    addSlider2.property (1) .setValueAtTime (2.03, 100);

    }

    Then, I select all the layer under the control and apply the expression, for example:

    delay = thisComp.layer("Controler").effect ("delay") ("Slider") * index;

    t = time + delay;

    exp = thisComp.layer("Controler").effect ("opacity")("Slider").valueAtTime (t);

    exp;

    I'm working on an animation of the tight timelines and tons of materials with tons of layer for each model now. So I think that if it is possible to combine this stage two in a script that will automate this work for me. I'm still new to scripts and none need help with it. Thank you

    Like this:

    var ease = new KeyframeEase(0,100/6);    // speed (0 for easeIn or easeOut, influence range: 0-100)
    var addSlider1 = new_adjustment.effect.addProperty("ADBE Slider Control");
    addSlider1.name = "delay";
    // 1st key: value + ease
    addSlider1.property(1).setValueAtTime(0, 0.2);
    addSlider1.property(1).setTemporalEaseAtKey(1, [ease], [ease]);
    addSlider1.property(1).setInterpolationTypeAtKey(1, KeyframeInterpolationType.LINEAR, KeyframeInterpolationType.BEZIER);
    // 2nd key: value + ease
    addSlider1.property(1).setValueAtTime(2.03, 0.03);
    addSlider1.property(1).setTemporalEaseAtKey(2, [ease], [ease]);
    addSlider1.property(1).setInterpolationTypeAtKey(2, KeyframeInterpolationType.BEZIER, KeyframeInterpolationType.LINEAR);
    

    (The use of setInterpolationTypeAtKey is not necessary, it is only there to do things similar to what you would get by doing things by hand).

    Xavier

  • the express uses french Outlook for the spell checker

    I had the same problem with my old pc with window7 I remember something being said about widows 7 not being compatible with office 7 that I installed. the parameters are for English and outlook express is used with office use enlish to spell check, but when I'm not using Office E-mail it will use french for spell checking. Because I don't speak french, it is a problem. I prefer not to use e-mail with the office if I can avoid it... I remember that a person of this forum developed a fix for the problem I downloaded and it was corrected. Have afix. Thank you.

    Hello

     
    1. Did you the latest changes on the computer?
    2. What version of the program Office is now installed on the computer?

    Outlook express doesn't have a spell check included he uses the spell checker of the Microsoft Office application installed on the computer.

     
    See the articles below and check if it helps.
    Check spelling and grammar in another language
    http://Office.Microsoft.com/en-us/support/check-spelling-and-grammar-in-a-different-language-HA010354780.aspx
     
    You no longer have the correction spell checking capabilities in some languages in Outlook Express 6.0 after you install the Microsoft Office 2007 or Office 2010 system
    http://support.Microsoft.com/kb/932974
  • Combine the Expression and keyframes

    Hello guys... I hope that you are not annoyed with me for questions

    Well, I got a problem (yet) here.

    I want to do a gear rotates in some time.

    I search on Google and I found an expression to solve.

    He gave me this expression...

    timeToStart = 2;

    If (time > timeToStart) {}

    Wiggle (3.25);

    } else {}

    value;

    }

    and I try to do that.

    and what I got here isssssssssssss... Look at the picture below...

    Screen Shot 2012-01-18 at 4.32.51 PM.png

    I do my material start turning to 6; 14 seconds. Look at the Z rotation value, and its value is 0, x and 0 degrees. Look at the current time. It shows 0; 00; 05 29

    When I moved it to my selection time, look at the picture below...

    Screen Shot 2012-01-18 at 4.33.18 PM.png

    Look at the current time! It displays 0; 00; 06 00 and my equipment starts to turn!

    and look at the rotation values. It's suddenly at 1 x and 240.6 degrees!

    All I want is just him starts turning gear in time as I want to and he'll leave x 0 and 1 degree... Suddenly can't be 1 x and 240,6... If the craft begins to spin with a gentle movement...

    In the future, it would be preferable to ask questions of the expression in the Expressions of the AE forum. I'll give this one a shot here in any case...

    The problem is that you set your rotation of time and you have not deducted from the start of the present time. It also seems that you want to start the rotation to 6 seconds and 14 images. You can't put timecode in as of the time this way. Time is a decimal value. Assuming that 29.97 FPS 6; 14 = 6.4

    Try this:

    timeToStart = 6.47;
      if (time > timeToStart){
          (time-timeToStart)*100;
      }else{
          value;
      }
    

    The only other problem with your expression, is that the speed ramp smoothly. You can fix this by increasing the complexity of the expression or by rewriting the expression using a slider of expression to control the speed of rotation. If you do this, then you can simply set keyframes for the slider and the ramp up to speed or change speed over time with ease. You will get a better solution. Add a slider of Expression to your rotating layer, rename it to "rpm" and try this expression.

    slider = effect("rpm")("Slider");//Expression Slider on this layer.
    sv = 0;//start value
    fNum = timeToFrames(inPoint);
    while (fNum < timeToFrames()){
    sv += slider.valueAtTime(framesToTime(fNum));
    fNum++;
    }
    sv*thisComp.frameDuration*60
    

    I think I got this Dan Ebberts solution a few years ago. When you get something like that you can reuse transform them into an Animation preset by selecting all the properties of the layer Animation > Save Animation preset. It took me a while to remember what I had called it.

  • Scaling vertically by the Expression, please help ASAP!

    Hello, everyone! I had a bit of trouble within the last few days, and I searched almost every corner of the web trying to figure out how to write this expression. So I had two expressions. We were too complicated and not a new does exactly what I want. So first, here's my first expression

    X = 100

    Y = thisComp.layer("Soundkeys_1").effect ("sound keys") ("Output 1") * 1.33333;

    "CB = (CheckBox Control") effect ("Checkbox");

    If (cb.numKeys > 0) {}

    t = cb.key (1) .time;

    Y = linear(time,t,t+1,Y,.5);

    Note: this is a single bar of 63
    This was given to me by another Member on this forum about 6 or 7 months ago. What this did is whenever that time I had a key image of the box I get the bar down slowly during the second at the end of the song. The problem with the term is that it does not allow me to do the bars Ascend slowly upward more than a second (the opposite of what it).

    So my solution so far has been to use an expression that allows me to have less soundkeys layers for solids (have not really learned to test it so if you could tell me if it works or not which would be awesome) here is the second (new) expression, but the expression does not include the scaling upward or down scale.

    X = 100

    Temp = thisComp.layer("1-3").effect ("sound keys") ("Output 1") * 1.33333;

    Temp2 = thisComp.layer("1-3").effect ("sound keys") ("output 2") * 1.33333;

    Temp3 = (temp1 and temp2) / 2

    Y = [100, temp3]

    }

    [X, Y]

    Once again: it's just a bar of 63

    What are average effects soundkeys instead of having so many different ranges (not important). What I am wanting to add is to add to this expression with a slider effect, or 2 box keyframes, just something like it takes do you present in several layers at once (while keeping my current expression) [so probably using an adjustment layer]:

    PotableAjarCaiman

    But of course scaling upward at the beginning of the song and scaled down at the end of the song, each period of 1 second. Sorry for such a long post, but I really wish I could get there as soon as POSSIBLE for my promotional music channel . Thank you!

    PS: The only reason I'm writing is because I couldn't find anywhere, and the only thing that I thought were too advanced for me to understand, but what I didn't understand is that they used a slider effect to control the whole of the value of Y of the layers with keyframes. Hope that the additional information could be useful

    Hello again everyone. So my friend and I were finally able to come with two expressions that I needed to make it work! Basically what I had to do was to create a null with effect of cursor object and add pictures 4 keys (2 at the beginning) and 2 at the end where I wanted them. We hung out and then each bar for the layer of sound keys appropriate as well as the slider layer. These are two expressions that we could get to

    For a single bar that wasn't going to be an average, we used this expression:

    temp = thisComp.layer("1-3").effect("Sound Keys")("Output 1")*(4/3);temp = temp*thisComp.layer("Spectrum Scale").effect("Slider Control")("Slider");temp = linear(temp, 0, 100*(4/3), .5, 100*(4/3));[100, temp]
    

    This adds a variety of things to temp.

    1. in the first line, we have 'temp' on the expression of basic whipped pick multiplied by 4/3.

    2. in the second line, we have pick whipped for the layer time zero that we named "Slider Scale" and the effect being "Cursor" with the variable (keyframes) on "Slider".

    3. the third line is a little more complicated because we needed to have had a minimum of.5 without adding +.5 at the end of the last line. This created a problem because this would produce no output, even when we didn't she added, a.5 more that it should be. So we decided to add a minimum expression to the minimum.5 power and the maximum output identical to the first line "(4/3)". "

    For the bars, on average, it needed a little more coding and much more advanced work (in my opinion). This is the expression:

    temp1 = thisComp.layer("1-3").effect("Sound Keys")("Output 1")*(4/3);temp2 = thisComp.layer("1-3").effect("Sound Keys")("Output 2")*(4/3);temp = (temp1+temp2)/2;temp = temp*thisComp.layer("Spectrum Scale").effect("Slider Control")("Slider");temp = linear(temp, 0, 100*(4/3), .5, 100*(4/3));
    

    So, is a lot heftier of an expression at first glance, but really, it's basically the same thing.

    1. put off tension in the first line, we have him while temp1 is the first release used in sound tones multiplied by 4/3.

    2. in the second line, we have exactly the same thing that the first line only, we used the second exit in the sound buttons layer.

    3. the third line is where we started having to change everything. previously, he was referred to as "temp3" but we couldn't use it with what we wanted to do. So what we ended up doing was to change all the references 'temp3"just"Temp ". Then we did the same thing as we did in the first expression choose it whipping out of the slider control.

    4. in the fourth line, that's where we had to implement a different minimum and maximum so that the bars do not disappear when the audio reaches a point 0 or keyframes, we put in the slider were set as 0. So, we made minimum.5 flow and the 100 *(4/3) of maximum output using the expression "linear '.

    Due to the extensive knowledge of my friend in these types of templates and javascript, it only takes about 30 minutes to fix the problem. It does exactly what I wanted to do in my original post, and I am very grateful to have a friend who can help out me like that. I want to thank each of you in the community forum to help people at all times with the expressions, even if they are extremely simple. Help you a lot of people who simply can not find the answer they're looking for. I'll show you what I did with key images in the slider effect now

    2 last keyframes are exactly the same values but in the opposite direction. The end result is completely what I wanted (as shown in the OP) so if anyone wants to know how to intensify the multiple layers at the beginning and then downwards at the end please send them this. Thanks again to the community, as much respect!

  • Airport Express, Time Capsule and Airport Express using the same network

    Just moved into a new House and this is what I install.  I have 7 Port wired into the House.

    Closet of network in the Garage:

    • Cable modem
    • Airport Express
    • netgear switch 8 ports
    • It works pretty well.  All my wired connections work fine.  Wireless is quite good but cove not enough of space in my house.

    Think about adding my airport express capsule of time in my office - plugged into one of the hard wired connections.  Who works AND let me wish the WIFI?

    Thank you!

    Yes fine, assuming that first test you the Ethernet port in the office by connecting a computer (with WIFI disabled on the computer) using a spare Ethernet cable runs to ensure that the computer can get a good connection in this way.

    Put the airport Time Capsule to create a wireless network that uses the exact same wireless network name and password in your existing network. Apple installation "Wizard" automatically configure airport Time Capsule in the correct setting of the Bridge Mode for the device.

  • Satellite L350 - how to use the express card slot?

    Can someone tell me about the L350 what means the express card slot?

    Only, I'm used to having the SD and memory stick cards.
    Is there an express card to use with this or can get you an adapter for other cards?

    Thank you smokeyb

    Hello

    You should look in the user manual. You will find lots of information about the batch of express cards.

    The express card slot allows you to install ExpressCard/34 or ExpressCard/54 to extend functionality.
    For example, the external WiFi cards, USB cards, etc. use this slot machine.

    Welcome them

  • I want to use the expression editor control in a DLL VC ++ how?

    Hello

    as mentioned I want to use the expression editor control in my DLL written with VSC ++ 2005 MFC. But I came across some problems:

    If I simply add the ExpressionEdit control in the toolbar to my dialog box then the dialog box will appear not during execution. As soon as I remove the control from the dialog box appears.

    In the examples of TS is a called "TCL" (...) Instruments\TestStand national 4.1.1\Examples\Tcl\source\EditSubstep). It is programmed in C++ and uses the expression editor control.

    The original dll works fine, but as soon as I compile the editsubstep with my VS 2005 I get a runtime error (see image).

    What should I do to be able to use this control?

    Does anyone have an example of a job for me?

    Frank has soon

    Hi, I found the solution and now it works fine.

    I just had to enable support for OLE controls in my dll.

    Nevertheless, thanks for your help!

    BOOL CMyDLLApp:: InitInstance()

    {

    CWinApp:: InitInstance();

    AfxEnableControlContainer();  enable support for OLE controls

    Return TRUE;

    }

    Frank has soon

  • Question about the possible use of MSVC 2008 Express as an external compiler CVI 9.0

    I was looking for these messages looking for information on the use of the ICB with external compilers, especially from MSVC 2008, and I came across this ad are about 4 months:

    "CVI 9.0 and MSVC 2008 express.

    The title of this announcement means that the freely downloadable 'express' version of MSVC can be used with CVI 9.0, but the body of the message is not in the details.  But I would really like to know if this is possible, and I'm guessing there are others here who could be very interested as well.  Page 8 of the CVI 9.0 release notes does not indicate that the Express version is supported, which makes sense.  I say this because I always thought that "express" versions of the MSVC were only to create .NET applications (C + c++ / CLI) and applications not native to Windows.  Or does change with the release of MSVC 2008 Express?

    There is no hurry to answer...

    JB

    If you have a CVI 9.0 FDS(I'm not sure about the BDS)

    Select Options/Build Options

    Select the Select button to the right of 'compiler active'.

    Click 'new' to create a new configuration of external compiler

    Select MSVC 9.0 as a model.

    Choose a configuration name (what you choose to CVI) and a destination file (where the external compiler settings will be stored).

    Click OK

    After that, you can easily select the optimizing level and the level of warnings that you need through the "Edit" in the box "compile to realease configuration.

    Kind regards

    Nicolas

  • use of Cisco of the expression "apparatus".

    Hello world.

    I read a lot in the 'device of the expression' cisco documents such as ASA appliance, firewall.

    Exactly what it means when Cisco use this term "device"?

    Thank you and have a nice day.

    There is not a fixed definition.

    Historically, the ASA has been called an Adaptive Security Appliance. The device, which means it's a box that could be made to make many different functions (firewall, VPN, IPS network head, etc.)

    More recently, the device is used to designate products that are based on a custom rack-mounted computer. These usually run a distribution of Linux (RHEL) and have ADE-OS of Cisco (Application Development Environment Operating System) on top of Linux all running multiple applications. Include first Cisco Infrastructure Cisco first LMS, identity Services Engine, ACS, etc..

  • Cannot use analytical functions such as lag/lead in odi components 12 c except in the expression

    Hi I am a beginner of ODI 12 c

    I'm trying to get the last two comments made on the product for a given product id. and load them into a target.

    I have a source table something like

    Product SR_NO comments LAST_UPDATED_TS

    1 good car 2015/05/15 08:30:25

    1 car average 2015/05/15 10:30:25

    Jeep 2 super 2015/05/15 11:30:25

    1 car bad 2015/05/15 11:30:25

    Jeep 2 horrible 2015/05/15 09:30:25

    Jeep 2 excellent 2015/05/15 12:30:25


    I want a target table based on their last timestamp updated as (last two comments)


    SR_NO Comment1 Comment2

    1                             bad                      average

    2 super excellent

    I used the logic below to get records in SQL Developer but in ODI 12 c, I'm not able to do this by mapping a source to the target table by applying analytical functions to the columns in the target table. Can someone help me solve this problem

    SELECT * FROM)

    SELECT SR_NO Comment1, LAG(Comment1,1,) ON Comment2 (SR_NO ORDER BY LAST_UPDATED_TS ASC PARTITION),

    ROW_NUMBER() ON RN (SCORE FROM SR_NO ORDER BY LAST_UPDATED_TS DESC)

    FROM Source_table

    ) M

    WHERE RN = 1

    ;

    UM, I'm afraid that ODI puts the filter too early in the request, if it generates:

    SELECT * FROM)

    SELECT SR_NO Comment1, LAG(Comment1,1,) ON Comment2 (SR_NO ORDER BY LAST_UPDATED_TS ASC PARTITION),

    ROW_NUMBER() ON RN (SCORE FROM SR_NO ORDER BY LAST_UPDATED_TS DESC)

    FROM Source_table

    WHERE RN = 1

    ) M

    ;

    Instead of:

    SELECT * FROM)

    SELECT SR_NO Comment1, LAG(Comment1,1,) ON Comment2 (SR_NO ORDER BY LAST_UPDATED_TS ASC PARTITION),

    ROW_NUMBER() ON RN (SCORE FROM SR_NO ORDER BY LAST_UPDATED_TS DESC)

    FROM Source_table

    ) M

    WHERE RN = 1

    ;

    Even by changing the 'run on Hint"of your component of the expression to get there on the source, the request will stay the same.

    I think the easiest solution for you is to put everything before the filter in a reusable mapping with a signature of output. Then drag this reusable in your mapping as the new source and check the box "subselect enabled."

    Your final mapping should look like this:

    It will be useful.

    Kind regards

    JeromeFr

  • Download ip applications and the port using the expression language

    Hi gurus, is possible to get the ip and port applications using the expression language / FacesContext?

    example:

    I have a request to the url:

    http://120.120.120.120:7001/MyApp/faces/login.JSPX

    I can get 'MyApp' (context root) using #{facesContext.externalContext.requestContextPath}

    but I want to get the 120.120.120.120:7001 using EL.

    If it is not possible using EL, I can't using javascript / java code in jspx?

    What am I I make here is, I want to store multiple images in the folder on the server, and then I'll have my servlet read this image of the server folder and use this picture as the background image of the panelgrouplayout.

    I want to save this image in a folder user can update this image easily that store this image in DB / application

    Thanks before

    Hello

    Try #{facesContext.externalContext.request.remoteAddr}

    If the above does not work, use a managed bean and expose the information as a property. Then use EL to reference the property.

    private String remoteAddress;

    public void setRemoteAddress (String s) {};

    public String getRemoteAddress() {}

    String addr = (facesContext.getExternalContext () .getRequest () .getRemoteAddr () (HttpServletRequest);

    }

    HttpServletRequest (Java EE SDK 5)

    Frank

  • Use the commands of the expression to preset animations...

    I have several preset animations that contain expressions with expression control sliders. When I apply the animation preset to a layer, it adds the commands of expressions in the effect controls panel as usual and everything works fine.

    However, if I add another animation preset to the same layer there is no add a double set of options for expressions (with a number appended to the name 2) instead of just replace existing ones. I realize that the preset detected a duplicate name, that's why the 2 has been added... but the real expression has not been updated to use the new name of control of expression. So basically, the expression still refers to the original name and completely ignores the game duplicate of the controls in the expression that was created.

    If anyone knows a way to get an animation preset to replace or upgrade options for existing expressions that use the same name?

    You must rename your controls of expression. This will solve the problem if all names are unique. If you apply the same predefined animation twice for the same layer and this preset contains options for expressions then you will get duplicate with the added number names. There is no way around that.

  • How to insert data into the table by using the expression builder in the assign activity

    How to insert data into the table by using the expression builder in affect business in BPEl, I use SOA Suite 11.1.1.5
    Can someone help me please

    Hello

    I don't think that oraext:query-database() can insert data into the table.

    What are your needs?
    Can not you plan to use the DB adapter with the insert operation?

    Kind regards
    Neeraj Sehgal

  • How to use the TRUNC function with dates in the expression builder in OBIEE.

    Hello
    How to use the TRUNC function with dates in the expression builder in OBIEE.
    TRUNC (SYSDATE, 'MM') returns 1 July 2010"where sysdate is July 15, 2010 ' in SQL. I need to use the same in the expression builder in the logical layer mdb column.


    Thanks in advance

    Use it instead:
    TIMESTAMPADD (SQL_TSI_DAY, (DAYOFMONTH (CURRENT_DATE) *-1) + 1, CURRENT_DATE)

Maybe you are looking for