help to change the size of precomp (weight and size using the script)

Hi guys, need help with change precomp size (weight and size using the script), my problem in this... when I change the size of the model (height and weight) of GUI AE, AE change the size of the composition of the Center model, but if I change the size of the model of my script it change from upper left... so I need some how change in the center of scripts of composition or something like that?

now I change size with this code

MyComp.Width = myComp.Width.Width + 50;

MyComp.Height = myComp.Width + 50;

Hi Zipkiev,

If you want to change the composition and all the layers it contains, there is a script: scale Composition.jsx that comes with Ae (in the Scripts folder) which does exactly the same thing.

He puts on a scale by a factor uniform using a temporary null object. You can twist no uniform scaling by a factor.

But if you want only to preserve the size of the layers and adjust their position so that their new position relative to the new comp Center is the same as previously, the script above can not help.

In the simplest situation you just compensate for all positions of layers related by the same amount: [(compNewWidth-compOldWidth) * 0.5, (compNewHeigth-compOldHeight) * 0.5].

Not sure it will work well in all situations (such as 3D with cameras).

You can try it, it might work for you:

COMP is the composition, newWidth, newHeight its new width/height

var

DX = (newWidth - comp.width) * 0.5;

DY = (newHeight - comp.height) * 0.5;

layer, n,

p, j,

value;

COMP. Width = newWidth;

COMP. Height = newHeight;

for (n = 1; n<=comp.numLayers;>

layer = comp.layer (n);

If (layer.transform &! layer.parent) {}

p = layer.transform.position;

If {(p.numKeys===0)}

p.value = value;

value [0] += dx;

value [1] += dy;

p.setValue (value);

}

else {}

for (j = 1; j<=p.numKeys;>

value = p.keyValue (j);

value [0] += dx;

value [1] += dy;

p.setValueAtKey (j, value);

};

};

};

};

Tags: After Effects

