Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all 2143 articles
Browse latest View live

Use part of the name of a comp in expression

$
0
0

Hello there,

 

I want to use part of the name of a comp to automate the actualization of expressions when duplicate this comps and the precomps in them. I labeled them as name_twodigitnumber, so I was wondering if there is some way to use Comp.name or a similar expression to get just the ending two digits number of the name of the comp as output, so they can actualize automatically when I make some duplicates. Hope the explanation is good enough.

 

Thanks in advance.

 

Diego.


Is there an alternative IDE to Extendscript Toolkit?

$
0
0

Hi There,

 

I may be the only one who has this opinion, but I'll throw it out there for discussion anyways.  I'm not a huge fan of the Adobe Extendscript Toolkit IDE.  I use it mainly on OSX and there are so many things that are fundamentally flawed with it.  For example, on the OSX version, when you go to change the colors for the document, they list the acutal color names, but if you choose a color that has two words in it, for example "Aqua Marine" nothing changes.  There are other issues I have with it that make it feel like it's a work in progress tha Adobe puts on the backburner.

 

I'm just curious if there is an alternative IDE that people use whereby you can still target the application you are scripting for?  I am a Coda user and would love to see a plugin written for that app.  If you have any suggestions for an alternative IDE for developing in Extenscript, please do post!

 

Thanks for your time and help!    

write to google sheets

$
0
0

hi,

 

I can read text from google sheets with scripting,

but how can I write in google sheets with scripting?

creating shape from text and get the path

$
0
0

Hi everyone!

I am trying to get an answer for this question.

I am working with ExtendScript, and with After Effect.

I have a script like this one:

var comp = app.project.items.addComp('test', 1920, 1080, 1, 30, 25);

var layer = comp.layers.addText('C');

What I am trying to do is to create shape from text by code in extendscript and then to get the path of the shape to array

that will contain the points of the path also in code.

I am sorry but i am beginner.

is there an easy way to do that?

creating shape from text and get the path

$
0
0

Hi everyone!

I am trying to get an answer for this question.

I am working with ExtendScript, and with After Effect.

I have a script like this one:

var comp = app.project.items.addComp('test', 1920, 1080, 1, 30, 25);

var layer = comp.layers.addText('C');

What I am trying to do is to create shape from text by code in extendscript and then to get the path of the shape to array

that will contain the points of the path also in code.

I am sorry but i am beginner.

is there an easy way to do that?

how to launch two dockable scripts from one script body??

$
0
0

Hi

     I have two scripts inside one with two different panels specified.

However 

>>Both Scripts launched separately using "myScript();"myScript_1();" but are not dockable.

>>Both Scripts are launched in one Panel using "myScript(this);"myScript_1(this);

 

 

 

////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////Script 1////////////////////////////////////////////////////////////////////

function myScript_1(thisObj1){

    function myScript_buildUI_1(thisObj1){

       

        var myPanel_1 = (thisObj1 instanceof Panel) ? thisObj1 : new Window("palette", "Tools", undefined, {resizeable:true});

        //

        //code 1

        //

        return myPanel_1;

 

 

}

 

 

var myScriptPal_1 = myScript_buildUI_1(thisObj1);

 

 

    if((myScriptPal_1 != null) && (myScriptPal_1 instanceof Window)) {

        myScriptPal_1.center();

        myScriptPal_1.show();

    }

 

 

}

 

 

////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////Script 2////////////////////////////////////////////////////////////////////

 

 

function myScript(thisObj){

    function myScript_buildUI(thisObj){

       

        var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Utils", undefined, {resizeable:true});

        //

        //code 2

        //

        return myPanel;

 

 

}

 

 

var myScriptPal = myScript_buildUI(thisObj);

 

 

    if((myScriptPal != null) && (myScriptPal instanceof Window)) {

        myScriptPal.center();

        myScriptPal.show();

    }

 

 

}

 

 

//////////////////////////////////////////////////////////////////////////////////////Auth enticate/////////////////////////////////////////////////

var a=2;

if (a=2){

   

    myScript(this);

    myScript_1(this);

   

    }else{

       

        }

Open script window under mouse position?

$
0
0

Is it possible? Something like that:

