Search found 705 matches

by Paul Tuersley
March 19th, 2014, 4:39 am
Forum: Scripts Discussion
Topic: writeln using non-English characters
Replies: 1
Views: 7679

Re: writeln using non-English characters

This seems to work ok. Paul var presetFile = File.saveDialog("Select a file..."); presetFile.encoding = "UTF-8"; presetFile.open("w","TEXT","????"); var english = "A"; var chinese = "喜"; writeTestEnglish = presetFile.writeln(eng...
by Paul Tuersley
March 19th, 2014, 4:34 am
Forum: Scripts Discussion
Topic: how to make arrayOfValues parameter for setValuesAtTimes?
Replies: 13
Views: 31818

Re: how to make arrayOfValues parameter for setValuesAtTimes

Setting Mask Path keyframes/values are a bit different from setting other property values. In your example you only had what appeared to be an array of Position values rather than vertices, so for this example I'm pretending they are supposed to be the 4 vertices for a mask shape and I'm applying th...
by Paul Tuersley
March 19th, 2014, 4:12 am
Forum: General Scripts Library
Topic: Capture what is done inside of After Effects ?
Replies: 1
Views: 19020

Re: Capture what is done inside of After Effects ?

There is no ability to do this in After Effects.
This is something other people have requested though. You can add your support for this feature to be added here:
https://www.adobe.com/cfusion/mmform/in ... e=wishform
by Paul Tuersley
February 26th, 2014, 9:11 am
Forum: Script requests
Topic: Select all abobe/below layers
Replies: 9
Views: 35702

Re: Select all abobe/below layers

Because you're now going down the layers instead of up you need to stop when you pass the last layer index, not the first. So the 'while' line should be:

Code: Select all

while (selectedIndex <= activeItem.numLayers) {
by Paul Tuersley
January 27th, 2014, 5:18 pm
Forum: Scripts Discussion
Topic: Get all parent folders to project root
Replies: 3
Views: 10655

Re: Get all parent folders to project root

For your first question, I don't think there isn't an easier way to get the folder path than looping through the parentFolder. That's what I would do. The only way I can think of finding the item index in the folder is to loop through the folder items and compare to your existing item to find a matc...
by Paul Tuersley
January 24th, 2014, 9:53 am
Forum: Expression Discussion
Topic: Connecting In/Out Points with time remap
Replies: 7
Views: 21233

Re: Connecting In/Out Points with time remap

Yeah I wasn't totally sure what you wanted. An expression can't actually alter the in/out points of a layer but you could have an Opacity expression to give the same effect: i = thisComp.layer("Layer 1").inPoint; o = thisComp.layer("Layer 1").outPoint; if (time < i || time > o) 0...
by Paul Tuersley
January 22nd, 2014, 6:31 am
Forum: Expression Discussion
Topic: Connecting In/Out Points with time remap
Replies: 7
Views: 21233

Re: Connecting In/Out Points with time remap

Try this expression on the time remap property:

Code: Select all

i = thisComp.layer("Layer 1").inPoint;
o = thisComp.layer("Layer 1").outPoint;
linear(time, i, o, thisLayer.inPoint, thisLayer.outPoint);
by Paul Tuersley
January 22nd, 2014, 1:31 am
Forum: Expression Discussion
Topic: dynamic on/off layer hide
Replies: 2
Views: 14912

Re: dynamic on/off layer hide

If you add a null layer called "Opacity Controller" and an expression control "Checkbox Control" effect to it, you can use this expression on your other layers' Opacity properties in that comp. check = thisComp.layer("Opacity Controller").effect("Checkbox Control&q...
by Paul Tuersley
January 22nd, 2014, 1:21 am
Forum: Expression Discussion
Topic: Wiggle on Top of a Wiggle... Starting From Initial Position
Replies: 2
Views: 9549

Re: Wiggle on Top of a Wiggle... Starting From Initial Posit

The main problem with your expression is that you're adding "value" three times. "value" represents the pre-expression value of the property. Each of the pairs of wiggles are cancelling themselves out on frame 1 to equal [0,0] so then you just need to add "value" once t...
by Paul Tuersley
December 11th, 2013, 7:22 pm
Forum: Script requests
Topic: Numbered Adjustment Layers
Replies: 1
Views: 8393

Re: Numbered Adjustment Layers

Here are a couple of methods. There are probably more efficient ways to do it. This one will name a new adjustment layer 1 higher than the current highest: { var activeItem = app.project.activeItem; if (activeItem == null || !(activeItem instanceof CompItem)){ alert("Please establish a comp as ...
by Paul Tuersley
December 2nd, 2013, 4:38 pm
Forum: Scripts Discussion
Topic: Check if selection is a project item or a layer
Replies: 7
Views: 17877

Re: Check if selection is a project item or a layer

I haven't tested it but something like this:

var compActive = false;
var numlayers = activeItem.numlayers;
// try adding null here
if (activeItem.numLayers > numlayers) {
compActive = true;
activeItem.layer(1).remove();
}
by Paul Tuersley
December 2nd, 2013, 5:01 am
Forum: Scripts Discussion
Topic: Check if selection is a project item or a layer
Replies: 7
Views: 17877

Re: Check if selection is a project item or a layer

I think you mean the activeViewer stuff. I did have a look at this when coming up with a response for you. You can check for app.activeViewer.active and find the activeViewer.type but this only covers Comp, Footage and Layer windows. activeViewer.active returns false if either the project or timelin...
by Paul Tuersley
December 1st, 2013, 5:52 pm
Forum: Scripts Discussion
Topic: Check if selection is a project item or a layer
Replies: 7
Views: 17877

Re: Check if selection is a project item or a layer

This is a bit tricky because activeItem can either represent the comp that is currently active, or an item in the project panel if that is active and selected. In the second case, activeItem returns null if multiple items are selected in the project panel, so then you would have to loop through app....
by Paul Tuersley
November 26th, 2013, 2:54 pm
Forum: Scripts Discussion
Topic: launch a preset bug
Replies: 9
Views: 16951

Re: launch a preset bug

Hmm. I've been testing this in AE CC but just tried CS6 (all on Mac) and it worked. I realise you're on Windows though. Have you tried it with other presets, such as the built-in Adobe ones? The only thing I can think of is that it's something about the preset. It uses some effect that isn't install...
by Paul Tuersley
November 26th, 2013, 8:40 am
Forum: Scripts Discussion
Topic: launch a preset bug
Replies: 9
Views: 16951

Re: launch a preset bug

Yes it works fine for me. Of course I can't recreate exactly what you're doing. I'm using one of the included Adobe presets to test it. I created a comp with two solids, selected them both then ran the script. I did it both with a modified presetPath and by changing the last line to use the myPreset...