Search found 705 matches

by Paul Tuersley
November 26th, 2013, 8:08 am
Forum: Scripts Discussion
Topic: launch a preset bug
Replies: 9
Views: 16951

Re: launch a preset bug

Have you tried applying the preset manually to check it works ok?

Paul
by Paul Tuersley
November 26th, 2013, 6:57 am
Forum: Scripts Discussion
Topic: launch a preset bug
Replies: 9
Views: 16951

Re: launch a preset bug

That code doesn't hook up what you select in the dialog to what you apply as the preset. Does it write true or false into your ESTK console? This will tell you if your path in the code is pointing to a correct file. If not, swap it with the path that gets written to the console after the File.open d...
by Paul Tuersley
November 26th, 2013, 4:30 am
Forum: Scripts Discussion
Topic: launch a preset bug
Replies: 9
Views: 16951

Re: launch a preset bug

It worked ok for me. Are you getting any errors? Is the debugger enabled in the prefs? Maybe the file path is incorrect? Here's some code you can try: var thePreset = File.openDialog("Locate the preset"); $.writeln(thePreset.fsName); var presetPath = ("C:\Program Files\Adobe\Adobe Aft...
by Paul Tuersley
November 16th, 2013, 8:24 am
Forum: Scripts Discussion
Topic: Update a panel from a drop down list
Replies: 1
Views: 7143

Re: Update a panel from a drop down list

For some reason that script isn't ever adding the elements when I test it on AE CC 12 Mac. But I was getting errors on the remove line, so maybe you didn't have the debugger turned on in the general prefs and just weren't aware the script was failing at that point. It failed first if there was no ch...
by Paul Tuersley
November 13th, 2013, 2:52 am
Forum: Scripts Discussion
Topic: parsing layer names
Replies: 4
Views: 10501

Re: parsing layer names

It's not so much that the +i doesn't work, it's just that your logic is wrong in that it will only work if layer 1 is named "Controlleur Bounce1", layer 2 is called "Controlleur Bounce2" etc You can used .indexOf to see if a string contains what you're looking for. It returns the...
by Paul Tuersley
November 11th, 2013, 6:43 pm
Forum: Scripts Discussion
Topic: parsing layer names
Replies: 4
Views: 10501

Re: parsing layer names

Aren't you getting this error message in the ESTK?
"After Effects error: Value 0 out of range 1 to ..."

That should give you a clue. Layer indexes start from 1. So you'd need:
for (var i = 1; i <= curComp.numLayers; i++) {

Paul
by Paul Tuersley
November 8th, 2013, 3:42 am
Forum: Scripts Discussion
Topic: Ultra simple script (but failed....)
Replies: 8
Views: 15651

Re: Ultra simple script (but failed....)

currentComp.width
currentComp.height
by Paul Tuersley
November 8th, 2013, 1:55 am
Forum: Scripts Discussion
Topic: Dockable UI panel
Replies: 4
Views: 20904

Re: Dockable UI panel

The important line was: myPanel.layout.layout(true); This invokes the automatic layout manager. I believe the reason it worked ok when run as a window (i.e. from File > Run Script or run from ESTK) is that this happens automatically when "show()" is used, but in the case of a panel it need...
by Paul Tuersley
November 8th, 2013, 1:49 am
Forum: Scripts Discussion
Topic: Ultra simple script (but failed....)
Replies: 8
Views: 15651

Re: Ultra simple script (but failed....)

As a little tip, you know from the error message that it must be either the effect object or the effect' property that is causing the error. In this case, to debug I would insert a couple of lines like this to try to narrow down the error. $.writeln(effetParticular.name); $.writeln(effetParticular.p...
by Paul Tuersley
November 8th, 2013, 1:10 am
Forum: Scripts Discussion
Topic: Ultra simple script (but failed....)
Replies: 8
Views: 15651

Re: Ultra simple script (but failed....)

I haven't tested this but it's possibly losing the connection to the Particular effect object stored in the variable effetParticular when the second effect is added. This kind of thing is unfortunately quite common in scripting. Try reassigning the variable again after you've added the other effect:...
by Paul Tuersley
November 7th, 2013, 3:42 pm
Forum: Scripts Discussion
Topic: Dockable UI panel
Replies: 4
Views: 20904

Re: Dockable UI panel

Try this. It also shows a couple of ways of assigning functions to button clicks. Paul { function myScript(thisObj){ function myScript_buildUI(thisObj){ var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "AK_toolkit_V01", undefined, {resizeable:true}); res...
by Paul Tuersley
November 7th, 2013, 3:29 pm
Forum: Scripts Discussion
Topic: Ultra simple script (but failed....)
Replies: 8
Views: 15651

Re: Ultra simple script (but failed....)

Well for me it failed because I don't have Particular installed.
Have you gone into Preferences > General and turned on Enable Javascript Debugger? What error message do you get?

Paul
by Paul Tuersley
October 15th, 2013, 2:47 pm
Forum: Scripts Discussion
Topic: Add a Slider and an Expression to the selected Properties?
Replies: 4
Views: 12574

Re: Add a Slider and an Expression to the selected Propertie

var activeItem = app.project.activeItem; if (activeItem != null && activeItem instanceof CompItem) { if (activeItem.selectedLayers.length != 1 || activeItem.selectedProperties.length != 1) { alert("You need to select one property first."); } else { var theProp = activeItem.selecte...
by Paul Tuersley
October 10th, 2013, 1:11 pm
Forum: Scripts Discussion
Topic: Need help setting up a UI
Replies: 1
Views: 7260

Re: Need help setting up a UI

You spelt column wrong on the first line.

Also, I've no idea what alignment:['bottom', 'top'] will do. The first value should indicate the horizontal behaviour, so left, right, center or fill.

Paul
by Paul Tuersley
October 1st, 2013, 5:00 pm
Forum: Scripts Discussion
Topic: Control Separate Dimensions
Replies: 2
Views: 8494

Re: Control Separate Dimensions

Normally you would access a property by specifying its full property group path, but there's a shortcut for the regular transform properties where you can access them directly from the layer item. This doesn't appear to be the case for the separate dimension versions. So: layer.property("Transf...