w = new Window("dialog", "Name");

w.location = [mouse-X, mouse-Y];

w.show();

 

I want to be able to immediately select the desired option.

check if it is folder

$
0
0

Hi guys ,

 

I tried to check if file with path is Folder item,

its return me true also if it is not folder item,

what I did wrong?

(I am working on PC)

 

 

var MyFolder=new Folder("~/Desktop/test.png");   

 

if(MyFolder.exists){//Return "True" only if it is folder.

     alert("true");

     }else{

         alert("false");

         }


Can't write to The applyStroke attribute

$
0
0

I have several lines of simple code like this:

     var myComp = app.project.activeItem;

     var myLayer = myComp.layer(1);

     myLayer.sourceText.value.applyStroke = true;

     alert(myLayer.sourceText.value.applyStroke);

 

 

However, the applyStroke doesn't work properly, I can read its value, but can't write it. According to the official scripting guide, it's read/write.

         

1.png

But the 3rd line just doesn't work! I wonder why! Is this a bug? !

Hope I've made myself clear.

The sourecRectAtTime() method doesn't work well with stroke

$
0
0

I have two shape layers in my comp. The second layer, which is the pink plate, has expression assigned to its size parameter as below:

     L = thisComp.layer("Shape").sourceRectAtTime(time,true);

     s = 30

     x = L.width-s*4;

     y = L.height-s*4;

     [x,y]

The variable s means the strokeWidth of the shape. In order to get the true size of the shape, I use sourceRectAtTime(time,true) method. But when the shape has a strokeWidth whose value is above 0, I have to deduct four times of the strokeWidth value to get the true size. Why this?

1.png2.png

And when I have mutiple shapes in one shape layer, and they have different strokeWidth, this doesn't work.

3.png

4.png

No matter what I do, I can't get it right. Is there a method that can retrieve the true size of a shape layer including the strokeWidth? I'm going crazy!!!

By the way, the textlayer has the similar problem.

試用期間ではエフェクトは使用できないのですか

$
0
0

エフェクト(時間)グレイアウトして使用できない。

script: add to adobe media encoder

$
0
0

Hello guys!

 

First of all congrats about the new features, and the badass look of After Effects. I really enjoy it!

 

But I'm really disappointed to see that the h264 render function is gone. That really destroyed my workflow   boom!

Because I have a lot of jobs for an event hall, where I'm doing very often 360 degrees projection mappings, and the global resolution there is around 26 000 px width. What we usually do, because we're using watchout as playback system and handling all the projectors, is splitting h264 movies to theirs maximum width resolution. The things is that for example for an event we have around 20 - 30 animations, and 1 animation is split in 6 movies.. What we usually did -  we wrote a small script which splits automatically the movie into 6, pre-compose them all, align them all  and renders all the videos with predefined h264 settings. So .... my question now is.. how can I modify my script and set it to send all the pre-composed, resized, aligned, new comps to Adobe Media Encoder and use a predefined h264 render setting? I couldn't find anywhere more info about the scripting bridge between AE and Media Encoder.

 

Cheers,

Marin

 

PS: I know that we can use Final Cut Pro or Motion to get more resolution from the h264.. but it's kind of workflow that I used to work.. everything happens in one application.. and no annoying hundred times save as, render as etc

Flash player reload video

$
0
0

Hey guys,

 

i am creating a "library" script where I have a bunch of swf videos. And I am having problem with the load function. If I load a video, it plays, everything is cool, but if I try to load another, it wont load over the old one. So now I have a bunch of videos overlapping and have to hide all the rest when I want to load a new one. But something is causing the script time from time to stop working. When I get rid of the flash player, everything works ok, so I guess the problem is with the videos playing over and over and just being hidden.

 

Here is the code:

 

