Expressions/Scripts/Presets

Search found 77 matches

by beginUndoGroup
Fri Feb 24, 2017 6:43 am
Forum: Scripts Discussion
Topic: How to update UI apps ?
Replies: 3
Views: 1690

Re: How to update UI apps ?

@runegan : you can close a comp this way:

comp.openInViewer();
app.executeCommand(4); // 4 is "Close"

Xavier
by beginUndoGroup
Wed Jan 25, 2017 9:16 am
Forum: Scripts Discussion
Topic: Image sequence array concatenation - need optimization help!
Replies: 1
Views: 683

Re: Image sequence array concatenation - need optimization help!

ExtendScript doesnt like big arrays. Past 500 entries it is getting a bit slow. What it slowing you down is probably the use of sort () and splice(). You dont need the sort() because getFiles() takes the files sorted anyway. And to avoid the splice(), you can push a new array (the final result) inst...
by beginUndoGroup
Sat Jan 07, 2017 11:42 am
Forum: Expression Discussion
Topic: Measure length of curved shape path?
Replies: 1
Views: 355

Re: Measure length of curved shape path?

In an expression context, there is no way.
And in scripting, you can access the control points of a shape path, hence you could calculate its curve length, but you would have to implement that function because After Effects does not provide it.

Xavier
by beginUndoGroup
Fri Dec 02, 2016 12:31 pm
Forum: Scripts Discussion
Topic: Run an explorer windows from After effects
Replies: 7
Views: 442

Re: Run an explorer windows from After effects

For folders, you can simply do:

myFolderObj.execute();

For files, .execute() also exists, but it will do something different (open the file with the default application registered for that type of file).

Xavier
by beginUndoGroup
Wed Nov 30, 2016 2:13 am
Forum: Scripts Discussion
Topic: Camera Auto-Orientation Off
Replies: 8
Views: 376

Re: Camera Auto-Orientation Off

Humm, sorry.
I misstyped the first and copied/pasted endlessly the same mistake.

Xavier
by beginUndoGroup
Tue Nov 29, 2016 1:02 pm
Forum: Scripts Discussion
Topic: Camera Auto-Orientation Off
Replies: 8
Views: 376

Re: Camera Auto-Orientation Off

Use the AutoOrient object:


myCamera.autoOrient = AutoOrient.NO_AUTO_ORIENT;



Other possibilities are :
AutoOrient.ALONG_PATH;
AutoOrient.CAMERA_OR_POINT_OF_INTEREST;
AutoOrient.CHARACTERS_TOWARDS_CAMERA;

(the last one is only for per-character-3D text layers).

Xavier

 
by beginUndoGroup
Thu Aug 11, 2016 1:49 pm
Forum: Script requests
Topic: Mass "Remove Masks" script?
Replies: 2
Views: 773

Re: Mass "Remove Masks" script?

You can try this, it removes all masks blindly (save as .jsx in the ScriptUIPanel folder, restart AE, then launch from the Window menu): this.add("button{text: 'remove all masks'}").onClick = function(){ var comp = app.project.activeItem; if (!comp || comp.typeName !== "Composition&qu...
by beginUndoGroup
Tue Jul 05, 2016 11:00 am
Forum: Scripts Discussion
Topic: Treeview multiselect?
Replies: 5
Views: 1185

Re: Treeview multiselect?

Hi again, i tried my suggestion and you right, it doesnt work.
From the ScriptUI object model viewer in ESTK, treeviews creation properties do not include "multiselect" (listboxes do), so it might very well be that they are not supposed to accept multiple selections...

Xavier
by beginUndoGroup
Mon Jul 04, 2016 5:23 am
Forum: Scripts Discussion
Topic: Treeview multiselect?
Replies: 5
Views: 1185

Re: Treeview multiselect?

You need to specify "multiselect: true" in the properties object of the treeview: myTree = myGroup.add("treeview{properties:{multiselect: true}}"); or : myTree = myGroup.add("treeview", undefined, undefined, {multiselect: true}); (it must be specified upon creation and ...
by beginUndoGroup
Mon May 16, 2016 2:50 am
Forum: Scripts Discussion
Topic: Dialog UI to palette
Replies: 3
Views: 1204

Re: Dialog UI to palette

To make requests you can use this form: http://www.adobe.com/products/wishform.html

But i doubt that, in that very case, Adobe will change anything.
by beginUndoGroup
Sun May 15, 2016 1:56 am
Forum: Scripts Discussion
Topic: Dialog UI to palette
Replies: 3
Views: 1204

Re: Dialog UI to palette

I may be mistaken, but from the name of the window you want to create it seems that it would be an auxiliary window for a main script. If so, then it's not possible. Dockable scripts are special in that the 'this' object at the entry point of the script is already a graphical container (empty panel)...
by beginUndoGroup
Sat Feb 20, 2016 4:06 am
Forum: Scripts Discussion
Topic: Checkboxes and a button in the palette window
Replies: 2
Views: 1281

Re: Checkboxes and a button in the palette window

The button1.onClick must collect the current checkboxes values: var myWin = new Window("palette", "My Window", undefined); myWin.orientation = "row"; var groupOne = myWin.add("group", undefined, "GroupOne"); groupOne.orientation = "column";...
by beginUndoGroup
Sat Nov 07, 2015 1:56 am
Forum: Scripts Discussion
Topic: Copy Effect with Parameters
Replies: 2
Views: 1119

Re: Copy Effect with Parameters

It's not easy, and even if you write a decent function that does it, it will frequently generate errors due to properties for which script cannot read/set values, like curves, histogram, etc: all properties that have propertyValueType: CUSTOM_VALUE or NO_VALUE. A workaround it to use the menu comman...
by beginUndoGroup
Thu Nov 05, 2015 8:41 am
Forum: Scripts Discussion
Topic: ScriptUI Panel update or redraw graphics
Replies: 3
Views: 1365

Re: ScriptUI Panel update or redraw graphics

Ok cool.

Be aware that with this "method", onDraw will be called twice, so i'd rather put the ctr increment part somewhere else than in the onDraw function itself.
by beginUndoGroup
Tue Nov 03, 2015 10:27 am
Forum: Scripts Discussion
Topic: ScriptUI Panel update or redraw graphics
Replies: 3
Views: 1365

Re: ScriptUI Panel update or redraw graphics

You can try this: win.ctl_button1.onClick = function(){ var s = win.ctl_group1.size; win.ctl_group1.size=[s[0], s[1]+1]; win.ctl_group1.size=[s[0], s[1]]; }; For me it works, but it might not for you. If you want more info, check the Adobe scripting forum for InDesign with keywords "onDraw"...