Search found 86 matches

by vidpat
June 22nd, 2006, 2:51 pm
Forum: General Scripts Library
Topic: Volumetric Light
Replies: 4
Views: 20313

Thanks Paul. I believe I have updated the script in a way where it should now work in 6.5 and 7.0. If there are still problems, please let me know.

In general, I would welcome any feedback or suggestions on this or any other scripts I have posted.
by vidpat
June 21st, 2006, 6:20 pm
Forum: General Scripts Library
Topic: Volumetric Light
Replies: 4
Views: 20313

I don't have AE7, so I can't be certain that it works there. However, if you could describe the problem, something may come to mind.

I'd be happy to help as best I can. If someone has updated it for AE7 or knows what I may need to change (possibly layer type detection?), please let me know.
by vidpat
June 1st, 2006, 1:02 pm
Forum: Scripts Discussion
Topic: string variable to int
Replies: 2
Views: 7768

Try this:

Code: Select all

var number1 = "008";

var integer1 = parseInt(number1);
by vidpat
May 11th, 2006, 4:49 pm
Forum: Script requests
Topic: 4th Corner - Tracking
Replies: 2
Views: 8535

I was working on a script (setting up expressions) that did something similar, but had to put it aside. I think that it is possible. However, the problem is that, due to projection of points to the plane, there will be multiple solutions to the system of equations that govern the relationship among ...
by vidpat
April 20th, 2006, 2:27 pm
Forum: Expression Discussion
Topic: light transmission
Replies: 2
Views: 8486

It should be possible to automate the double-sided flip if you were to put the source for both sides in a precomp, end to end. Then, using Time Remapping, have an expression that advances the time into the next source when the layer's normal is facing away from the camera. That wouldn't work so well...
by vidpat
April 20th, 2006, 9:28 am
Forum: Scripts Discussion
Topic: reading and writing hex (reading a quicktime file)
Replies: 1
Views: 6482

The file is probably binary. It is just represented in hex for convenience by the hex editor. Setting the mode to binary when opening the file, and the encoding property when writing, should do what you need it to do. Of course, you'll have to know how the binary data should be interpreted and the b...
by vidpat
March 27th, 2006, 12:12 pm
Forum: Scripts Discussion
Topic: precompose function is undefined? what the?
Replies: 4
Views: 11030

I think I understand what you are saying. For nested comps, that is how it appears in the UI. However, thing are a bit more complicated internally, which is reflected in the scripting API. A nested comp is just an instance of the comp item (think of it in the Project Window), which itself owns a Lay...
by vidpat
March 26th, 2006, 12:32 pm
Forum: Scripts Discussion
Topic: precompose function is undefined? what the?
Replies: 4
Views: 11030

precompose() is a method of LayerCollection. In the first post, newChosenLayer is set to the result of <LayerCollection>.byName(), which is a Layer object. Thus, you are calling precompose() on a Layer, not a LayerCollection, hence the error. In the second post: Although selectedLayers represents a ...
by vidpat
March 19th, 2006, 12:51 pm
Forum: Expression Discussion
Topic: Min/Max value
Replies: 6
Views: 23743

To make sure a value is within a certain range, you could use a conditional statement or a combination of the min() and max() functions. Any of the following approaches are equivalent. var temp = thisComp.layer("Amplitude audio").effect("Les deux couches")("Curseur"); v...
by vidpat
March 18th, 2006, 11:03 am
Forum: Scripts Discussion
Topic: Favorite methods for UI development?
Replies: 6
Views: 12293

The UI implementation, at least in 6.5, really isn't great. I don't know if this is to what you are referring, zold, but (on Windows) I've noticed two problems: Controls that overlap initially appear stacked in the order that they were instantiated. For example, in my UIChooser, any buttons or contr...
by vidpat
March 4th, 2006, 12:20 am
Forum: Scripts Discussion
Topic: Default directory
Replies: 3
Views: 9394

You could always stick the path in a variable and concatenate it with the file name, as needed:

Code: Select all

var cwd = "C:\\temp\\scripts\\";

// ...

f = file(cwd + "sample.txt");
by vidpat
February 10th, 2006, 12:43 pm
Forum: Scripts Discussion
Topic: Text layer / mask size
Replies: 10
Views: 17596

I think the plug-in in question is the one that I wrote a while back. See http://www.aenhancers.com/viewtopic.php?t=150 . Due to the limitations of the effects API, it had some odd behavior. I'm not sure it will provide the information you need to a script, since it calculates the bounding box when ...
by vidpat
February 9th, 2006, 2:01 pm
Forum: Scripts Discussion
Topic: Text layer / mask size
Replies: 10
Views: 17596

Well, as with most things involving Text Layers, there doesn't seem to be a way to convert the text via script (at least as of 6.5). Of course, there may be some undocumented method. You would still need to split your script in two. However, I think it would be easier to just convert all of the Text...
by vidpat
February 9th, 2006, 1:04 pm
Forum: Scripts Discussion
Topic: Text layer / mask size
Replies: 10
Views: 17596

If it would be acceptable and practical for your purposes to convert the text to paths, you could find the bounding box of all of the resulting masks. Of course, the text would no longer be character-editable and Text Animators would not work.
by vidpat
January 26th, 2006, 2:30 pm
Forum: Scripts Discussion
Topic: variables defined globally
Replies: 3
Views: 9560

A compound statement (putting braces around a block of code) does not limit the scope of variables in JavaScript, as it does in most languages. Only function (object) definitions limit the scope of variables declared within them. Of course, closures can be formed, too. Garbage collection won't erase...