Expressions/Scripts/Presets

Search found 75 matches

by beginUndoGroup
Sat Jan 07, 2017 11:42 am
Forum: Expression Discussion
Topic: Measure length of curved shape path?
Replies: 1
Views: 37

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

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

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

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

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

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

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

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

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

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

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

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

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"...
by beginUndoGroup
Mon Nov 02, 2015 2:36 pm
Forum: Scripts Discussion
Topic: edittext scrollable
Replies: 1
Views: 730

Re: edittext scrollable

I couldnt make it work too, but an edit text with properties: readonly true works, and has more or less the same effect

.add ('edittext', undefined,'',{multiline: true, readonly: true});

Xavier.
by beginUndoGroup
Thu Oct 22, 2015 6:29 am
Forum: Scripts Discussion
Topic: How to check if an effect is missing
Replies: 6
Views: 1531

Re: How to check if an effect is missing

Yes you're right it doesnt work.
I also tried Dan's idea but there are many entries without a category in the app.effects array so it cannot be a test.
But it's possible to do it as you pointed out.
Maybe that info is hidding somewhere in the app.project.xmpPacket. Who knows.