How to remove an object (created by a script) element of the project?

For example:

TempNull = app.project.activeItem.layers.addNull ();

.

.

.

Use somehaw

.

.

.

TempNull.remove ();

It will remove the object model

But how the remove project (newly created element Null in folder "Solids")

I want to keep the structure of the project the same as before the execution of the script.

var comp = app.project.activeItem;
var par = comp.pixelAspect;

var layer = comp.selectedLayers[0];
var rect = layer.sourceRectAtTime(0,false);
var lpos = layer.position.value;
var x = rect.left + rect.width/2+lpos[0];
var y = rect.top + rect.height/2+lpos[1];

app.beginUndoGroup("Centroid");

center = comp.layers.addNull();
center.name = "CENTROID";
center.position.setValue([x, y]);

var SceneScaleNull = comp.layers.addNull();
var SceneScaleNullSource = SceneScaleNull.source; // grab null's source
SceneScaleNull.name = "fixPAR";

center.parent = SceneScaleNull;

SceneScaleNull.property("Scale").setValue([100/par,100]);

SceneScaleNull.remove();
SceneScaleNullSource.remove(); // and remove it

app.endUndoGroup();

Tags: After Effects

Similar Questions

  • How to remove unused objects from the webcatalogs?

    Hi friends,

    How to remove unused objects from the webcatalogs?
    is there a utility like the removal of unused objects of the physical layer in RPD?

    Thank you

    Hello

    Click link responses to the left of the answers click on the catalog button manage manage catalog, you can delete the unused objects

    Concerning

    NGO

  • Can I create a hierarchy of topic on the project manager pod or I must rely on the table of contents?

    Hello

    Can I create a hierarchy of topic on the project manager pod or I must rely on the table of contents? I use RoboHelp 9 (although I doubt that the version of the questions).

    Thank you

    Mary

    Hi Mary

    As you do this is by creating folders in the project manager, then create new topics in the files or move the existing entries in the records.

    If you work exclusively in the project manager, you are only able to move a single topic at a time. If you want to move a swarm of topics, open the pod of the list of topics and you can select as many as you want. Then drag the subjects selected to the folder on the project manager pod. Be a little careful when you drag. Often the mouse will pass over a tab at the bottom of the basket, and this can change their minds about you.

    See you soon... Rick

  • How to remove an accidentally created icon?

    Do you know how to remove an icon accidentally created on the desktop - the problem is the "office" and if I put it in trash/remove it, I will also remove the program "desktop", it seems.  Thank you.

    Hello

    Right-click on it - remove to put in the trash. To only delete the shortcut.
    If there is a problem, you can restore it from the Recycle Bin.

    Add or remove icons from the desktop
    http://Windows.Microsoft.com/en-us/Windows7/add-or-delete-desktop-icons

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • How to remove unwanted objects in photoshop

    I am trying to remove an object from an image (for example, a lightpost on a building to blend in the background sky). I tried to describe using Quick Selection then complete but not getting the results I want.

    There are many tutorials online depending on the version you're using and the image you are editing.

    Can you post the image to see what you're dealing with? There are always several ways to do something in Photoshop, and everyone has their preferred method.

    Try remove an object in Adobe Photoshop | Tutorials Photoshop Adobe CC

  • I we e CC of Photoshop on Mac. Use it for about a month.  When using the filler content longer option to remove an object from my picture I sometimes get the message "could not complete because there are not enough opaque pixels.  I created a new layer an

    I was wondering if someone could tell me what I'm doing wrong

    I would use it on a duplicate layer ctrl/cmd-J for the layer that you want to fill or visible merged stamp ctrl-alt-shift-E. The feature is intended to fill small transparent surfaces such as a mesh of pano or remove an object from an image. It has not been designed to fill an empty layer.

  • How to remove a shortcut doubles for an application out of the home screen

    I accidentally created a shortcut twice on my home screen to the same application and may not know how to remove the duplicate shortcut.

    A long time hold the shortcut that you want to remove and drag it to the bottom of the screen where a bin should have appeared. When it turns red, drop it and he went.  I hope this helps.

  • How to remove a song from my library, but not from the playlist?

    Hello

    I know this question has been asked before. But as far as I don't know in conjunction with Apple music.

    Since there is a way in music from Apple to add a song only to a playlist, not the library, I was wondering if there is a way to remove a song from my library and not from the playlist?

    Is it possible to do?

    All the songs on playlists and in my library are Apple music.

    I tried to export a playlist in XML format, and then deleting the songs in my library, and then import the XML file.

    Unfortunately this does not work because iTunes can't find the songs in Apple's music even though he had only songs from Apple's music in the playlist before.

    I'd hate to have to create all my playlists once more just to empty my library.

    Thanks for your help!

    Read this Apple knowledge base article

    Add a song to a playlist in music Apple without adding it to your library - Apple Support

  • Get the UID of an object created from a script

    Hi all

    In my script, I create an object in a script (say PersonHasRessource) using the. Save() method.

    Is there a way I can get the UID of the object created in the same script to move to the next step in the process?

    Thank you

    Hello

    PersonHasRessource does not have a UID of its own.  There the UID of the person and the UID of the resource.  So in this case you should already have these values if you have created an entry in this table.

    Here's an example of another table:

    UIDValue = Connection.GetSingleProperty ("AccProductGroup", "UID_AccProductGroup", f.Comparison ("Ident_AccProductGroup", Ident_AccProductGroup, ValType.String, CompareOperator.Equal, FormatterOptions.None))

    So here, I get the UID_AccProductGroup of the AccProductGroup has just created using the Ident_AccProductGroup in the where clause.

    HTH, Barry.

  • How to make an object or a menu to stick on the left edge of the screen?

    I want the menu on the left to look like here http://muserocket.com/TF/bonesa/ How to do paste left on any monitor?

    Use the pinning control in the Control Strip to pin to your sidebar to the top left of the browser window.

  • Cannot create folders or other elements in the same drop-down menu in "organize bookmarks".

    Cannot create new bookmark files. 'Create a new folder' and all the other relevant elements that scrolls to organize the bookmarks are grayed out.

    I have exactly the same problem. Have not found the solution.
    21/07/10

  • How to remove a folder created in LR6

    Hello, I use Win7 & LR6. I accidentally created a folder (without name) and I would like to delete LR and start over, how do I do it please?

    Sorry, to be more precise:

    -Remove the folder from the OS - there '?' in LR

    -Then right click on the folder in the LR library and choose to remove it.

  • How to remove old objects of IOM resource

    I work with IOM Version: 9.1.0.1866.70 and I have recently said that we will not use a certain object of resources more.  I have watched and traversed the console design but I don't see any option to remove a whole resource.  Is it still possible to delete a resource of OIM?  I can turn off Auto down but our many admins provisioning will always have the possibility to grant the deceased resource.  Is it available in a future release of OIM?

    If you change the type of the object system resource, it will be more visible from the user interface for commissioning.  You must also remove it from any of your access policies.  If you really need to retire.  I suggest that you assign auto complete a task on your function to remove and revoke all your users of it.  If the resource will exist always, but no new users should get it, scoring as a system resource should be enough then will always trigger events of life to existing users.

    I wouldn't through the connector to uninstall your production.  If any other object present coins in use, uninstall will worry not about that and then other your workflow will be broken due to missing parts, but you get no warning.

    -Kevin

  • How to remove an object from a turned movement?

    So my dumb butt left a cellphone on the counter in this shot, as you can see here: Streamable - simple video sharing

    I never got to try it, but what is (in your opinion) the best way to deal with this?  My first thought was I could export it as an image sequence and remove manually in photoshop in every shot, but I shot it at 60 fps and close-up has about 100 images so obviously I don't want to do it 100 times.

    Any recommendations?  I'm fine with lifting the tutorials but I don't know what methods I need to find a tutorial on

    So if someone could point me in the right direction, I would appreciate it.

    AE has a tool, clone stamp, as well, and in your case, that would be super simple to use, since you have a lot of sources of clone with barely any discernible texture. Track the phone and apply the clone stamp. As an alternative, you can simply duplicate the layer and use a bit of masking and repositioning to cover the phone on the layer below.

    Mylenium

  • How to remove an object from a photo...

    I tried the Magic Eraser... no results... The object is deleted bu t that appears a large number of small squares...

    It depends on what you want to do with the subject. I guess you are trying to cut out a portion of a photo to use in another image? You can just copy paste the object isolated in the new photo.

    On the other hand, if you mean you want to fill the empty space, the gum was not the best choice of tool for the job. Usually in PSE you clone from objects you don't want (like traffic signs, for example) to hide rather than delete it, because you still have to put something to cover the hole that you did. If you don't mind not changing the shape of the picture, the tool recompose can also be used for things like the deletion of the average person in a group of three and the other two get closer.

Maybe you are looking for