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

Scrollability in a CEP (non scriptUI) extension

$
0
0

Hello,

 

Our extension is html/angular in an extension window with no ScriptUI functionality included. When some of our panels get "deep", the material gets cut off without any option for a scrollbar. In order to see it, you have to resize the window vertically. I have tried everything I can think of to target the extension window itself even if just to add an overflow-y: scroll value to it, but nothing has worked so far. Has anyone had any experience with this?


How to change size and color of "staticText"??

$
0
0

Can someone plz share how to change size and color of "staticText" object??

 

 

 

function buildUI(thisObj) {

 

var myPanel = (thisObj instanceof Panel) ? thisObj:new Window('palette', 'Stress Reducers',undefined, {resizable: true});

 

var txt=myPanel.add("staticText",[0,0,100,20],"txt");

 

//txt. newFont, fontSize,color?????

 

 

  return myPanel;

 

}

 

 

var myToolsPanel = buildUI(this);

Script cannot set effect property value

$
0
0

I have a layer that has "Dust & Scratches" effect applied.

The layer has several Time Remap keyframes and I am applying this code on that Time Remap property like this ():

 

effect("Dust & Scratches")("Threshold") = 60;

 

But I got error saying "Cannot apply value" - does anyone know why?

Script UI - EditText

$
0
0

Hi friend,

 

I have a script with "EditText" inside, and I want to change

the writing direction (of the default) - from left to right to right-to-left.

 

I can do this manually (by right-clicking on "edittext"),

but I wonder if it is possible to do this with exstenScript code?

system.callSystem with curl gets stopped by firewall

$
0
0

Hi

 

I have created a plugin which uses Gumroads licensing system.

I call the license server like this: system.callSystem('curl https://api.gumroad.com/v2/licenses/verify -d "product_permalink=xxxxxxxxxx" -d "license_key='+licensekey+'" -X POST');

 

This works for most people and also the computers I have tested it on, but I have a couple of users getting stuck with the error "After Effects warning.  ERROR: The system can not find the file specified".

 

I highly suspect this is because it is being stopped by the firewall. Is there anything i could do differently which would make it more firewall friendly?

 

Any suggestions are very welcome.

 

Jakob Wagner

How to change the anchor point of a layer when clicking a button?

$
0
0

Hi, my name is Bram and I'm from the Netherlands. I'm curious how to change the anchor point of a layer to a specified position when clicking a button.

 

I hope someone can help me out with this.

Change Colorama Colors Via Scripting

$
0
0

Observe the following code:

 

mycomp = get_comp_by_name("BACK")
var jj = mycomp.layers[1].property("Effects").addProperty("APC Colorama")
jj.property("Blend With Original").setValue(50)
jj.property("Use Preset Palette").setValue(6)
jj.property("Output Cycle").setValue([6, 8, 10])

 

The first two properties are able to be modified successfully.  However, no matter the argument I give to setValue of the last line (for "Output Cycle"), I always end up with the following error from After Effects:

 

NgSysK6.png

 

Is it possible individually manage every color used in the Output Cycle of Colorama (you are able to with the GUI, so I would hope you could with a script)?  As I demonstrated in the line before, you can change which preset palette you select, but I'm not sure how to change individual colors on the Output Cycle wheel (how many, what color, at what rotation, alpha, etc.)

 

Is it possible to have that level of control for Colorama with After Effects scripting?  If not, what would you suggest as a scriptable alternative to achieve similar effects (mapping grays to different hues)?

How to tell if footageSource is a layer of a file (e.g. a .psd layer or .ai layer)

$
0
0

I want to duplicate a footageSource object, and I'm using something like this:

 

var oldSource = originalLayer.source;
newSource = app.project.importFile(new ImportOptions(oldSource.file));

 

This works fine if the original source is a flat file, like a jpg or movie file, but if it's a layer of a Photoshop image or Illustrator file it imports the whole file instead of just the layer. There doesn't seem to be any way to query a footageSource object to see if it's a layer of a multi-layer file, or not.

 