Similar Questions

  • Help please change the script number

    Hello!

    There is one such script or plugin, hand Controller.jsx and there is a single track camera parameter limit somehow the number that allows you to control up to 1370, for example, I need to infinity, or at least to 20,000, to try to change the number in the main Controller.jsx file but nothing changed. wrote one person here, he said the difficulty of "PresetEffects.xml" in the folder "C:-Program Files-Adobe------Adobe after effects CC 2015------Support Files. I changed the track camera up to the desired value, but as soon as I change more than 1370 all is lost. Plug-and-project joint. project of https://Cloud.mail.ru/public/3AwZ/fCu2WcPSh and https://cloud.mail.ru/public/H6C8/smxDKdXPM

    Help me please.

    Here it goes

  • Can someone help me change the script function?

    I have a script for indesign:


    var link, image, frame,.
    doc = app.activeDocument,
    Links = doc.links,.
    counter = 0;

    for (var i = links.length - 1; i > = 0; i--) {}
    If (links [i] .status == LinkStatus.LINK_MISSING) {}
    try {}
    link = links [i];
    image = link.parent;
    Frame = image.parent;
    Frame.Remove ();
    counter ++;
    }
    {} catch (err)
    $.writeln (i + "-" + err);
    }
    }
    }


    which is made by Kasyan Servetsky, function: remove all objects from the missing link, it works fine, but only works on the single file,.
    now, I want to change the purpose of the function to let him work on all open files.


    for example, I opened more than a dozen files, all the files have disappeared as objects, I want to delete all items in the missing link in the file by a simple click the script,


    is this possible?

    Hi Harvey.

    I guess that's what you expect below,

    ***********************************************************************

    var link, image, image;

    var openDocs = app.documents.

    var openDocsLen = openDocs.length;

    for (var d = 0; d)< opendocslen;="" d="">

    currDoc = openDocs [d],

    Links = currDoc.links,.

    counter = 0;

    for (var i = links.length - 1; I > = 0; i--) {}

    If (links [i] .status == LinkStatus.LINK_MISSING) {}

    try {}

    link = links [i];

    image = link.parent;

    Frame = image.parent;

    Frame.Remove ();

    counter ++;

    }

    {} catch (err)

    $.writeln (i + "-" + err);

    }

    }

    }

    }

    *****************************************************************************

    Please add extra code to save the document if you need

    Concerning

    Augustine

  • I'm desperate. Help to change the additional e-mail address.

    Nice day!

    My additional email address is missing, because the field has been deleted (russia.ru). Questionnaire responses because I forgot. Help please change the address on the action.

    I can't call tech support, because I can't talk. I can write only.

    I can confirm his identity by any means. I'm honest owner identification.

    Help, please!

    Maybe I chose the wrong topic. But now I have no way to update the program and stopped all the work and must be updated.

  • script need help to change the VMinfo Get to include no RDM

    Hello world

    Could someone help me with the script which retrieves information for VMGuests. I would like to modify this script to include NO RDM, if possible.

    Thanks for your help

    # The Get-VMInformation function gets information of VM
    Function Get-VMInformation {}
    {in process
    Get - VM | Sort-Object-property name. `
    Select-Object Name,@{N="UsedSpaceMB; E = {[math]: tour ($_.)} (UsedSpaceGB * 1 Ko, 0)}}, NumCpu, MemoryMB,.
    @{N = "SnapshotSizeMB"; E = {[math]: round (($_ |))} Get-Snapshot | Measure-Object-SizeMB property-sum). Sum, 0)}}
    }
    {end}
    "" | Select-Object @{N = "Name"; {E = {"{0:yyyy - MM - DD} ' f (Get-Date)"}}, UsedSpaceMB, NumCpu, MemoryMB, SnapshotSizeMB
    }
    }

    # Get all information from the virtual machine and export it to the output file
    Get-VMInformation |
    Export-Csv-path $OutPutFile - NoTypeInformation - UseCulture

    Try this

    # The Get-VMInformation function gets all the VM information function Get-VMInformation {
        process {
            Get-VM | Sort-Object -Property Name | `        Select-Object Name,
            @{N="UsedSpaceMB";E={[math]::Round((Get-HardDisk -VM $_ | where {"RawPhysical","RawVirtual" -notcontains $_.Disktype} | Measure-Object -Sum -Property CapacityKB).Sum/1KB)}},
            NumCpu,MemoryMB,
            @{N="SnapshotSizeMB";E={[math]::Round(($_ | Get-Snapshot | Measure-Object -Property SizeMB -Sum).Sum,0)}}
        }
        end {
            "" | Select-Object @{N="Name";E={"{0:yyyy-MM-dd}" -f (Get-Date)}},UsedSpaceMB,NumCpu,MemoryMB,SnapshotSizeMB
        }
    }
    
    # Get all the VM information and export it to the output file Get-VMInformation | Export-Csv -Path $OutPutFile -NoTypeInformation -UseCulture
    
  • I recently purchased Photoshop elements 13.  My employer just changed my computer (I am allowed and only use my personal computer) and the new computer does not have a CD-ROM drive.  Is it possible to download the software elements on my compu

    I recently purchased Photoshop elements 13.  My employer just changed my computer (I am allowed and only use my personal computer) and the new computer does not have a CD-ROM drive.  Is there a way to download the software items on my computer with the serial number and not the CD? Help!

    You can download the trial and use your serial number of the drive to enable to make full use...

    PSE 13 trial - http://www.adobe.com/cfusion/tdrc/index.cfm?product=photoshop_elements

  • How can I change the script on my windows live mail in English after it being hacked

    my windows live has been hacked. I decided to go back inside. But unable to change the script back to English.

    Windows Live Mail questions belong here: http://windowslivehelp.com/product.aspx?productid=15

  • Need help to modify the Script to find the number of vCPU and reservation of memory in VC

    Hello

    Need help to modify the script so that his can person report to the vc all focus level instead of each level of the Cluster.

    Thank you

    KR

    Try this instead:

    $vmsInfo = Get-VM
    #Creating array to place new object
    
    $reportdata = @()
    
    Foreach ($vm in $vmsInfo)
    {
    #Creating new object
    $vmInfo = "" | Select Name, CPUReservationMHz, MemoryReservationGB
    $vmInfo.Name = $vm.Name
    $vmInfo.CPUReservationMHz = $vm.ExtensionData.ResourceConfig.CpuAllocation.Reservation
    $vmInfo.MemoryReservationGB = $vm.ExtensionData.ResourceConfig.MemoryAllocation.Reservation / 1024;
    #Inserting data into new object.
    $reportdata += $vminfo
    }
    $reportdata
    
  • Please help me fix the script

    I try to write a script by my slef but not work

    app.findGrepPreferencest = firstLineIndent:8, leftIndent:8;

    app.changeGrepPreferences = firstLineIndent:8, leftIndent:16;

    app.changeGrep ();

    app.findGrepPreferences = app.changeGrepPreferences = null;

    Can someone please help me fix the script, please.

    Hello

    Try this.

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.firstLineIndent = '8 ';

    app.findGrepPreferences.leftIndent = '8 ';

    app.changeGrepPreferences.firstLineIndent = '8 ';

    app.changeGrepPreferences.leftIndent = "16pt;

    app.changeGrep ();

    app.findGrepPreferences = app.changeGrepPreferences = null;

    Kind regards

    Cognet

  • Need HELP to change the NAT type to open on Linksys E2000.

    I was wondering if anyone could tell me how to change my nat from moderate to open so I can play xbox without any problems. But the strange thing is my nat was open, but it changed to moderate and I recently bought the linksys e2000 and it was open at first, but no more. If anyone can help me?

    Follow the below mentioned settings, then check.

    Open an Internet Explorer browser on your computer (desktop) wired page. In the address bar type - 192.168.1.1 and press ENTER...
    Let the empty user name & password use admin lowercase...
    On the Configuration tab change the size of the MTU to 1365, then click on save settings...
    Click the 'Administration' tab and disable the UPnP option and click on save settings...
    Click on the tab "Games and Applications" and then click the sub-tab "Port Range Forwarding"...
    (1) on the first line in the box, type Application in ABC, in the start box, type in 53 and type in 3074 service box, leave the Protocol as and under type 192.168.1.20 ip address and check the box to enable, click on save settings once it's been...
    (2) once you return to the game to the top page, click the Security tab and uncheck block anonymous Internet requests and click on save settings...
    (3) click on the status tab, and then note the DNS1 and DNS2 addresses...
    (4) address IP, Goto settings XBox network settings and assign the following on your Xbox and select manual IP settings
    IP address:-192.168.1.20, subnet mask:-255.255.255.0 default gateway:-192.168.1.1...
    (5) also assign addresses DNS on Xbox
    Use DNS1 and DNS2 addresses you took note of the primary router as secondary DNS & DNS status tab for the xbox...
    (6) turn off your modem, router and Xbox... Wait a minute...
    (7) plug the power to the modem first, wait a minute and plug the router power cable, wait another minute and turn on the Xbox and... test it connects...
    IP address: part 192.168.X. [last intellectual property in your device] for example if static ip given to the unit's 192.168.X.10 get the last part and put it in the empty box.

  • Need help to change the background and more

    Hey everybody! This is my first post on this forum so excuse me if its not very good.

    Now, at school, we experience a realization project and I and my group want to impress the teacher really a lot of movies. We decided that our film will be defined on a boat on the way to the sink, and before it sinks you get to know the different families/people on the boat and how all this turns out to these families when the boat begins to sink. But the problem is that we don't have a boat. But I have after effects, and a normal size sheet that is completely blue, which can be used as a blue screen!

    I know how to chroma key easily, but some scenes are in need of a big blue screen we have
    So I spent a few hours now looking for a tutorial on how maybe change the background without anything like a blue screen , but I can't seem to find a good tutorial that helps me with what I want help with.

    E.g. one of our scenes are cars climbing on the boat and the blue screen is not big enough to cover the entire car and the Earth under our car is gravel, and I can't have that. So is there anyone here who knows a few videos on the internet that could help me, or a kind soul who could write me a text tutorial on how to do this?
    / Friendly, Axel.
    (btw I'm Swedish so excuse for bad spelling/grammar)

    There are many times when a green screen is not wide enough to cover all the material. You end up using a combination of green screen and Rotoscoping. In your car drive you to the boat example would position the blue screen before the blue screen was behind the windows of the car because that would be the most difficult parts of the car for Rotoscoping in hand. It would be easy enough to rotoscope the wheels and underside of the car.

    Take a look at this video from Lynda.com - a really great source after effects training. It will show you how the various masks are used to clean up a green screen when it does cover the whole.

    There was a lot of publicity for Singapore Airlines called Across the World who had an actress works continuously with a shot that she moved seamlessly from San Francisco to Paris to Venice and across transitions, she walked in front of a green screen that was just big enough to cover here head and shoulders because it is very difficult to rotoscoping hair and hands when they move. I took a quick glance for the behind the scenes video that was produced when they initially released the commercial but couldn't find the exact. If you look closely in this video, you will see people moving green screens around as she walks.

    This technique is still used on hit movies. Note here the green screen that does not hide the bottom of everything, just the parts that would be very difficult if not impossible to Rotoscoping.

  • Need help to change the new "new tab".

    My new custom tab, google, is no longer opens. New tab in Firefox is shit, how can I change this back?

    I used the topic: method of config to change it for a while, but now the chain is simply ignored.

    41 of Firefox is no longer uses the browser.newtab.url setting in about: config because he was constantly attacked by malware. From 41 of Firefox, you need an add-on to change the new tab page.

    Here are a few options (I'm learning more all the time):

    • If you are already using the extension classic restaurateur theme: There is an option somewhere (!) in his dialogues of the parameters to select another page in the new tab.

    Use only one of these methods at the same time, otherwise there may be conflicts and dysfunctions.

    Setting up substitute new tab and new tab custom

    After installing one of these extensions, you must use the Options page to set the new desired tab page (instead of use subject: config).

    Open the page modules using either:

    • CTRL + SHIFT + a (Mac: Cmd + shift + a)
    • "3-bar" menu button (or tools) > Add-ons

    In the left column, click Extensions. Then on the side right, find the new tab replace or custom new tab and click on the Options button. (See first screenshot attached).

    New tab Override

    Depending on the size of your screen, you may need to scroll down to enter the address in the form. (See second screenshot attached). For example:

    • (Default) page thumbnails = > subject: newtab
    • Blank tab = > subject: empty
    • Built-in Firefox homepage = > topic: welcome
    • Any other page = > full URL of the page

    Then tab or click this form field and you can test using Ctrl + t.

    Custom new tab

    It is easy to enter your favourite homepage address. If you check either of the boxes, the expansion will set the focus in the page as well, for example, the cursor will be in the Google search box. (See third screenshot attached). I had to leave Firefox and start it up again before new custom tab started working, but this may have been due to tests so many extensions back to back.

    Success?

  • Help to change the network settings on the guest account

    On my internet guest account worked very well, is not working anylonger. I tried the administrator account to change network settings, the guest account, but the only option I have is to change the image and to deactivate the account.

    Can someone help me please?

    Thank you.

    Hello
     

    1. What are the changes that you made before the show?
    2. what happens when you try to access the Internet?
    3. were you able to access the Internet with your admin account?
    4. do you have an error message?

    Method 1:
    I suggest you do the networking in safe mode
    http://Windows.Microsoft.com/en-us/Windows-Vista/advanced-startup-options-including-safe-mode

    Method 2:
    I also suggest you to return the item.
    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-Internet-connection-problems

    Method 3:
    Follow these steps:
    a. create a new user account and see if the problem occurs in the newly created account.
    b. If the problem does not persist in the new user account, it may indicate that your old user account is corrupted.
    Access the link below and follow the steps to repair the corrupted user profile:
    Difficulty of a corrupted user profile

  • OfficeJet Pro 8600: Help: I changed the cartridges and they are locked (JO 6800)

    I had a few problems print quality with my OfficeJet Pro 8600 and I changed the ink cartridges (950/951XL). Unfortunately, the problems are remained so, instead of buying a new printer head, I bought a new printer: a 6015 OfficeJet at Staples. First of all, I had to install the set up of the cartridges but pass them the old printer, which I had already brought to the depot of garbage to new XL versions. And guess what? The cartridges were locked! Now, I have to remove the locks in the old broken printer (what is left) or I can throw them-which is a shame because I bought the new 8615 especaially because it uses the same (expensive) XL cartridges. Please HP: help me. A loyal customer.

    Any cartridge that is installed in your Officejet Pro 8600 would not be usable in another printer, including a different of Officejet Pro 8600 8600 Pro Officejet "cartridge protection" was defined.  This cannot be reset, even in the original printer.  Turning off the cartridge of the printer's built-in web server protection will not affect future cartridges installed in the machine.

    Given the circumstances, I suggest call HP and ask if they can help to.  If they decline please post here and I'll see if I can help with a different approach.

    You can disable the protection of the cartridge in your Pro Officejet 8615 for the future.

  • help to change the name of the user account

    How can I change my name of user account for windows 8. I tried to change my Microsoft name and the password, which has not changed my username or password when I first connect to my computer and the start screen is displayed.   any help would be appreciated

    Hi Jeanette,

    Thanks for posting your question on the forum of the Microsoft community.

    I would like to know some information about the problem so that we can help you better.

    Are you trying to change the username of your account or your Microsoft account?

    Thank you for details on the question and your efforts to resolve.

    If you try to change Microsoft account name, please read this article:

    How can I change my account name Microsoft?
    http://Windows.Microsoft.com/en-us/Windows-8/change-Microsoft-account-name

    If you try to change the name of the account from your local account, you can try the steps and check.

    a. press Windows + X keys and click on Panel.
    b. click on "user accounts and family safety" and then click on "user accounts".
    c. click 'change the name of your account' and follow the on-screen instructions.

    I hope this information helps.

    Please let us know if you need more help.

    Thank you

Maybe you are looking for