Expressions/Scripts/Presets

Search found 79 matches

by beginUndoGroup
Mon Dec 11, 2017 7:18 am
Forum: Expression Discussion
Topic: Wiggle, how to use the output values?
Replies: 9
Views: 169

Re: Wiggle, how to use the output values?

I had not tried my code when i posted, and i just did: it works for me. The solid animated with this expression moves every second frame, and holds it position otherwise. I don't know why it's not working for you. Side note: Arrays are objects : if a is an array, (typeof a) is : 'object', and (a ins...
by beginUndoGroup
Sun Dec 03, 2017 5:44 am
Forum: Expression Discussion
Topic: Wiggle, how to use the output values?
Replies: 9
Views: 169

Re: Wiggle, how to use the output values?

Try this: if (timeToFrames(time)%2 ==0){     wiggle(12,50);     } else{     wiggle(12,50, 1,0.5, time-0.04);     }; wiggle(freq, amount, octave, multiplier, time); It's a method for properties, and it outputs the same kind of things as the property's value (number, array of numbers, etc). So you can...
by beginUndoGroup
Fri Feb 24, 2017 6:43 am
Forum: Scripts Discussion
Topic: How to update UI apps ?
Replies: 3
Views: 2212

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: 1212

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: 923

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: 1026

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: 1012

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: 1012

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: 1336

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: 2073

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: 2073

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: 1794

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: 1794

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: 1757

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: 1656

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...