ImportOptions has an ImportOptions.importAs attribute, which means if I know whether the file is a layer I can specify

 

    ImportAsType.COMP_CROPPED_LAYERS

    ImportAsType.FOOTAGE

    ImportAsType.COMP

    ImportAsType.PROJECT

 

But the import type of a footage source doesn't seem to be part of the footageSource object.


Mysterious PropertyValueType.CUSTOM_VALUE

$
0
0

I've read a discussion started in 2014, stating that you can't access property values of type PropertyValueType.CUSTOM_VALUE. Also, you can't set it. There is pretty much nothing you can do with them.

 

Typical path:

comp.layer(1).property("ADBE Effect Parade").property("ADBE CurvesCustom").property("ADBE CurvesCustom-0001").value;

 

Curves, Levels, Hue and Saturation are the effects (that I know of) that are using this CUSTOM_VALUE. Is extend script still incapable of doing anything with this properties? Is there a way to get a glimps of what they store internally?

Script UI Button with blue color

$
0
0

Hello guys,

 

I have a script with a button (iconbutton), and when the user clicks the button, the button turns blue.

What do I have to do to keep the button always in its color and not turn blue even when pressed?

Adobe software availability

Is it possible to group action without having an undo related .... ?

$
0
0

im writing a CEP panel extension and trying to sync a sourceText keyPoint with a text marker.

When the user changes the text marker I move the sourceText keyPoint so it stays aligned

The problem is doing so generates a lot of undo history.

Is it possible to group actions without having an undo generated ?

Or is there a better way to align a keyPoint sourceText with the value of a text marker?

 

thanks

Mat

Automate Auto-Trace

$
0
0

Hi,

 

I know it's been asked before on various forums but I have still failed to find an answer.

I need to batch process auto-trace on a number of comps so they can be done over night.

 

Using CS6...

I know the auto-trace settings I want to use.

I can save these in the comps comments for retrieval.

So I would loop through each comp and call Auto-Trace, passing it the specified settings for the current comp.

 

I'm new to AE Scripting but have done some for a number of other apps like Max & Maya.

Is this something that can be done with scripting?

If not can it be done via the SDK?

 

Any help greatly appreciated.

Cheers,
Toby

After Effects CC aerender multiple instances error

$
0
0

Hello!

 

I use After Effects CC 2018 (with aerender.exe) on Windows 10.

Because aerender only uses a small amount of my available CPU resources, I would like to start several instances and render simultaneously.

 

To start several instances at once, I wrote a little helper script (node.js).

If I open up cmd and start my script like that, it works perfectly.

 

The big problem is:

I want to run the script in the background with Windows Task Scheduler.

It runs the script in the background with no visible cmd window.

But unfortunately, i always get this error:

 

aerender version 15.1.2x69

aerender version 15.1.2x69

aerender version 15.1.2x69

Using DXGI: Device: "Microsoft Basic Render Driver" has dedicated video RAM (MB): 0

Using DXGI: Device: "Microsoft Basic Render Driver" has dedicated video RAM (MB): 0

Using DXGI: Device: "Microsoft Basic Render Driver" has dedicated video RAM (MB): 0

has video RAM(MB): 0

has video RAM(MB): 0

has video RAM(MB): 0

aerender ERROR: After Effects can not render for aerender. Another instance of aerender, or another script, may be running; or, AE may be waiting for response from a modal dialog, or for a render to complete. Try running aerender without the -reuse flag to invoke a separate instance of After Effects

rendering error

aerender ERROR: After Effects can not render for aerender. Another instance of aerender, or another script, may be running; or, AE may be waiting for response from a modal dialog, or for a render to complete. Try running aerender without the -reuse flag to invoke a separate instance of After Effects

 

In this case, I try to run 3 instances.

It tells me to try to use areender without the -reuse flag, but I haven't used it anyway, so I don't know what the problem is.

 