var win = (obj instanceof Panel) ? obj : new Window("palette", "Toolkit", undefined, {resizeable: false});

 

    var previewList= win.add("listbox", undefined, undefined);

        for(var o = 0; o < options.length; o++){

            previewList.add("item", "");

            previewList.items[o].image = File("imagePNG");

            previewList.items[o].id = o;                           

        }

   

    var mainGroup = win.add("group", undefined, undefined);

        mainGroup.orientation = "column";

   

    var flashGroup = mainGroup.add("group", undefined, undefined);

        flashGroup.alignChildren = ['fill', 'fill']

        flashGroup.orientation = "stack";

 

        var players = []

        for(var p = 0; p < options.length; p++){

        

            var player = flashGroup.add("flashplayer", undefined, undefined);

                player.minimumSize = [400, 300];

                player.loadMovie(File("movieSWF"));

                player.hide();

            players.push(player);   

        }

        players[0].show();  

 

        previewList.onChange = function(){   try{

                                                                    for(var p = 0; p <players.length; p++){

                                                                        players[p].hide();

                                                                    }    

                                                                    players[previewList.selection.id].show();

                                                            }catch(err){

                                                                alert(err.toString());

                                                            }   

                                                       };

 

Also, as i have read, Adobe is no longer continuing support of Flash Player in AE from CC 2017, so any other ideas how can i load videos in AE without using flash player? I didn't find any other way for this.

 

Thanks.

Extendscript - Dropdownlist not working in AE

$
0
0

Hey Guys!

 

I'm working on my first script for AE but i'm trying to create a dropdownlist with presets created by the user.

This works in Extendscript but i doesn't in AE

 

Anyone know how to fix this?

 

//Create DropDownList

                myPanel.grp.myPanel10.G1.B3.onClick = function(){

                        myPanel.grp.myPanel10.G1.B2.removeAll(); //removes all dropdownlist items

                        var thisFile = new File($.fileName);

                        var path = thisFile.path+"/XPress%20Presets";

                        var configFolder = Folder(path);

                        var fileList = configFolder.getFiles();

                        for (i = 0; i < fileList.length; i++) {

                            var filePath = fileList[i] + "";

                            fileName1 = filePath.replace(path+"/","");

                            fileName = fileName1.replace("%20"," ");

                            myPanel.grp.myPanel10.G1.B2.add("item",fileName);

                        }

                }

 

Thanks!

How to embed an image into my ExtendScript?

$
0
0

For example, I have a jpg file for my IconButton, I know how to access the image via specifying its file path. But how can I embed it into my script so that I don't need it on my disk while my script works fine ?


how do I apply a pseudo effect to a layer from a script?

$
0
0

Hey guys I have seen a few scripts that apply custom pseudo effects on layers. can anyone help me as to how that was done?

Adobe CEP6 extension CSInterface.prototype.closeExtension() not working

$
0
0

I am trying to use the closeExtension() on a secondary window. However, it doesn't seem to close the window or do anything at all. Am I misunderstanding what this method is supposed to do?

 

CSInterface.js

 

    /** Closes this extension. */

    CSInterface.prototype.closeExtension = function()

    {

        window.__adobe_cep__.closeExtension();

    };

 

Here is a button I've temporarily hardcoded to test it

   $(".closeme").click(function(){

      CSInterface.prototype.closeExtension();

    //  csInterface.closeExtension(); -- I have an instance of CSInterface name csInterface

    });

 

The window maintains all functionality. It's almost as if this method does nothing.

ae 2017 bug in estk

$
0
0

estk tool with ae 2017 would not work correctly

 

estk always return undefinded but with 13.8 it works fine

 

any suggestion?

How to add text animator to text layer in script?

$
0
0

Hello,

 

I'm a beginner in scripting and trying to create a script to apply set of expression control and text animator.

I want to add text animator property to selected layer, however I keep having error with the codes below.

 

selectedLayers[0].Text.Animators.addProperty("ADBE Text Animator");

selectedLayers[0].Text.Animators.addProperty("ADBE Text Position");    //error on this line


What is the correct code?


Thanks a lot.

Adobe CEP License file / key - is it possible to secure extensions?

$
0
0

Sorry for my poor english.

 

I'm working on an extension for Adobe After Effects. I want to secure my whole extension or just the part with jsx script, using some type of license key, license file. I can't find any solutions. I'm not script-expert - rather I'm a person with only a basic knowledge about ExtendScript and CEP Panels.

 

The question is - is it possible to secure extensions to prevent piracy? Can you give me an advice or help me in my project?

 

Thank you in advance.

Viewing all 2143 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>