Only one of the instances works and renders, but the other two don't work.

It's not a problem only with Windows task scheduler, but with every program which lets the

If I run aerender one by one, it works (but of course it takes more time)

Trying to implement a VideoPreview into Script UI using PNGs

$
0
0

Hey there

So i am trying to implement a preview inside my Script. I'm using a technique where i'm updating .pngs in the script UI to create a video.

Unfortunatly it doesn't work that well in AE. I guess there is a problem with the $.sleep() Command in AE. There might be a better & faster way.

If you guys have any ideas I would really appreciate it!

 

 

Here is what I've got so far:

 

ImagePreview();


function ImagePreview (){


var dir = "/g/test/!!_RENDER/";
var imageArray = ['0.png','1.png','2.png','3.png','4.png','5.png','6.png','7.png','8.png','9.png','10.png','11.png','12.png','13.png','14.png','15.png','16.png','17.png','18.png','19.png','20.png','21.png','22.png','23.png','24.png','25.png','26.png','27.png','28.png','29.png','30.png','31.png','32.png','33.png','34.png','35.png','36.png','37.png','38.png','39.png','40.png','41.png','42.png','43.png','44.png','45.png','46.png','47.png','48.png','49.png','50.png'];
var counter = 0;


var images = File(dir+imageArray[counter])
var thumb = File(dir+imageArray[0])






var w = new Window("dialog","ImagePreview");

var ImageGroup = w.add("image",[10,10,281,158],thumb)

var panel = w.add("panel",undefined,"")


var PLAY = panel.add("button",undefined,"play")
var STOP = panel.add("button",undefined,"stop")


panel.orientation = "row";


PLAY.onClick = function(PLAY) {
    for(counter = 0; counter<51; counter++){               $.sleep(25)               updateImage();    }
}

function updateImage(){
     ImageGroup.image = ScriptUI.newImage(File(dir+imageArray[counter]))
}


w.center();
w.show();
}

Is there a maximum size for a Preference created via scripting?

$
0
0

Hello

 

I've developed a script that saves some information to Preferences file when closing AE. A user had this error:

 

"Unable to execute script at line 1. After Effects error: Preference [Settings_colorLibrary] 'saved_library' is 2732 bytes, max allowed is 1999 bytes."

 

Some testing has confirmed this error, as info written to Preferences gets bigger. My question is: Is there a limit to the information I can write to Preferences file? Error message said 2 KB, which is quite low. I had the same problem using bith Mac and Win.

 

Thanks.

system.callSystem() output diferent results onClick()

$
0
0

I'm writing a script that needs to call some Gulp tasks. I'm experiencing an issue with the output of the cmd. I have this code:

 

varpath= (newFile($.fileName)).parent.fsName;

 

path = system.callSystem("cmd.exe /c \"cd "+path+" && cd\"");

 

When I run this code in a blank script the value of path is "C:\Users\myUser\myProject". But when I put this code inside an onClick even, the output changes to: "C:\Users\myUser\myProject\r\n". It makes the following commands  not work. Why is this happening? Is there a workarround to fix it?

How to check if entire text are fit in "addBoxText" layer by scripting

$
0
0

Hi guys. I have an issue, I've added different text to composition from JSON file by "addBoxText" method. But sometimes not everything is visible:

AE_1.png

 

How to let my application to know if not everything is fit that I want.

 

Thanks for the help!

mask to path

$
0
0

how to use code to take the mask applied to one layer and apply it to another layers path between seconds 0-5

Multiselect treeview

$
0
0

According to the documentation, there is no multiselect parameter in the treeview creation properties ,but in the  treeview selection property says that an array of indices can be passed as selection. I tryed that, but only the last index of the array is selected.

 

Is there any way to make the treeview has multiselection, or I would have to make a custom full implementation of the treeview?

Viewing all 2143 articles
Browse latest View live


Latest Images

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